~ubuntu-branches/debian/jessie/libapache2-mod-python/jessie

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Package Import Robot
  • Author(s): Arthur de Jong
  • Date: 2013-06-28 13:13:39 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20130628131339-k0153luvvedddtml
Tags: 3.3.1-11
* Team upload.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
  ALL="dso"
108
108
 
109
109
  # check Apache version
110
 
  AC_MSG_CHECKING(Apache version)
111
 
  HTTPD="`${APXS} -q SBINDIR`/`${APXS} -q TARGET`"
112
 
  ver=`$HTTPD -v | awk '/version/ {print $3}' | awk -F/ '{print $2}'`
113
 
  AC_MSG_RESULT($ver)
 
110
# peterh: Remove apache version check for debian package, since we don't
 
111
# want to build-depend on apache2.
 
112
#  AC_MSG_CHECKING(Apache version)
 
113
#  HTTPD="`${APXS} -q SBINDIR`/`${APXS} -q TARGET`"
 
114
#  ver=`$HTTPD -v | awk '/version/ {print $3}' | awk -F/ '{print $2}'`
 
115
#  AC_MSG_RESULT($ver)
114
116
 
115
117
  # make sure version begins with 2
116
 
  if test -z "`echo $ver | egrep \^2`"; then
117
 
    AC_MSG_ERROR([This version of mod_python only works with Apache 2. The one you have seems to be $ver.])
118
 
  fi
 
118
#  if test -z "`echo $ver | egrep \^2`"; then
 
119
#    AC_MSG_ERROR([This version of mod_python only works with Apache 2. The one you have seems to be $ver.])
 
120
#  fi
119
121
 
120
122
  # determine LIBEXEC
121
123
  AC_MSG_CHECKING(for Apache libexec directory)
221
223
# set python std library variable
222
224
AC_SUBST(LIBS)
223
225
 
224
 
PyLIBP=${PY_STD_LIB}
225
 
PyLIBPL=${PyLIBP}/config
226
 
PyPYTHONLIBS=${PyLIBPL}/libpython${PyVERSION}.a
227
 
PyLIBS=`grep "^LIB[[SMC]]=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
228
 
PyMODLIBS=`grep "^LOCALMODLIBS=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
229
 
PyFRAMEWORK=`grep "^PYTHONFRAMEWORK=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
230
 
PyFRAMEWORKDIR=`grep "^PYTHONFRAMEWORKDIR=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   ' | awk '{print $1}'`
231
 
 
232
 
save_LDFLAGS="$LDFLAGS"
233
 
save_LIBS="$LIBS"
234
 
if test "$PyFRAMEWORKDIR" != "no-framework"; then
235
 
  if test -n "$PyFRAMEWORK"; then
236
 
    PyPYTHONLIBS="-framework $PyFRAMEWORK"
237
 
    LDFLAGS="${LDFLAGS} -Wl,-framework,Python"
238
 
  fi
239
 
else
240
 
  LDFLAGS="${LDFLAGS} -L${PyLIBPL}"
241
 
  AC_CHECK_LIB(python${PyVERSION}, Py_NewInterpreter,
242
 
             [ PyPYTHONLIBS="-lpython${PyVERSION}" ],
243
 
             [ LDFLAGS="$save_LDFLAGS"
244
 
               if test -f ${PyLIBPL}/libpython${PyVERSION}.a; then
245
 
                  PyPYTHONLIBS=${PyLIBPL}/libpython${PyVERSION}.a
246
 
               else
247
 
                  AC_ERROR(Can not link to python)
248
 
               fi
249
 
              ], 
250
 
              [ ${PyLIBS} ${PyMODLIBS} ] )
251
 
fi
252
 
LIBS="$save_LIBS"
253
 
 
254
226
# (actually this check already just happened above)
255
227
AC_MSG_CHECKING(what libraries Python was linked with) 
256
 
PY_LIBS="${PyPYTHONLIBS} ${PyLIBS} ${PyMODLIBS}"
 
228
PY_LIBS=`${PYTHON_BIN}-config --libs`
257
229
 
258
230
## XXX this is a small work around for a weird RedHat problem
259
231
## erase -lieee from library list
266
238
 
267
239
AC_MSG_CHECKING(linker flags used to link Python)
268
240
AC_SUBST(LDFLAGS)
269
 
PyLFS=`grep "^LINKFORSHARED=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
270
 
PyLDFLAGS=`grep "^LDFLAGS=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
271
 
LDFLAGS="${LDFLAGS} ${PyLFS} ${PyLDFLAGS}"
 
241
PY_LDFLAGS=`${PYTHON_BIN}-config --ldflags`
272
242
LDFLAGS="${LDFLAGS} ${PY_LDFLAGS}"
273
243
AC_MSG_RESULT($PY_LDFLAGS)
274
244
 
275
245
AC_MSG_CHECKING(where Python include files are)
276
246
AC_SUBST(INCLUDES)
277
 
PY_INCLUDES="-I${PyEXEC_INSTALLDIR}/include/python${PyVERSION}"
 
247
PY_INCLUDES=`${PYTHON_BIN}-config --includes`
278
248
INCLUDES="${INCLUDES} ${AP_INCLUDES} ${PY_INCLUDES}"
279
249
AC_MSG_RESULT($PY_INCLUDES)
280
250
 
287
257
# get the mod_python version
288
258
AC_SUBST(MP_VERSION)
289
259
MP_VERSION=`awk '/MPV_STRING/ {print $3}' src/include/mpversion.h`
290
 
MP_VERSION=`echo $MP_VERSION | sed 's/["]//g'`
 
260
MP_VERSION=`echo $MP_VERSION | sed 's/"//g'`
291
261
 
292
262
# get --with-python-src. The python src is required to generate the documentation
293
263
# It is not required to compile or install mod_python itself