summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4ad7200)
raw | patch | inline | side by side (parent: 4ad7200)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 7 Aug 2016 11:10:14 +0000 (13:10 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 7 Aug 2016 13:05:10 +0000 (15:05 +0200) |
python-config --ldflags returns -lpython (yeah I know)
autoconf prepends ldflags in its configuration tests
so conftest.c will never look for symbols in -lpython.
python-config --libs also returns -lpython, but this is appended.
autoconf prepends ldflags in its configuration tests
so conftest.c will never look for symbols in -lpython.
python-config --libs also returns -lpython, but this is appended.
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index da332a9f76f6d0acd5a7e63ee66a843af9ccf3fc..1bc02bc15098da90be74a43ad76604ee4f258a0b 100644 (file)
--- a/configure.ac
+++ b/configure.ac
# --with-libpython {{{
AC_ARG_VAR([LIBPYTHON_CPPFLAGS], [Preprocessor flags for libpython])
AC_ARG_VAR([LIBPYTHON_LDFLAGS], [Linker flags for libpython])
+AC_ARG_VAR([LIBPYTHON_LIBS], [Libraries for libpython])
AC_ARG_WITH([libpython],
[AS_HELP_STRING([--with-libpython],
if test $? -ne 0; then
with_libpython="no"
fi
+ LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs`"
+ if test $? -ne 0; then
+ with_libpython="no"
+ fi
fi
if test "$with_libpython" != "xno"; then
SAVE_CPPFLAGS="$CPPFLAGS"
SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CPPFLAGS="$LIBPYTHON_CPPFLAGS $CPPFLAGS"
LDFLAGS="$LIBPYTHON_LDFLAGS $LDFLAGS"
+ LIBS="$LIBPYTHON_LIBS $LIBS"
AC_CHECK_HEADERS([Python.h],
[
AC_MSG_CHECKING([for libpython])
)
CPPFLAGS="$SAVE_CPPFLAGS"
LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
# }}} --with-libpython