dnl If you changed any AC_DEFINES, also run autoheader.
dnl
dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl 2005, 2006, 2007, 2008, 2009, 2010
+dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011
dnl Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Emacs.
docdir='${datadir}/emacs/${version}/etc'
gamedir='${localstatedir}/games/emacs'
-gameuser=games
-
dnl OPTION_DEFAULT_OFF(NAME, HELP-STRING)
dnl Create a new --with option that defaults to being disabled.
dnl NAME is the base name of the option. The shell variable with_NAME
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.
The default is /usr/lib, or /usr/lib64 on some platforms.])])
CRT_DIR="${with_crt_dir}"
+AC_ARG_WITH(gameuser,dnl
+[AS_HELP_STRING([--with-gameuser=USER],[user for shared game score files])])
+test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
+ && gameuser="${with_gameuser}"
+test "X$gameuser" = X && gameuser=games
+
AC_ARG_WITH([gnustep-conf],dnl
[AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])])
test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
[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_SUBST(PROFILING_LDFLAGS)
AC_ARG_ENABLE(autodepend,
[AS_HELP_STRING([--enable-autodepend],
machine='' opsys='' unported=no
case "${canonical}" in
+ ## GNU/Linux ports
+ *-*-linux-gnu*)
+ opsys=gnu-linux
+ case ${canonical} in
+ alpha*) machine=alpha ;;
+ s390-*) machine=ibms390 ;;
+ s390x-*) machine=ibms390x ;;
+ powerpc*) machine=macppc ;;
+ sparc*) machine=sparc ;;
+ ia64*) machine=ia64 ;;
+ m68k*) machine=m68k ;;
+ x86_64*) machine=amdx86-64 ;;
+ esac
+ ;;
+
## FreeBSD ports
*-*-freebsd* )
opsys=freebsd
case "${canonical}" in
alpha*) machine=alpha ;;
amd64-*|x86_64-*) machine=amdx86-64 ;;
- arm*) machine=arm ;;
ia64-*) machine=ia64 ;;
i[3456]86-*) machine=intel386 ;;
powerpc-*) machine=macppc ;;
case "${canonical}" in
alpha*) machine=alpha ;;
x86_64-*) machine=amdx86-64 ;;
- arm-*) machine=arm ;;
- hppa-*) machine=hp800 ;;
i[3456]86-*) machine=intel386 ;;
m68k-*) machine=m68k ;;
powerpc-*) machine=macppc ;;
- mips-*) machine=mips ;;
- mipse[bl]-*) machine=mips ;;
sparc*-) machine=sparc ;;
vax-*) machine=vax ;;
esac
case "${canonical}" in
alpha*) machine=alpha ;;
x86_64-*) machine=amdx86-64 ;;
- arm-*) machine=arm ;;
- hppa-*) machine=hp800 ;;
i386-*) machine=intel386 ;;
powerpc-*) machine=macppc ;;
sparc*) machine=sparc ;;
esac
;;
- alpha*-*-linux-gnu* )
- machine=alpha opsys=gnu-linux
- ;;
-
- arm*-*-linux-gnu* )
- machine=arm opsys=gnu-linux
- ;;
-
## Apple Darwin / Mac OS X
*-apple-darwin* )
case "${canonical}" in
## HP 9000 series 700 and 800, running HP/UX
hppa*-hp-hpux10.2* )
- machine=hp800 opsys=hpux10-20
+ opsys=hpux10-20
;;
hppa*-hp-hpux1[1-9]* )
- machine=hp800 opsys=hpux11
+ opsys=hpux11
CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
;;
- hppa*-*-linux-gnu* )
- machine=hp800 opsys=gnu-linux
- ;;
-
## IBM machines
- s390-*-linux-gnu* )
- machine=ibms390 opsys=gnu-linux
- ;;
- s390x-*-linux-gnu* )
- machine=ibms390x opsys=gnu-linux
- ;;
rs6000-ibm-aix4.[23]* )
machine=ibmrs6000 opsys=aix4-2
;;
machine=ibmrs6000 opsys=aix4-2
;;
- ## Macintosh PowerPC
- powerpc*-*-linux-gnu* )
- machine=macppc opsys=gnu-linux
- ;;
-
## Silicon Graphics machines
## Iris 4D
mips-sgi-irix6.5 )
;;
## Suns
- sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
- machine=sparc opsys=gnu-linux
- ;;
-
*-sun-solaris* \
| i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
| x86_64-*-solaris2* | x86_64-*-sunos5*)
esac
;;
- ## IA-64
- ia64*-*-linux* )
- machine=ia64 opsys=gnu-linux
- ;;
-
## Intel 386 machines where we don't care about the manufacturer.
i[3456]86-*-* )
machine=intel386
*-darwin* ) opsys=darwin
CPP="${CC-cc} -E -no-cpp-precomp"
;;
- *-linux-gnu* ) opsys=gnu-linux ;;
*-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
*-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
*-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
esac
;;
- ## m68k Linux-based GNU system
- m68k-*-linux-gnu* )
- machine=m68k opsys=gnu-linux
- ;;
-
- ## Mips Linux-based GNU system
- mips-*-linux-gnu* | mipsel-*-linux-gnu* \
- | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
- machine=mips opsys=gnu-linux
- ;;
-
- ## AMD x86-64 Linux-based GNU system
- x86_64-*-linux-gnu* )
- machine=amdx86-64 opsys=gnu-linux
- ;;
-
- ## Tensilica Xtensa Linux-based GNU system
- xtensa*-*-linux-gnu* )
- machine=xtensa opsys=gnu-linux
- ;;
-
- ## SuperH Linux-based GNU system
- sh[34]*-*-linux-gnu* )
- machine=sh3 opsys=gnu-linux
- ;;
-
* )
unported=yes
;;
Check `etc/MACHINES' for recognized configuration names.])
fi
-machfile="m/${machine}.h"
+if test -n "$machine"; then
+ machfile="m/${machine}.h"
+else
+ machfile=
+fi
opsysfile="s/${opsys}.h"
## should test for it as it does for any other build requirement.
## We use the presence of $srcdir/info/emacs to distinguish a release,
## with pre-built manuals, from a Bazaar checkout.
+HAVE_MAKEINFO=yes
+
if test "$MAKEINFO" = "no"; then
+ MAKEINFO=makeinfo
if test "x${with_makeinfo}" = "xno"; then
- MAKEINFO=off
+ HAVE_MAKEINFO=no
elif test ! -e $srcdir/info/emacs; then
AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.6, and your
source tree does not seem to have pre-built manuals in the `info' directory.
with the `--without-makeinfo' option to build without the manuals.] )
fi
fi
+AC_SUBST(HAVE_MAKEINFO)
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)])
gnu-linux)
## cpp test was "ifdef __mips__", but presumably this is equivalent...
- test "$machine" = "mips" && LD_SWITCH_SYSTEM="-G 0"
+ case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
;;
netbsd)
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 \
+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)
tmp_CFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS -x objective-c"
CFLAGS="$CFLAGS -x objective-c"
-TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}"
+TEMACS_LDFLAGS2="\${LDFLAGS}"
dnl I don't think it's especially important, but src/Makefile.in
dnl (now the only user of ns_appdir) used to go to the trouble of adding a
dnl trailing "/" to it, so now we do it here.
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_appbindir=${ns_appdir}
- ns_appresdir=${ns_appdir}Resources
+ ns_appdir=`pwd`/nextstep/Emacs.app
+ ns_appbindir=${ns_appdir}/
+ 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)"
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"
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
dnl FIXME the logic here seems weird, but this is what cpp was doing.
dnl Why not just test for libxmu in the normal way?
LIBXMU=-lXmu
-case "$machine" in
- ## These machines don't supply Xmu.
+case $opsys in
+ ## These systems don't supply Xmu.
hpux* | aix4-2 )
test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
;;
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,
memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
cfmakeraw cfsetspeed isnan copysign __executable_start)
+dnl Cannot use AC_CHECK_FUNCS
+AC_CACHE_CHECK([for __builtin_unwind_init],
+ emacs_cv_func___builtin_unwind_init,
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([], [__builtin_unwind_init ();])],
+ emacs_cv_func___builtin_unwind_init=yes,
+ emacs_cv_func___builtin_unwind_init=no)])
+if test $emacs_cv_func___builtin_unwind_init = yes; then
+ AC_DEFINE(HAVE___BUILTIN_UNWIND_INIT, 1,
+ [Define to 1 if you have the `__builtin_unwind_init' function.])
+fi
+
AC_CHECK_HEADERS(sys/un.h)
AC_FUNC_MKTIME
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);
[Define to 1 if you have inet sockets.])
fi
-AC_CHECK_HEADERS(sys/ioctl.h)
-
if test -f /usr/lpp/X11/bin/smt.exp; then
AC_DEFINE(HAVE_AIX_SMT_EXP, 1,
[Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists.])
AC_SUBST(CFLAGS)
## Used in lwlib/Makefile.in.
AC_SUBST(X_TOOLKIT_TYPE)
-AC_SUBST(machfile)
-AC_SUBST(opsysfile)
+if test -n "${machfile}"; then
+ M_FILE="\$(srcdir)/${machfile}"
+else
+ M_FILE=
+fi
+S_FILE="\$(srcdir)/${opsysfile}"
+AC_SUBST(M_FILE)
+AC_SUBST(S_FILE)
AC_SUBST(GETLOADAVG_LIBS)
AC_SUBST(ns_appdir)
AC_SUBST(ns_appbindir)
[Define to the canonical Emacs configuration name.])
AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}",
[Define to the options passed to configure.])
-AC_DEFINE_UNQUOTED(config_machfile, "${machfile}",
- [Define to the used machine dependent file.])
+if test -n "$machfile"; then
+ AC_DEFINE_UNQUOTED(config_machfile, "${machfile}",
+ [Define to the used machine dependent file.])
+fi
AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}",
[Define to the used os dependent file.])
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.
## 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
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:
+## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
## freebsd, gnu-* not on macppc|ibms390x.
-elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
+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"
+ LD_FIRSTFLAG="-nostdlib"
fi
-test "x$LINKER" = "x" && LINKER=ld
## 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
gnu-*)
## armin76@gentoo.org reported that the lgcc_s flag is necessary to
## build on ARM EABI under GNU/Linux. (Bug#5518)
- ## Note that m/arm.h never bothered to undefine LIB_GCC first.
- if test "$machine" = "arm"; then
+ case $host_cpu in
+ arm*)
LIB_GCC="-lgcc_s"
- else
+ ;;
+ *)
## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
## immediately undefine it again and redefine it to empty.
## Was the C_SWITCH_X_SITE part really necessary?
## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
LIB_GCC=
- fi
+ ;;
+ esac
;;
## Ask GCC where to find libgcc.a.
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" && \
/* Don't try to switch on inline handling as detected by AC_C_INLINE
generally, because even if non-gcc compilers accept `inline', they
may reject `extern inline'. */
-#if defined (__GNUC__) && defined (OPTIMIZE)
+#if defined (__GNUC__)
#define INLINE __inline__
#else
#define INLINE
/* Include the os and machine dependent files. */
#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
+#ifdef config_machfile
+# include config_machfile
+#endif
+
/* 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
not define __STDC__ (e.g. DEC C by default) or may define it as zero. */
#undef PROTOTYPES
-#ifdef HAVE_STRING_H
#include <string.h>
-#endif
-
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#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
+
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
+#define EXTERNALLY_VISIBLE __attribute__((externally_visible))
+#else
+#define EXTERNALLY_VISIBLE
+#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__
USE_X_TOOLKIT=GTK
fi
+and_machfile=
+if test -n "$machfile"; then
+ and_machfile=" and \`${machfile}'"
+fi
+
echo "
Configured for \`${canonical}'.
Where should the build process find the source code? ${srcdir}
What operating system and machine description files should Emacs use?
- \`${opsysfile}' and \`${machfile}'
+ \`${opsysfile}'${and_machfile}
What compiler should emacs be built with? ${CC} ${CFLAGS}
Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
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