~ubuntu-branches/ubuntu/gutsy/libapache2-mod-python/gutsy

« back to all changes in this revision

Viewing changes to configure

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-07-07 13:18:35 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060707131835-zfp1vupanjj2e77y
Tags: 3.2.8-1ubuntu1
* Merge to Debian unstable.
* Remaining Ubuntu change: debian/{control,rules}: Drop python 2.3 package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
272
272
PACKAGE_BUGREPORT=
273
273
 
274
274
ac_unique_file="src/mod_python.c"
275
 
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE APXS DSO ALL LIBEXECDIR SOLARIS_HACKS HTTPD AP_SRC AP_SRC_OWN AP_SRC_GRP STATIC PYTHON_BIN PY_STD_LIB INCLUDES TEST_SERVER_ROOT MOD_PYTHON_SO MP_VERSION LIBOBJS LTLIBOBJS'
 
275
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE APXS DSO ALL LIBEXECDIR SOLARIS_HACKS HTTPD AP_SRC AP_SRC_OWN AP_SRC_GRP STATIC PYTHON_BIN PY_STD_LIB INCLUDES TEST_SERVER_ROOT MOD_PYTHON_SO MP_VERSION PYTHON_SRC MAX_LOCKS LEX LIBOBJS LTLIBOBJS'
276
276
ac_subst_files=''
277
277
 
278
278
# Initialize some variables set by options.
801
801
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
802
802
--with-apxs=PATH        Path to apxs
803
803
--with-apache=DIR       Path to Apache sources
804
 
--with-python=DIR       Path to specific Python binary
 
804
--with-python=PATH      Path to specific Python binary
 
805
--with-python-src=DIR   Path to python sources - required if you want to generate the documenation
 
806
--with-max-locks=INTEGER        Maximum number of locks
 
807
--with-flex=PATH        Path to specific flex binary.
 
808
        Flex Version 2.5.31 or greater is required to regenerate psp_parser.c
 
809
        from psp_parse.l. A prepared psp_parser.c file is included with the
 
810
        source, so you will only need flex if you make changes to psp_parser.l
 
811
        See the README for more information.
805
812
 
806
813
Some influential environment variables:
807
814
  CC          C compiler command
2583
2590
  fi
2584
2591
fi
2585
2592
 
2586
 
# last resort
 
2593
# second last resort
2587
2594
if test -z "$APXS"; then
2588
2595
  echo "$as_me:$LINENO: checking for apxs in your PATH" >&5
2589
2596
echo $ECHO_N "checking for apxs in your PATH... $ECHO_C" >&6
2632
2639
  fi
2633
2640
fi
2634
2641
 
 
2642
# last resort
 
2643
# some linux distributions use apxs2 for apache2 installations,
 
2644
# so check for apxs2 before we give up.
 
2645
if test -z "$APXS"; then
 
2646
  echo "$as_me:$LINENO: checking for apxs2 in your PATH" >&5
 
2647
echo $ECHO_N "checking for apxs2 in your PATH... $ECHO_C" >&6
 
2648
  # Extract the first word of "apxs2", so it can be a program name with args.
 
2649
set dummy apxs2; ac_word=$2
 
2650
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
2651
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
2652
if test "${ac_cv_path_APXS+set}" = set; then
 
2653
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
2654
else
 
2655
  case $APXS in
 
2656
  [\\/]* | ?:[\\/]*)
 
2657
  ac_cv_path_APXS="$APXS" # Let the user override the test with a path.
 
2658
  ;;
 
2659
  *)
 
2660
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
2661
for as_dir in $PATH
 
2662
do
 
2663
  IFS=$as_save_IFS
 
2664
  test -z "$as_dir" && as_dir=.
 
2665
  for ac_exec_ext in '' $ac_executable_extensions; do
 
2666
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
2667
    ac_cv_path_APXS="$as_dir/$ac_word$ac_exec_ext"
 
2668
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
2669
    break 2
 
2670
  fi
 
2671
done
 
2672
done
 
2673
 
 
2674
  ;;
 
2675
esac
 
2676
fi
 
2677
APXS=$ac_cv_path_APXS
 
2678
 
 
2679
if test -n "$APXS"; then
 
2680
  echo "$as_me:$LINENO: result: $APXS" >&5
 
2681
echo "${ECHO_T}$APXS" >&6
 
2682
else
 
2683
  echo "$as_me:$LINENO: result: no" >&5
 
2684
echo "${ECHO_T}no" >&6
 
