From a46007e939dcdb94301d4ea6eb94539cfa580e1d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 29 Jun 2010 20:43:30 -0700 Subject: [PATCH] * configure.in (HAVE_SOUND, HAVE_X_I18N, HAVE_X11R6_XIM): Set with AC_DEFINE rather than AH_BOTTOM. * src/s/sol2-6.h (INHIBIT_X11R6_XIM): Remove, handled by configure now. * admin/CPP-DEFINES: Remove INHIBIT_X11R6_XIM. * configure, src/config.in: Regenerate. --- ChangeLog | 3 ++ admin/CPP-DEFINES | 1 - configure | 29 +++++++++++++++++-- configure.in | 71 +++++++++++++++++++++-------------------------- src/ChangeLog | 2 ++ src/config.in | 49 +++++++++----------------------- src/s/sol2-6.h | 4 --- 7 files changed, 75 insertions(+), 84 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7f52eb6ed6..c6564b91604 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-06-30 Glenn Morris + * configure.in (HAVE_SOUND, HAVE_X_I18N, HAVE_X11R6_XIM): + Set with AC_DEFINE rather than AH_BOTTOM. + * configure.in (C_OPTIMIZE_SWITCH, CANNOT_DUMP, SYSTEM_MALLOC): (USE_MMAP_FOR_BUFFERS, C_WARNING_SWITCH, CFLAGS, REAL_CFLAGS): Set with shell, not cpp. diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index db96443ad48..8dfb8e2d600 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -203,7 +203,6 @@ HAVE_WINDOW_SYSTEM HAVE_WORKING_VFORK HAVE_XRMSETDATABASE HPUX -INHIBIT_X11R6_XIM INTERNAL_TERMINAL IS_ANY_SEP IS_DIRECTORY_SEP diff --git a/configure b/configure index 686320b3622..a6b4c45f329 100755 --- a/configure +++ b/configure @@ -5393,12 +5393,12 @@ fi if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x then - ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" + ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" fi if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x then - ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" + ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" fi @@ -5898,7 +5898,7 @@ eval as_val=\$$as_ac_Header cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - + have_sound_header=yes fi done @@ -6099,6 +6099,17 @@ $as_echo "#define HAVE_ALSA 1" >>confdefs.h fi + if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then + case "$opsys" in + gnu-linux|freebsd|netbsd) + +$as_echo "#define HAVE_SOUND 1" >>confdefs.h + + ;; + esac + fi + + fi for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ @@ -8175,6 +8186,18 @@ $as_echo "6 or newer" >&6; } $as_echo "#define HAVE_X11R6 1" >>confdefs.h + +$as_echo "#define HAVE_X_I18N 1" >>confdefs.h + + ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style + ## XIM support. + case "$opsys" in + sol2-*) : ;; + *) +$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h + + ;; + esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 $as_echo "before 6" >&6; } diff --git a/configure.in b/configure.in index 2e5ed9497b7..48f0716a482 100644 --- a/configure.in +++ b/configure.in @@ -810,12 +810,12 @@ dnl Add our options to ac_link now, after it is set up. if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x then - ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" + ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" fi if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x then - ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" + ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" fi dnl We need -znocombreloc if we're using a relatively recent GNU ld. @@ -866,7 +866,7 @@ if test "x$SPECIFIED_CFLAGS" = x; then REAL_CFLAGS= fi else - REAL_CFLAGS="$CFLAGS" + REAL_CFLAGS="$CFLAGS" fi @@ -1155,7 +1155,8 @@ AC_DEFUN([PKG_CHECK_MODULES], [ if test "${with_sound}" != "no"; then # Sound support for GNU/Linux and the free BSDs. - AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h) + AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h, + have_sound_header=yes) # Emulation library used on NetBSD. AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) AC_SUBST(LIBSOUND) @@ -1188,6 +1189,19 @@ if test "${with_sound}" != "no"; then CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) fi + + dnl Define HAVE_SOUND if we have sound support. We know it works and + dnl compiles only on the specified platforms. For others, it + dnl probably doesn't make sense to try. + if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then + case "$opsys" in + dnl defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ + gnu-linux|freebsd|netbsd) + AC_DEFINE(HAVE_SOUND, 1, [Define to 1 if you have sound support.]) + ;; + esac + fi + AC_SUBST(CFLAGS_SOUND) fi @@ -1777,6 +1791,15 @@ fail; AC_MSG_RESULT(6 or newer) AC_DEFINE(HAVE_X11R6, 1, [Define to 1 if you have the X11R6 or newer version of Xlib.]) + AC_DEFINE(HAVE_X_I18N, 1, [Define if you have usable i18n support.]) + ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style + ## XIM support. + case "$opsys" in + sol2-*) : ;; + *) AC_DEFINE(HAVE_X11R6_XIM, 1, + [Define if you have usable X11R6-style XIM support.]) + ;; + esac else AC_MSG_RESULT(before 6) fi @@ -3453,25 +3476,6 @@ AH_BOTTOM([ /* Turned on June 1996 supposing nobody will mind it. */ #define AMPERSAND_FULL_NAME -/* Define HAVE_SOUND if we have sound support. We know it works - and compiles only on the specified platforms. For others, - it probably doesn't make sense to try. */ - -#if defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ -#ifdef HAVE_MACHINE_SOUNDCARD_H -#define HAVE_SOUND 1 -#endif -#ifdef HAVE_SYS_SOUNDCARD_H -#define HAVE_SOUND 1 -#endif -#ifdef HAVE_SOUNDCARD_H -#define HAVE_SOUND 1 -#endif -#ifdef HAVE_ALSA -#define HAVE_SOUND 1 -#endif -#endif /* __FreeBSD__ || __NetBSD__ || __linux__ */ - /* If using GNU, then support inline function declarations. */ /* Don't try to switch on inline handling as detected by AC_C_INLINE generally, because even if non-gcc compilers accept `inline', they @@ -3500,9 +3504,9 @@ AH_BOTTOM([ parallel this exactly since GNUstep is multi-OS. */ #ifdef HAVE_NS # ifdef NS_IMPL_GNUSTEP -/* GNUstep needs a bit more pure memory. Of the existing knobs, + /* GNUstep needs a bit more pure memory. Of the existing knobs, SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ -# define SYSTEM_PURESIZE_EXTRA 30000 + # define SYSTEM_PURESIZE_EXTRA 30000 # endif /* NS_IMPL_GNUSTEP */ #endif /* HAVE_NS */ @@ -3562,9 +3566,8 @@ extern char *getenv (); #endif #endif -/* Define if the compiler supports function prototypes. It may do so - but not define __STDC__ (e.g. DEC C by default) or may define it as - zero. */ +/* Define if the compiler supports function prototypes. It may do so but + not define __STDC__ (e.g. DEC C by default) or may define it as zero. */ #undef PROTOTYPES /* For mktime.c: */ #ifndef __P @@ -3605,18 +3608,6 @@ void *alloca (size_t); typedef unsigned size_t; #endif -/* Define HAVE_X_I18N if we have usable i18n support. */ - -#ifdef HAVE_X11R6 -#define HAVE_X_I18N -#endif - -/* Define HAVE_X11R6_XIM if we have usable X11R6-style XIM support. */ - -#if defined HAVE_X11R6 && !defined INHIBIT_X11R6_XIM -#define HAVE_X11R6_XIM -#endif - #if defined __GNUC__ && (__GNUC__ > 2 \ || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) #define NO_RETURN __attribute__ ((__noreturn__)) diff --git a/src/ChangeLog b/src/ChangeLog index dc0dd35e632..2670410284b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2010-06-30 Glenn Morris + * s/sol2-6.h (INHIBIT_X11R6_XIM): Remove, handled by configure now. + * Makefile.in (CANNOT_DUMP): Update for configure name change. * s/freebsd.h (USE_MMAP_FOR_BUFFERS): diff --git a/src/config.in b/src/config.in index 098edeafd4a..e796e30b79d 100644 --- a/src/config.in +++ b/src/config.in @@ -588,6 +588,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if the system has the type `size_t'. */ #undef HAVE_SIZE_T +/* Define to 1 if you have sound support. */ +#undef HAVE_SOUND + /* Define to 1 if you have the header file. */ #undef HAVE_SOUNDCARD_H @@ -765,6 +768,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the X11R6 or newer version of Xlib. */ #undef HAVE_X11R6 +/* Define if you have usable X11R6-style XIM support. */ +#undef HAVE_X11R6_XIM + /* Define to 1 if you have the X11R6 or newer version of Xt. */ #undef HAVE_X11XTR6 @@ -795,6 +801,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the `XSetWMProtocols' function. */ #undef HAVE_XSETWMPROTOCOLS +/* Define if you have usable i18n support. */ +#undef HAVE_X_I18N + /* Define to 1 if you have the SM library (-lSM). */ #undef HAVE_X_SM @@ -1036,25 +1045,6 @@ along with GNU Emacs. If not, see . */ /* Turned on June 1996 supposing nobody will mind it. */ #define AMPERSAND_FULL_NAME -/* Define HAVE_SOUND if we have sound support. We know it works - and compiles only on the specified platforms. For others, - it probably doesn't make sense to try. */ - -#if defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ -#ifdef HAVE_MACHINE_SOUNDCARD_H -#define HAVE_SOUND 1 -#endif -#ifdef HAVE_SYS_SOUNDCARD_H -#define HAVE_SOUND 1 -#endif -#ifdef HAVE_SOUNDCARD_H -#define HAVE_SOUND 1 -#endif -#ifdef HAVE_ALSA -#define HAVE_SOUND 1 -#endif -#endif /* __FreeBSD__ || __NetBSD__ || __linux__ */ - /* If using GNU, then support inline function declarations. */ /* Don't try to switch on inline handling as detected by AC_C_INLINE generally, because even if non-gcc compilers accept `inline', they @@ -1083,9 +1073,9 @@ along with GNU Emacs. If not, see . */ parallel this exactly since GNUstep is multi-OS. */ #ifdef HAVE_NS # ifdef NS_IMPL_GNUSTEP -/* GNUstep needs a bit more pure memory. Of the existing knobs, + /* GNUstep needs a bit more pure memory. Of the existing knobs, SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ -# define SYSTEM_PURESIZE_EXTRA 30000 + # define SYSTEM_PURESIZE_EXTRA 30000 # endif /* NS_IMPL_GNUSTEP */ #endif /* HAVE_NS */ @@ -1145,9 +1135,8 @@ extern char *getenv (); #endif #endif -/* Define if the compiler supports function prototypes. It may do so - but not define __STDC__ (e.g. DEC C by default) or may define it as - zero. */ +/* Define if the compiler supports function prototypes. It may do so but + not define __STDC__ (e.g. DEC C by default) or may define it as zero. */ #undef PROTOTYPES /* For mktime.c: */ #ifndef __P @@ -1188,18 +1177,6 @@ void *alloca (size_t); typedef unsigned size_t; #endif -/* Define HAVE_X_I18N if we have usable i18n support. */ - -#ifdef HAVE_X11R6 -#define HAVE_X_I18N -#endif - -/* Define HAVE_X11R6_XIM if we have usable X11R6-style XIM support. */ - -#if defined HAVE_X11R6 && !defined INHIBIT_X11R6_XIM -#define HAVE_X11R6_XIM -#endif - #if defined __GNUC__ && (__GNUC__ > 2 \ || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) #define NO_RETURN __attribute__ ((__noreturn__)) diff --git a/src/s/sol2-6.h b/src/s/sol2-6.h index 0c30b3d81f0..f4719093d4a 100644 --- a/src/s/sol2-6.h +++ b/src/s/sol2-6.h @@ -34,10 +34,6 @@ along with GNU Emacs. If not, see . */ #define HAVE_LIBKSTAT #endif -/* inoue@ainet.or.jp says Solaris has a bug related to X11R6-style - XIM support. */ -#define INHIBIT_X11R6_XIM - /* This is the same definition as in usg5-4.h, but with sigblock/sigunblock rather than sighold/sigrelse, which appear to be BSD4.1 specific. It may also be appropriate for SVR4.x -- 2.39.2