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

« back to all changes in this revision

Viewing changes to debian/patches/04_autoconf_python_multiarch.patch

  • 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:
 
1
Description: Drop custom Python detection and use pkg-config instead.
 
2
 Drop custom Python detection and use pkg-config instead. This fixes
 
3
 FTBFS due to multiarch include paths. Not sure if this should be
 
4
 fowrarded or not 
 
5
 (see https://lists.ubuntu.com/archives/ubuntu-devel/2013-January/036291.html)
 
6
Author: Robie Basak <robie.basak@canonical.com>
 
7
Bug-Ubuntu: https://launchpad.net/bugs/1098597
 
8
Forwarded: no
 
9
 
 
10
--- a/configure.in
 
11
+++ b/configure.in
 
12
@@ -223,39 +223,9 @@ AC_MSG_RESULT($PY_STD_LIB)
 
13
 # set python std library variable
 
14
 AC_SUBST(LIBS)
 
15
 
 
16
-PyLIBP=${PY_STD_LIB}
 
17
-PyLIBPL=${PyLIBP}/config
 
18
-PyPYTHONLIBS=${PyLIBPL}/libpython${PyVERSION}.a
 
19
-PyLIBS=`grep "^LIB[[SMC]]=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
 
20
-PyMODLIBS=`grep "^LOCALMODLIBS=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
 
21
-PyFRAMEWORK=`grep "^PYTHONFRAMEWORK=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
 
22
-PyFRAMEWORKDIR=`grep "^PYTHONFRAMEWORKDIR=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   ' | awk '{print $1}'`
 
23
-
 
24
-save_LDFLAGS="$LDFLAGS"
 
25
-save_LIBS="$LIBS"
 
26
-if test "$PyFRAMEWORKDIR" != "no-framework"; then
 
27
-  if test -n "$PyFRAMEWORK"; then
 
28
-    PyPYTHONLIBS="-framework $PyFRAMEWORK"
 
29
-    LDFLAGS="${LDFLAGS} -Wl,-framework,Python"
 
30
-  fi
 
31
-else
 
32
-  LDFLAGS="${LDFLAGS} -L${PyLIBPL}"
 
33
-  AC_CHECK_LIB(python${PyVERSION}, Py_NewInterpreter,
 
34
-             [ PyPYTHONLIBS="-lpython${PyVERSION}" ],
 
35
-             [ LDFLAGS="$save_LDFLAGS"
 
36
-               if test -f ${PyLIBPL}/libpython${PyVERSION}.a; then
 
37
-                  PyPYTHONLIBS=${PyLIBPL}/libpython${PyVERSION}.a
 
38
-               else
 
39
-                  AC_ERROR(Can not link to python)
 
40
-               fi
 
41
-              ], 
 
42
-              [ ${PyLIBS} ${PyMODLIBS} ] )
 
43
-fi
 
44
-LIBS="$save_LIBS"
 
45
-
 
46
 # (actually this check already just happened above)
 
47
 AC_MSG_CHECKING(what libraries Python was linked with) 
 
48
-PY_LIBS="${PyPYTHONLIBS} ${PyLIBS} ${PyMODLIBS}"
 
49
+PY_LIBS=`${PYTHON_BIN}-config --libs`
 
50
  
 
51
 ## XXX this is a small work around for a weird RedHat problem
 
52
 ## erase -lieee from library list
 
53
@@ -268,15 +238,13 @@ AC_MSG_RESULT($PY_LIBS)
 
54
 
 
55
 AC_MSG_CHECKING(linker flags used to link Python)
 
56
 AC_SUBST(LDFLAGS)
 
57
-PyLFS=`grep "^LINKFORSHARED=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
 
58
-PyLDFLAGS=`grep "^LDFLAGS=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
 
59
-LDFLAGS="${LDFLAGS} ${PyLFS} ${PyLDFLAGS}"
 
60
+PY_LDFLAGS=`${PYTHON_BIN}-config --ldflags`
 
61
 LDFLAGS="${LDFLAGS} ${PY_LDFLAGS}"
 
62
 AC_MSG_RESULT($PY_LDFLAGS)
 
63
 
 
64
 AC_MSG_CHECKING(where Python include files are)
 
65
 AC_SUBST(INCLUDES)
 
66
-PY_INCLUDES="-I${PyEXEC_INSTALLDIR}/include/python${PyVERSION}"
 
67
+PY_INCLUDES=`${PYTHON_BIN}-config --includes`
 
68
 INCLUDES="${INCLUDES} ${AP_INCLUDES} ${PY_INCLUDES}"
 
69
 AC_MSG_RESULT($PY_INCLUDES)
 
70