2685
fi
 
2686
 
 
2687
  if test -n "$APXS"; then
 
2688
    echo "$as_me:$LINENO: result: found $APXS, we'll use this. Use --with-apxs to specify another." >&5
 
2689
echo "${ECHO_T}found $APXS, we'll use this. Use --with-apxs to specify another." >&6
 
2690
  fi
 
2691
fi
 
2692
 
2635
2693
# if apxs was still not found, then no DSO
2636
2694
 
2637
2695
 
2648
2706
  ALL="dso"
2649
2707
 
2650
2708
  # check Apache version
2651
 
# peterh: Remove apache version check for debian package, since we don't
2652
 
# want to build-depend on apache2.
2653
 
#  AC_MSG_CHECKING(Apache version)
2654
 
#  HTTPD="`${APXS} -q SBINDIR`/`${APXS} -q TARGET`"
2655
 
#  ver=`$HTTPD -v | awk '/version/ {print $3}' | awk -F/ '{print $2}'`
2656
 
#  AC_MSG_RESULT($ver)
 
2709
  echo "$as_me:$LINENO: checking Apache version" >&5
 
2710
echo $ECHO_N "checking Apache version... $ECHO_C" >&6
 
2711
  HTTPD="`${APXS} -q SBINDIR`/`${APXS} -q TARGET`"
 
2712
  ver=`$HTTPD -v | awk '/version/ {print $3}' | awk -F/ '{print $2}'`
 
2713
  echo "$as_me:$LINENO: result: $ver" >&5
 
2714
echo "${ECHO_T}$ver" >&6
2657
2715
 
2658
2716
  # make sure version begins with 2
2659
 
#  if test -z "`echo $ver | egrep \^2`"; then
2660
 
#    AC_MSG_ERROR([This version of mod_python only works with Apache 2. The one you have seems to be $ver.])
2661
 
#  fi
 
2717
  if test -z "`echo $ver | egrep \^2`"; then
 
2718
    { { echo "$as_me:$LINENO: error: This version of mod_python only works with Apache 2. The one you have seems to be $ver." >&5
 
2719
echo "$as_me: error: This version of mod_python only works with Apache 2. The one you have seems to be $ver." >&2;}
 
2720
   { (exit 1); exit 1; }; }
 
2721
  fi
2662
2722
 
2663
2723
  # determine LIBEXEC
2664
2724
  echo "$as_me:$LINENO: checking for Apache libexec directory" >&5
2827
2887
 
2828
2888
# this is where the Python libraries will get installed
2829
2889
 
2830
 
PY_STD_LIB=${PyEXEC_INSTALLDIR}/lib/python${PyVERSION}
2831
 
 
 
2890
echo "$as_me:$LINENO: checking checking where python libraries are installed" >&5
 
2891
echo $ECHO_N "checking checking where python libraries are installed... $ECHO_C" >&6
 
2892
PY_STD_LIB=`$PYTHON_BIN -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(plat_specific=1, standard_lib=1)'`
 
2893
echo "$as_me:$LINENO: result: $PY_STD_LIB" >&5
 
2894
echo "${ECHO_T}$PY_STD_LIB" >&6
2832
2895
# set python std library variable
2833
2896
 
2834
2897
 
2835
 
PyLIBP=${PyEXEC_INSTALLDIR}/lib/python${PyVERSION}
 
2898
PyLIBP=${PY_STD_LIB}
2836
2899
PyLIBPL=${PyLIBP}/config
2837
2900
PyPYTHONLIBS=${PyLIBPL}/libpython${PyVERSION}.a
2838
2901
PyLIBS=`grep "^LIB[SMC]=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
2974
3037
MP_VERSION=`awk '/MPV_STRING/ {print $3}' src/include/mpversion.h`
2975
3038
MP_VERSION=`echo $MP_VERSION | sed s/\\"//g`
2976
3039
 
2977
 
                                                            ac_config_files="$ac_config_files Makefile src/Makefile Doc/Makefile test/testconf.py dist/setup.py dist/Makefile"
 
3040
# get --with-python-src. The python src is required to generate the documentation
 
3041
# It is not required to compile or install mod_python itself
 
3042
 
 
3043
echo "$as_me:$LINENO: checking for --with-python-src" >&5
 
3044
echo $ECHO_N "checking for --with-python-src... $ECHO_C" >&6
 
3045
 
 
3046
# Check whether --with-python-src or --without-python-src was given.
 
3047
if test "${with_python_src+set}" = set; then
 
