[Freeswitch-svn] [commit] r8588 - freeswitch/trunk

Freeswitch SVN stkn at freeswitch.org
Sat May 24 20:52:38 EDT 2008


Author: stkn
Date: Sat May 24 20:52:37 2008
New Revision: 8588

Modified:
   freeswitch/trunk/configure.in

Log:
Fix libpython detection in non-standard locations

Modified: freeswitch/trunk/configure.in
==============================================================================
--- freeswitch/trunk/configure.in	(original)
+++ freeswitch/trunk/configure.in	Sat May 24 20:52:37 2008
@@ -540,6 +540,15 @@
 			PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print \" \".join(flags);'`"
 			PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print \" \".join(libs);'`"
 			PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print \"python\" + sysconfig.get_config_var(\"VERSION\");'`"
+			PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var(\"LIBDIR\");'`"
+
+			# handle python being installed into /usr/local
+			AC_MSG_CHECKING([python libdir])
+			if test -z "`echo $PYTHON_LIBDIR | grep "/usr/lib"`" ; then
+				PYTHON_LDFLAGS="-L$PYTHON_LIBDIR $PYTHON_LDFLAGS"
+				LIBS="-L$PYTHON_LIBDIR $LIBS"
+			fi
+			AC_MSG_RESULT([$PYTHON_LIBDIR])
 
 			# check libpython
 			AC_CHECK_LIB([$PYTHON_LIB], [main], [has_libpython="yes"], [has_libpython="no"])



More information about the Freeswitch-svn mailing list