X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/eb1dd42a729ab1b9cdcd278767951679480cd4c3..f9fea26c27e2d3dfc8d29b3e61fb58acf8a7efd6:/configure.ac diff --git a/configure.ac b/configure.ac index a46f89ad55..00c841e77b 100644 --- a/configure.ac +++ b/configure.ac @@ -199,7 +199,6 @@ OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support]) OPTION_DEFAULT_ON([gconf],[don't compile with GConf support]) OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings support]) OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support]) -OPTION_DEFAULT_ON([acl],[don't compile with ACL support]) OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support]) OPTION_DEFAULT_ON([inotify],[don't compile with inotify (file-watch) support]) @@ -439,6 +438,11 @@ case "${canonical}" in opsys=freebsd ;; + ## DragonFly ports + *-*-dragonfly* ) + opsys=dragonfly + ;; + ## FreeBSD kernel + glibc based userland *-*-kfreebsd*gnu* ) opsys=gnu-kfreebsd @@ -471,6 +475,11 @@ case "${canonical}" in ## fi ;; + ## Cygwin ports + *-*-cygwin ) + opsys=cygwin + ;; + ## HP 9000 series 700 and 800, running HP/UX hppa*-hp-hpux10.2* ) opsys=hpux10-20 @@ -544,9 +553,8 @@ case "${canonical}" in ## Intel 386 machines where we don't care about the manufacturer. i[3456]86-*-* ) case "${canonical}" in - *-cygwin ) opsys=cygwin ;; *-darwin* ) opsys=darwin ;; - *-mingw32 ) + *-mingw32 ) opsys=mingw32 # MinGW overrides and adds some system headers in nt/inc. GCC_TEST_OPTIONS="-I $srcdir/nt/inc" @@ -614,10 +622,10 @@ AC_DEFUN([gl_THREADLIB]) dnl Amongst other things, this sets AR and ARFLAGS. gl_EARLY -# It's helpful to have C macros available to GDB, so prefer -g3 to -g -# if -g3 works and the user does not specify CFLAGS. -# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. if test "$ac_test_CFLAGS" != set; then + # It's helpful to have C macros available to GDB, so prefer -g3 to -g + # if -g3 works and the user does not specify CFLAGS. + # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. case $CFLAGS in '-g') emacs_g3_CFLAGS='-g3';; @@ -633,16 +641,32 @@ if test "$ac_test_CFLAGS" != set; then [emacs_cv_prog_cc_g3], [AC_LINK_IFELSE([AC_LANG_PROGRAM()], [emacs_cv_prog_cc_g3=yes], - [emacs_cv_prog_cc_g3=no])]) - if test $emacs_cv_prog_cc_g3 = yes; then - CFLAGS=$emacs_g3_CFLAGS - else + [emacs_cv_prog_cc_g3=no])]) + if test $emacs_cv_prog_cc_g3 != yes; then CFLAGS=$emacs_save_CFLAGS fi if test $opsys = mingw32; then CFLAGS="$CFLAGS -gdwarf-2" fi fi + + case $CFLAGS in + *-O*) ;; + *) + # No optimization flag was inferred for this non-GCC compiler. + # Try -O. This is needed for xlc on AIX; see Bug#14258. + emacs_save_CFLAGS=$CFLAGS + test -z "$CFLAGS" || CFLAGS="$CFLAGS " + CFLAGS=${CFLAGS}-O + AC_CACHE_CHECK([whether $CC accepts -O], + [emacs_cv_prog_cc_o], + [AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [emacs_cv_prog_cc_o=yes], + [emacs_cv_prog_cc_o=no])]) + if test $emacs_cv_prog_cc_o != yes; then + CFLAGS=$emacs_save_CFLAGS + fi ;; + esac fi AC_ARG_ENABLE([gcc-warnings], @@ -723,27 +747,13 @@ else esac AC_SUBST([WERROR_CFLAGS]) - nw="$nw -Waggregate-return" # anachronistic - nw="$nw -Wlong-long" # C90 is anachronistic - nw="$nw -Wc++-compat" # We don't care about C++ compilers - nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib - nw="$nw -Wtraditional" # Warns on #elif which we use often - nw="$nw -Wcast-qual" # Too many warnings for now - nw="$nw -Wconversion" # Too many warnings for now nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings - nw="$nw -Wsign-conversion" # Too many warnings for now nw="$nw -Woverlength-strings" # Not a problem these days - nw="$nw -Wtraditional-conversion" # Too many warnings for now - nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored - nw="$nw -Wpadded" # Our structs are not padded - nw="$nw -Wredundant-decls" # we regularly (re)declare functions nw="$nw -Wlogical-op" # any use of fwrite provokes this nw="$nw -Wformat-nonliteral" # we do this a lot nw="$nw -Wvla" # warnings in gettext.h nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ - nw="$nw -Wswitch-enum" # Too many warnings for now nw="$nw -Wswitch-default" # Too many warnings for now - nw="$nw -Wfloat-equal" # warns about high-quality code nw="$nw -Winline" # OK to ignore 'inline' nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. nw="$nw -Wstrict-overflow" # OK to optimize assuming that @@ -761,6 +771,20 @@ else # The following line should be removable at some point. nw="$nw -Wsuggest-attribute=pure" + # clang is unduly picky about some things. + AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #ifndef __clang__ + #error "not clang" + #endif + ]])], + [emacs_cv_clang=yes], + [emacs_cv_clang=no])]) + if test $emacs_cv_clang = yes; then + nw="$nw -Wcast-align" + fi + gl_MANYWARN_ALL_GCC([ws]) gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) for w in $ws; do @@ -777,6 +801,14 @@ else # gcc 4.5.0 20090517. gl_WARN_ADD([-Wno-logical-op]) + # More things that clang is unduly picky about. + if test $emacs_cv_clang = yes; then + gl_WARN_ADD([-Wno-format-extra-args]) + gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare]) + gl_WARN_ADD([-Wno-unused-command-line-argument]) + gl_WARN_ADD([-Wno-unused-value]) + fi + gl_WARN_ADD([-fdiagnostics-show-option]) gl_WARN_ADD([-funit-at-a-time]) @@ -808,7 +840,48 @@ dnl AC_PROG_MKDIR_P dnl if test "x$RANLIB" = x; then dnl AC_PROG_RANLIB dnl fi -AC_PROG_LN_S + + +dnl Sadly, AC_PROG_LN_S is too restrictive. It also tests whether links +dnl can be made to directories. This is not relevant for our usage, and +dnl excludes some cases that work fine for us. Eg MS Windows or files +dnl hosted on AFS, both examples where simple links work, but links to +dnl directories fail. We use a cut-down version instead. +dnl AC_PROG_LN_S + +AC_MSG_CHECKING([whether ln -s works for files in the same directory]) +rm -f conf$$ conf$$.file + +LN_S_FILEONLY='cp -p' + +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + LN_S_FILEONLY='ln -s' + elif ln conf$$.file conf$$ 2>/dev/null; then + LN_S_FILEONLY=ln + fi +fi + +rm -f conf$$ conf$$.file + +if test "$LN_S_FILEONLY" = "ln -s"; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no, using $LN_S_FILEONLY]) +fi + +AC_SUBST(LN_S_FILEONLY) + + +dnl AC_PROG_LN_S sets LN_S to 'cp -pR' for MinGW, on the premise that 'ln' +dnl doesn't support links to directories, as in "ln file dir". But that +dnl use is non-portable, and OTOH MinGW wants to use hard links for Emacs +dnl executables at "make install" time. +dnl See http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00475.html +dnl for more details. +if test "$opsys" = "mingw32"; then + LN_S="ln" +fi AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin) @@ -948,7 +1021,7 @@ esac LD_SWITCH_SYSTEM= case "$opsys" in - freebsd) + freebsd|dragonfly) ## Let `ld' find image libs and similar things in /usr/local/lib. ## The system compiler, GCC, has apparently been modified to not ## look there, contrary to what a stock GCC would do. @@ -969,7 +1042,7 @@ case "$opsys" in ;; openbsd) - ## Han Boetes says this is necessary, + ## Han Boetes says this is necessary, ## otherwise Emacs dumps core on elf systems. LD_SWITCH_SYSTEM="-Z" ;; @@ -1031,13 +1104,11 @@ AC_SUBST(C_SWITCH_SYSTEM) LIBS_SYSTEM= -LIB_WSOCK32= -NTLIB= case "$opsys" in ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; - freebsd) LIBS_SYSTEM="-lutil" ;; + freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;; hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; @@ -1045,16 +1116,9 @@ case "$opsys" in ## Motif needs -lgen. unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; - - mingw32) LIBS_SYSTEM="-lcomctl32" - LIB_WSOCK32="$LIB_WSOCK32 -lwsock32" - NTLIB="ntlib.$ac_objext" - ;; esac AC_SUBST(LIBS_SYSTEM) -AC_SUBST(LIB_WSOCK32) -AC_SUBST(NTLIB) ### Make sure subsequent tests use flags consistent with the build flags. @@ -1085,7 +1149,7 @@ case $opsys in ## Adding -lm confuses the dynamic linker, so omit it. LIB_MATH= ;; - freebsd ) + freebsd | dragonfly ) SYSTEM_TYPE=berkeley-unix ;; gnu-linux | gnu-kfreebsd ) @@ -1219,10 +1283,7 @@ if test "${with_sound}" != "no"; then if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then case "$opsys" in dnl defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ - gnu-linux|freebsd|netbsd) - AC_DEFINE(HAVE_SOUND, 1, [Define to 1 if you have sound support.]) - ;; - mingw32) + gnu-linux|freebsd|netbsd|mingw32) AC_DEFINE(HAVE_SOUND, 1, [Define to 1 if you have sound support.]) ;; esac @@ -1550,26 +1611,31 @@ CLIENTW= W32_RES_LINK= EMACS_MANIFEST= if test "${with_w32}" != no; then - if test "${opsys}" != "cygwin"; then - if test "${opsys}" != "mingw32"; then + case "${opsys}" in + cygwin) + AC_CHECK_HEADER([windows.h], [HAVE_W32=yes], + [AC_MSG_ERROR([`--with-w32' was specified, but windows.h + cannot be found.])]) + ;; + mingw32) + ## Using --with-w32 with MinGW is a no-op, but we allow it. + ;; + *) AC_MSG_ERROR([Using w32 with an autotools build is only supported for Cygwin and MinGW32.]) - fi - fi - AC_CHECK_HEADER([windows.h], [HAVE_W32=yes], - [AC_MSG_ERROR([`--with-w32' was specified, but windows.h - cannot be found.])]) + ;; + esac fi + if test "${opsys}" = "mingw32"; then - AC_CHECK_HEADER([windows.h], [HAVE_W32=yes], - [AC_MSG_ERROR([The windows.h header file is required, - but cannot be found.])]) AC_MSG_CHECKING([whether Windows API headers are recent enough]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include ]], [[void test(PIMAGE_NT_HEADERS pHeader) {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}]])], - emacs_cv_w32api=yes, emacs_cv_w32api=no) + [emacs_cv_w32api=yes + HAVE_W32=yes], + emacs_cv_w32api=no) AC_MSG_RESULT($emacs_cv_w32api) if test "${emacs_cv_w32api}" = "no"; then AC_MSG_ERROR([the Windows API headers are too old to support this build.]) @@ -1578,7 +1644,11 @@ fi FIRSTFILE_OBJ= NTDIR= +LIBS_ECLIENT= +LIB_WSOCK32= +NTLIB= CM_OBJ="cm.o" +XARGS_LIMIT= if test "${HAVE_W32}" = "yes"; then AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.]) AC_CHECK_TOOL(WINDRES, [windres], @@ -1595,17 +1665,22 @@ if test "${HAVE_W32}" = "yes"; then W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool" # Tell the linker that emacs.res is an object (which we compile from # the rc file), not a linker script. - W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res" + W32_RES_LINK="-Wl,emacs.res" else W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o" W32_OBJ="$W32_OBJ w32notify.o" W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32" - W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lusp10" + W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10" + W32_RES_LINK="\$(EMACSRES)" CLIENTRES="emacsclient.res" CLIENTW="emacsclientw\$(EXEEXT)" FIRSTFILE_OBJ=firstfile.o NTDIR=nt CM_OBJ= + LIBS_ECLIENT="-lcomctl32" + LIB_WSOCK32="-lwsock32" + NTLIB="ntlib.$ac_objext" + XARGS_LIMIT="-s 10000" fi fi AC_SUBST(W32_OBJ) @@ -1618,6 +1693,10 @@ AC_SUBST(W32_RES_LINK) AC_SUBST(FIRSTFILE_OBJ) AC_SUBST(NTDIR) AC_SUBST(CM_OBJ) +AC_SUBST(LIBS_ECLIENT) +AC_SUBST(LIB_WSOCK32) +AC_SUBST(NTLIB) +AC_SUBST(XARGS_LIMIT) if test "${HAVE_W32}" = "yes"; then window_system=w32 @@ -2003,6 +2082,7 @@ if test "${opsys}" != "mingw32"; then USE_GTK_TOOLKIT="GTK3" if test "x$ac_enable_gtk_deprecation_warnings" = x; then GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS" + GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS" fi else check_gtk2=yes @@ -2225,23 +2305,6 @@ if test "$ac_cv_func_inotify_init1" = yes; then AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.]) fi -dnl POSIX ACL support: provided by libacl on GNU/Linux, by libc on FreeBSD. -HAVE_POSIX_ACL=no -LIBACL_LIBS= -if test "${with_acl}" = "yes"; then - AC_CHECK_LIB([acl], [acl_set_file], HAVE_POSIX_ACL=yes, HAVE_POSIX_ACL=no) - if test "$HAVE_POSIX_ACL" = yes; then - AC_DEFINE(HAVE_POSIX_ACL, 1, [Define to 1 if using POSIX ACL support.]) - LIBACL_LIBS=-lacl - else - AC_CHECK_FUNC(acl_set_file, HAVE_POSIX_ACL=yes, HAVE_POSIX_ACL=no) - if test "$HAVE_POSIX_ACL" = yes; then - AC_DEFINE(HAVE_POSIX_ACL, 1, [Define to 1 if using POSIX ACL support.]) - fi - fi -fi -AC_SUBST(LIBACL_LIBS) - dnl Do not put whitespace before the #include statements below. dnl Older compilers (eg sunos4 cc) choke on it. HAVE_XAW3D=no @@ -2666,6 +2729,10 @@ no_return_alloc_pixels fi fi +### FIXME: Perhaps regroup to minimize code duplication due to MinGW's +### slightly different requirements wrt image libraries (it doesn't +### use -lXpm because it loads the xpm shared library dynamically at +### run time). if test "${opsys}" = "mingw32"; then if test "${with_xpm}" != "no"; then AC_CHECK_HEADER(X11/xpm.h, HAVE_XPM=yes, HAVE_XPM=no, [ @@ -2923,6 +2990,56 @@ if test "${HAVE_X11}" = "yes"; then fi AC_SUBST(LIBXSM) +### Use XRandr (-lXrandr) if available +HAVE_XRANDR=no +if test "${HAVE_X11}" = "yes"; then + XRANDR_REQUIRED=1.2.2 + XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED" + PKG_CHECK_MODULES(XRANDR, $XRANDR_MODULES, HAVE_XRANDR=yes, HAVE_XRANDR=no) + if test $HAVE_XRANDR = no; then + # Test old way in case pkg-config doesn't have it (older machines). + AC_CHECK_HEADER(X11/extensions/Xrandr.h, + [AC_CHECK_LIB(Xrandr, XRRQueryExtension, HAVE_XRANDR=yes)]) + if test $HAVE_XRANDR = yes; then + XRANDR_LIBS=-lXrandr + AC_SUBST(XRANDR_LIBS) + fi + fi + if test $HAVE_XRANDR = yes; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LIBS="$LIBS" + CFLAGS="$XRANDR_CFLAGS $CFLAGS" + LIBS="$XRANDR_LIBS $LIBS" + AC_CHECK_FUNCS(XRRGetOutputPrimary XRRGetScreenResourcesCurrent) + CFLAGS="$SAVE_CFLAGS" + LIBS="$SAVE_LIBS" + + AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have the XRandr extension.]) + fi +fi + +### Use Xinerama (-lXinerama) if available +HAVE_XINERAMA=no +if test "${HAVE_X11}" = "yes"; then + XINERAMA_REQUIRED=1.0.2 + XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED" + PKG_CHECK_MODULES(XINERAMA, $XINERAMA_MODULES, HAVE_XINERAMA=yes, + HAVE_XINERAMA=no) + if test $HAVE_XINERAMA = no; then + # Test old way in case pkg-config doesn't have it (older machines). + AC_CHECK_HEADER(X11/extensions/Xinerama.h, + [AC_CHECK_LIB(Xinerama, XineramaQueryExtension, HAVE_XINERAMA=yes)]) + if test $HAVE_XINERAMA = yes; then + XINERAMA_LIBS=-lXinerama + AC_SUBST(XINERAMA_LIBS) + fi + fi + if test $HAVE_XINERAMA = yes; then + AC_DEFINE(HAVE_XINERAMA, 1, [Define to 1 if you have the Xinerama extension.]) + fi +fi + + ### Use libxml (-lxml2) if available ### mingw32 doesn't use -lxml2, since it loads the library dynamically. HAVE_LIBXML2=no @@ -3007,7 +3124,7 @@ mail_lock=no case "$opsys" in aix4-2) mail_lock="lockf" ;; - gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; + gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; ## On GNU/Linux systems, both methods are used by various mail programs. ## I assume most people are using newer mailers that have heard of flock. @@ -3029,6 +3146,9 @@ case "$opsys" in test $ac_cv_header_maillock_h = yes && mail_lock=no fi ;; + + mingw32) + mail_lock="none-needed" ;; esac BLESSMAIL_TARGET= @@ -3037,6 +3157,8 @@ case "$mail_lock" in lockf) AC_DEFINE(MAIL_USE_LOCKF, 1, [Define if the mailer uses lockf to interlock the mail spool.]) ;; + none-needed) ;; + *) BLESSMAIL_TARGET="need-blessmail" ;; esac AC_SUBST(BLESSMAIL_TARGET) @@ -3188,7 +3310,7 @@ fail; fi ;; - openbsd) LIBS_TERMCAP="-lncurses" ;; + openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;; ## hpux: Make sure we get select from libc rather than from libcurses ## because libcurses on HPUX 10.10 has a broken version of select. @@ -3499,18 +3621,19 @@ AC_DEFINE(HAVE_SOCKETS, 1, [Define if the system supports AH_TEMPLATE(INTERNAL_TERMINAL, [This is substituted when $TERM is "internal".]) +AH_TEMPLATE(NULL_DEVICE, [Name of the file to open to get + a null file, or a data sink.]) if test "${opsys}" = "mingw32"; then - AC_DEFINE(NULL_DEVICE, ["NUL:"], [Name of the file to open to get - a null file, or a data sink.]) + AC_DEFINE(NULL_DEVICE, ["NUL:"]) else - AC_DEFINE(NULL_DEVICE, ["/dev/null"], [Name of the file to open to get - a null file, or a data sink.]) + AC_DEFINE(NULL_DEVICE, ["/dev/null"]) fi +AH_TEMPLATE(SEPCHAR, [Character that separates PATH elements.]) if test "${opsys}" = "mingw32"; then - AC_DEFINE(SEPCHAR, [';'], [Character that separates PATH elements.]) + AC_DEFINE(SEPCHAR, [';']) else - AC_DEFINE(SEPCHAR, [':'], [Character that separates PATH elements.]) + AC_DEFINE(SEPCHAR, [':']) fi dnl Everybody supports this, except MS-DOS. @@ -3522,9 +3645,10 @@ AC_DEFINE(USER_FULL_NAME, [pw->pw_gecos], [How to get a user's full name.]) AC_DEFINE(DIRECTORY_SEP, ['/'], [Character that separates directories in a file name.]) +AH_TEMPLATE(DEVICE_SEP, [Character that separates a device in a file name.]) if test "${opsys}" = "mingw32"; then dnl Only used on MS platforms. - AC_DEFINE(DEVICE_SEP, ':', [Character that separates a device in a file name.]) + AC_DEFINE(DEVICE_SEP, ':') AC_DEFINE(IS_DEVICE_SEP(_c_), [((_c_) == DEVICE_SEP)], [Returns true if character is a device separator.]) @@ -3534,8 +3658,6 @@ if test "${opsys}" = "mingw32"; then AC_DEFINE(IS_ANY_SEP(_c_), [(IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))], [Returns true if character is any form of separator.]) else - AH_TEMPLATE(DEVICE_SEP, [Character that separates a device in a file name.]) - AC_DEFINE(IS_DEVICE_SEP(_c_), 0, [Returns true if character is a device separator.]) @@ -3635,7 +3757,7 @@ case $opsys in esac case $opsys in - darwin | freebsd | netbsd | openbsd ) + darwin | dragonfly | freebsd | netbsd | openbsd ) AC_DEFINE(DONT_REOPEN_PTY, 1, [Define if process.c does not need to close a pty to make it a controlling terminal (it is already a controlling terminal of the subprocess, because we did ioctl TIOCSCTTY).]) @@ -3741,7 +3863,7 @@ case $opsys in AC_DEFINE(FIRST_PTY_LETTER, ['p']) ;; - gnu-linux | gnu-kfreebsd | freebsd | netbsd ) + gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd ) 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.]) @@ -3824,7 +3946,7 @@ AH_TEMPLATE(SIGNALS_VIA_CHARACTERS, [Make process_send_signal work by case $opsys in dnl Perry Smith says this is correct for AIX. dnl thomas@mathematik.uni-bremen.de says this is needed for IRIX. - aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd | darwin ) + aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin ) AC_DEFINE(SIGNALS_VIA_CHARACTERS, 1) ;; @@ -3873,7 +3995,7 @@ AH_TEMPLATE(TAB3, [Undocumented.]) case $opsys in darwin) AC_DEFINE(TAB3, OXTABS) ;; - gnu | freebsd | netbsd | openbsd ) + gnu | dragonfly | freebsd | netbsd | openbsd ) AC_DEFINE(TABDLY, OXTABS, [Undocumented.]) AC_DEFINE(TAB3, OXTABS) ;; @@ -3927,7 +4049,7 @@ if test x$GCC = xyes; then else case $opsys in dnl irix: Tested on Irix 6.5. SCM worked on earlier versions. - freebsd | netbsd | openbsd | irix6-5 | sol2* ) + dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* ) AC_DEFINE(GC_SETJMP_WORKS, 1) ;; esac @@ -4402,6 +4524,9 @@ case "$opsys" in ## each); under Cocoa 31 commands are required. if test "$HAVE_NS" = "yes"; then libs_nsgui="-framework AppKit" + if test "$NS_IMPL_COCOA" = "yes"; then + libs_nsgui="$libs_nsgui -framework IOKit" + fi headerpad_extra=6C8 else libs_nsgui= @@ -4426,15 +4551,27 @@ case "$opsys" in gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;; mingw32) + ## MinGW64 does not prepend an underscore to symbols, so we must + ## pass a different -entry switch to linker. FIXME: It is better + ## to make the entry points the same by changing unexw32.c. case "$canonical" in - x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-subsystem,console -Wl,-entry,_start -Wl,-Map,./temacs.map" ;; - *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-subsystem,console -Wl,-entry,__start -Wl,-Map,./temacs.map" ;; + x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;; + *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;; esac ;; + openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;; + *) LD_SWITCH_SYSTEM_TEMACS= ;; esac +if test x$ac_enable_profiling != x ; then + case $opsys in + *freebsd | gnu-linux) ;; + *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;; + esac +fi + AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) ## MinGW-specific post-link processing of temacs. @@ -4661,8 +4798,12 @@ dnl by configure. This also explains the `move-if-change' test and dnl the use of force in the `epaths-force' rule in Makefile.in. AC_CONFIG_COMMANDS([epaths], [ echo creating src/epaths.h -${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force -], [GCC="$GCC" CPPFLAGS="$CPPFLAGS"]) +if test "${opsys}" = "mingw32"; then + ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32 +else + ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force +fi +], [GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"]) AC_CONFIG_COMMANDS([gdbinit], [ if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then