dnl along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.65)
-AC_INIT(emacs, 24.3.90)
+AC_INIT(emacs, 24.3.91)
dnl We get MINGW64 with MSYS2
if test "x$MSYSTEM" = "xMINGW32" -o "x$MSYSTEM" = "xMINGW64"
dnl _ON results in a '--without' option in the --help output, so
dnl the help text should refer to "don't compile", etc.
+with_xpm_set=${with_xpm+set}
OPTION_DEFAULT_ON([xpm],[don't compile with XPM image support])
OPTION_DEFAULT_ON([jpeg],[don't compile with JPEG image support])
OPTION_DEFAULT_ON([tiff],[don't compile with TIFF image support])
rs6000-ibm-aix[56]* )
opsys=aix4-2
;;
- powerpc-ibm-aix[56]* )
+ powerpc-ibm-aix[5-9]* | powerpc-ibm-aix[1-9][0-9]* )
opsys=aix4-2
;;
LN_S="/bin/ln"
fi
+dnl On some Debian versions, "install-info" prints irritating messages
+dnl "This is not dpkg install-info anymore, but GNU install-info"
+dnl if called via an absolute file name.
+dnl Use the entirely-identical-but-quieter ginstall-info instead if present.
+dnl Sadly some people may have an old ginstall-info installed on
+dnl non-Debian systems, so we can't use this.
+dnl AC_PATH_PROGS(INSTALL_INFO, [ginstall-info install-info], :,
+dnl $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin)
+
AC_PATH_PROG(INSTALL_INFO, install-info, :,
$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin)
dnl Don't use GZIP, which is used by gzip for additional parameters.
LIBS="$LIB_PTHREAD $LIBS" ;;
esac
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>.
+ if test "$opsys" = aix4-2; then
+ AC_DEFINE([_THREAD_SAFE], [1],
+ [Define to 1 if your system requires this in multithreaded code.])
+ fi
fi
AC_SUBST([LIB_PTHREAD])
HAVE_IMAGEMAGICK=no
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)
fi
if test "${HAVE_X11}" = "yes"; then
+ dnl Avoid Xpm on AIX unless requested, as it crashes; see Bug#17598.
+ test "$opsys$with_xpm_set" = aix4-2 && with_xpm=no
+
if test "${with_xpm}" != "no"; then
AC_CHECK_HEADER(X11/xpm.h,
[AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, HAVE_XPM=yes, , -lX11)])
if test "${HAVE_XPM}" = "yes"; then
AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm library (-lXpm).])
LIBXPM=-lXpm
+ elif test "$opsys,$LUCID_LIBW" = aix4-2,-lXaw; then
+ dnl AIX -lXaw needs -lXpm linked too; see Bug#17598 Message#152.
+ LIBXPM=-lXpm
fi
fi
### mingw32 doesn't use -lpng, since it loads the library dynamically.
HAVE_PNG=no
LIBPNG=
-PNG_CFLAGS=
if test "${opsys}" = "mingw32"; then
if test "${with_png}" != "no"; then
- AC_CHECK_HEADER([png.h], [HAVE_PNG=yes])
+ AC_CHECK_HEADER(png.h, HAVE_PNG=yes, HAVE_PNG=no)
+ fi
+ if test "${HAVE_PNG}" = "yes"; then
+ AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
+
+ AC_CHECK_DECL(png_longjmp,
+ [],
+ [AC_DEFINE(PNG_DEPSTRUCT, [],
+ [Define to empty to suppress deprecation warnings when building
+ with --enable-gcc-warnings and with libpng versions before 1.5,
+ which lack png_longjmp.])],
+ [[#ifdef HAVE_LIBPNG_PNG_H
+ # include <libpng/png.h>
+ #else
+ # include <png.h>
+ #endif
+ ]])
fi
elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
if test "${with_png}" != "no"; then
-
- dnl NetBSD 6 provides libpng16, not libpng.
- if png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` &&
- png_libs=`(libpng-config --libs) 2>&AS_MESSAGE_LOG_FD`
- then
- HAVE_PNG=yes
- PNG_CFLAGS=`AS_ECHO(["$png_cflags"]) | sed -e "$edit_cflags"`
- LIBPNG=$png_libs
- else
- # libpng-config does not work; configure it by hand.
- # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
- # in /usr/include/libpng.
- AC_CHECK_HEADERS([png.h libpng/png.h],
- [AC_CHECK_LIB([png], [png_get_channels],
- [HAVE_PNG=yes
- LIBPNG='-lpng -lz -lm'
- if test "$ac_cv_header_libpng_png_h" = yes; then
- PNG_CFLAGS=-I/usr/include/libpng
- fi],
- [],
- [-lz -lm])
- break])
+ # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
+ # in /usr/include/libpng.
+ AC_CHECK_HEADERS(png.h libpng/png.h, break)
+ if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
+ AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm)
fi
fi
-fi
-if test $HAVE_PNG = yes; then
- AC_DEFINE([HAVE_PNG], [1], [Define to 1 if you have the png library.])
-
- SAVE_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS $PNG_CFLAGS"
- AC_CHECK_DECL([png_longjmp],
- [],
- [AC_DEFINE([PNG_DEPSTRUCT], [],
- [Define to empty to suppress deprecation warnings when building
- with --enable-gcc-warnings and with libpng versions before 1.5,
- which lack png_longjmp.])],
- [[#include <png.h>
- ]])
- CFLAGS=$SAVE_CFLAGS
+
+ if test "${HAVE_PNG}" = "yes"; then
+ 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,
+ [],
+ [AC_DEFINE(PNG_DEPSTRUCT, [],
+ [Define to empty to suppress deprecation warnings when building
+ with --enable-gcc-warnings and with libpng versions before 1.5,
+ which lack png_longjmp.])],
+ [[#ifdef HAVE_LIBPNG_PNG_H
+ # include <libpng/png.h>
+ #else
+ # include <png.h>
+ #endif
+ ]])
+ fi
fi
AC_SUBST(LIBPNG)
-AC_SUBST(PNG_CFLAGS)
HAVE_ZLIB=no
LIBZ=
else
case $opsys in
dnl irix: Tested on Irix 6.5. SCM worked on earlier versions.
- dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
+ aix* | dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
AC_DEFINE(GC_SETJMP_WORKS, 1)
;;
esac