Ticket #36220: patch-m4-m4-ax_python_devel.m4.diff
File patch-m4-m4-ax_python_devel.m4.diff, 2.0 KB (added by Tom.Schoonjans@…, 12 years ago) |
---|
-
m4/m4-ax_python_devel.m4
old new 232 232 # credits goes to momjian, I think. I'd like to put the right name 233 233 # in the credits, if someone can point me in the right direction... ? 234 234 # 235 if test -n "$ac_python_libdir" -a -n "$ac_python_library" \ 236 -a x"$ac_python_library" != x"$ac_python_soname" 237 then 235 #echo "ac_python_libdir: x$ac_python_libdirx" 236 #echo "ac_python_library: x$ac_python_libraryx" 237 #echo "ac_python_soname: x$ac_python_sonamex" 238 #if test -n "$ac_python_libdir" -a -n "$ac_python_library" \ 239 # -a x"$ac_python_library" != x"$ac_python_soname" 240 #then 238 241 # use the official shared library 239 242 ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"` 240 PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"241 else242 # old way: use libpython from python_configdir243 ac_python_libdir=`$PYTHON -c \244 "from distutils.sysconfig import get_python_lib as f; \245 import os; \246 print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`247 243 PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version" 248 fi 244 #else 245 # # old way: use libpython from python_configdir 246 # ac_python_libdir=`$PYTHON -c \ 247 # "from distutils.sysconfig import get_python_lib as f; \ 248 # import os; \ 249 # print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"` 250 # PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version" 251 #fi 249 252 250 253 if test -z "PYTHON_LDFLAGS"; then 251 254 AC_MSG_WARN([ … … 290 293 if test -z "$PYTHON_EXTRA_LIBS"; then 291 294 PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ 292 295 conf = distutils.sysconfig.get_config_var; \ 293 print (conf('LOCALMODLIBS') + ' ' + conf('L IBS'))"`296 print (conf('LOCALMODLIBS') + ' ' + conf('LDFLAGS') + ' ' + conf('LIBS'))"` 294 297 fi 295 298 AC_MSG_RESULT([$PYTHON_EXTRA_LIBS]) 296 299 AC_SUBST(PYTHON_EXTRA_LIBS)