diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/Makefile.am | 1 | ||||
-rw-r--r-- | m4/as-compiler-flag.m4 | 33 | ||||
-rw-r--r-- | m4/python.m4 | 17 |
3 files changed, 3 insertions, 48 deletions
diff --git a/m4/Makefile.am b/m4/Makefile.am deleted file mode 100644 index 31484fa4..00000000 --- a/m4/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST=as-compiler-flag.m4 diff --git a/m4/as-compiler-flag.m4 b/m4/as-compiler-flag.m4 deleted file mode 100644 index aba31b1c..00000000 --- a/m4/as-compiler-flag.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl as-compiler-flag.m4 0.1.0 - -dnl autostars m4 macro for detection of compiler flags - -dnl David Schleef <ds@schleef.org> - -dnl $Id: as-compiler-flag.m4,v 1.1 2004/06/01 09:33:45 thomasvs Exp $ - -dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) -dnl Tries to compile with the given CFLAGS. -dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, -dnl and ACTION-IF-NOT-ACCEPTED otherwise. - -AC_DEFUN([AS_COMPILER_FLAG], -[ - AC_MSG_CHECKING([to see if compiler understands $1]) - - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $1" - - AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) - CFLAGS="$save_CFLAGS" - - if test "X$flag_ok" = Xyes ; then - $2 - true - else - $3 - true - fi - AC_MSG_RESULT([$flag_ok]) -]) - diff --git a/m4/python.m4 b/m4/python.m4 index 74ac6ee9..ed5559da 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -43,14 +43,7 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS], [AC_REQUIRE([AM_PATH_PYTHON]) AC_MSG_CHECKING(for headers required to compile python extensions) dnl deduce PYTHON_INCLUDES -py_prefix=`$PYTHON -c "import sys; print sys.prefix"` -py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` -if test "x$PYTHON_INCLUDES" == x; then - PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" - if test "$py_prefix" != "$py_exec_prefix"; then - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" - fi -fi +PYTHON_INCLUDES=`$PYTHON-config --includes` AC_SUBST(PYTHON_INCLUDES) dnl check if the headers exist: save_CPPFLAGS="$CPPFLAGS" @@ -70,14 +63,10 @@ AC_DEFUN([AM_CHECK_PYTHON_LIBS], [AC_REQUIRE([AM_CHECK_PYTHON_HEADERS]) AC_MSG_CHECKING(for libraries required to link against libpython) dnl deduce PYTHON_LIBS -if test "x$PYTHON_LIBS" == x; then - PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}" -fi -if test "x$PYTHON_LIB_LOC" == x; then - PYTHON_LIB_LOC="${py_prefix}/lib" +if test "x$PYTHON_LIBS" = x; then + PYTHON_LIBS=`$PYTHON-config --ldflags --libs` fi AC_SUBST(PYTHON_LIBS) -AC_SUBST(PYTHON_LIB_LOC) dnl check if libpython exist: save_LIBS="$LIBS" LIBS="$LIBS $PYTHON_LIBS" |