OPTION_DEFAULT_ON([gif],[don't compile with GIF image support])
OPTION_DEFAULT_ON([png],[don't compile with PNG image support])
OPTION_DEFAULT_ON([rsvg],[don't compile with SVG image support])
+OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
+OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support])
OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts])
OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support])
OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support])
OPTION_DEFAULT_ON([gconf],[don't compile with GConf support])
OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support])
+OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
## For the times when you want to build Emacs but don't have
## a suitable makeinfo, and can live without the manuals.
[Define this to check for errors in cons list.])
fi
+AC_ARG_ENABLE(use-lisp-union-type,
+[AS_HELP_STRING([--enable-use-lisp-union-type],
+ [use a union for the Lisp_Object data type.
+ This is only useful for development for catching certain types of bugs.])],
+if test "${enableval}" != "no"; then
+ AC_DEFINE(USE_LISP_UNION_TYPE, 1,
+ [Define this to use a lisp union for the Lisp_Object data type.])
+fi)
+
+
AC_ARG_ENABLE(profiling,
[AS_HELP_STRING([--enable-profiling],
[build emacs with profiling support.
[ac_enable_profiling="${enableval}"],[])
if test x$ac_enable_profiling != x ; then
PROFILING_CFLAGS="-DPROFILING=1 -pg"
- PROFILING_LDFLAGS="-pg"
else
PROFILING_CFLAGS=
- PROFILING_LDFLAGS=
fi
+AC_SUBST(PROFILING_CFLAGS)
AC_ARG_ENABLE(autodepend,
[AS_HELP_STRING([--enable-autodepend],
CC="$NON_GNU_CC"
fi
-if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
-then
- CC="$CC $GCC_TEST_OPTIONS"
-fi
-
-if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
-then
- CC="$CC $NON_GCC_TEST_OPTIONS"
+if test x$GCC = xyes; then
+ test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
+else
+ test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
fi
dnl checks for Unix variants
unset has_option
unset SAVE_CFLAGS
+### Use -Wold-style-definition if the compiler supports it
+# This can be removed when conversion to standard C is finished.
+AC_MSG_CHECKING([whether gcc understands -Wold-style-definition])
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wold-style-definition"
+AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
+if test $has_option = yes; then
+ C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH"
+fi
+AC_MSG_RESULT($has_option)
+CFLAGS="$SAVE_CFLAGS"
+unset has_option
+unset SAVE_CFLAGS
+
+### Use -Wimplicit-function-declaration if the compiler supports it
+AC_MSG_CHECKING([whether gcc understands -Wimplicit-function-declaration])
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wimplicit-function-declaration"
+AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
+if test $has_option = yes; then
+ C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH"
+fi
+AC_MSG_RESULT($has_option)
+CFLAGS="$SAVE_CFLAGS"
+unset has_option
+unset SAVE_CFLAGS
+
+AC_SUBST(C_WARNINGS_SWITCH)
+
+
#### Some other nice autoconf tests.
dnl checks for programs
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"
-fi
-
-if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
-then
- ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
+if test x$GCC = xyes; then
+ test "x$GCC_LINK_TEST_OPTIONS" != x && \
+ ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
+else
+ test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
+ ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
fi
dnl We need -znocombreloc if we're using a relatively recent GNU ld.
dnl if not built to support GNU ld.
late_LDFLAGS=$LDFLAGS
-if test "$GCC" = yes; then
+if test x$GCC = xyes; then
LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
else
LDFLAGS="$LDFLAGS -znocombreloc"
fi
AC_MSG_CHECKING([for -znocombreloc])
-AC_LINK_IFELSE([main(){return 0;}],
+AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[AC_MSG_RESULT(yes)],
LDFLAGS=$late_LDFLAGS
[AC_MSG_RESULT(no)])
-#### Extract some information from the operating system and machine files.
-
-AC_CHECKING([the machine- and system-dependent files to find out
- - which libraries the lib-src programs will want, and
- - whether the GNU malloc routines are usable])
-
-### First figure out CFLAGS (which we use for running the compiler here)
-### and REAL_CFLAGS (which we use for real compilation).
-### The two are the same except on a few systems, where they are made
-### different to work around various lossages. For example,
-### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
-### as implying static linking.
-
-### If the CFLAGS env var is specified, we use that value
-### instead of the default.
-
-### It's not important that this name contain the PID; you can't run
-### two configures in the same directory and have anything work
-### anyway.
-tempcname="conftest.c"
-
-echo '
-#include "'${srcdir}'/src/'${opsysfile}'"
-#include "'${srcdir}'/src/'${machfile}'"
-
-configure___ LIBX=-lX11
-
-#ifdef CANNOT_DUMP
-configure___ cannot_dump=yes
-#else
-configure___ cannot_dump=no
-#endif
-
-#ifdef SYSTEM_MALLOC
-configure___ system_malloc=yes
-#else
-configure___ system_malloc=no
-#endif
-
-#ifdef USE_MMAP_FOR_BUFFERS
-configure___ use_mmap_for_buffers=yes
-#else
-configure___ use_mmap_for_buffers=no
-#endif
-
-#ifndef C_OPTIMIZE_SWITCH
-#ifdef __GNUC__
-#define C_OPTIMIZE_SWITCH -O2
-#else
-#define C_OPTIMIZE_SWITCH -O
-#endif
-#endif
-
-#ifndef C_WARNINGS_SWITCH
-#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
-#endif
-
-#ifdef THIS_IS_CONFIGURE
-
-/* Get the CFLAGS for tests in configure. */
-#ifdef __GNUC__
-configure___ CFLAGS=-g C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
-#else
-configure___ CFLAGS='${SPECIFIED_CFLAGS}'
-#endif
-
-#else /* not THIS_IS_CONFIGURE */
-
-/* Get the CFLAGS for real compilation. */
-#ifdef __GNUC__
-configure___ REAL_CFLAGS=-g C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
-#else
-configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}'
-#endif
-
-#endif /* not THIS_IS_CONFIGURE */
-' > ${tempcname}
-
-LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
# The value of CPP is a quoted variable reference, so we need to do this
# to get its actual value...
CPP=`eval "echo $CPP"`
-[eval `${CPP} -Isrc ${tempcname} \
- | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
-if test "x$SPECIFIED_CFLAGS" = x; then
- eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
- | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
-else
- REAL_CFLAGS="$CFLAGS"
-fi]
-rm ${tempcname}
-AC_SUBST(cannot_dump)
+dnl Not used by any currently supported platform.
+dnl The function dump-emacs will not be defined and temacs will do
+dnl (load "loadup") automatically unless told otherwise.
+CANNOT_DUMP=no
+case "$opsys" in
+ your-opsys-here)
+ CANNOT_DUMP=yes
+ AC_DEFINE(CANNOT_DUMP, 1, [Define if Emacs cannot be dumped on your system.])
+ ;;
+esac
+AC_SUBST(CANNOT_DUMP)
+
UNEXEC_OBJ=unexelf.o
case "$opsys" in
+ # MSDOS uses unexcoff.o
+ # MSWindows uses unexw32.o
aix4-2)
UNEXEC_OBJ=unexaix.o
;;
case $opsys in
cygwin )
LIB_MATH=
- START_FILES='ecrt0.o'
+ START_FILES='pre-crt0.o'
;;
darwin )
## Adding -lm confuses the dynamic linker, so omit it.
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
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 stdlib.h \
- stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
- sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
- sys/utsname.h pwd.h utmp.h)
+AC_CHECK_HEADERS(sys/select.h sys/time.h unistd.h utime.h \
+ linux/version.h sys/systeminfo.h limits.h \
+ stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \
+ sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
+ sys/utsname.h pwd.h utmp.h dirent.h util.h)
AC_MSG_CHECKING(if personality LINUX32 can be set)
AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)],
[Define as `void' if your compiler accepts `void *'; otherwise
define as `char'.])dnl
-
-
-dnl This could be used for targets which can have both byte sexes.
-dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally.
-dnl AC_C_BIGENDIAN
+dnl Check for endianess
+AC_C_BIGENDIAN
dnl check for Make feature
AC_PROG_MAKE_SET
if test "${with_ns}" != no; then
if test "${opsys}" = darwin; then
NS_IMPL_COCOA=yes
- ns_appdir=`pwd`/nextstep/Emacs.app/
- ns_appbindir=${ns_appdir}Contents/MacOS/
- ns_appresdir=${ns_appdir}Contents/Resources
+ ns_appdir=`pwd`/nextstep/Emacs.app
+ ns_appbindir=${ns_appdir}/Contents/MacOS/
+ ns_appresdir=${ns_appdir}/Contents/Resources
ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
elif test -f $GNUSTEP_CONFIG_FILE; then
NS_IMPL_GNUSTEP=yes
- ns_appdir=`pwd`/nextstep/Emacs.app/
+ ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=${ns_appdir}
- ns_appresdir=${ns_appdir}Resources
+ ns_appresdir=${ns_appdir}/Resources
ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
dnl FIXME sourcing this several times in subshells seems inefficient.
GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
- REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
LIB_STANDARD=
START_FILES=
fi
ns_frag=$srcdir/src/ns.mk
NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o"
- NS_SUPPORT="\${lispsource}emacs-lisp/easymenu.elc \${lispsource}term/ns-win.elc"
+ NS_SUPPORT="\${lispsource}/emacs-lisp/easymenu.elc \${lispsource}/term/ns-win.elc"
fi
CFLAGS="$tmp_CFLAGS"
CPPFLAGS="$tmp_CPPFLAGS"
doug_lea_malloc=no
fi
+
+dnl See comments in aix4-2.h about maybe using system malloc there.
+system_malloc=no
+case "$opsys" in
+ ## darwin ld insists on the use of malloc routines in the System framework.
+ darwin|sol2-10) system_malloc=yes ;;
+esac
+
if test "${system_malloc}" = "yes"; then
+ AC_DEFINE(SYSTEM_MALLOC, 1, [Define to use system malloc.])
GNU_MALLOC=no
GNU_MALLOC_reason="
(The GNU allocators don't work with this system configuration.)"
REL_ALLOC=${GNU_MALLOC}
fi
-dnl For now, need to use an explicit `#define USE_MMAP_FOR_BUFFERS 1'
-dnl the system configuration file (s/*.h) to turn the use of mmap
-dnl in the relocating allocator on.
+use_mmap_for_buffers=no
+case "$opsys" in
+ freebsd|irix6-5) use_mmap_for_buffers=yes ;;
+esac
AC_FUNC_MMAP
if test $use_mmap_for_buffers = yes; then
+ AC_DEFINE(USE_MMAP_FOR_BUFFERS, 1, [Define to use mmap to allocate buffer text.])
REL_ALLOC=no
fi
# used for the tests that follow. We set them back to REAL_CFLAGS and
# REAL_CPPFLAGS later on.
+REAL_CFLAGS="$CFLAGS"
REAL_CPPFLAGS="$CPPFLAGS"
if test "${HAVE_X11}" = "yes"; then
DEFS="$C_SWITCH_X_SITE $DEFS"
LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
- LIBS="$LIBX $LIBS"
+ LIBS="-lX11 $LIBS"
CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
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
RSVG_REQUIRED=2.11.0
RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
- PKG_CHECK_MODULES(RSVG, $RSVG_MODULE, :, :)
+ PKG_CHECK_MODULES(RSVG, $RSVG_MODULE, HAVE_RSVG=yes, :)
AC_SUBST(RSVG_CFLAGS)
AC_SUBST(RSVG_LIBS)
- if test ".${RSVG_CFLAGS}" != "."; then
- HAVE_RSVG=yes
+ if test $HAVE_RSVG = yes; then
AC_DEFINE(HAVE_RSVG, 1, [Define to 1 if using librsvg.])
CFLAGS="$CFLAGS $RSVG_CFLAGS"
LIBS="$RSVG_LIBS $LIBS"
fi
fi
+HAVE_IMAGEMAGICK=no
+if test "${HAVE_X11}" = "yes"; then
+ if test "${with_imagemagick}" != "no"; then
+ IMAGEMAGICK_MODULE="Wand"
+ PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :)
+ AC_SUBST(IMAGEMAGICK_CFLAGS)
+ AC_SUBST(IMAGEMAGICK_LIBS)
+
+ if test $HAVE_IMAGEMAGICK = yes; then
+ AC_DEFINE(HAVE_IMAGEMAGICK, 1, [Define to 1 if using imagemagick.])
+ CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
+ LIBS="$IMAGEMAGICK_LIBS $LIBS"
+ AC_CHECK_FUNCS(MagickExportImagePixels)
+ fi
+ fi
+fi
+
HAVE_GTK=no
if test "${with_gtk3}" = "yes"; then
PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.13, HAVE_GCONF=yes, HAVE_GCONF=no)
if test "$HAVE_GCONF" = yes; then
AC_DEFINE(HAVE_GCONF, 1, [Define to 1 if using GConf.])
+ dnl Newer GConf doesn't link with g_objects, so this is not defined.
+ AC_CHECK_FUNCS([g_type_init])
fi
fi
fi
AC_SUBST(LIBSELINUX_LIBS)
+HAVE_GNUTLS=no
+if test "${with_gnutls}" = "yes" ; then
+ PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.2.4], HAVE_GNUTLS=yes, HAVE_GNUTLS=no)
+ if test "${HAVE_GNUTLS}" = "yes"; then
+ AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.])
+ fi
+fi
+AC_SUBST(LIBGNUTLS_LIBS)
+AC_SUBST(LIBGNUTLS_CFLAGS)
+
dnl Do not put whitespace before the #include statements below.
dnl Older compilers (eg sunos4 cc) choke on it.
HAVE_XAW3D=no
fi
AC_SUBST(LIBXSM)
+### Use libxml (-lxml2) if available
+if test "${with_xml2}" != "no"; then
+ ### I'm not sure what the version number should be, so I just guessed.
+ PKG_CHECK_MODULES(LIBXML2, libxml-2.0 > 2.2.0, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
+ if test "${HAVE_LIBXML2}" = "yes"; then
+ LIBS="$LIBXML2_LIBS $LIBS"
+ AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
+ if test "${HAVE_LIBXML2}" = "yes"; then
+ AC_DEFINE(HAVE_LIBXML2, 1, [Define to 1 if you have the libxml library (-lxml2).])
+ else
+ LIBXML2_LIBS=""
+ LIBXML2_CFLAGS=""
+ fi
+ fi
+fi
+AC_SUBST(LIBXML2_LIBS)
+AC_SUBST(LIBXML2_CFLAGS)
+
# If netdb.h doesn't declare h_errno, we must declare it by hand.
AC_CACHE_CHECK(whether netdb declares h_errno,
emacs_cv_netdb_declares_h_errno,
AC_CHECK_FUNCS(gethostname getdomainname dup2 \
rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
-random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
+random lrand48 logb frexp fmod rint cbrt ftime setsid \
strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
-__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
+__fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \
sendto recvfrom getsockopt setsockopt getsockname getpeername \
-gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
+gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
-cfmakeraw cfsetspeed isnan copysign)
+cfmakeraw cfsetspeed isnan copysign __executable_start)
AC_CHECK_HEADERS(sys/un.h)
AC_CACHE_VAL(emacs_cv_localtime_cache,
[if test x$ac_cv_func_tzset = xyes; then
AC_TRY_RUN([#include <time.h>
-extern char **environ;
-unset_TZ ()
-{
- char **from, **to;
- for (to = from = environ; (*to = *from); from++)
- if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
- to++;
-}
char TZ_GMT0[] = "TZ=GMT0";
char TZ_PST8[] = "TZ=PST8";
main()
if (putenv (TZ_GMT0) != 0)
exit (1);
hour_GMT0 = localtime (&now)->tm_hour;
- unset_TZ ();
+ unsetenv("TZ");
hour_unset = localtime (&now)->tm_hour;
if (putenv (TZ_PST8) != 0)
exit (1);
if (localtime (&now)->tm_hour == hour_GMT0)
exit (1);
- unset_TZ ();
+ unsetenv("TZ");
if (localtime (&now)->tm_hour != hour_unset)
exit (1);
exit (0);
Otherwise, Emacs expects to use version 10.])
if test "$USE_X_TOOLKIT" = "none"; then
- OLDXMENU="\${oldXMenudir}libXMenu11.a"
+ OLDXMENU="\${oldXMenudir}/libXMenu11.a"
else
- OLDXMENU="\${lwlibdir}liblw.a"
+ OLDXMENU="\${lwlibdir}/liblw.a"
fi
LIBXMENU="\$(OLDXMENU)"
LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
-LINKER=
+LD_FIRSTFLAG=
ORDINARY_LINK=
case "$opsys" in
## gnu: GNU needs its own crt0.
- aix4-2|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
-
- cygwin) LINKER="\$(CC)" ;;
+ aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
## library search parth, i.e. it won't search /usr/lib for libc and
## friends. Using -nostartfiles instead avoids this problem, and
## will also work on earlier NetBSD releases.
- netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;;
+ netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
## MkLinux/LinuxPPC needs this.
## ibms390x only supports opsys = gnu-linux so it can be added here.
gnu-*)
case "$machine" in
- macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;;
+ macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;;
esac
;;
esac
-PRE_EDIT_LDFLAGS=
-POST_EDIT_LDFLAGS=
if test "x$ORDINARY_LINK" = "xyes"; then
- LINKER="\$(CC)"
+ LD_FIRSTFLAG=""
AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.])
-## The system files defining neither ORDINARY_LINK nor LINKER are:
-## (bsd-common), freebsd, gnu-* not on macppc|ibms390x, hpux*.
-elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
+## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
+## freebsd, gnu-* not on macppc|ibms390x.
+elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
## places that are difficult to figure out at make time. Fortunately,
## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
## searching for libraries in its internal directories, so we have to
## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
- LINKER="\$(CC) -nostdlib"
- ## GCC passes any argument prefixed with -Xlinker directly to the linker.
- ## See prefix-args.c for an explanation of why we do not do this with the
- ## shell''s ``for'' construct. Note that sane people do not have '.' in
- ## their paths, so we must use ./prefix-args.
- ## TODO either make prefix-args check ORDINARY_LINK internally,
- ## or remove it altogether (bug#6184), removing the need for this hack.
- PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker'
- POST_EDIT_LDFLAGS='`'
-fi
-AC_SUBST(PRE_EDIT_LDFLAGS)
-AC_SUBST(POST_EDIT_LDFLAGS)
-
-test "x$LINKER" = "x" && LINKER=ld
+ LD_FIRSTFLAG="-nostdlib"
+fi
+
## FIXME? What setting of EDIT_LDFLAGS should this have?
-test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic"
+test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
-AC_SUBST(LINKER)
+AC_SUBST(LD_FIRSTFLAG)
## FIXME? The logic here is not precisely the same as that above.
-## There is no check here for a pre-defined LINKER.
+## There is no check here for a pre-defined LD_FIRSTFLAG.
## Should we only be setting LIB_GCC if LD ~ -nostdlib?
LIB_GCC=
if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
case "$opsys" in
- ## cygwin: don't link against static libgcc.
- cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
+ freebsd|netbsd|openbsd) LIB_GCC= ;;
gnu-*)
## armin76@gentoo.org reported that the lgcc_s flag is necessary to
AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.])
AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
- TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
+ TOOLTIP_SUPPORT="\${lispsource}/mouse.elc"
WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
test "$HAVE_X_WINDOWS" = "yes" && \
/* 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
#include config_opsysfile
#include config_machfile
-/* Set up some defines, C and LD flags for NeXTstep interface on GNUstep.
- (There is probably a better place to do this, but right now the Cocoa
- side does this in s/darwin.h and we cannot
- 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,
-SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */
+ SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems.
+ (There is probably a better place to do this, but right now the
+ Cocoa side does this in s/darwin.h and we cannot parallel this
+ exactly since GNUstep is multi-OS. */
+#if defined HAVE_NS && defined NS_IMPL_GNUSTEP
# define SYSTEM_PURESIZE_EXTRA 30000
-# endif /* NS_IMPL_GNUSTEP */
-#endif /* HAVE_NS */
+#endif
/* SIGTYPE is the macro we actually use. */
#ifndef SIGTYPE
#define my_strftime nstrftime /* for strftime.c */
-/* Some of the files of Emacs which are intended for use with other
- programs assume that if you have a config.h file, you must declare
- the type of getenv. */
-extern char *getenv ();
-
/* These default definitions are good for almost all machines.
The exceptions override them in m/MACHINE.h. */
#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
-# if defined PROTOTYPES
-# define __P(args) args
-# else
-# define __P(args) ()
-# endif /* GCC. */
-#endif /* __P */
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#ifdef HAVE_STRINGS_H
-#include <strings.h> /* May be needed for bcopy & al. */
-#endif
-#ifdef HAVE_STDLIB_H
+#include <string.h>
#include <stdlib.h>
-#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
typedef unsigned size_t;
#endif
-/* Define HAVE_X_I18N if we have usable i18n support. */
-
-#ifdef HAVE_X11R6
-#define HAVE_X_I18N
+#ifndef HAVE_STRCHR
+#define strchr(a, b) index (a, b)
#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
+#ifndef HAVE_STRRCHR
+#define strrchr(a, b) rindex (a, b)
#endif
#if defined __GNUC__ && (__GNUC__ > 2 \
#define NO_RETURN /* nothing */
#endif
+#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */
+#define NO_INLINE __attribute__((noinline))
+#else
+#define NO_INLINE
+#endif
+
+/* Some versions of GNU/Linux define noinline in their headers. */
+#ifdef noinline
+#undef noinline
+#endif
+
/* These won't be used automatically yet. We also need to know, at least,
that the stack is continuous. */
#ifdef __GNUC__
# endif
#endif
-#ifndef HAVE_BCOPY
-#define bcopy(a,b,s) memcpy (b,a,s)
-#endif
-#ifndef HAVE_BZERO
-#define bzero(a,s) memset (a,0,s)
-#endif
-#ifndef HAVE_BCMP
-#define BCMP memcmp
-#endif
-
#endif /* EMACS_CONFIG_H */
/*
echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
echo " Does Emacs use -lpng? ${HAVE_PNG}"
echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
+echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
+
echo " Does Emacs use -lgpm? ${HAVE_GPM}"
echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
+echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
+echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
echo
fi
-if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
- echo "D-Bus integration has been tested for GNU/Linux only."
- echo
-fi
-
# Remove any trailing slashes in these variables.
[test "${prefix}" != NONE &&
], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"])
-m4_if(dnl Do not change this comment
- arch-tag: 156a4dd5-bddc-4d18-96ac-f37742cf6a5e
-)dnl