First attempt of writing configure.in
[mod_auth_kerb.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_REVISION($Revision$)
3 AC_INIT(Apache Kerberos Module, 0.5-rc1, modauthkerb-developers@lists.sourceforge.net)
4
5 AC_ARG_WITH(apache,
6    [  --with-apache=DIR directory with apache installation.],
7    [], [])
8    
9 AC_ARG_WITH(kerberos5,
10    [  --with-kerberos5=DIR directory where Kerberos5 is installed.],
11    [], [])
12
13 AC_ARG_ENABLE(krb5,
14 [  --disable-krb5                      force disabling of krb5 support],
15
16 AC_ARG_WITH(kerberos4,
17    [  --with-kerberos4=DIR directory where Kerberos4 is installed.]
18    [] [])
19
20 AC_ARG_ENABLE(krb4,
21 [  --disable-krb4                      force disabling of krb4 support],
22
23 dnl Checks for programs.
24 AC_PROG_CC
25 AC_PROG_MAKE_SET
26 if test -z "$ac_static" ; then
27         AC_PATH_PROG(APXS, apxs)
28         if test -z "$APXS" ; then
29                 echo "No apxs found.  Defaulting to static module generation."
30                 ac_static="yes"
31         fi
32 fi
33
34 dnl Checks for typedefs, structures, and compiler characteristics.
35 if test -z "$ac_api" ; then
36         if test -n "`$APXS -q bindir 2> /dev/null`" ; then
37                 echo "API autodetected to be Apache 2.*"
38                 ac_api=apache2
39                 ac_apidefs="-DAPXS2"
40         else
41                 echo "API autodetected to be Apache 1.*"
42                 ac_api=apache1
43                 ac_apidefs="-DAPXS1"
44         fi
45 fi
46
47
48 dnl Checks for library functions.
49
50
51 dnl Last minute settings.
52 LIBS="$LIBS $ac_krblibs"
53 DEFS="$DEFS $ac_apidefs $ac_krbdefs"
54 CFLAGS="$CFLAGS $DEFS"
55
56
57 dnl Create files necessary to compile mod_auth_kerb.
58 if test "$ac_static" = "yes" ; then
59         echo ""
60         echo ""
61         echo "This module is to be built statically into Apache.  You will need"
62         echo "to place it into the appropriate location in the source tree and"
63         echo "compile Apache accordingly.  You can look at the online docs at"
64         echo "http://modauthkerb.sourceforge.net/ or README.static for more"
65         echo "information."
66         echo ""
67         echo ""
68 else
69         AC_OUTPUT(Makefile)
70         AC_OUTPUT(src/Makefile)
71 fi
72
73 exit 0