3048
  withval="$with_python_src"
 
3049
 
 
3050
  PYTHON_SRC="$withval"
 
3051
  echo "$as_me:$LINENO: result: $PYTHON_SRC" >&5
 
3052
echo "${ECHO_T}$PYTHON_SRC" >&6
 
3053
 
 
3054
else
 
3055
  echo "$as_me:$LINENO: result: no" >&5
 
3056
echo "${ECHO_T}no" >&6
 
3057
fi;
 
3058
if test -z "$PYTHON_SRC"; then
 
3059
  PYTHON_SRC=""
 
3060
fi
 
3061
 
 
3062
# configure the MAX_LOCKS for number of mutex locks
 
3063
 
 
3064
echo "$as_me:$LINENO: checking for --with-max-locks" >&5
 
3065
echo $ECHO_N "checking for --with-max-locks... $ECHO_C" >&6
 
3066
 
 
3067
# Check whether --with-max-locks or --without-max-locks was given.
 
3068
if test "${with_max_locks+set}" = set; then
 
3069
  withval="$with_max_locks"
 
3070
 
 
3071
  MAX_LOCKS="$withval"
 
3072
  echo "$as_me:$LINENO: result: $MAX_LOCKS" >&5
 
3073
echo "${ECHO_T}$MAX_LOCKS" >&6
 
3074
 
 
3075
else
 
3076
  echo "$as_me:$LINENO: result: no" >&5
 
3077
echo "${ECHO_T}no" >&6
 
3078
fi;
 
3079
 
 
3080
if test -z "$MAX_LOCKS"; then
 
3081
  MAX_LOCKS="8"
 
3082
fi
 
3083
echo "$as_me:$LINENO: result: Using $MAX_LOCKS MAX_LOCKS." >&5
 
3084
echo "${ECHO_T}Using $MAX_LOCKS MAX_LOCKS." >&6
 
3085
 
 
3086
# Check for correct flex version
 
3087
# Requires flex 2.5.31 for reentrant support
 
3088
# See README for more details
 
3089
 
 
3090
 
 
3091
echo "$as_me:$LINENO: checking for --with-flex" >&5
 
3092
echo $ECHO_N "checking for --with-flex... $ECHO_C" >&6
 
3093
 
 
3094
# Check whether --with-flex or --without-flex was given.
 
3095
if test "${with_flex+set}" = set; then
 
3096
  withval="$with_flex"
 
3097
 
 
3098
  LEX="$withval"
 
3099
  echo "$as_me:$LINENO: result: $LEX" >&5
 
3100
echo "${ECHO_T}$LEX" >&6
 
3101
 
 
3102
else
 
3103
  echo "$as_me:$LINENO: result: no" >&5
 
3104
echo "${ECHO_T}no" >&6
 
3105
fi;
 
3106
 
 
3107
# check for flex executable
 
3108
if test -z "$LEX"; then
 
3109
  # Extract the first word of "flex", so it can be a program name with args.
 
3110
set dummy flex; ac_word=$2
 
3111
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
3112
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
3113
if test "${ac_cv_path_LEX+set}" = set; then
 
3114
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
3115
else
 
3116
  case $LEX in
 
3117
  [\\/]* | ?:[\\/]*)
 
3118
  ac_cv_path_LEX="$LEX" # Let the user override the test with a path.
 
3119
  ;;
 
3120
  *)
 
3121
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
3122
for as_dir in $PATH
 
3123
do
 
3124
  IFS=$as_save_IFS
 
3125
  test -z "$as_dir" && as_dir=.
 
3126
  for ac_exec_ext in '' $ac_executable_extensions; do
 
3127
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
3128
    ac_cv_path_LEX="$as_dir/$ac_word$ac_exec_ext"
 
3129
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
3130
    break 2
 
3131
  fi
 
3132
done
 
3133
done
 
3134
 
 
3135
  ;;
 
3136
esac
 
3137
fi
 
3138
LEX=$ac_cv_path_LEX
 
3139
 
 
3140
if test -n "$LEX"; then
 
3141
  echo "$as_me:$LINENO: result: $LEX" >&5
 
3142
echo "${ECHO_T}$LEX" >&6
 
3143
else
 
3144
  echo "$as_me:$LINENO: result: no" >&5
 
3145
echo "${ECHO_T}no" >&6
 
3146
fi
 
3147
 
 
3148
fi
 
3149
 
 
3150
if test "$LEX" && test -x "$LEX"; then
 
