]> code.delx.au - gnu-emacs/blobdiff - configure.in
(load_face_colors): Load background color if setting
[gnu-emacs] / configure.in
index 2aeed6ee5326d7b3ccbe1ed01cf9db9ee6fd06dd..dcabf5a7d7699cc8eb5deef75117cb122d7183ce 100644 (file)
@@ -66,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
@@ -1094,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
@@ -1226,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* )
@@ -1553,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,
@@ -1828,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.