dnl in the directory containing this script.
dnl If you changed any AC_DEFINES, also run autoheader.
dnl
-dnl Copyright (C) 1994-1996, 1999-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 1994-1996, 1999-2014 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.3.50)
+AC_INIT(emacs, 24.3.90)
-if test "x$MSYSTEM" = "xMINGW32"
+dnl We get MINGW64 with MSYS2
+if test "x$MSYSTEM" = "xMINGW32" -o "x$MSYSTEM" = "xMINGW64"
then
. $srcdir/nt/mingw-cfg.site
### If you add support for a new configuration, add code to this
### switch statement to recognize your configuration name and select
-### the appropriate operating system file.
-
-### You would hope that you could choose an s/*.h
-### file based on the operating system portion. However, it turns out
-### that each s/*.h file is pretty manufacturer-specific.
-### So we basically have to have a special case for each
-### configuration name.
-###
+### the appropriate opsys.
+
### As far as handling version numbers on operating systems is
### concerned, make sure things will fail in a fixable way. If
### /etc/MACHINES doesn't say anything about version numbers, be
;;
## OpenBSD ports
- *-*-openbsd* )
+ *-*-openbsd* | *-*-mirbsd* )
opsys=openbsd
;;
* ) unported=yes ;;
esac
case "${canonical}" in
+ *-sunos5.[1-9][0-9]* | *-solaris2.[1-9][0-9]* )
+ opsys=sol2-10
+ emacs_check_sunpro_c=yes
+ ;;
*-sunos5.6* | *-solaris2.6* )
opsys=sol2-6
RANLIB="ar -ts"
opsys=sol2-6
emacs_check_sunpro_c=yes
;;
- *-sunos5* | *-solaris* )
- opsys=sol2-10
- emacs_check_sunpro_c=yes
- ;;
esac
## Watch out for a compiler that we know will not work.
case "${canonical}" in
dnl quotation ends
if test $unported = yes; then
- AC_MSG_ERROR([Emacs hasn't been ported to `${canonical}' systems.
+ AC_MSG_ERROR([Emacs does not support `${canonical}' systems.
+If you think it should, please send a report to bug-gnu-emacs@gnu.org.
Check `etc/MACHINES' for recognized configuration names.])
fi
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.
-# Otherwise, run RUN-IF-NOT-FOUND.
-AC_DEFUN([gl_GCC_VERSION_IFELSE],
- [AC_PREPROC_IFELSE(
- [AC_LANG_PROGRAM(
- [[
-#if ($1) < __GNUC__ || (($1) == __GNUC__ && ($2) <= __GNUC_MINOR__)
-/* ok */
-#else
-# error "your version of gcc is older than $1.$2"
-#endif
- ]]),
- ], [$3], [$4])
- ]
-)
-
# 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"
+ error "not clang";
#endif
]])],
[emacs_cv_clang=yes],
AC_SUBST([GNULIB_WARN_CFLAGS])
fi
+edit_cflags="
+ s,///*,/,g
+ s/^/ /
+ s/ -I/ $isystem/g
+ s/^ //
+"
dnl Some other nice autoconf tests.
LN_S_FILEONLY='cp -p'
+dnl On MinGW, ensure we will call the MSYS /bin/ln.exe, not some
+dnl random program in the current directory.
if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
- LN_S_FILEONLY='ln -s'
+ if test "$opsys" = "mingw32"; then
+ LN_S_FILEONLY='/bin/ln -s'
+ else
+ LN_S_FILEONLY='ln -s'
+ fi
elif ln conf$$.file conf$$ 2>/dev/null; then
- LN_S_FILEONLY=ln
+ if test "$opsys" = "mingw32"; then
+ LN_S_FILEONLY=/bin/ln
+ else
+ LN_S_FILEONLY=ln
+ fi
fi
fi
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"
+ LN_S="/bin/ln"
fi
AC_PATH_PROG(INSTALL_INFO, install-info, :,
[if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then AC_MSG_RESULT(yes)
else AC_MSG_RESULT(no); PAXCTL=""; fi])
fi
+
+ if test "${SETFATTR+set}" != set; then
+ AC_CACHE_CHECK([for setfattr],
+ [emacs_cv_prog_setfattr],
+ [touch conftest.tmp
+ if (setfattr -n user.pax.flags conftest.tmp) >/dev/null 2>&1; then
+ emacs_cv_prog_setfattr=yes
+ else
+ emacs_cv_prog_setfattr=no
+ fi])
+ if test "$emacs_cv_prog_setfattr" = yes; then
+ SETFATTR=setfattr
+ else
+ SETFATTR=
+ fi
+ rm -f conftest.tmp
+ AC_SUBST([SETFATTR])
+ fi
fi
## Need makeinfo >= 4.7 (?) to build the manuals.
## pre-built, and not deleted by the normal clean rules. makeinfo is
## therefore in the category of "special tools" not normally required, which
## configure does not have to check for (eg autoconf itself).
-## In a Bazaar checkout on the other hand, the manuals are not included.
-## So makeinfo is a requirement to build from Bazaar, and configure
+## In a repository checkout on the other hand, the manuals are not included.
+## So makeinfo is a requirement to build from the repository, and configure
## should test for it as it does for any other build requirement.
## We use the presence of $srcdir/info/emacs to distinguish a release,
-## with pre-built manuals, from a Bazaar checkout.
+## with pre-built manuals, from a repository checkout.
HAVE_MAKEINFO=yes
if test "$MAKEINFO" = "no"; then
#endif
#if defined __SANITIZE_ADDRESS__ || __has_feature (address_sanitizer)
#else
- #error "Addresses are not sanitized."
+ error "Addresses are not sanitized.";
#endif
]])],
[emacs_cv_sanitize_address=yes],
if "$PKG_CONFIG" --exists "$2" 2>&AS_MESSAGE_LOG_FD &&
$1_CFLAGS=`"$PKG_CONFIG" --cflags "$2" 2>&AS_MESSAGE_LOG_FD` &&
$1_LIBS=`"$PKG_CONFIG" --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then
- edit_cflags="
- s,///*,/,g
- s/^/ /
- s/ -I/ $isystem/g
- s/^ //
- "
$1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"`
$1_LIBS=`AS_ECHO(["$$1_LIBS"]) | sed -e 's,///*,/,g'`
AC_MSG_RESULT([yes CFLAGS='$$1_CFLAGS' LIBS='$$1_LIBS'])
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
; /* OK */
#else
-#error "OSX 10.4 or newer required"
+ error "OSX 10.4 or newer required";
#endif
#endif
])],
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
; /* OK */
#else
-#error "OSX 10.5 not found"
+ error "OSX 10.5 not found";
#endif
#endif
])],
x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
*) EMACS_MANIFEST="emacs-x86.manifest" ;;
esac
- UPDATE_MANIFEST=update-game-score.exe.manifest
if test "${opsys}" = "cygwin"; then
W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
# the rc file), not a linker script.
W32_RES_LINK="-Wl,emacs.res"
else
+ UPDATE_MANIFEST=update-game-score.exe.manifest
W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
AC_MSG_ERROR([You seem to be running X, but no X development libraries
were found. You should install the relevant development files for X
-and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
+and for the toolkit you want, such as Gtk+ or Motif. Also make
sure you have development files for image handling, i.e.
tiff, gif, jpeg, png and xpm.
If you are sure you want Emacs compiled without X window support, pass
fi
HAVE_IMAGEMAGICK=no
-if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
+if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then
if test "${with_imagemagick}" != "no"; then
- ## 6.2.8 is the earliest version known to work, but earlier versions
- ## might work - let us know if you find one.
- ## 6.0.7 does not work. See bug#7955.
+ ## 6.3.5 is the earliest version known to work; see Bug#17339.
## 6.8.2 makes Emacs crash; see Bug#13867.
- IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
+ IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2"
PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :)
AC_SUBST(IMAGEMAGICK_CFLAGS)
AC_SUBST(IMAGEMAGICK_LIBS)
if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
PKG_CHECK_MODULES(GSETTINGS, gio-2.0 >= 2.26, HAVE_GSETTINGS=yes, HAVE_GSETTINGS=no)
if test "$HAVE_GSETTINGS" = "yes"; then
- AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.])
- SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
- SETTINGS_LIBS="$GSETTINGS_LIBS"
+ old_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $GSETTINGS_CFLAGS"
+ old_LIBS=$LIBS
+ LIBS="$LIBS $GSETTINGS_LIBS"
+ AC_MSG_CHECKING([whether GSettings is in gio])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[/* Check that gsettings really is present. */
+ #include <glib-object.h>
+ #include <gio/gio.h>
+ ]],
+ [[
+ GSettings *settings;
+ GVariant *val = g_settings_get_value (settings, "");
+ ]])],
+ [], HAVE_GSETTINGS=no)
+ AC_MSG_RESULT([$HAVE_GSETTINGS])
+
+ if test "$HAVE_GSETTINGS" = "yes"; then
+ AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.])
+ SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
+ SETTINGS_LIBS="$GSETTINGS_LIBS"
+ fi
+ CFLAGS=$old_CFLAGS
+ LIBS=$old_LIBS
fi
fi
# Windows loads GnuTLS dynamically
if test "${opsys}" = "mingw32"; then
LIBGNUTLS_LIBS=
- else
- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
- LIBS="$LIBGNUTLS_LIBS $LIBS"
fi
fi
fi
if test "${HAVE_PNG}" = "yes"; then
- AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
- LIBPNG="-lpng -lz -lm"
+ AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library.])
+
+ dnl Some systems, eg NetBSD 6, only provide eg "libpng16", not "libpng".
+ lpng=`libpng-config --libs 2> /dev/null`
+ case $lpng in
+ -l*) : ;;
+ *) lpng="-lpng" ;;
+ esac
+ LIBPNG="$lpng -lz -lm"
AC_CHECK_DECL(png_longjmp,
[],
strsignal setitimer \
sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
gai_strerror getline getdelim sync \
-difftime \
getpwent endpwent getgrent endgrent \
touchlock \
cfmakeraw cfsetspeed copysign __executable_start log2)
dnl Check this late. It depends on what other libraries (lrsvg, Gtk+ etc)
dnl Emacs uses.
XGSELOBJ=
+OLDCFLAGS="$CFLAGS"
+OLDLIBS="$LIBS"
+CFLAGS="$CFLAGS $GFILENOTIFY_CFLAGS"
+LIBS="$LIBS $GFILENOTIFY_LIBS"
AC_MSG_CHECKING([whether GLib is linked in])
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#include <glib.h>
XGSELOBJ=xgselect.o
fi
fi
+CFLAGS="$OLDCFLAGS"
+LIBS="$OLDLIBS"
AC_SUBST(XGSELOBJ)
dnl Adapted from Haible's version.
version=$PACKAGE_VERSION
-copyright="Copyright (C) 2013 Free Software Foundation, Inc."
+copyright="Copyright (C) 2014 Free Software Foundation, Inc."
AC_DEFINE_UNQUOTED(COPYRIGHT, ["$copyright"],
[Short copyright string for this version of Emacs.])
AC_SUBST(copyright)
AH_TOP([/* GNU Emacs site configuration template file.
-Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2013
+Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2014
Free Software Foundation, Inc.
This file is part of GNU Emacs.
echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
-echo " Does Emacs use -lpng? ${HAVE_PNG}"
+echo " Does Emacs use a png library? ${HAVE_PNG} $LIBPNG"
echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"