3151
  echo "$as_me:$LINENO: result: found $LEX, we'll use this. Use --with-flex to specify another." >&5
 
3152
echo "${ECHO_T}found $LEX, we'll use this. Use --with-flex to specify another." >&6
 
3153
 
 
3154
  echo "$as_me:$LINENO: checking flex version" >&5
 
3155
echo $ECHO_N "checking flex version... $ECHO_C" >&6
 
3156
  FlexVERSION=`$LEX --version | sed 's/version//g' | awk '/flex/ {print $2}'`
 
3157
  Flex_MAJOR=`echo $FlexVERSION| awk -F .  '{print $1}'`
 
3158
  Flex_MINOR=`echo $FlexVERSION| awk -F .  '{print $2}'`
 
3159
  Flex_PATCH=`echo $FlexVERSION| awk -F .  '{print $3}'`
 
3160
 
 
3161
  if test "$Flex_MAJOR" -eq "2" && test "$Flex_MINOR" -eq "5" && test "$Flex_PATCH" -ge "31"; then
 
3162
    echo "$as_me:$LINENO: result: $FlexVERSION. Good" >&5
 
3163
echo "${ECHO_T}$FlexVERSION. Good" >&6
 
3164
  else
 
3165
    { echo "$as_me:$LINENO: WARNING: Flex version $FlexVERSION found.
 
3166
    Version 2.5.31 or greater is required.  You can generally ignore this
 
3167
    warning unless you need to regenerate psp_parser.c from psp_parse.l.
 
3168
    If you do need regenerate psp_parser.c, use --with-flex to specify the
 
3169
    location of the correct flex version. See the README for more information." >&5
 
3170
echo "$as_me: WARNING: Flex version $FlexVERSION found.
 
3171
    Version 2.5.31 or greater is required.  You can generally ignore this
 
3172
    warning unless you need to regenerate psp_parser.c from psp_parse.l.
 
3173
    If you do need regenerate psp_parser.c, use --with-flex to specify the
 
3174
    location of the correct flex version. See the README for more information." >&2;}
 
3175
  fi
 
3176
 
 
3177
else
 
3178
  { echo "$as_me:$LINENO: WARNING: flex $LEX not found
 
3179
  You can generally ignore this warning unless you need to regenerate
 
3180
  psp_parser.c from psp_parse.l.  If you do need regenerate psp_parser.c,
 
3181
  use --with-flex to specify the location of flex.
 
3182
  See the README for more information." >&5
 
3183
echo "$as_me: WARNING: flex $LEX not found
 
3184
  You can generally ignore this warning unless you need to regenerate
 
3185
  psp_parser.c from psp_parse.l.  If you do need regenerate psp_parser.c,
 
3186
  use --with-flex to specify the location of flex.
 
3187
  See the README for more information." >&2;}
 
3188
fi
 
3189
 
 
3190
                                                                      ac_config_files="$ac_config_files Makefile src/Makefile Doc/Makefile src/include/mod_python.h test/testconf.py dist/setup.py dist/Makefile"
2978
3191
cat >confcache <<\_ACEOF
2979
3192
# This file is a shell script that caches the results of configure
2980
3193
# tests run on this system so they can be shared between configure
3529
3742
  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
3530
3743
  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
3531
3744
  "Doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES Doc/Makefile" ;;
 
3745
  "src/include/mod_python.h" ) CONFIG_FILES="$CONFIG_FILES src/include/mod_python.h" ;;
3532
3746
  "test/testconf.py" ) CONFIG_FILES="$CONFIG_FILES test/testconf.py" ;;
3533
3747
  "dist/setup.py" ) CONFIG_FILES="$CONFIG_FILES dist/setup.py" ;;
3534
3748
  "dist/Makefile" ) CONFIG_FILES="$CONFIG_FILES dist/Makefile" ;;
3643
3857
s,@TEST_SERVER_ROOT@,$TEST_SERVER_ROOT,;t t
3644
3858
s,@MOD_PYTHON_SO@,$MOD_PYTHON_SO,;t t
3645
3859
s,@MP_VERSION@,$MP_VERSION,;t t
 
3860
s,@PYTHON_SRC@,$PYTHON_SRC,;t t
 
3861
s,@MAX_LOCKS@,$MAX_LOCKS,;t t
 
3862
s,@LEX@,$LEX,;t t
3646
3863
s,@LIBOBJS@,$LIBOBJS,;t t
3647
3864
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
3648
3865
CEOF