]> code.delx.au - gnu-emacs/blobdiff - configure.in
(load_face_colors): Load background color if setting
[gnu-emacs] / configure.in
index f2ce21bbe66f6fb6ce2ce9116887378b6479d107..dcabf5a7d7699cc8eb5deef75117cb122d7183ce 100644 (file)
@@ -39,18 +39,6 @@ AC_ARG_WITH(gcc,
 AC_ARG_WITH(pop,
 [  --with-pop              support POP for mail retrieval],
 [AC_DEFINE(MAIL_USE_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)])
@@ -78,6 +66,18 @@ Currently, \`yes', \`athena' and \`lucid' are synonyms.])
          esac
          with_x_toolkit=$val
 ])
+AC_ARG_WITH(xpm,
+[  --with-xpm              use -lXpm for displaying XPM images])
+AC_ARG_WITH(jpeg,
+[  --with-jpeg             use -ljpeg for displaying JPEG images])
+AC_ARG_WITH(tiff,
+[  --with-tiff             use -ltiff34 for displaying TIFF images])
+AC_ARG_WITH(gif,
+[  --with-gif              use -lungif for displaying GIF images])
+AC_ARG_WITH(png,
+[  --with-png              use -lpng for displaying PNG images])
+AC_ARG_WITH(sound,
+[  --with-sound            native sound support for GNU/Linux and free BSDs])
 
 #### Make srcdir absolute, if it isn't already.  It's important to
 #### avoid running the path through pwd unnecessary, since pwd can
@@ -168,6 +168,7 @@ case "${canonical}" in
       m68k-*-netbsd*)
                        # This is somewhat bogus.
                        machine=hp9000s300 ;;
+      powerpc-apple-netbsd*) machine=macppc ;;
       mips-*-netbsd*)  machine=pmax ;;
       ns32k-*-netbsd*) machine=ns32000 ;;
       sparc-*-netbsd*) machine=sparc ;;
@@ -185,7 +186,7 @@ case "${canonical}" in
       mipsel-*-openbsd*) machine=pmax ;;
       ns32k-*-openbsd*)        machine=ns32000 ;;
       sparc-*-openbsd*)        machine=sparc ;;
-      vax-*-netbsd*)   machine=vax ;;
+      vax-*-openbsd*)  machine=vax ;;
     esac
   ;;
 
@@ -977,6 +978,11 @@ case "${canonical}" in
     RANLIB="ar -ts"
   ;;
 
+  ## UXP/V
+  f301-fujitsu-uxpv4.1)
+    machine=f301 opsys=uxpv
+  ;;
+
   * )
     unported=yes
   ;;
@@ -1100,6 +1106,14 @@ AC_PROG_YACC
 dnl checks for Unix variants
 AC_AIX
 
+# Sound support for GNU/Linux and the free BSDs.
+if test "${with_sound}" = ""; then
+  with_sound=no
+fi
+if test "${with_sound}" != "no"; then
+  AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h)
+fi
+
 dnl checks for header files
 AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h linux/version.h sys/systeminfo.h termios.h limits.h string.h)
 AC_HEADER_STDC
@@ -1232,6 +1246,94 @@ case ${HAVE_X11} in
   yes ) HAVE_MENUS=yes ;;
 esac
 
+### Is -lXaw3d available?
+HAVE_XAW3D=no
+if test "${HAVE_X11}" = "yes"; then
+  old_c_flags="${CFLAGS}"
+  CFLAGS="${LD_SWITCH_X_SITE}"
+  AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, HAVE_XAW3D=yes, , -lX11)
+  CFLAGS="${old_c_flags}"
+
+  if test "${HAVE_XAW3D}" = "yes"; then
+    AC_DEFINE(HAVE_XAW3D)
+  fi
+fi
+  
+### Use -lXpm if available, unless `--with-xpm=no'.
+HAVE_XPM=no
+if test "${HAVE_X11}" = "yes"; then
+  if test "${with_xpm}" != "no"; then
+    old_c_flags="${CFLAGS}"
+    CFLAGS="${LD_SWITCH_X_SITE}"
+    AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, HAVE_XPM=yes, , -lX11)
+    CFLAGS="${old_c_flags}"
+  fi
+
+  if test "${HAVE_XPM}" = "yes"; then
+    AC_DEFINE(HAVE_XPM)
+  fi
+fi
+  
+### Use -ljpeg if available, unless `--with-jpeg=no'.
+HAVE_JPEG=no
+if test "${HAVE_X11}" = "yes"; then
+  if test "${with_jpeg}" != "no"; then
+    old_c_flags="${CFLAGS}"
+    CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
+    AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes, , -lX11)
+    CFLAGS="${old_c_flags}"
+  fi
+
+  if test "${HAVE_JPEG}" = "yes"; then
+    AC_DEFINE(HAVE_JPEG)
+  fi
+fi
+  
+### Use -lpng if available, unless `--with-png=no'.
+HAVE_PNG=no
+if test "${HAVE_X11}" = "yes"; then
+  if test "${with_png}" != "no"; then
+    old_c_flags="${CFLAGS}"
+    CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
+    AC_CHECK_LIB(png, png_set_expand, HAVE_PNG=yes, , -lX11 -lz -lm)
+    CFLAGS="${old_c_flags}"
+  fi
+
+  if test "${HAVE_PNG}" = "yes"; then
+    AC_DEFINE(HAVE_PNG)
+  fi
+fi
+  
+### Use -ltiff34 if available, unless `--with-tiff=no'.
+HAVE_TIFF=no
+if test "${HAVE_X11}" = "yes"; then
+  if test "${with_tiff}" != "no"; then
+    old_c_flags="${CFLAGS}"
+    CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
+    AC_CHECK_LIB(tiff34, TIFFGetVersion, HAVE_TIFF=yes, , -lX11)
+    CFLAGS="${old_c_flags}"
+  fi
+
+  if test "${HAVE_TIFF}" = "yes"; then
+    AC_DEFINE(HAVE_TIFF)
+  fi
+fi
+  
+### Use -lgif if available, unless `--with-gif=no'.
+HAVE_GIF=no
+if test "${HAVE_X11}" = "yes"; then
+  if test "${with_gif}" != "no"; then
+    old_c_flags="${CFLAGS}"
+    CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
+    AC_CHECK_LIB(ungif, DGifOpenFileName, HAVE_GIF=yes, , -lX11)
+    CFLAGS="${old_c_flags}"
+  fi
+
+  if test "${HAVE_GIF}" = "yes"; then
+    AC_DEFINE(HAVE_GIF)
+  fi
+fi
+  
 if test "${opsys}" = "hpux9"; then
   case "${x_libraries}" in
     *X11R4* )
