- Added functions for Negotiate support, not called from the body yet.
[mod_auth_kerb.cvs/.git] / configure.in
index dcb2b9e..927e41d 100644 (file)
@@ -1,7 +1,10 @@
 dnl ####################
 dnl ## Initialization ##
 dnl ####################
-AC_INIT(README)
+AC_INIT(Apache Kerberos Module,
+        alpha2,
+        modauthkerb-developers@lists.sourceforge.net,
+        mod_auth_kerb)
 
 
 dnl ####################
@@ -13,9 +16,11 @@ AC_ARG_WITH(api,
        case $withval in
                'apache1')
                        ac_api=apache1
+                       ac_apidefs="-DAPXS1"
                        ;;
                'apache2')
                        ac_api=apache2
+                       ac_apidefs="-DAPXS2"
                        ;;
                *)
                        AC_ERROR(You can only specify apache1 or apache2.)
@@ -193,8 +198,8 @@ if test -z "$ac_krb5_disable" ; then
                        if test -n "$ac_krblibs" ; then
                                AC_CHECK_LIB(krb4, krb_get_pw_in_tkt, [
                                        ac_krb4="yes"
-                                       ac_krbdefs="-DKRB4"
-                                       ac_krblibs="-lkrb4 $ac_krblibs"
+                                       ac_krbdefs="$ac_krbdefs -DKRB4"
+                                       ac_krblibs="$ac_krblibs -lkrb4 $ac_krblibs"
                                ],, $ac_krblibs)
                        fi
                fi
@@ -263,9 +268,11 @@ if test -z "$ac_api" ; then
        if test -n "`$APXS -q bindir 2> /dev/null`" ; then
                echo "API autodetected to be Apache 2.*"
                ac_api=apache2
+               ac_apidefs="-DAPXS2"
        else
                echo "API autodetected to be Apache 1.*"
                ac_api=apache1
+               ac_apidefs="-DAPXS1"
        fi
 fi
 
@@ -284,57 +291,13 @@ dnl ##########################
 dnl ## Last Minute Settings ##
 dnl ##########################
 LIBS="$LIBS $ac_krblibs"
-DEFS="$DEFS $ac_krbdefs"
-GENHEADERS=""
-GENSOURCES=""
-case $ac_api in
-       'apache1')
-               GENHEADERS="$GENHEADERS apache1/api_inc.h"
-               GENHEADERS="$GENHEADERS apache1/auth_config.h"
-               GENSOURCES="$GENSOURCES apache1/auth_user.c"
-               GENSOURCES="$GENSOURCES apache1/auth_cmds.c"
-               GENSOURCES="$GENSOURCES apache1/dir_config.c"
-               GENSOURCES="$GENSOURCES apache1/module.c"
-               ;;
-       'apache2')
-               GENHEADERS="$GENHEADERS apache2/api_inc.h"
-               GENHEADERS="$GENHEADERS apache2/auth_config.h"
-               GENSOURCES="$GENSOURCES apache2/auth_user.c"
-               GENSOURCES="$GENSOURCES apache2/auth_cmds.c"
-               GENSOURCES="$GENSOURCES apache2/dir_config.c"
-               GENSOURCES="$GENSOURCES apache2/hooks.c"
-               GENSOURCES="$GENSOURCES apache2/module.c"
-               ;;
-esac
-
-if test "$ac_krb5" = "yes" ; then
-       GENHEADERS="$GENHEADERS krb5/krb5_inc.h"
-       GENSOURCES="krb5/validate.c $GENSOURCES"
-fi
-
-if test "$ac_krb4" = "yes" ; then
-       GENHEADERS="$GENHEADERS krb4/krb4_inc.h"
-       GENSOURCES="krb4/validate.c $GENSOURCES"
-fi
+DEFS="$DEFS $ac_apidefs $ac_krbdefs"
+CFLAGS="$CFLAGS $DEFS"
 
 
 dnl #########################
 dnl ## Create Output Files ##
 dnl #########################
-echo "Generating mod_auth_kerb.c ..."
-echo "/* Automatically generated by configure. */" > mod_auth_kerb.c
-if test "$ac_krb5" = "yes" ; then
-       echo "#define KRB5 1" >> mod_auth_kerb.c
-fi
-if test "$ac_krb4" = "yes" ; then
-       echo "#define KRB4 1" >> mod_auth_kerb.c
-fi
-for f in $GENHEADERS $GENSOURCES ; do
-       echo "  Adding $f"
-       echo "" >> mod_auth_kerb.c
-       cat $f >> mod_auth_kerb.c
-done
-
 if test "$ac_static" = "yes" ; then
        echo ""
        echo ""
@@ -347,6 +310,7 @@ if test "$ac_static" = "yes" ; then
        echo ""
 else
        AC_OUTPUT(Makefile)
+       AC_OUTPUT(src/Makefile)
 fi
 
 exit 0