Commit eb11f5b8 authored by Thien-Thi Nguyen's avatar Thien-Thi Nguyen
Browse files

(EMACS_ARG_Y, EMACS_ARG_N): New AC_DEFUNs.

Use them throughout in place of AC_ARG_WITH calls.
parent ccf89694
...@@ -42,25 +42,33 @@ gamedir='${localstatedir}/games/emacs' ...@@ -42,25 +42,33 @@ gamedir='${localstatedir}/games/emacs'
gameuser=games gameuser=games
AC_ARG_WITH(gcc, dnl Autoconf is so much less fun under VMS, maybe
[ --without-gcc don't use GCC to compile Emacs if GCC is found]) dnl because everything is less fun under VMS. --ttn
AC_ARG_WITH(pop, AC_DEFUN([EMACS_ARG_Y],[dnl
[ --without-pop don't support POP mail retrieval with movemail], AC_ARG_WITH([$1],[AS_HELP_STRING([--with-$1],[$2])],[$3],[$4])dnl
])dnl
AC_DEFUN([EMACS_ARG_N],[dnl
AC_ARG_WITH([$1],[AS_HELP_STRING([--without-$1],[$2])],[$3],[$4])dnl
])dnl
EMACS_ARG_N([gcc],[don't use GCC to compile Emacs if GCC is found])
EMACS_ARG_N([pop],[don't support POP mail retrieval with movemail],
[if test "$withval" = yes; then [if test "$withval" = yes; then
AC_DEFINE(MAIL_USE_POP) AC_DEFINE(MAIL_USE_POP)
else : else :
fi], fi],
AC_DEFINE(MAIL_USE_POP)) AC_DEFINE(MAIL_USE_POP))
AH_TEMPLATE(MAIL_USE_POP, [Define to support POP mail retrieval.])dnl AH_TEMPLATE(MAIL_USE_POP, [Define to support POP mail retrieval.])dnl
AC_ARG_WITH(kerberos,
[ --with-kerberos support Kerberos-authenticated POP], EMACS_ARG_Y([kerberos],[support Kerberos-authenticated POP],
[if test "$withval" = yes; then [if test "$withval" = yes; then
AC_DEFINE(KERBEROS) AC_DEFINE(KERBEROS)
fi]) fi])
AH_TEMPLATE(KERBEROS, AH_TEMPLATE(KERBEROS,
[Define to support Kerberos-authenticated POP mail retrieval.])dnl [Define to support Kerberos-authenticated POP mail retrieval.])dnl
AC_ARG_WITH(kerberos5,
[ --with-kerberos5 support Kerberos version 5 authenticated POP], EMACS_ARG_Y([kerberos5],[support Kerberos version 5 authenticated POP],
[if test "${with_kerberos5+set}" = set; then [if test "${with_kerberos5+set}" = set; then
if test "${with_kerberos+set}" != set; then if test "${with_kerberos+set}" != set; then
with_kerberos=yes with_kerberos=yes
...@@ -68,21 +76,19 @@ AC_ARG_WITH(kerberos5, ...@@ -68,21 +76,19 @@ AC_ARG_WITH(kerberos5,
fi fi
AC_DEFINE(KERBEROS5, 1, [Define to use Kerberos 5 instead of Kerberos 4.]) AC_DEFINE(KERBEROS5, 1, [Define to use Kerberos 5 instead of Kerberos 4.])
fi]) fi])
AC_ARG_WITH(hesiod,
[ --with-hesiod support Hesiod to get the POP server host], EMACS_ARG_Y([hesiod],[support Hesiod to get the POP server host],
[if test "$withval" = yes; then [if test "$withval" = yes; then
AC_DEFINE(HESIOD, 1, [Define to support using a Hesiod database to find the POP server.]) AC_DEFINE(HESIOD, 1, [Define to support using a Hesiod database to find the POP server.])
fi]) fi])
AC_ARG_WITH(sound, EMACS_ARG_N([sound],[don't compile with sound support])
[ --without-sound don't compile with sound support])
dnl This should be the last --with option, because --with-x is dnl This should be the last --with option, because --with-x is
dnl added later on when we find the path of X, and it's best to dnl added later on when we find the path of X, and it's best to
dnl keep them together visually. dnl keep them together visually.
AC_ARG_WITH(x-toolkit, AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT],
[ --with-x-toolkit=KIT use an X toolkit [use an X toolkit (KIT one of: yes, lucid, athena, motif, gtk, no)])],
(KIT = yes/lucid/athena/motif/gtk/no)],
[ case "${withval}" in [ case "${withval}" in
y | ye | yes ) val=gtk ;; y | ye | yes ) val=gtk ;;
n | no ) val=no ;; n | no ) val=no ;;
...@@ -98,33 +104,21 @@ this option's value should be `yes', `no', `lucid', `athena', `motif' or `gtk'. ...@@ -98,33 +104,21 @@ this option's value should be `yes', `no', `lucid', `athena', `motif' or `gtk'.
esac esac
with_x_toolkit=$val with_x_toolkit=$val
]) ])
AC_ARG_WITH(xpm,
[ --with-xpm use -lXpm for displaying XPM images]) EMACS_ARG_Y([xpm],[use -lXpm for displaying XPM images])
AC_ARG_WITH(jpeg, EMACS_ARG_Y([jpeg],[use -ljpeg for displaying JPEG images])
[ --with-jpeg use -ljpeg for displaying JPEG images]) EMACS_ARG_Y([tiff],[use -ltiff for displaying TIFF images])
AC_ARG_WITH(tiff, EMACS_ARG_Y([gif],[use -lgif (or -lungif) for displaying GIF images])
[ --with-tiff use -ltiff for displaying TIFF images]) EMACS_ARG_Y([png],[use -lpng for displaying PNG images])
AC_ARG_WITH(gif, EMACS_ARG_Y([gpm],[use -lgpm for mouse support on a GNU/Linux console])
[ --with-gif use -lgif (or -lungif) for displaying GIF images]) EMACS_ARG_Y([rsvg],[use -lrsvg-2 for displaying SVG images])
AC_ARG_WITH(png, EMACS_ARG_Y([gtk],[use GTK (same as --with-x-toolkit=gtk)])
[ --with-png use -lpng for displaying PNG images]) EMACS_ARG_Y([pkg-config-prog],[Path to pkg-config for finding GTK and librsvg])
AC_ARG_WITH(gpm, EMACS_ARG_N([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars])
[ --with-gpm use -lgpm for mouse support on a GNU/Linux console]) EMACS_ARG_N([xaw3d],[don't use Xaw3d])
AC_ARG_WITH(rsvg, EMACS_ARG_N([xim],[don't use X11 XIM])
[ --with-rsvg use -lrsvg-2 for displaying SVG images]) EMACS_ARG_N([carbon],[don't use Carbon GUI on Mac OS X])
AC_ARG_WITH(gtk,
[ --with-gtk use GTK (same as --with-x-toolkit=gtk)])
AC_ARG_WITH(pkg-config-prog,
[ --with-pkg-config-prog Path to pkg-config to use for finding GTK and librsvg])
AC_ARG_WITH(toolkit-scroll-bars,
[ --without-toolkit-scroll-bars
don't use Motif or Xaw3d scroll bars])
AC_ARG_WITH(xaw3d,
[ --without-xaw3d don't use Xaw3d])
AC_ARG_WITH(xim,
[ --without-xim don't use X11 XIM])
AC_ARG_WITH(carbon,
[ --without-carbon don't use Carbon GUI on Mac OS X])
AC_ARG_ENABLE(carbon-app, AC_ARG_ENABLE(carbon-app,
[[ --enable-carbon-app[=DIR] [DIR=/Application] [[ --enable-carbon-app[=DIR] [DIR=/Application]
specify install directory for Emacs.app on Mac OS X]], specify install directory for Emacs.app on Mac OS X]],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment