]> code.delx.au - gnu-emacs/blobdiff - configure.in
(calendar-location-name): Doc fix.
[gnu-emacs] / configure.in
index 7105a0dc01b720c56d81e7602241b0b701244ce9..be1035197872a8f6ad59f71d716b74dda09228ab 100644 (file)
@@ -31,7 +31,6 @@ locallisppath='${datadir}/emacs/${version}/site-lisp:'\
 '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
 lisppath='${locallisppath}:${lispdir}'
 etcdir='${datadir}/emacs/${version}/etc'
-lockdir='${sharedstatedir}/emacs/lock'
 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
 docdir='${datadir}/emacs/${version}/etc'
 
@@ -43,6 +42,15 @@ AC_ARG_WITH(pop,
 AC_ARG_WITH(kerberos,
 [  --with-kerberos         support Kerberos-authenticated POP],
 [AC_DEFINE(KERBEROS)])
+AC_ARG_WITH(kerberos5,
+[  --with-kerberos5         support Kerberos version 5 authenticated POP],
+[if test "${with_kerberos5+set}" = set; then
+  if test "${with_kerberos+set}" != set; then
+    with_kerberos=yes
+    AC_DEFINE(KERBEROS)
+  fi
+fi
+AC_DEFINE(KERBEROS5)])
 AC_ARG_WITH(hesiod,
 [  --with-hesiod           support Hesiod to get the POP server host],
 [AC_DEFINE(HESIOD)])
@@ -167,6 +175,20 @@ case "${canonical}" in
     esac
   ;;
 
+  ## OpenBSD ports
+  *-*-openbsd* )
+    opsys=openbsd
+    case "${canonical}" in
+      alpha-*-openbsd*)        machine=alpha ;;
+      i386-*-openbsd*) machine=intel386 ;;
+      m68k-*-openbsd*)  machine=hp9000s300 ;;
+      mipsel-*-openbsd*) machine=pmax ;;
+      ns32k-*-openbsd*)        machine=ns32000 ;;
+      sparc-*-openbsd*)        machine=sparc ;;
+      vax-*-netbsd*)   machine=vax ;;
+    esac
+  ;;
+
   ## Acorn RISCiX:
   arm-acorn-riscix1.1* )
     machine=acorn opsys=riscix1-1
@@ -177,6 +199,22 @@ case "${canonical}" in
     machine=acorn opsys=riscix12
   ;;
 
+  ## BSDI ports
+  *-*-bsdi* )
+    opsys=bsdi
+    case "${canonical}" in
+      i[345]86-*-bsdi*) machine=intel386 ;;
+      sparc-*-bsdi*)  machine=sparc ;;
+      powerpc-*-bsdi*)  machine=powerpc ;;
+    esac
+    case "${canonical}" in
+      *-*-bsd386* | *-*-bsdi1* )       opsys=bsd386 ;;
+      *-*-bsdi2.0* )           opsys=bsdos2 ;;
+      *-*-bsdi2* )             opsys=bsdos2-1 ;;
+      *-*-bsdi3* )             opsys=bsdos3 ;;
+    esac
+  ;;
+
   ## Alliant machines
   ## Strictly speaking, we need the version of the alliant operating
   ## system to choose the right machine file, but currently the
@@ -715,7 +753,7 @@ case "${canonical}" in
     machine=news-risc opsys=bsd4-3
   ;;
   mips-sony-newsos6* )
-    machine=news-risc opsys=newsos6
+    machine=news-r6 opsys=newsos6
   ;;
   mips-sony-news* )
     machine=news-risc opsys=newsos5
@@ -895,9 +933,7 @@ case "${canonical}" in
                                # /lib/cpp does not accept it.
                                OVERRIDE_CPPFLAGS=" "
                                ;;
-      *-bsd386* | *-bsdi1* )   opsys=bsd386 ;;
-      *-bsdi2.0* )             opsys=bsdos2 ;;
-      *-bsdi2* )               opsys=bsdos2-1 ;;
+      *-sysv4.2uw* )           opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
       *-386bsd* )              opsys=386bsd ;;
       *-freebsd* )             opsys=freebsd ;;
       *-nextstep* )             opsys=nextstep ;;
@@ -905,11 +941,16 @@ case "${canonical}" in
     esac
   ;;
 
-  ## Linux/68k-based GNU system
+  ## m68k Linux-based GNU system
   m68k-*-linux-gnu* )
     machine=m68k opsys=gnu-linux
   ;;
 
+  ## Mips Linux-based GNU system
+  mips-*-linux-gnu* )
+    machine=mips opsys=gnu-linux
+  ;;
+
   * )
     unported=yes
   ;;
@@ -931,6 +972,7 @@ if test x"${opsys}" = x; then
     *-sysv2 | *-sysvr2 )               opsys=usg5-2 ;;
     *-sysv2.2 | *-sysvr2.2 )           opsys=usg5-2-2 ;;
     *-sysv3* | *-sysvr3* )             opsys=usg5-3 ;;
+    *-sysv4.2uw* )                     opsys=unixware ;;
     *-sysv4.1* | *-sysvr4.1* )
        NON_GNU_CPP=/usr/lib/cpp
        opsys=usg5-4 ;;
@@ -1102,6 +1144,18 @@ fi
 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
   LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
   LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
