Commit 8b1de1b5 authored by Michael Olson's avatar Michael Olson
Browse files

Rename EMACS_ARG_Y to OPTION_DEFAULT_OFF, and EMACS_ARG_N to OPTION_DEFAULT_ON.

parent dfbe40f2
2008-01-23 Tom Tromey <tromey@redhat.com>
* configure.in (OPTION_DEFAULT_ON, OPTION_DEFAULT_OFF): New
macros.
(EMACS_ARG_Y, EMACS_ARG_N): Remove.
Update all users.
2008-01-21 Dan Nicolaescu <dann@ics.uci.edu> 2008-01-21 Dan Nicolaescu <dann@ics.uci.edu>
* config.guess, config.sub: Updated from master source. * config.guess, config.sub: Updated from master source.
......
...@@ -43,47 +43,63 @@ gamedir='${localstatedir}/games/emacs' ...@@ -43,47 +43,63 @@ gamedir='${localstatedir}/games/emacs'
gameuser=games gameuser=games
dnl Autoconf is so much less fun under VMS, maybe dnl OPTION_DEFAULT_OFF(NAME, HELP-STRING)
dnl because everything is less fun under VMS. --ttn dnl Create a new --with option that defaults to being disabled.
AC_DEFUN([EMACS_ARG_Y],[dnl dnl NAME is the base name of the option. The shell variable with_NAME
AC_ARG_WITH([$1],[AS_HELP_STRING([--with-$1],[$2])],[$3],[$4])dnl dnl will be set to either the user's value (if the option is
dnl specified; 'yes' for a plain --with-NAME) or to 'no' (if the
dnl option is not specified). Note that the shell variable name is
dnl constructed as autoconf does, by replacing non-alphanumeric
dnl characters with "_".
dnl HELP-STRING is the help text for the option.
AC_DEFUN([OPTION_DEFAULT_OFF], [dnl
AC_ARG_WITH([$1],[AS_HELP_STRING([--with-$1],[$2])],[],[dnl
m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=no])dnl
])dnl ])dnl
AC_DEFUN([EMACS_ARG_N],[dnl
AC_ARG_WITH([$1],[AS_HELP_STRING([--without-$1],[$2])],[$3],[$4])dnl dnl OPTION_DEFAULT_ON(NAME, HELP-STRING)
dnl Create a new --with option that defaults to being enabled. NAME
dnl is the base name of the option. The shell variable with_NAME
dnl will be set either to 'no' (for a plain --without-NAME) or to
dnl 'yes' (if the option is not specified). Note that the shell
dnl variable name is constructed as autoconf does, by replacing
dnl non-alphanumeric characters with "_".
dnl HELP-STRING is the help text for the option.
AC_DEFUN([OPTION_DEFAULT_ON], [dnl
AC_ARG_WITH([$1],[AS_HELP_STRING([--without-$1],[$2])],[],[dnl
m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=yes])dnl
])dnl ])dnl
EMACS_ARG_N([gcc],[don't use GCC to compile Emacs if GCC is found]) OPTION_DEFAULT_ON([gcc],[don't use GCC to compile Emacs if GCC is found])
EMACS_ARG_N([pop],[don't support POP mail retrieval with movemail], OPTION_DEFAULT_ON([pop],[don't support POP mail retrieval with movemail])
[if test "$withval" = yes; then if test "$with_pop" = yes; then
AC_DEFINE(MAIL_USE_POP) AC_DEFINE(MAIL_USE_POP)
else : fi
fi],
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
EMACS_ARG_Y([kerberos],[support Kerberos-authenticated POP], OPTION_DEFAULT_OFF([kerberos],[support Kerberos-authenticated POP])
[if test "$withval" = yes; then if test "$with_kerberos" = 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
EMACS_ARG_Y([kerberos5],[support Kerberos version 5 authenticated POP], OPTION_DEFAULT_OFF([kerberos5],[support Kerberos version 5 authenticated POP])
[if test "${with_kerberos5+set}" = set; then if test "${with_kerberos5}" = yes; then
if test "${with_kerberos+set}" != set; then if test "${with_kerberos}" != yes; then
with_kerberos=yes with_kerberos=yes
AC_DEFINE(KERBEROS) AC_DEFINE(KERBEROS)
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
EMACS_ARG_Y([hesiod],[support Hesiod to get the POP server host], OPTION_DEFAULT_OFF([hesiod],[support Hesiod to get the POP server host])
[if test "$withval" = yes; then if test "$with_hesiod" = 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
EMACS_ARG_N([sound],[don't compile with sound support]) OPTION_DEFAULT_ON([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
...@@ -106,20 +122,28 @@ this option's value should be `yes', `no', `lucid', `athena', `motif' or `gtk'. ...@@ -106,20 +122,28 @@ this option's value should be `yes', `no', `lucid', `athena', `motif' or `gtk'.
with_x_toolkit=$val with_x_toolkit=$val
]) ])
EMACS_ARG_Y([xpm],[use -lXpm for displaying XPM images]) OPTION_DEFAULT_OFF([xpm],[use -lXpm for displaying XPM images])
EMACS_ARG_Y([jpeg],[use -ljpeg for displaying JPEG images]) OPTION_DEFAULT_OFF([jpeg],[use -ljpeg for displaying JPEG images])
EMACS_ARG_Y([tiff],[use -ltiff for displaying TIFF images]) OPTION_DEFAULT_OFF([tiff],[use -ltiff for displaying TIFF images])
EMACS_ARG_Y([gif],[use -lgif (or -lungif) for displaying GIF images]) OPTION_DEFAULT_OFF([gif],[use -lgif (or -lungif) for displaying GIF images])
EMACS_ARG_Y([png],[use -lpng for displaying PNG images]) OPTION_DEFAULT_OFF([png],[use -lpng for displaying PNG images])
EMACS_ARG_Y([gpm],[use -lgpm for mouse support on a GNU/Linux console]) OPTION_DEFAULT_OFF([gpm],[use -lgpm for mouse support on a GNU/Linux console])
EMACS_ARG_Y([rsvg],[use -lrsvg-2 for displaying SVG images]) OPTION_DEFAULT_OFF([rsvg],[use -lrsvg-2 for displaying SVG images])
EMACS_ARG_Y([gtk],[use GTK (same as --with-x-toolkit=gtk)]) OPTION_DEFAULT_OFF([gtk],[use GTK (same as --with-x-toolkit=gtk)])
EMACS_ARG_Y([pkg-config-prog],[Path to pkg-config for finding GTK and librsvg]) OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars])
EMACS_ARG_N([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars]) OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
EMACS_ARG_N([xaw3d],[don't use Xaw3d]) OPTION_DEFAULT_ON([xim],[don't use X11 XIM])
EMACS_ARG_N([xim],[don't use X11 XIM]) OPTION_DEFAULT_ON([carbon],[don't use Carbon GUI on Mac OS X])
EMACS_ARG_N([carbon],[don't use Carbon GUI on Mac OS X]) OPTION_DEFAULT_ON([dbus],[use D-Bus])
EMACS_ARG_Y([dbus],[use D-Bus])
AC_ARG_WITH([pkg-config-prog],dnl
[AS_HELP_STRING([--with-pkg-config-prog=PATH],
[Path to pkg-config for finding GTK and librsvg])])
if test "X${with_pkg_config_prog}" != X; then
if test "${with_pkg_config_prog}" != yes; then
PKG_CONFIG="${with_pkg_config_prog}"
fi
fi
AC_ARG_ENABLE(carbon-app, AC_ARG_ENABLE(carbon-app,
[AS_HELP_STRING([--enable-carbon-app@<:@=DIR@:>@], [AS_HELP_STRING([--enable-carbon-app@<:@=DIR@:>@],
...@@ -1089,9 +1113,7 @@ dnl also defines GSTUFF_PKG_ERRORS on error ...@@ -1089,9 +1113,7 @@ dnl also defines GSTUFF_PKG_ERRORS on error
AC_DEFUN([PKG_CHECK_MODULES], [ AC_DEFUN([PKG_CHECK_MODULES], [
succeeded=no succeeded=no
if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "$PKG_CONFIG" = "no" ; then if test "$PKG_CONFIG" = "no" ; then
ifelse([$4], , [AC_MSG_ERROR([ ifelse([$4], , [AC_MSG_ERROR([
...@@ -1147,10 +1169,6 @@ if test "${with_sound}" != "no"; then ...@@ -1147,10 +1169,6 @@ if test "${with_sound}" != "no"; then
ALSA_REQUIRED=1.0.0 ALSA_REQUIRED=1.0.0
ALSA_MODULES="alsa >= $ALSA_REQUIRED" ALSA_MODULES="alsa >= $ALSA_REQUIRED"
dnl Check if --with-pkg-config-prog has been given.
if test "X${with_pkg_config_prog}" != X; then
PKG_CONFIG="${with_pkg_config_prog}"
fi
PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no) PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no)
if test $HAVE_ALSA = yes; then if test $HAVE_ALSA = yes; then
SAVE_CFLAGS="$CFLAGS" SAVE_CFLAGS="$CFLAGS"
...@@ -1639,11 +1657,6 @@ fi ...@@ -1639,11 +1657,6 @@ fi
HAVE_RSVG=no HAVE_RSVG=no
if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
if test "${with_rsvg}" != "no"; then if test "${with_rsvg}" != "no"; then
dnl Check if `--with-pkg-config-prog' has been given.
if test "X${with_pkg_config_prog}" != X; then
PKG_CONFIG="${with_pkg_config_prog}"
fi
RSVG_REQUIRED=2.0.0 RSVG_REQUIRED=2.0.0
RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
...@@ -1674,10 +1687,6 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \ ...@@ -1674,10 +1687,6 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \
GTK_REQUIRED=2.6 GTK_REQUIRED=2.6
GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
dnl Check if --with-pkg-config-prog has been given.
if test "X${with_pkg_config_prog}" != X; then
PKG_CONFIG="${with_pkg_config_prog}"
fi
dnl Checks for libraries. dnl Checks for libraries.
PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
...@@ -1765,21 +1774,20 @@ dnl D-Bus has been tested under GNU/Linux only. Must be adapted for ...@@ -1765,21 +1774,20 @@ dnl D-Bus has been tested under GNU/Linux only. Must be adapted for
dnl other platforms. Support for higher D-Bus versions but 1.0 is dnl other platforms. Support for higher D-Bus versions but 1.0 is
dnl also not configured. dnl also not configured.
HAVE_DBUS=no HAVE_DBUS=no
AC_MSG_CHECKING([maybe dbus])
if test "${with_dbus}" = "yes"; then if test "${with_dbus}" = "yes"; then
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, HAVE_DBUS=yes, HAVE_DBUS=no) PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, HAVE_DBUS=yes, HAVE_DBUS=no)
if test "$HAVE_DBUS" = yes; then if test "$HAVE_DBUS" = yes; then
AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.]) AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.])
fi fi
AC_MSG_RESULT($HAVE_DBUS)
else
AC_MSG_RESULT(no bub)
fi fi
### Link with -lXft if available to work around a bug. ### Link with -lXft if available to work around a bug.
HAVE_XFT=maybe HAVE_XFT=maybe
if test "${HAVE_GTK}" = "yes"; then if test "${HAVE_GTK}" = "yes"; then
dnl Check if --with-pkg-config-prog has been given.
if test "X${with_pkg_config_prog}" != X; then
PKG_CONFIG="${with_pkg_config_prog}"
fi
PKG_CHECK_MODULES(XFT, xft >= 0.13.0, , HAVE_XFT=no) PKG_CHECK_MODULES(XFT, xft >= 0.13.0, , HAVE_XFT=no)
if test "$HAVE_XFT" != no; then if test "$HAVE_XFT" != no; then
OLD_CFLAGS="$CPPFLAGS" OLD_CFLAGS="$CPPFLAGS"
......
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