Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 90 lines (79 sloc) 2.728 kb
a321c86 @spiritloose use autoconf
authored
1 AC_INIT(mod_psgi, 0.0.1, jiro@cpan.org)
2
3 AC_ARG_WITH(apxs, AC_HELP_STRING([--with-apxs=NAME],
4 [name of the apxs executable [[apxs]]]),
5 [APXS="$with_apxs"])
6 if test -z "${APXS}"; then
7 AC_PATH_PROGS(APXS, apxs2 apxs, no, [$PATH:/usr/sbin:/usr/local/apache2/bin])
8 fi
9 if test "$APXS" = no; then
10 AC_MSG_ERROR([apxs not found. set apxs with --with-apxs.])
11 fi
12 AC_SUBST(APXS)
13
f3f6041 @spiritloose Get apxs and perl's config vars in configure
authored
14 AP_INSTALLBUILDDIR=`$APXS -q installbuilddir`
15 AP_TOP_BUILDDIR=`dirname $AP_INSTALLBUILDDIR`
1fc9825 @spiritloose missing AP_TOP_SRCDIR
authored
16 AP_TOP_SRCDIR=$AP_TOP_BUILDDIR
f4c01d9 @spiritloose Support old autoconf
authored
17 AC_SUBST(AP_INSTALLBUILDDIR)
18 AC_SUBST(AP_TOP_BUILDDIR)
19 AC_SUBST(AP_TOP_SRCDIR)
f3f6041 @spiritloose Get apxs and perl's config vars in configure
authored
20
7dc7b31 @spiritloose --with-apctl -> --with-apachectl
authored
21 AC_ARG_WITH(apachectl, AC_HELP_STRING([--with-apachectl=NAME],
a321c86 @spiritloose use autoconf
authored
22 [name of the apachectl executable [[apachectl]]]),
7dc7b31 @spiritloose --with-apctl -> --with-apachectl
authored
23 [APACHECTL="$with_apachectl"])
a321c86 @spiritloose use autoconf
authored
24 if test -z "${APACHECTL}"; then
25 AC_PATH_PROGS(APACHECTL, apache2ctl apachectl, no, [$PATH:/usr/sbin:/usr/local/apache2/bin])
26 fi
27 if test "$APACHECTL" = no; then
28 AC_MSG_ERROR([apachectl not found. set apachectl with --with-apctl.])
29 fi
30 AC_SUBST(APACHECTL)
31
32 AC_ARG_WITH(perl, AC_HELP_STRING([--with-perl=NAME],
33 [name of the perl executable [[perl]]]),
34 [PERL="$with_perl"])
35 if test -z "${PERL}"; then
36 AC_PATH_PROG(PERL, perl, no, [$PATH])
37 fi
38 if test "$PERL" = no; then
ad1548e @spiritloose use abs_top_builddir
authored
39 AC_MSG_ERROR([perl not found. set perl with --with-perl.])
a321c86 @spiritloose use autoconf
authored
40 fi
41 AC_SUBST(PERL)
42
f39fe49 @spiritloose Check ExtUtils::Embed is installed
authored
43 HAS_EXTUTILS_EMBED=`$PERL -MExtUtils::Embed -e 'print "yes"'`
44 if test "$HAS_EXTUTILS_EMBED" != "yes"; then
45 AC_MSG_ERROR([ExtUtils::Embed not found. Please install it.])
46 fi
59b444b @spiritloose Removed -D_FILE_OFFSET_BITS=64
authored
47 PERL_CCOPTS=`$PERL -MExtUtils::Embed -e ccopts | sed -e 's/-D_FILE_OFFSET_BITS=64//'`
f3f6041 @spiritloose Get apxs and perl's config vars in configure
authored
48 PERL_LDOPTS=`$PERL -MExtUtils::Embed -e ldopts`
f4c01d9 @spiritloose Support old autoconf
authored
49 AC_SUBST(PERL_CCOPTS)
50 AC_SUBST(PERL_LDOPTS)
f3f6041 @spiritloose Get apxs and perl's config vars in configure
authored
51
378acc6 @spiritloose Added --with-prove
authored
52 AC_ARG_WITH(prove, AC_HELP_STRING([--with-prove=NAME],
53 [name of the prove executable [[prove]]]),
54 [PROVE="$with_prove"])
55 if test -z "${PROVE}"; then
56 AC_PATH_PROG(PROVE, prove, no, [$PATH])
57 fi
58 if test "$PROVE" = no; then
59 PROVE="prove"
60 fi
61 AC_SUBST(PROVE)
62
3cd211b @spiritloose Added --enable-debug
authored
63 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
64 [enable debug mode]),
65 [ENABLE_DEBUG="$enable_debug"],
66 [ENABLE_DEBUG="no"])
67 AP_LIBTOOL=`$APXS -q LIBTOOL`
68 eval `$AP_LIBTOOL --config | grep "^CC"`
69 if test "$CC" = "gcc"; then
70 EXTRA_CFLAGS="-Wall"
71 if test "$ENABLE_DEBUG" = "yes"; then
05f22d9 @spiritloose -O0 if --enable-debug
authored
72 EXTRA_CFLAGS+=" -O0 -g"
3cd211b @spiritloose Added --enable-debug
authored
73 DEBUG_DEFS="-DMOD_PSGI_DEBUG"
74 AC_SUBST(DEBUG_DEFS)
75 fi
76 AC_SUBST(EXTRA_CFLAGS)
77 fi
78
4097f28 @spiritloose Refactored Makefile
authored
79 AC_OUTPUT([Makefile t/Config.pm])
a321c86 @spiritloose use autoconf
authored
80
81 echo "
82 $PACKAGE_NAME $PACKAGE_VERSION configuration:
83 -----------------------
84 apxs: ${APXS}
85 apachectl: ${APACHECTL}
86 perl: ${PERL}
87
88 Now type 'make' to build $PACKAGE_NAME $PACKAGE_VERSION!
89 "
Something went wrong with that request. Please try again.