+  x_default_search_path=""
+  for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
+    x_search_path="${x_library}/X11/%L/%T/%N%C%S:\
+${x_library}/X11/%L/%T/%N%C%S:${x_libary}/X11/%l/%T/%N%C%S:\
+${x_library}/X11/%T/%N%C%S:${x_library}/X11/%L/%T/%N%S:\
+${x_library}/X11/%l/%T/%N%S:${x_library}/X11/%T/%N%S"
+    if test x"${x_default_search_path}" = x; then
+      x_default_search_path=${x_search_path}
+    else
+      x_default_search_path="${x_search_path}:${x_default_search_path}"
+    fi
+  done
 fi
 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
   C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
@@ -1302,6 +1356,11 @@ GNU_MALLOC=yes
 doug_lea_malloc=yes
 AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no)
 AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
+AC_MSG_CHECKING(whether __after_morecore_hook exists)
+AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0],
+  [AC_MSG_RESULT(yes)],
+  [AC_MSG_RESULT(no)
+   doug_lea_malloc=no])
 if test "${system_malloc}" = "yes"; then
   GNU_MALLOC=no
   GNU_MALLOC_reason="
@@ -1310,7 +1369,7 @@ fi
 if test "$doug_lea_malloc" = "yes" ; then
   if test "$GNU_MALLOC" = yes ; then
     GNU_MALLOC_reason="
-      (Using new Doug Lea's new malloc from the GNU C Library.)"
+      (Using Doug Lea's new malloc from the GNU C Library.)"
   fi
   AC_DEFINE(DOUG_LEA_MALLOC)
 fi
@@ -1479,6 +1538,21 @@ dnl tranle@intellicorp.com says libXmu.a can need XtMalloc in libXt.a to link.
   LIBS="$OLDLIBS"
 fi
 
+if test "${USE_X_TOOLKIT}" = "MOTIF"; then
+  AC_MSG_CHECKING(for Motif version 2.1)
+  AC_TRY_COMPILE([#include <Xm/Xm.h>],
+    [#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
+int x = 5;
+#else
+Motif version prior to 2.1.
+#endif],
+    [AC_MSG_RESULT(yes)
+     HAVE_MOTIF_2_1=yes
+     AC_DEFINE(HAVE_MOTIF_2_1)],
+    [AC_MSG_RESULT(no)
+     HAVE_MOTIF_2_1=no])
+fi
+
 # If netdb.h doesn't declare h_errno, we must declare it by hand.
 AC_MSG_CHECKING(whether netdb declares h_errno)
 AC_TRY_LINK([#include <netdb.h>],
@@ -1513,9 +1587,27 @@ AC_CHECK_LIB(ncurses, tparm)
 
 # These tell us which Kerberos-related libraries to use.
 if test "${with_kerberos+set}" = set; then
-  AC_CHECK_LIB(krb, krb_get_cred)
-  AC_CHECK_LIB(des, des_cbc_encrypt)
+  if test "${with_kerberos5+set}" != set; then
+    AC_CHECK_LIB(krb, krb_get_cred,,
+                AC_CHECK_LIB(krb4, krb_get_cred))
+    AC_CHECK_LIB(des, des_cbc_encrypt,,
+                AC_CHECK_LIB(des425, des_cbc_encrypt))
+  fi
+  AC_CHECK_LIB(krb5, krb5_init_context)
+  AC_CHECK_LIB(crypto, mit_des_cbc_encrypt)
   AC_CHECK_LIB(com_err, com_err)
+
+  if test "${with_kerberos5+set}" = set; then
+    AC_CHECK_HEADERS(krb5.h)
+  else
+    AC_CHECK_HEADERS(des.h,,
+                    AC_CHECK_HEADERS(kerberosIV/des.h,,
+                                     AC_CHECK_HEADERS(kerberos/des.h)))
+    AC_CHECK_HEADERS(krb.h,,
+                    AC_CHECK_HEADERS(kerberosIV/krb.h,,
+                                     AC_CHECK_HEADERS(kerberos/krb.h)))
+  fi
+  AC_CHECK_HEADERS(com_err.h)
 fi
 
 AC_MSG_CHECKING(whether localtime caches TZ)
@@ -1634,8 +1726,8 @@ AC_SUBST(infodir)
 AC_SUBST(lispdir)
 AC_SUBST(locallisppath)
 AC_SUBST(lisppath)
+AC_SUBST(x_default_search_path)
 AC_SUBST(etcdir)
-AC_SUBST(lockdir)
 AC_SUBST(archlibdir)
 AC_SUBST(docdir)
 AC_SUBST(bitmapdir)
@@ -1719,7 +1811,8 @@ test "${exec_prefix}" != NONE &&
 changequote([, ])dnl
 
 AC_OUTPUT(Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
-       man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in, [
+       man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
+       leim/Makefile, [
 
 ### Make the necessary directories, if they don't exist.
 for dir in cpp etc lisp ; do
@@ -1783,4 +1876,7 @@ if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
   echo source $top_srcdir/src/.gdbinit > src/.gdbinit
 fi
 
+# This is how we know whether to re-run configure in certain cases.
+touch src/config.stamp
+
 ], [CPP="$CPP" CPPFLAGS="$CPPFLAGS"])