dnl autoconf
dnl in the directory containing this script.
dnl
-dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001
+dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002
dnl Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Emacs.
dnl Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
-AC_PREREQ(2.50)dnl
+AC_PREREQ(2.51)dnl
AC_INIT(src/lisp.h)
AC_CONFIG_HEADER(src/config.h:src/config.in)
. )
## We may be able to use the $PWD environment variable to make this
## absolute. But sometimes PWD is inaccurate.
- if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".${PWD}" ;
+ ## Note: we used to use ${PWD} at the end instead of `pwd`,
+ ## but that tested only for a well-formed and valid PWD,
+ ## it did not object when PWD was well-formed and valid but just wrong.
+ if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
then
srcdir="$PWD"
else
machine='' opsys='' unported=no
case "${canonical}" in
+ ## FreeBSD ports
+ *-*-freebsd* )
+ opsys=freebsd
+ case "${canonical}" in
+ alpha*-*-freebsd*) machine=alpha ;;
+ i[3456]86-*-freebsd*) machine=intel386 ;;
+ esac
+ ;;
+
## NetBSD ports
*-*-netbsd* )
opsys=netbsd
*-*-bsdi2.0* ) opsys=bsdos2 ;;
*-*-bsdi2* ) opsys=bsdos2-1 ;;
*-*-bsdi3* ) opsys=bsdos3 ;;
- *-*-bsdi4* ) opsys=bsdos4 ;;
+ *-*-bsdi[45]* ) opsys=bsdos4 ;;
esac
;;
## operating system.
;;
+ ## Compaq Nonstop
+ mips-compaq-nonstopux* )
+ machine=nonstopux opsys=nonstopux
+ ;;
+
## Convex
*-convex-bsd* | *-convex-convexos* )
machine=convex opsys=bsd4-3
machine=hp800 opsys=hpux11
;;
+ hppa*-*-linux-gnu* )
+ machine=hp800 opsys=gnu-linux
+ ;;
+
## HP 9000 series 700 and 800, running HP/UX
hppa*-hp-hpux* )
## Cross-compilation? Nah!
rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
machine=ibmrs6000 opsys=aix4-2
;;
+ rs6000-ibm-aix5.1* | powerpc-ibm-aix5.1* )
+ machine=ibmrs6000 opsys=aix4-2
+ ;;
rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
machine=ibmrs6000 opsys=aix4
;;
;;
*-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
*-386bsd* ) opsys=386bsd ;;
- *-freebsd* ) opsys=freebsd ;;
*-nextstep* ) opsys=nextstep ;;
## Otherwise, we'll fall through to the generic opsys code at the bottom.
esac
dnl checks for header files
AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
- termcap.h stdio_ext.h fcntl.h term.h strings.h)
+ termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h)
AC_HEADER_STDC
AC_HEADER_TIME
AC_DECL_SYS_SIGLIST
if test "${HAVE_JPEG}" = "yes"; then
AC_DEFINE(HAVE_JPEG)
+ AC_EGREP_CPP(
+changequote({, })dnl avoid leadingspace on the next line
+{version= *(6[2-9]|[7-9][0-9])},
+changequote([, ])dnl
+ [#include <jpeglib.h>
+ version=JPEG_LIB_VERSION
+],
+ AC_DEFINE(HAVE_JPEG),
+ [AC_MSG_WARN([libjpeg found, but not version 6b or later])
+ HAVE_JPEG=no])
fi
fi
if test "${HAVE_X11}" = "yes"; then
if test "${with_gif}" != "no"; then
AC_CHECK_HEADER(gif_lib.h,
- AC_CHECK_LIB(ungif, DGifOpen, HAVE_GIF=yes))
+# EGifPutExtensionLast only exists from version libungif-4.1.0b1.
+# Earlier versions can crash Emacs.
+ AC_CHECK_LIB(ungif, EGifPutExtensionLast, HAVE_GIF=yes))
fi
if test "${HAVE_GIF}" = "yes"; then
fi
fi
+### Use session management (-lSM -lICE) if available
+HAVE_X_SM=no
+if test "${HAVE_X11}" = "yes"; then
+ AC_CHECK_HEADER(X11/SM/SMlib.h,
+ AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, -lICE))
+
+ if test "${HAVE_X_SM}" = "yes"; then
+ AC_DEFINE(HAVE_X_SM)
+ case "$LIBS" in
+ *-lSM*) ;;
+ *) LIBS="-lSM -lICE $LIBS" ;;
+ esac
+ fi
+fi
+
# If netdb.h doesn't declare h_errno, we must declare it by hand.
AC_CACHE_CHECK(whether netdb declares h_errno,
emacs_cv_netdb_declares_h_errno,
random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
-__fpending mblen mbrlen strsignal setitimer ualarm index rindex \
+__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
+sendto recvfrom getsockopt setsockopt getsockname getpeername \
gai_strerror mkstemp)
+AC_CHECK_HEADERS(sys/un.h)
+
AC_FUNC_MKTIME
if test "$ac_cv_func_working_mktime" = no; then
AC_DEFINE(BROKEN_MKTIME)
AC_CHECK_HEADERS(krb5.h)
else
AC_CHECK_HEADERS(des.h,,
- AC_CHECK_HEADERS(kerberosIV/des.h,,
- AC_CHECK_HEADERS(kerberos/des.h)))
+ [AC_CHECK_HEADERS(kerberosIV/des.h,,
+ [AC_CHECK_HEADERS(kerberos/des.h)])])
AC_CHECK_HEADERS(krb.h,,
- AC_CHECK_HEADERS(kerberosIV/krb.h,,
- AC_CHECK_HEADERS(kerberos/krb.h)))
+ [AC_CHECK_HEADERS(kerberosIV/krb.h,,
+ [AC_CHECK_HEADERS(kerberos/krb.h)])])
fi
AC_CHECK_HEADERS(com_err.h)
fi
AC_MSG_RESULT(no)
fi
-AC_FUNC_VFORK
+AC_FUNC_FORK
# Fixme: This should be replaced when we have autoconf 2.14.
AC_SIZE_T
AC_OUTPUT(Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
- lisp/Makefile lispref/Makefile leim/Makefile, [
+ lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile, [
### Make the necessary directories, if they don't exist.
for dir in etc lisp ; do