## fi
;;
+ ## Chromium Native Client
+ *-nacl )
+ opsys=nacl
+ ;;
+
## Cygwin ports
*-*-cygwin )
opsys=cygwin
gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare])
gl_WARN_ADD([-Wno-pointer-sign])
gl_WARN_ADD([-Wno-string-plus-int])
+ gl_WARN_ADD([-Wno-unknown-attributes])
fi
else
isystem='-isystem '
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
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
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
;;
esac
;;
- openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
-
*) LD_SWITCH_SYSTEM_TEMACS= ;;
esac
+# -nopie fixes a temacs segfault on Gentoo, OpenBSD, and other systems
+# with "hardened" GCC configurations for some reason (Bug#18784).
+# We don't know why -nopie works, but not segfaulting is better than
+# segfaulting. Use -Werror when trying -nopie, otherwise clang keeps
+# warning that it does not understand -nopie.
+AC_CACHE_CHECK([whether $CC accepts -nopie],
+ [emacs_cv_prog_cc_nopie],
+ [emacs_save_CFLAGS=$CFLAGS
+ emacs_save_LDFLAGS=$LDFLAGS
+ CFLAGS="$CFLAGS -Werror"
+ LDFLAGS="$LDFLAGS -nopie"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+ [emacs_cv_prog_cc_nopie=yes],
+ [emacs_cv_prog_cc_nopie=no])
+ CFLAGS=$emacs_save_CFLAGS
+ LDFLAGS=$emacs_save_LDFLAGS])
+if test "$emacs_cv_prog_cc_nopie" = yes; then
+ LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -nopie"
+fi
+
if test x$ac_enable_profiling != x ; then
case $opsys in
*freebsd | gnu-linux) ;;