dnl in the directory containing this script.
dnl If you changed any AC_DEFINES, also run autoheader.
dnl
-dnl Copyright (C) 1994-1996, 1999-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 1994-1996, 1999-2012 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Emacs.
dnl
dnl along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.65)
-AC_INIT(emacs, 24.0.90)
+AC_INIT(emacs, 24.0.92)
AC_CONFIG_HEADER(src/config.h:src/config.in)
AC_CONFIG_SRCDIR(src/lisp.h)
AC_CONFIG_AUX_DIR(build-aux)
dnl http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01844.html
OPTION_DEFAULT_ON([makeinfo],[don't require makeinfo for building manuals])
+## Makefile.in needs the cache file name.
+AC_SUBST(cache_file)
+
## This is an option because I do not know if all info/man support
## compressed files, nor how to test if they do so.
OPTION_DEFAULT_ON([compress-info],[don't compress the installed Info pages])
opsys=gnu-linux
case ${canonical} in
alpha*) machine=alpha ;;
- s390-*) machine=ibms390 ;;
s390x-*) machine=ibms390x ;;
powerpc*) machine=macppc ;;
sparc*) machine=sparc ;;
PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no)
if test $HAVE_ALSA = yes; then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CFLAGS="$ALSA_CFLAGS $CFLAGS"
- LDFLAGS="$ALSA_LIBS $LDFLAGS"
+ LIBS="$ALSA_LIBS $LIBS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <asoundlib.h>]], [[snd_lib_error_set_handler (0);]])],
emacs_alsa_normal=yes,
emacs_alsa_normal=no)
fi
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
LIBSOUND="$LIBSOUND $ALSA_LIBS"
CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.])
AC_CHECK_FUNCS(getifaddrs freeifaddrs)
dnl checks for structure members
-AC_STRUCT_TM
-AC_STRUCT_TIMEZONE
-AC_CHECK_MEMBER(struct tm.tm_gmtoff,
- [AC_DEFINE(HAVE_TM_GMTOFF, 1,
- [Define to 1 if `tm_gmtoff' is member of `struct tm'.])],,
- [#include <time.h>])
AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr,
struct ifreq.ifr_netmask, struct ifreq.ifr_broadaddr,
struct ifreq.ifr_addr,
[Define as `void' if your compiler accepts `void *'; otherwise
define as `char'.])dnl
-dnl Check for endianess
+dnl Check for endianness.
AC_C_BIGENDIAN
AC_CACHE_CHECK([for __attribute__ ((__aligned__ (expr)))],
if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
AC_MSG_CHECKING([whether we are using GNU Make])
HAVE_GNU_MAKE=no
- testval=`make --version 2>/dev/null | grep 'GNU Make'`
+ testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
if test "x$testval" != x; then
HAVE_GNU_MAKE=yes
else
window_system=nextstep
with_xft=no
# set up packaging dirs
- exec_prefix=${ns_appbindir}
- libexecdir=${ns_appbindir}/libexec
if test "${EN_NS_SELF_CONTAINED}" = yes; then
prefix=${ns_appresdir}
+ exec_prefix=${ns_appbindir}
+ libexecdir=${ns_appbindir}/libexec
fi
ns_frag=$srcdir/src/ns.mk
NS_OBJ="fontset.o fringe.o image.o"
athena | lucid ) USE_X_TOOLKIT=LUCID ;;
motif ) USE_X_TOOLKIT=MOTIF ;;
gtk ) with_gtk=yes
-dnl Dont set this for GTK. A lot of tests below assumes Xt when
+dnl Don't set this for GTK. A lot of tests below assumes Xt when
dnl USE_X_TOOLKIT is set.
USE_X_TOOLKIT=none ;;
gtk3 ) with_gtk3=yes
## Use mmap directly for allocating larger buffers.
## FIXME this comes from src/s/{gnu,gnu-linux}.h:
## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
- ## Does the AC_FUNC_MMAP test below make this check unecessary?
+ ## Does the AC_FUNC_MMAP test below make this check unnecessary?
case "$opsys" in
gnu*) REL_ALLOC=no ;;
esac
LIB_PTHREAD=
AC_CHECK_HEADERS(pthread.h)
if test "$ac_cv_header_pthread_h"; then
- AC_CHECK_LIB(pthread, pthread_self, HAVE_PTHREAD=yes)
+ dnl gmalloc.c uses pthread_atfork, which is not available on older-style
+ dnl hosts such as MirBSD 10, so test for pthread_atfork instead of merely
+ dnl testing for pthread_self if Emacs uses gmalloc.c.
+ if test "$GMALLOC_OBJ" = gmalloc.o; then
+ emacs_pthread_function=pthread_atfork
+ else
+ emacs_pthread_function=pthread_self
+ fi
+ AC_CHECK_LIB(pthread, $emacs_pthread_function, HAVE_PTHREAD=yes)
fi
if test "$HAVE_PTHREAD" = yes; then
case "${canonical}" in
*-hpux*) ;;
- *) LIB_PTHREAD="-lpthread" ;;
+ *) LIB_PTHREAD="-lpthread"
+ LIBS="$LIB_PTHREAD $LIBS" ;;
esac
AC_DEFINE(HAVE_PTHREAD, 1, [Define to 1 if you have pthread (-lpthread).])
fi
AC_MSG_CHECKING(whether X on GNU/Linux needs -b to link)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
[[XOpenDisplay ("foo");]])],
- [xlinux_first_failure=no],
- [xlinux_first_failure=yes])
- if test "${xlinux_first_failure}" = "yes"; then
+ [xgnu_linux_first_failure=no],
+ [xgnu_linux_first_failure=yes])
+ if test "${xgnu_linux_first_failure}" = "yes"; then
OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
OLD_CPPFLAGS="$CPPFLAGS"
LIBS="$LIBS -b i486-linuxaout"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
[[XOpenDisplay ("foo");]])],
- [xlinux_second_failure=no],
- [xlinux_second_failure=yes])
- if test "${xlinux_second_failure}" = "yes"; then
+ [xgnu_linux_second_failure=no],
+ [xgnu_linux_second_failure=yes])
+ if test "${xgnu_linux_second_failure}" = "yes"; then
# If we get the same failure with -b, there is no use adding -b.
# So take it out. This plays safe.
LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
if test "$pkg_check_gtk" != "yes"; then
HAVE_GTK=no
if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
- GLIB_REQUIRED=2.6
- GTK_REQUIRED=2.6
+ GLIB_REQUIRED=2.10
+ GTK_REQUIRED=2.10
GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
dnl Checks for libraries.
AC_CHECK_FUNCS(gtk_widget_get_window gtk_widget_set_has_window \
gtk_dialog_get_action_area gtk_widget_get_sensitive \
gtk_widget_get_mapped gtk_adjustment_get_page_size \
- gtk_orientable_set_orientation)
-
+ gtk_orientable_set_orientation \
+ gtk_window_set_has_resize_grip)
fi
dnl D-Bus has been tested under GNU/Linux only. Must be adapted for
if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
- LDFLAGS="$SETTINGS_LIBS $LDFLAGS"
+ LIBS="$SETTINGS_LIBS $LIBS"
AC_CHECK_FUNCS([g_type_init])
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
AC_SUBST(SETTINGS_CFLAGS)
AC_SUBST(SETTINGS_LIBS)
HAVE_GNUTLS=no
HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
if test "${with_gnutls}" = "yes" ; then
- PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.6.0], HAVE_GNUTLS=yes, HAVE_GNUTLS=no)
+ PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.6.6], HAVE_GNUTLS=yes, HAVE_GNUTLS=no)
if test "${HAVE_GNUTLS}" = "yes"; then
AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.])
fi
fi
if test "${HAVE_XPM}" = "yes"; then
- AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm libary (-lXpm).])
+ AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm library (-lXpm).])
LIBXPM=-lXpm
fi
fi
AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.])
# See also .m.o rule in Makefile.in */
# FIXME: are all these flags really needed? Document here why. */
+ dnl FIXME this should be renamed to GNUSTEP_CFLAGS, and only
+ dnl used in src/Makefile.in.
C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
## Extra CFLAGS applied to src/*.m files.
GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
# than to expect to find it in ncurses.
# Also we need tputs and friends to be able to build at all.
have_tputs_et_al=true
-AC_SEARCH_LIBS(tputs, [ncurses terminfo termcap], , have_tputs_et_al=false)
+# Maybe curses should be tried earlier?
+# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
+AC_SEARCH_LIBS(tputs, [ncurses terminfo termcap curses], , have_tputs_et_al=false)
if test "$have_tputs_et_al" != true; then
- AC_MSG_ERROR([I couldn't find termcap functions (tputs and friends).
-Maybe some development libraries/packages are missing? Try installing
-libncurses-dev(el), libterminfo-dev(el) or similar.])
+ AC_MSG_ERROR([The required function `tputs' was not found in any library.
+These libraries were tried: libncurses, libterminfo, libtermcap, libcurses.
+Please try installing whichever of these libraries is most appropriate
+for your system, together with its header files.
+For example, a libncurses-dev(el) or similar package.])
fi
# Must define this when any termcap library is found.
AC_DEFINE(HAVE_LIBNCURSES, 1,
AC_SUBST(DESLIB)
AC_SUBST(KRB4LIB)
-# Solaris requires -lintl if you want strerror (which calls dgettext)
-# to return localized messages.
-AC_CHECK_LIB(intl, dgettext)
-
AC_MSG_CHECKING(whether localtime caches TZ)
AC_CACHE_VAL(emacs_cv_localtime_cache,
[if test x$ac_cv_func_tzset = xyes; then
AH_TOP([/* GNU Emacs site configuration template file.
-Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2011
+Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
/* GC_SETJMP_WORKS is nearly always appropriate for GCC. */
# define GC_SETJMP_WORKS 1
# endif
-# ifndef GC_LISP_OBJECT_ALIGNMENT
-# define GC_LISP_OBJECT_ALIGNMENT (__alignof__ (Lisp_Object))
-# endif
#endif
#endif /* EMACS_CONFIG_H */
echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
-echo " Does Emacs use -lgnutls (2.6.x or higher)? ${HAVE_GNUTLS}"
+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 toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
echo
+if test -n "${EMACSDATA}"; then
+ echo " Environment variable EMACSDATA set to: $EMACSDATA"
+fi
+if test -n "${EMACSDOC}"; then
+ echo " Environment variable EMACSDOC set to: $EMACSDOC"
+fi
+
if test $USE_XASSERTS = yes; then
echo " Compiling with asserts turned on."
CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
if test "$HAVE_NS" = "yes"; then
echo
- echo "You must run \"make install\" in order to test the built application.
+ echo "You must run \"${MAKE-make} install\" in order to test the built application.
The installed application will go to nextstep/Emacs.app and can be
run or moved from there."
if test "$EN_NS_SELF_CONTAINED" = "yes"; then
echo "The application will be fully self-contained."
else
echo "The lisp resources for the application will be installed under ${prefix}.
-You may need to run \"make install\" with sudo. The application will fail
+You may need to run \"${MAKE-make} install\" with sudo. The application will fail
to run if these resources are not installed."
fi
echo