Cosmetic fix for libpopt-checking test.
[ira/wip.git] / source3 / configure.in
index 778990c5675014efb2bdfd88e23e1096f88bf8b1..433665eeef81da3016519325980b6996447c2b33 100644 (file)
@@ -320,12 +320,6 @@ fi
 AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
        AC_DEFINE(HAVE_LIBDL)])
 
-############################################
-# we need kerberos 5 for w2k ADS authentication
-AC_CHECK_LIB(krb5, krb5_mk_req_extended, [LIBS="$LIBS -lkrb5";
-       AC_DEFINE(HAVE_KRB5)])
-
-
 ############################################
 # check if the compiler can do immediate structures
 AC_CACHE_CHECK([for immediate structures],samba_cv_immediate_structures, [
@@ -615,16 +609,9 @@ if test x$ac_cv_func_fstat64 = xno ; then
   fi
 fi
 
-#
-# If no strcasecmp, check for it in some known places
-# It is in -lresolv on ReliantUNIX and UnixWare
-#   -lresolve *must* follow -lnsl for name resolution to work properly
-#
-
-if test x$ac_cv_func_strcasecmp = xno ; then
-       AC_CHECK_LIB(resolv,strcasecmp,[LIBS="$LIBS -lresolv"]
-               AC_DEFINE(HAVE_STRCASECMP))
-fi
+#####################################
+# we might need the resolv library on some systems
+AC_CHECK_LIB(resolv, dn_expand)
 
 #
 # Check for the functions putprpwnam, set_auth_parameters,
@@ -1555,10 +1542,10 @@ AC_ARG_WITH(smbwrapper,
 )
 
 #################################################
-# check for the AFS filesystem
-AC_MSG_CHECKING(whether to use AFS)
+# check for AFS clear-text auth support
+AC_MSG_CHECKING(whether to use AFS clear-text auth)
 AC_ARG_WITH(afs,
-[  --with-afs              Include AFS support (default=no) ],
+[  --with-afs              Include AFS clear-text auth support (default=no) ],
 [ case "$withval" in
   yes)
     AC_MSG_RESULT(yes)
@@ -1573,10 +1560,10 @@ AC_ARG_WITH(afs,
 
 
 #################################################
-# check for the DFS auth system
-AC_MSG_CHECKING(whether to use DFS auth)
+# check for the DFS clear-text auth system
+AC_MSG_CHECKING(whether to use DFS clear-text auth)
 AC_ARG_WITH(dfs,
-[  --with-dce-dfs          Include DCE/DFS support (default=no)],
+[  --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)],
 [ case "$withval" in
   yes)
     AC_MSG_RESULT(yes)
@@ -1589,50 +1576,41 @@ AC_ARG_WITH(dfs,
   AC_MSG_RESULT(no)
 )
 
-#################################################
-# check for Kerberos IV auth system
-AC_MSG_CHECKING(whether to use Kerberos IV)
-AC_ARG_WITH(krb4,
-[  --with-krb4=base-dir    Include Kerberos IV support (default=no)],
-[ case "$withval" in
-  yes)
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(KRB4_AUTH)
-    AC_CHECK_LIB(resolv, dn_expand)
-    LIBS="$LIBS -lkrb -ldes"
-    CFLAGS="$CFLAGS -I$withval/include"
-    LDFLAGS="$LDFLAGS -L$withval/lib"
-    AC_DEFINE_UNQUOTED(KRB4_DIR, ${withval})
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    ;;
-  esac ],
-  AC_MSG_RESULT(no)
-)
 
 #################################################
 # check for location of Kerberos 5 install
-AC_MSG_CHECKING(for kerberos 5 install)
+AC_MSG_CHECKING(for kerberos 5 install path)
 AC_ARG_WITH(krb5,
-[  --with-krb5=base-dir    Include Kerberos 5 support (default=no)],
+[  --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)],
 [ case "$withval" in
   no)
     AC_MSG_RESULT(no)
     ;;
   *)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(KRB5_AUTH)
     LIBS="$LIBS -lkrb5"
     CFLAGS="$CFLAGS -I$withval/include"
     LDFLAGS="$LDFLAGS -L$withval/lib"
     AC_DEFINE(HAVE_KRB5)
-    AC_DEFINE_UNQUOTED(KRB5_DIR,${withval})
+    have_krb5=yes;
     ;;
   esac ],
   AC_MSG_RESULT(no)
 )
 
