summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-12-04 09:30:49 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-12-04 09:30:49 +0000
commit9b6dbc4beb09e134a78c1068df296fb33e11cb99 (patch)
treef2650988bc0785eb561a4dbff78eaca86ed2ba51 /configure.ac
parent5b87a648d9b964f5a8bf8cd0e5731cb78e70e4b2 (diff)
downloadgpsd-9b6dbc4beb09e134a78c1068df296fb33e11cb99.tar.gz
Remove some configure.ac complexity.
All regression tests pass.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac77
1 files changed, 33 insertions, 44 deletions
diff --git a/configure.ac b/configure.ac
index 546f7a3a..9a801df0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,54 +49,43 @@ if test "x$ac_python" = "xyes"; then
PYTHON_VERSION="${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
AC_MSG_RESULT([$PYTHON, $PYTHON_VERSION, $PYTHON_PREFIX])
- AC_MSG_CHECKING(whether Python is at least 2.6)
- if test $PYTHON_VERSION_MAJOR -lt 2 -o $PYTHON_VERSION_MAJOR -eq 2 -a $PYTHON_VERSION_MINOR -lt 6; then
- AC_MSG_RESULT(no)
- AC_MSG_WARN([*** GPSD requires at least Python 2.6, Python support disabled.])
- ac_python=no
- fi
+ PYTHON_CFLAGS="-DHAVE_PYTHON -I$PYTHON_PREFIX/include/python$PYTHON_VERSION"
+
+ OLD_CPPFLAGS="$CPPFLAGS"
+ OLD_CXXFLAGS="$CXXFLAGS"
+ CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $PYTHON_CFLAGS"
+
+ AC_CHECK_HEADERS([Python.h],
+ [],
+ [AC_MSG_WARN([*** Python include files not found! You should install the Python development package. Python support disabled]); ac_python=no])
+ CPPFLAGS="$OLD_CPPFLAGS"
+ CXXFLAGS="$OLD_CXXFLAGS"
+
if test "x$ac_python" = "xyes"; then
- AC_MSG_RESULT(yes)
-
- PYTHON_CFLAGS="-DHAVE_PYTHON -I$PYTHON_PREFIX/include/python$PYTHON_VERSION"
-
- OLD_CPPFLAGS="$CPPFLAGS"
- OLD_CXXFLAGS="$CXXFLAGS"
- CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
- CXXFLAGS="$CXXFLAGS $PYTHON_CFLAGS"
-
- AC_CHECK_HEADERS([Python.h],
- [],
- [AC_MSG_WARN([*** Python include files not found! You should install the Python development package. Python support disabled]); ac_python=no])
- CPPFLAGS="$OLD_CPPFLAGS"
- CXXFLAGS="$OLD_CXXFLAGS"
-
- if test "x$ac_python" = "xyes"; then
- AC_SUBST([PYTHON_CFLAGS])
-
- ac_python=no
- for pylibpath in '/usr/lib' $PYTHON_PREFIX/lib $PYTHON_PREFIX/lib/python$PYTHON_VERSION/config; do
- eval `echo unset ac_cv_lib_python$PYTHON_VERSION'___'Py_Finalize | tr '.' '_'`
-
- save_LIBS=$LIBS
- LIBS="$LIBS -L$pylibpath $PYTHON_LIBS"
- AC_CHECK_LIB(python$PYTHON_VERSION, Py_Finalize, PYTHON_LIBS="-L$pylibpath -lpython$PYTHON_VERSION $PYTHON_DEPS"; ac_python=yes,,$PYTHON_DEPS)
- LIBS=$save_LIBS
- if test "x$ac_python" = "xyes"; then
- break
- fi
- done
-
- if test "x$ac_python" != "xyes"; then
- AC_MSG_WARN(*** Python development libraries required, Python support disabled)
- fi
- AC_SUBST([PYTHON_LIBS])
+ AC_SUBST([PYTHON_CFLAGS])
- AC_SUBST(pkgpythondir)
- if test "x$python_install" = "xyes"; then
- pkgpythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION"/site-packages/gpsd"
+ ac_python=no
+ for pylibpath in '/usr/lib' $PYTHON_PREFIX/lib $PYTHON_PREFIX/lib/python$PYTHON_VERSION/config; do
+ eval `echo unset ac_cv_lib_python$PYTHON_VERSION'___'Py_Finalize | tr '.' '_'`
+
+ save_LIBS=$LIBS
+ LIBS="$LIBS -L$pylibpath $PYTHON_LIBS"
+ AC_CHECK_LIB(python$PYTHON_VERSION, Py_Finalize, PYTHON_LIBS="-L$pylibpath -lpython$PYTHON_VERSION $PYTHON_DEPS"; ac_python=yes,,$PYTHON_DEPS)
+ LIBS=$save_LIBS
+ if test "x$ac_python" = "xyes"; then
+ break
fi
+ done
+
+ if test "x$ac_python" != "xyes"; then
+ AC_MSG_WARN(*** Python development libraries required, Python support disabled)
+ fi
+ AC_SUBST([PYTHON_LIBS])
+ AC_SUBST(pkgpythondir)
+ if test "x$python_install" = "xyes"; then
+ pkgpythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION"/site-packages/gpsd"
fi
fi
fi