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.
2010-06-30 Glenn Morris <rgm@gnu.org>
+ * 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.
HAVE_WORKING_VFORK
HAVE_XRMSETDATABASE
HPUX
-INHIBIT_X11R6_XIM
INTERNAL_TERMINAL
IS_ANY_SEP
IS_DIRECTORY_SEP
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
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
-
+ have_sound_header=yes
fi
done
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 \
$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; }
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.
REAL_CFLAGS=
fi
else
- REAL_CFLAGS="$CFLAGS"
+ REAL_CFLAGS="$CFLAGS"
fi
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)
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
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
/* 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
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 */
#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
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__))
2010-06-30 Glenn Morris <rgm@gnu.org>
+ * 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):
/* 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 <soundcard.h> header file. */
#undef HAVE_SOUNDCARD_H
/* 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
/* 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
/* 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
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 */
#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
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__))
#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