dnl See also epaths.h below.
lispdir='${datadir}/emacs/${version}/lisp'
leimdir='${datadir}/emacs/${version}/leim'
+standardlisppath='${lispdir}:${leimdir}'
locallisppath='${datadir}/emacs/${version}/site-lisp:'\
'${datadir}/emacs/site-lisp'
-lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
+lisppath='${locallisppath}:${standardlisppath}'
etcdir='${datadir}/emacs/${version}/etc'
archlibdir='${libexecdir}/emacs/${version}/${configuration}'
docdir='${datadir}/emacs/${version}/etc'
EN_NS_SELF_CONTAINED=$enableval,
EN_NS_SELF_CONTAINED=yes)
-AC_ARG_ENABLE(asserts,
-[AS_HELP_STRING([--enable-asserts], [compile code with asserts enabled])],
- USE_XASSERTS=$enableval,
- USE_XASSERTS=no)
-
AC_ARG_ENABLE(locallisppath,
[AS_HELP_STRING([--enable-locallisppath=PATH],
[directories Emacs should search for lisp files specific
enable only specific categories of checks.
Categories are: all,yes,no.
Flags are: stringbytes, stringoverrun, stringfreelist,
- xmallocoverrun, conslist])],
+ xmallocoverrun, conslist, glyphs])],
[ac_checking_flags="${enableval}"],[])
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
for check in $ac_checking_flags
ac_gc_check_string_overrun= ;
ac_gc_check_string_free_list= ;
ac_xmalloc_overrun= ;
- ac_gc_check_cons_list= ;;
+ ac_gc_check_cons_list= ;
+ ac_glyphs_debug= ;;
all) ac_enable_checking=1 ;
ac_gc_check_stringbytes=1 ;
ac_gc_check_string_overrun=1 ;
ac_gc_check_string_free_list=1 ;
ac_xmalloc_overrun=1 ;
- ac_gc_check_cons_list=1 ;;
+ ac_gc_check_cons_list=1 ;
+ ac_glyphs_debug=1 ;;
# these enable particular checks
stringbytes) ac_gc_check_stringbytes=1 ;;
stringoverrun) ac_gc_check_string_overrun=1 ;;
stringfreelist) ac_gc_check_string_free_list=1 ;;
xmallocoverrun) ac_xmalloc_overrun=1 ;;
conslist) ac_gc_check_cons_list=1 ;;
+ glyphs) ac_glyphs_debug=1 ;;
*) AC_MSG_ERROR(unknown check category $check) ;;
esac
done
if test x$ac_enable_checking != x ; then
AC_DEFINE(ENABLE_CHECKING, 1,
-[Enable expensive run-time checking of data types?])
+[Define to 1 if expensive run-time data type and consistency checks are enabled.])
fi
if test x$ac_gc_check_stringbytes != x ; then
AC_DEFINE(GC_CHECK_STRING_BYTES, 1,
AC_DEFINE(GC_CHECK_CONS_LIST, 1,
[Define this to check for errors in cons list.])
fi
+if test x$ac_glyphs_debug != x ; then
+ AC_DEFINE(GLYPH_DEBUG, 1,
+[Define this to enable glyphs debugging code.])
+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.])],
+AC_ARG_ENABLE(check-lisp-object-type,
+[AS_HELP_STRING([--enable-check-lisp-object-type],
+ [enable compile time checks for the Lisp_Object data type.
+ This is 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.])
+ AC_DEFINE(CHECK_LISP_OBJECT_TYPE, 1,
+ [Define this to enable compile time checks for the Lisp_Object data type.])
fi)
[gl_gcc_warnings=no]
)
+AC_ARG_ENABLE(link-time-optimization,
+[AS_HELP_STRING([--enable-link-time-optimization],
+ [build emacs with link-time optimization.
+ This is supported only for GCC since 4.5.0.])],
+if test "${enableval}" != "no"; then
+ AC_MSG_CHECKING([whether link-time optimization is supported])
+ ac_lto_supported=no
+ if test x$GCC = xyes; then
+ CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
+ if test x$CPUS != x; then
+ LTO="-flto=$CPUS"
+ else
+ LTO="-flto"
+ fi
+ old_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $LTO"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [ac_lto_supported=yes], [ac_lto_supported=no])
+ CFLAGS="$old_CFLAGS"
+ fi
+ AC_MSG_RESULT([$ac_lto_supported])
+ if test "$ac_lto_supported" = "yes"; then
+ CFLAGS="$CFLAGS $LTO"
+ fi
+fi)
+
# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
# ------------------------------------------------
# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin)
dnl Don't use GZIP, which is used by gzip for additional parameters.
AC_PATH_PROG(GZIP_PROG, gzip)
-AC_PATH_PROG(PAXCTL, paxctl,,
- [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
+if test $opsys = gnu-linux; then
+ AC_PATH_PROG(PAXCTL, paxctl,,
+ [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
+fi
## Need makeinfo >= 4.7 (?) to build the manuals.
AC_PATH_PROG(MAKEINFO, makeinfo, no)
esac
+# Configure gnulib before invoking PKG_CHECK_MODULES, as the latter might
+# for example add -lrt to RSVG_LIBS, which would then cause gnulib to
+# incorrectly conclude that -lrt is not needed to link clock_gettime.
+gl_ASSERT_NO_GNULIB_POSIXCHECK
+gl_ASSERT_NO_GNULIB_TESTS
+gl_INIT
+
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
dnl This function definition taken from Gnome 2.0
dnl checks for header files
AC_CHECK_HEADERS_ONCE(
- sys/select.h sys/time.h utime.h
linux/version.h sys/systeminfo.h
stdio_ext.h fcntl.h coff.h pty.h
sys/vlimit.h sys/resource.h
fi
AC_HEADER_SYS_WAIT
-dnl Some systems have utime.h but don't declare the struct anyplace.
-AC_CACHE_CHECK(for struct utimbuf, emacs_cv_struct_utimbuf,
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
-#endif
-#ifdef HAVE_UTIME_H
-#include <utime.h>
-#endif]], [[static struct utimbuf x; x.actime = x.modtime;]])],
- emacs_cv_struct_utimbuf=yes, emacs_cv_struct_utimbuf=no))
-if test $emacs_cv_struct_utimbuf = yes; then
- AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [Define to 1 if `struct utimbuf' is declared by <utime.h>.])
-fi
-
dnl Check for speed_t typedef.
AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <termios.h>]], [[speed_t x = 1;]])],
[Define to 1 if `speed_t' is declared by <termios.h>.])
fi
-AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval,
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
-#endif]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
- emacs_cv_struct_timeval=yes, emacs_cv_struct_timeval=no))
-HAVE_TIMEVAL=$emacs_cv_struct_timeval
-if test $emacs_cv_struct_timeval = yes; then
- AC_DEFINE(HAVE_TIMEVAL, 1, [Define to 1 if `struct timeval' is declared by <sys/time.h>.])
-fi
-
AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]],
[[static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;]])],
AC_SUBST(BLESSMAIL_TARGET)
-AC_CHECK_FUNCS_ONCE(gethostname \
+AC_CHECK_FUNCS(gethostname \
rename closedir mkdir rmdir getrusage get_current_dir_name \
random lrand48 logb frexp fmod rint cbrt setsid \
strerror fpathconf select euidaccess getpagesize setlocale \
difftime posix_memalign \
getpwent endpwent getgrent endgrent \
touchlock \
+strcasecmp strncasecmp \
cfmakeraw cfsetspeed copysign __executable_start)
dnl Cannot use AC_CHECK_FUNCS
AC_FUNC_GETPGRP
# UNIX98 PTYs.
-AC_CHECK_FUNCS_ONCE(grantpt)
+AC_CHECK_FUNCS(grantpt)
# PTY-related GNU extensions.
-AC_CHECK_FUNCS_ONCE(getpt)
+AC_CHECK_FUNCS(getpt)
# Check this now, so that we will NOT find the above functions in ncurses.
# That is because we have not set up to link ncurses in lib-src.
AC_SUBST(DESLIB)
AC_SUBST(KRB4LIB)
-AC_CHECK_FUNCS_ONCE(tzset)
+AC_CHECK_FUNCS(tzset)
AC_MSG_CHECKING(whether localtime caches TZ)
AC_CACHE_VAL(emacs_cv_localtime_cache,
[if test x$ac_cv_func_tzset = xyes; then
[Define to 1 if localtime caches TZ.])
fi
-if test "x$HAVE_TIMEVAL" = xyes; then
- AC_CHECK_FUNCS(gettimeofday)
- if test $ac_cv_func_gettimeofday = yes; then
- AC_CACHE_CHECK(whether gettimeofday can accept two arguments,
- emacs_cv_gettimeofday_two_arguments,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
-#endif]],
- [[struct timeval time;
- gettimeofday (&time, 0);]])],
- emacs_cv_gettimeofday_two_arguments=yes,
- emacs_cv_gettimeofday_two_arguments=no)])
- if test $emacs_cv_gettimeofday_two_arguments = no; then
- AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT, 1,
- [Define to 1 if gettimeofday accepts only one argument.])
- fi
- fi
-fi
-
ok_so_far=yes
AC_CHECK_FUNC(socket, , ok_so_far=no)
if test $ok_so_far = yes; then
AC_FUNC_FORK
-AC_CHECK_FUNCS_ONCE(snprintf)
+AC_CHECK_FUNCS(snprintf)
dnl Adapted from Haible's version.
AC_CACHE_CHECK([for nl_langinfo and CODESET], emacs_cv_langinfo_codeset,
esac
dnl SIGIO exists, but the feature doesn't work in the way Emacs needs.
-dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>.
+dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>.
case $opsys in
hpux* | irix6-5 | openbsd | sol2* | unixware )
AC_DEFINE(BROKEN_SIGIO, 1, [Define if SIGIO should not be used.])
;;
esac
+case $opsys in
+ gnu-* | sol2-10 )
+ dnl FIXME Can't we test if this exists (eg /proc/$$)?
+ AC_DEFINE(HAVE_PROCFS, 1, [Define if you have the /proc filesystem.])
+ ;;
+esac
+
+case $opsys in
+ gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;;
+
+ hpux11)
+ dnl SA_RESTART resets the timeout of `select', so don't use it.
+ AC_DEFINE(BROKEN_SA_RESTART, 1, [Define if SA_RESTART should not
+ be used.])
+ dnl It works to open the pty's tty in the parent (Emacs), then
+ dnl close and reopen it in the child.
+ AC_DEFINE(USG_SUBTTY_WORKS, 1, [Define for USG systems where it
+ works to open a pty's tty in the parent process, then close and
+ reopen it in the child.])
+
+ opsysfile="s/hpux10-20.h"
+ ;;
+
+ openbsd) opsysfile="s/netbsd.h" ;;
+
+ sol2-10)
+ AC_DEFINE(_STRUCTURED_PROC, 1, [Needed for system_process_attributes
+ on Solaris.])
+ opsysfile="s/sol2-6.h"
+ ;;
+esac
+
# Set up the CFLAGS for real compilation, so we can substitute it.
CFLAGS="$REAL_CFLAGS"
CPPFLAGS="$REAL_CPPFLAGS"
AC_SUBST(infodir)
AC_SUBST(lispdir)
AC_SUBST(leimdir)
+AC_SUBST(standardlisppath)
AC_SUBST(locallisppath)
AC_SUBST(lisppath)
AC_SUBST(x_default_search_path)
AC_SUBST(PRE_ALLOC_OBJ)
AC_SUBST(POST_ALLOC_OBJ)
-# Configure gnulib here, now that we know LIBS.
-gl_ASSERT_NO_GNULIB_POSIXCHECK
-gl_ASSERT_NO_GNULIB_TESTS
-gl_INIT
-
case "$opsys" in
aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
#include <string.h>
#include <stdlib.h>
-#if defined __GNUC__ && (__GNUC__ > 2 \
- || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
-#define NO_RETURN __attribute__ ((__noreturn__))
-#else
-#define NO_RETURN /* nothing */
-#endif
-
#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */
#define NO_INLINE __attribute__((noinline))
#else
Configured for \`${canonical}'.
Where should the build process find the source code? ${srcdir}
- What operating system file should Emacs use? \`${opsysfile-none}'
+ What operating system file should Emacs use? ${opsysfile-none}
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 " Environment variable EMACSDOC set to: $EMACSDOC"
fi
-if test $USE_XASSERTS = yes; then
- echo " Compiling with asserts turned on."
- CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
-fi
-
echo
if test "$HAVE_NS" = "yes"; then