+
+########################################################
+# now see if we can find the krb5 libs in standard paths
+if test x$have_krb5 != xyes; then
+AC_CHECK_LIB(krb5, krb5_mk_req_extended, [LIBS="$LIBS -lkrb5";
+       AC_DEFINE(HAVE_KRB5)])
+fi
+
+##################################################################
+# we might need the k5crypto and com_err libraries on some systems
+AC_CHECK_LIB(com_err, _et_list, [LIBS="$LIBS -lcom_err"])
+AC_CHECK_LIB(k5crypto, krb5_encrypt_data, [LIBS="$LIBS -lk5crypto"])
+
 #################################################
 # check for automount support
 AC_MSG_CHECKING(whether to use AUTOMOUNT)
@@ -1679,11 +1657,11 @@ AC_ARG_WITH(smbmount,
 
 
 #################################################
-# check for a PAM password database
+# check for a PAM clear-text auth, accounts, password and session support
 with_pam_for_crypt=no
-AC_MSG_CHECKING(whether to use PAM password database)
+AC_MSG_CHECKING(whether to use PAM)
 AC_ARG_WITH(pam,
-[  --with-pam              Include PAM password database support (default=no)],
+[  --with-pam              Include PAM support (default=no)],
 [ case "$withval" in
   yes)
     AC_MSG_RESULT(yes)
@@ -1795,7 +1773,7 @@ AC_ARG_WITH(ldapsam,
   yes)
     AC_MSG_RESULT(yes)
     AC_DEFINE(WITH_LDAP_SAM)
-    LIBS="-lldap -llber -lresolv $LIBS"
+    LIBS="-lldap -llber $LIBS"
     with_smbpasswd_sam=no
     ;;
   *)
@@ -2083,57 +2061,6 @@ AC_ARG_WITH(swatdir,
    AC_SUBST(swatdir)]
 )
 
-#################################################
-# check for i18n'ed SWAT compiling
-AC_MSG_CHECKING(whether to use i18n'ed SWAT)
-AC_ARG_WITH(i18n-swat,
-[  --with-i18n-swat        Use i18n'ed SWAT
-  --without-i18n-swat     Don't use i18n'ed SWAT (default)],
-[ case "$withval" in
-  yes)
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(I18N_SWAT)
-    i18n_swat="yes"
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    i18n_swat="no"
-    ;;
-  esac 
-  AC_SUBST(i18n_swat) ],
-  [ AC_MSG_RESULT(no)
-  i18n_swat="no"
-  AC_SUBST(i18n_swat) ]
-)
-
-#################################################
-# set SWAT default language for old web browsers.
-AC_MSG_CHECKING(whether to use default SWAT language)
-AC_ARG_WITH(swat-def-lang,
-[  --with-swat-def-lang=LN default SWAT language for old web browsers (empty)],
-[
-  default_pref_lang=""
-  case "$withval" in
-  yes)
-    AC_MSG_WARN([--with-swat-def-lang called without argument - will use default])
-  ;;
-  no)
-    AC_MSG_RESULT(no)
-  ;;
-  *)
-    default_pref_lang="$withval"
-    AC_MSG_RESULT($withval)
-    ;;
-  esac
-  AC_DEFINE_UNQUOTED(I18N_DEFAULT_PREF_LANG, "$default_pref_lang")
-],
-[
-  default_pref_lang=""
-  AC_MSG_RESULT(no)
-  AC_DEFINE_UNQUOTED(I18N_DEFAULT_PREF_LANG, "$default_pref_lang")
-]
-)
-
 #################################################
 # choose native language(s) of man pages
 AC_MSG_CHECKING(chosen man pages' language(s))
@@ -2525,6 +2452,37 @@ AC_SUBST(WINBIND_STARGETS)
 AC_SUBST(WINBIND_LTARGETS)
 AC_SUBST(WINBIND_PAM_PROGS)
 
+#################################################
+# Check to see if we should use the included popt 
+
+AC_ARG_WITH(included-popt,
+[  --with-included-popt    use bundled popt library, not from system],
+[ 
+  case "$withval" in
+       yes)
+               INCLUDED_POPT=yes
+               ;;
+        no)
+               INCLUDED_POPT=no
+                ;;
+  esac ],
+)
+if test x"$INCLUDED_POPT" != x"yes"; then
+    AC_CHECK_LIB(popt, poptGetContext,
+                INCLUDED_POPT=no, INCLUDED_POPT=yes)
+fi
+
+AC_MSG_CHECKING(whether to use included popt)
+if test x"$INCLUDED_POPT" = x"yes"; then
+    AC_MSG_RESULT($srcdir/popt)
+    BUILD_POPT='$(POPT_OBJS)'
+    CFLAGS="$CFLAGS -I$srcdir/popt"
+else
+    AC_MSG_RESULT(no)
+    LIBS="$LIBS -lpopt"
+fi
+AC_SUBST(BUILD_POPT)
+
 #################################################
 # final configure stuff