Changes in trunk/zoo-kernel/configure.ac [15:29]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-kernel/configure.ac
r15 r29 128 128 # =========================================================================== 129 129 130 131 132 130 133 AC_ARG_WITH([python], 131 [AS_HELP_STRING([--with-python=PATH], [specify an alternative directory for python installation])], 132 [PYTHONCONFIG="$withval/bin/python-config"], [PYTHONCONFIG=""]) 133 134 if test "x$PYTHONCONFIG" = "x"; then 135 # PYTHON was not specified, so search within the current path 136 AC_PATH_PROG([PYTHONCONFIG], [python-config]) 137 138 # If we couldn't find python-config, display a warning 139 if test "x$PYTHONCONFIG" = "x"; then 140 AC_MSG_ERROR([could not find python-config from libpython within the current path. You may need to try re-running configure with a --with-python parameter.]) 141 fi 142 else 143 # PYTHON was specified; display a message to the user 144 if test "x$PYTHON" = "xyes"; then 145 AC_MSG_ERROR([you must specify a parameter to --with-python, e.g. --with-python=/path/to/python]) 146 else 147 if test -f $PYTHONCONFIG; then 148 AC_MSG_RESULT([Using user-specified python-config file: $PYTHONCONFIG]) 149 else 150 AC_MSG_ERROR([the user-specified python-config file $PYTHONCONFIG does not exist]) 151 fi 152 fi 153 fi 154 155 156 # Extract the linker and include flags 157 PYTHON_LDFLAGS=`$PYTHONCONFIG --libs` 158 PYTHON_CPPFLAGS=`$PYTHONCONFIG --cflags` 159 160 # Check headers file 161 CPPFLAGS_SAVE="$CPPFLAGS" 162 CPPFLAGS="$PYTHON_CPPFLAGS" 163 AC_CHECK_HEADERS([Python.h], 134 [AS_HELP_STRING([--with-python=PATH], [To enabled python support or specify an alternative directory for python installation, disabled by default])], 135 [PYTHON_PATH="$withval"; PYTHON_ENABLED="-DUSE_PYTHON"], [PYTHON_ENABLED=""]) 136 137 138 if test -z "$PYTHON_ENABLED" 139 then 140 PYTHON_FILE="" 141 else 142 PYTHONCONFIG="$PYTHON_PATH/bin/python-config" 143 PYTHON_FILE="service_internal_python.o" 144 if test "$PYTHON_PATH" = "yes" 145 then 146 # PHP was not specified, so search within the current path 147 AC_PATH_PROG([PYTHONCONFIG], [python-config]) 148 else 149 PYTHONCONFIG="$PYTHON_PATH/bin/python-config" 150 fi 151 152 # Extract the linker and include flags 153 PYTHON_LDFLAGS=`$PYTHONCONFIG --ldflags` 154 PYTHON_CPPFLAGS=`$PYTHONCONFIG --cflags` 155 156 # Check headers file 157 CPPFLAGS_SAVE="$CPPFLAGS" 158 CPPFLAGS="$PYTHON_CPPFLAGS" 159 AC_CHECK_HEADERS([Python.h], 164 160 [], [AC_MSG_ERROR([could not find headers include related to libpython])]) 165 161 166 # Ensure we can link against libpython 167 LIBS_SAVE="$LIBS" 168 LIBS="$PYTHON_LDFLAGS" 169 # Shouldn't we get python here rather than python2.6 :) ?? 170 PY_LIB=`$PYTHONCONFIG --libs | sed -e 's/^.*\(python2\..\)$/\1/'` 171 AC_CHECK_LIB([$PY_LIB], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], []) 172 173 AC_SUBST([PYTHON_CPPFLAGS]) 174 AC_SUBST([PYTHON_LDFLAGS]) 162 # Ensure we can link against libphp 163 LIBS_SAVE="$LIBS" 164 LIBS="$PYTHON_LDFLAGS" 165 PY_LIB=`$PYTHONCONFIG --libs | sed -e 's/^.*\(python2\..\)$/\1/'` 166 AC_CHECK_LIB([$PY_LIB], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], []) 167 AC_SUBST([PYTHON_CPPFLAGS]) 168 AC_SUBST([PYTHON_LDFLAGS]) 169 fi 170 171 AC_SUBST([PYTHON_ENABLED]) 172 AC_SUBST([PYTHON_FILE]) 175 173 176 174 # =========================================================================== … … 182 180 183 181 AC_ARG_WITH([php], 184 [AS_HELP_STRING([--with-php=PATH], [specify an alternative directory for php installation or --with-php=no to disable php support])], 185 [PHP_PATH="$withval"], [PHP_PATH=""]) 186 if test "$PHP_PATH" != "no"; 187 then 182 [AS_HELP_STRING([--with-php=PATH], [To enabled php support or specify an alternative directory for php installation, disabled by default])], 183 [PHP_PATH="$withval"; PHP_ENABLED="-DUSE_PHP"], [PHP_ENABLED=""]) 184 185 186 if test -z "$PHP_ENABLED" 187 then 188 PHP_FILE="" 189 else 188 190 PHPCONFIG="$PHP_PATH/bin/php-config" 189 PHP_ENABLED="-DUSE_PHP"190 191 PHP_FILE="service_internal_php.o" 191 if test "x$PHPCONFIG" = "x"; 192 then 193 # PHP was not specified, so search within the current path 194 AC_PATH_PROG([PHPCONFIG], [php-config]) 195 196 # If we couldn't find php-config, display a warning 197 if test "x$PHPCONFIG" = "x"; 198 then 199 AC_MSG_ERROR([could not find php-config from libphp within the current path. You may need to try re-running configure with a --with-php parameter.]) 200 fi 201 else 202 # PHP was specified; display a message to the user 203 if test "x$PHP" = "xyes"; 204 then 205 AC_MSG_ERROR([you must specify a parameter to --with-php, e.g. --with-php=/path/to/php]) 206 else 207 if test -f $PHPCONFIG; 208 then 209 AC_MSG_RESULT([Using user-specified php-config file: $PHPCONFIG]) 210 else 211 AC_MSG_ERROR([the user-specified php-config file $PHPCONFIG does not exist]) 212 fi 213 fi 214 fi 192 if test "$PHP_PATH" = "yes" 193 then 194 # PHP was not specified, so search within the current path 195 AC_PATH_PROG([PHPCONFIG], [php-config]) 196 else 197 PHPCONFIG="$PHP_PATH/bin/php-config" 198 fi 199 215 200 # Extract the linker and include flags 216 201 PHP_LDFLAGS="-L/`$PHPCONFIG --prefix`/lib -lphp5" … … 230 215 AC_SUBST([PHP_CPPFLAGS]) 231 216 AC_SUBST([PHP_LDFLAGS]) 232 else233 PHP_ENABLED=""234 PHP_FILE=""235 217 fi 236 218 … … 244 226 245 227 246 247 248 228 AC_ARG_WITH([perl], 249 [AS_HELP_STRING([--with-perl=PATH], [specify an alternative directory for perl installation or --with-perl=no to disable perl support])], 250 [PERL_PATH="$withval"], [PERL_PATH=""]) 251 if test "$PERL_PATH" != "no"; 252 then 253 if test "x$PERL_PATH" = "xyes"; 254 then 229 [AS_HELP_STRING([--with-perl=PATH], [To enabled perl support or specify an alternative directory for perl installation, disabled by default])], 230 [PERL_PATH="$withval"; PERL_ENABLED="-DUSE_PERL"], [PERL_ENABLED=""]) 231 232 233 if test -z "$PERL_ENABLED" 234 then 235 PERL_FILE="" 236 else 237 PERLCONFIG="$PERL_PATH/bin/perl" 238 PHP_FILE="service_internal_perl.o" 239 if test "$PERL_PATH" = "yes" 240 then 241 # PHP was not specified, so search within the current path 255 242 AC_PATH_PROG([PERLCONFIG], [perl]) 256 243 else … … 258 245 fi 259 246 260 if test -f $PERLCONFIG;261 then262 AC_MSG_RESULT([Using user-specified perl file: $PERLCONFIG])263 else264 AC_MSG_ERROR([the user-specified perl file $PERLCONFIG does not exist])265 fi266 267 PERL_ENABLED="-DUSE_PERL"268 PERL_FILE="service_internal_perl.o"269 270 247 # Extract the linker and include flags 271 248 PERL_LDFLAGS=`$PERLCONFIG -MExtUtils::Embed -e ldopts` … … 280 257 AC_SUBST([PERL_CPPFLAGS]) 281 258 AC_SUBST([PERL_LDFLAGS]) 282 else283 PERL_ENABLED=""284 PERL_FILE=""285 259 fi 286 260
Note: See TracChangeset
for help on using the changeset viewer.