EN_NS_SELF_CONTAINED=$enableval,
EN_NS_SELF_CONTAINED=yes)
+locallisppathset=no
AC_ARG_ENABLE(locallisppath,
[AS_HELP_STRING([--enable-locallisppath=PATH],
[directories Emacs should search for lisp files specific
if test "${enableval}" = "no"; then
locallisppath=
elif test "${enableval}" != "yes"; then
- locallisppath=${enableval}
+ locallisppath=${enableval} locallisppathset=yes
fi)
AC_ARG_ENABLE(checking,
## fi
;;
+ ## Chromium Native Client
+ *-nacl )
+ opsys=nacl
+ ;;
+
## Cygwin ports
*-*-cygwin )
opsys=cygwin
# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
# as we don't use them.
AC_DEFUN([gl_FCNTL_O_FLAGS])
+# Avoid gnulib's test for pthread_sigmask.
+funcs=
+for func in $ac_func_list; do
+ test $func = pthread_sigmask || AS_VAR_APPEND([funcs], [" $func"])
+done
+ac_func_list=$funcs
+# Use the system putenv even if it lacks GNU features, as we don't need them,
+# and the gnulib replacement runs afoul of a FreeBSD 10.1 bug; see Bug#19874.
+AC_CHECK_FUNCS_ONCE([putenv])
+AC_DEFUN([gl_FUNC_PUTENV],
+ [test "$ac_cv_func_putenv" = yes || REPLACE_PUTENV=1])
# Initialize gnulib right after choosing the compiler.
dnl Amongst other things, this sets AR and ARFLAGS.
dnl (load "loadup") automatically unless told otherwise.
test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
case "$opsys" in
- your-opsys-here) CANNOT_DUMP=yes ;;
+ nacl) CANNOT_DUMP=yes ;;
esac
if test "$CANNOT_DUMP" = "yes"; then
infodir="\${ns_appresdir}/info"
mandir="\${ns_appresdir}/man"
lispdir="\${ns_appresdir}/lisp"
+ test "$locallisppathset" = no && locallisppath=""
INSTALL_ARCH_INDEP_EXTRA=
fi
case "$opsys" in
## darwin ld insists on the use of malloc routines in the System framework.
- darwin|mingw32|sol2-10) system_malloc=yes ;;
+ darwin | mingw32 | nacl | sol2-10) system_malloc=yes ;;
cygwin) hybrid_malloc=yes;;
esac
dnl Check for the POSIX thread library.
LIB_PTHREAD=
-if test "$opsys" != "mingw32"; then
AC_CHECK_HEADERS_ONCE(pthread.h)
-if test "$ac_cv_header_pthread_h"; then
- 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_kill if Emacs uses gmalloc.c.
- if test "$GMALLOC_OBJ" = gmalloc.o; then
- emacs_pthread_function=pthread_atfork
- else
- emacs_pthread_function=pthread_kill
- fi
- OLD_LIBS=$LIBS
- AC_SEARCH_LIBS([$emacs_pthread_function], [pthread],
- [AC_DEFINE([HAVE_PTHREAD], [1],
- [Define to 1 if you have pthread (-lpthread).])
- # Some systems optimize for single-threaded programs by default, and
- # need special flags to disable these optimizations. For example, the
- # definition of 'errno' in <errno.h>.
- case $opsys in
- sol*)
- AC_DEFINE([_REENTRANT], 1,
- [Define to 1 if your system requires this in multithreaded code.]);;
- aix4-2)
- AC_DEFINE([_THREAD_SAFE], 1,
- [Define to 1 if your system requires this in multithreaded code.]);;
- esac])
- if test "X$LIBS" != "X$OLD_LIBS"; then
- eval LIB_PTHREAD=\$ac_cv_search_$emacs_pthread_function
+if test "$ac_cv_header_pthread_h" && test "$opsys" != "mingw32"; then
+ AC_CACHE_CHECK([for pthread library],
+ [emacs_cv_pthread_lib],
+ [emacs_cv_pthread_lib=no
+ OLD_CPPFLAGS=$CPPFLAGS
+ OLD_LIBS=$LIBS
+ for emacs_pthread_lib in 'none needed' -lpthread; do
+ case $emacs_pthread_lib in
+ -*) LIBS="$OLD_LIBS $emacs_pthread_lib";;
+ esac
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ #include <signal.h>
+ sigset_t old_mask, new_mask;
+ void noop (void) {}]],
+ [[pthread_t th = pthread_self ();
+ int status = 0;
+ status += pthread_create (&th, 0, 0, 0);
+ status += pthread_sigmask (SIG_BLOCK, &new_mask, &old_mask);
+ status += pthread_kill (th, 0);
+ #if ! (defined SYSTEM_MALLOC || defined HYBRID_MALLOC \
+ || defined DOUG_LEA_MALLOC)
+ /* Test for pthread_atfork only if gmalloc uses it,
+ as older-style hosts like MirBSD 10 lack it. */
+ status += pthread_atfork (noop, noop, noop);
+ #endif
+ return status;]])],
+ [emacs_cv_pthread_lib=$emacs_pthread_lib])
+ LIBS=$OLD_LIBS
+ if test "$emacs_cv_pthread_lib" != no; then
+ break
+ fi
+ done
+ CPPFLAGS=$OLD_CPPFLAGS])
+ if test "$emacs_cv_pthread_lib" != no; then
+ AC_DEFINE([HAVE_PTHREAD], 1, [Define to 1 if you have POSIX threads.])
+ case $emacs_cv_pthread_lib in
+ -*) LIB_PTHREAD=$emacs_cv_pthread_lib;;
+ esac
+ ac_cv_func_pthread_sigmask=yes
+ # Some systems optimize for single-threaded programs by default, and
+ # need special flags to disable these optimizations. For example, the
+ # definition of 'errno' in <errno.h>.
+ case $opsys in
+ hpux* | sol*)
+ AC_DEFINE([_REENTRANT], 1,
+ [Define to 1 if your system requires this in multithreaded code.]);;
+ aix4-2)
+ AC_DEFINE([_THREAD_SAFE], 1,
+ [Define to 1 if your system requires this in multithreaded code.]);;
+ esac
fi
- LIBS=$OLD_LIBS
fi
AC_SUBST([LIB_PTHREAD])
-fi
dnl Check for need for bigtoc support on IBM AIX
dnl MS Windows native file monitor is available for mingw32 only.
case $with_file_notification,$opsys in
+ w32,cygwin)
+ AC_MSG_ERROR([`--with-file-notification=w32' was specified, but
+ this is only supported on MS-Windows native and MinGW32 builds.
+ Consider using gfile instead.])
+ ;;
w32,* | yes,mingw32)
AC_CHECK_HEADER(windows.h)
if test "$ac_cv_header_windows_h" = yes ; then
AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
if test "${HAVE_JPEG}" = "yes"; then
AC_DEFINE(HAVE_JPEG)
- AC_EGREP_CPP([version= *(6[2-9]|[7-9][0-9])],
- [#include <jpeglib.h>
- version=JPEG_LIB_VERSION
-],
+ AC_EGREP_CPP([version 6b or later],
+ [#include <jpeglib.h>
+ #if JPEG_LIB_VERSION >= 62
+ version 6b or later
+ #endif
+ ],
[AC_DEFINE(HAVE_JPEG)],
[AC_MSG_WARN([libjpeg found, but not version 6b or later])
HAVE_JPEG=no])
AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
if test "${HAVE_JPEG}" = "yes"; then
AC_DEFINE(HAVE_JPEG)
- AC_EGREP_CPP([version= *(6[2-9]|[7-9][0-9])],
+ AC_EGREP_CPP([version 6b or later],
[#include <jpeglib.h>
- version=JPEG_LIB_VERSION
-],
+ #if JPEG_LIB_VERSION >= 62
+ version 6b or later
+ #endif
+ ],
[AC_DEFINE(HAVE_JPEG)],
[AC_MSG_WARN([libjpeg found, but not version 6b or later])
HAVE_JPEG=no])
case $opsys in
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>.
- hpux* | irix6-5 | openbsd | sol2* | unixware )
+ hpux* | irix6-5 | nacl | openbsd | sol2* | unixware )
emacs_broken_SIGIO=yes
;;
AC_DEFINE(FIRST_PTY_LETTER, ['p'])
;;
- gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
+ gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd | nacl )
dnl if HAVE_GRANTPT
if test "x$ac_cv_func_grantpt" = xyes; then
AC_DEFINE(UNIX98_PTYS, 1, [Define if the system has Unix98 PTYs.])
AC_CACHE_CHECK([for usable FIONREAD], [emacs_cv_usable_FIONREAD],
[case $opsys in
- aix4-2)
+ aix4-2 | nacl)
dnl BUILD 9008 - FIONREAD problem still exists in X-Windows.
emacs_cv_usable_FIONREAD=no
;;