You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by gr...@apache.org on 2002/12/02 22:58:49 UTC

cvs commit: httpd-python configure configure.in

grisha      2002/12/02 13:58:49

  Modified:    .        configure configure.in
  Log:
  Detect Python compiled as framework on Darwin.
  Submitted by: Justin Erenkrantz
  
  Revision  Changes    Path
  1.23      +16 -8     httpd-python/configure
  
  Index: configure
  ===================================================================
  RCS file: /home/cvs/httpd-python/configure,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- configure	7 Nov 2002 23:17:37 -0000	1.22
  +++ configure	2 Dec 2002 21:58:49 -0000	1.23
  @@ -1293,12 +1293,19 @@
   PyPYTHONLIBS=${PyLIBPL}/libpython${PyVERSION}.a
   PyLIBS=`grep "^LIB[SMC]=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
   PyMODLIBS=`grep "^LOCALMODLIBS=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
  +PyFRAMEWORK=`grep "^PYTHONFRAMEWORK=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
  +PyFRAMEWORKDIR=`grep "^PYTHONFRAMEWORKDIR=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   ' | sed 's/ //g'`
   
   save_LDFLAGS="$LDFLAGS"
   save_LIBS="$LIBS"
  -LDFLAGS="${LDFLAGS} -L${PyLIBPL}"
  -echo $ac_n "checking for Py_NewInterpreter in -lpython${PyVERSION}""... $ac_c" 1>&6
  -echo "configure:1302: checking for Py_NewInterpreter in -lpython${PyVERSION}" >&5
  +if test "$PyFRAMEWORKDIR" != "no-framework"; then
  +  if test -n "$PyFRAMEWORK"; then
  +    PyPYTHONLIBS="-framework $PyFRAMEWORK"
  +  fi
  +else
  +  LDFLAGS="${LDFLAGS} -L${PyLIBPL}"
  +  echo $ac_n "checking for Py_NewInterpreter in -lpython${PyVERSION}""... $ac_c" 1>&6
  +echo "configure:1309: checking for Py_NewInterpreter in -lpython${PyVERSION}" >&5
   ac_lib_var=`echo python${PyVERSION}'_'Py_NewInterpreter | sed 'y%./+-%__p_%'`
   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     echo $ac_n "(cached) $ac_c" 1>&6
  @@ -1306,7 +1313,7 @@
     ac_save_LIBS="$LIBS"
   LIBS="-lpython${PyVERSION}  ${PyLIBS} ${PyMODLIBS}   $LIBS"
   cat > conftest.$ac_ext <<EOF
  -#line 1310 "configure"
  +#line 1317 "configure"
   #include "confdefs.h"
   /* Override any gcc2 internal prototype to avoid an error.  */
   /* We use char because int might match the return type of a gcc2
  @@ -1317,7 +1324,7 @@
   Py_NewInterpreter()
   ; return 0; }
   EOF
  -if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  +if { (eval echo configure:1328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     rm -rf conftest*
     eval "ac_cv_lib_$ac_lib_var=yes"
   else
  @@ -1344,11 +1351,12 @@
                 
   fi
   
  +fi
   LIBS="$save_LIBS"
   
   # (actually this check already just happened above)
   echo $ac_n "checking what libraries Python was linked with""... $ac_c" 1>&6
  -echo "configure:1352: checking what libraries Python was linked with" >&5 
  +echo "configure:1360: checking what libraries Python was linked with" >&5 
   PY_LIBS="${PyPYTHONLIBS} ${PyLIBS} ${PyMODLIBS}"
    
   ## XXX this is a small work around for a weird RedHat problem
  @@ -1361,7 +1369,7 @@
   echo "$ac_t""$PY_LIBS" 1>&6
   
   echo $ac_n "checking linker flags used to link Python""... $ac_c" 1>&6
  -echo "configure:1365: checking linker flags used to link Python" >&5
  +echo "configure:1373: checking linker flags used to link Python" >&5
   
   PyLFS=`grep "^LINKFORSHARED=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
   PyLDFLAGS=`grep "^LDFLAGS=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
  @@ -1370,7 +1378,7 @@
   echo "$ac_t""$PY_LDFLAGS" 1>&6
   
   echo $ac_n "checking where Python include files are""... $ac_c" 1>&6
  -echo "configure:1374: checking where Python include files are" >&5
  +echo "configure:1382: checking where Python include files are" >&5
   
   PY_INCLUDES="-I${PyEXEC_INSTALLDIR}/include/python${PyVERSION}"
   INCLUDES="${INCLUDES} ${AP_INCLUDES} ${PY_INCLUDES}"
  
  
  
  1.27      +10 -2     httpd-python/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/httpd-python/configure.in,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- configure.in	8 Nov 2002 00:15:10 -0000	1.26
  +++ configure.in	2 Dec 2002 21:58:49 -0000	1.27
  @@ -256,11 +256,18 @@
   PyPYTHONLIBS=${PyLIBPL}/libpython${PyVERSION}.a
   PyLIBS=`grep "^LIB[[SMC]]=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
   PyMODLIBS=`grep "^LOCALMODLIBS=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
  +PyFRAMEWORK=`grep "^PYTHONFRAMEWORK=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
  +PyFRAMEWORKDIR=`grep "^PYTHONFRAMEWORKDIR=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   ' | sed 's/ //g'`
   
   save_LDFLAGS="$LDFLAGS"
   save_LIBS="$LIBS"
  -LDFLAGS="${LDFLAGS} -L${PyLIBPL}"
  -AC_CHECK_LIB(python${PyVERSION}, Py_NewInterpreter,
  +if test "$PyFRAMEWORKDIR" != "no-framework"; then
  +  if test -n "$PyFRAMEWORK"; then
  +    PyPYTHONLIBS="-framework $PyFRAMEWORK"
  +  fi
  +else
  +  LDFLAGS="${LDFLAGS} -L${PyLIBPL}"
  +  AC_CHECK_LIB(python${PyVERSION}, Py_NewInterpreter,
                [ PyPYTHONLIBS="-lpython${PyVERSION}" ],
                [ LDFLAGS="$save_LDFLAGS"
                  if test -f ${PyLIBPL}/libpython${PyVERSION}.a; then
  @@ -270,6 +277,7 @@
                  fi
                 ], 
                 [ ${PyLIBS} ${PyMODLIBS} ] )
  +fi
   LIBS="$save_LIBS"
   
   # (actually this check already just happened above)