@@ -1559,6 +1661,18 @@ fi
 
 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
 
+dnl Use toolkit scroll bars if configured for X toolkit and either
+dnl using Motif or Xaw3d is available.
+
+if test "${USE_X_TOOLKIT}" != "none"; then
+  if test "${USE_X_TOOLKIT}" = "MOTIF"; then
+    AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
+    HAVE_XAW3D=no
+  elif test "${HAVE_XAW3D}" = "yes"; then
+    AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
+  fi
+fi
+
 if test "${USE_X_TOOLKIT}" != "none"; then
   AC_MSG_CHECKING(X11 toolkit version)
   AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6,
@@ -1599,6 +1713,7 @@ Motif version prior to 2.1.
   HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
   if test $emacs_cv_motif_version_2_1 = yes; then
     AC_DEFINE(HAVE_MOTIF_2_1)
+    AC_CHECK_LIB(Xp, XpCreateContext)
   fi
 fi
 
@@ -1636,31 +1751,6 @@ utimes setrlimit setpgid getcwd shutdown strftime)
 # than to expect to find it in ncurses.
 AC_CHECK_LIB(ncurses, tparm)
 
-# These tell us which Kerberos-related libraries to use.
-if test "${with_kerberos+set}" = set; then
-  AC_CHECK_LIB(com_err, com_err)
-  AC_CHECK_LIB(crypto, mit_des_cbc_encrypt)
-  AC_CHECK_LIB(krb5, krb5_init_context)
-  if test "${with_kerberos5+set}" != set; then
-    AC_CHECK_LIB(des, des_cbc_encrypt,,
-                AC_CHECK_LIB(des425, des_cbc_encrypt))
-    AC_CHECK_LIB(krb, krb_get_cred,,
-                AC_CHECK_LIB(krb4, krb_get_cred))
-  fi
-
-  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
-
 # Solaris requires -lintl if you want strerror (which calls dgettext)
 # to return localized messages.
 AC_CHECK_LIB(intl, dgettext)
@@ -1858,6 +1948,12 @@ else
 echo "  Where do we find X Windows libraries?                   Standard dirs"
 fi
 
+echo "  Does Emacs use -lXaw3d?                                 ${HAVE_XAW3D}"
+echo "  Does Emacs use -lXpm?                                   ${HAVE_XPM}"
+echo "  Does Emacs use -ljpeg?                                  ${HAVE_JPEG}"
+echo "  Does Emacs use -ltiff34?                                ${HAVE_TIFF}"
+echo "  Does Emacs use -lungif?                                 ${HAVE_GIF}"
+echo "  Does Emacs use -lpng?                                   ${HAVE_PNG}"
 echo
 
 # Remove any trailing slashes in these variables.
@@ -1894,8 +1990,8 @@ sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/  *$//' \
 `"
 changequote([, ])dnl
 
-echo creating src/paths.h
-make paths-force
+echo creating src/epaths.h
+make epaths-force
 
 echo creating lib-src/Makefile
 ( cd lib-src