x_includes=NONE
x_libraries=NONE
-dnl Installation directory options.
-dnl These are left unexpanded so users can "make install exec_prefix=/foo"
-dnl and all the variables that are supposed to be based on exec_prefix
-dnl by default will actually change.
-dnl Use braces instead of parens because sh, perl, etc. also accept them.
-dnl If you change these, you need to synchronize with the settings of the
-dnl various ..._USER_DEFINED variables further down.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${{exec_prefix}}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
dnl Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
with_dialogs=''
with_file_coding=''
cpp='' cppflags='' libs='' ldflags=''
+extra_includes=''
dynamic=''
with_x11=''
with_msw=''
infopath ) AC_DEFINE(INFOPATH_USER_DEFINED) ;;
package_path ) AC_DEFINE(PACKAGE_PATH_USER_DEFINED) ;;
datadir )
- AC_DEFINE(INFODIR_USER_DEFINED)
- AC_DEFINE(LISPDIR_USER_DEFINED)
- AC_DEFINE(MODULEDIR_USER_DEFINED)
- AC_DEFINE(ETCDIR_USER_DEFINED) ;;
+ AC_DEFINE(INFODIR_USER_DEFINED)
+ AC_DEFINE(LISPDIR_USER_DEFINED)
+ AC_DEFINE(MODULEDIR_USER_DEFINED)
+ AC_DEFINE(ETCDIR_USER_DEFINED)
+ AC_DEFINE(DOCDIR_USER_DEFINED)
+ AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;;
docdir ) AC_DEFINE(DOCDIR_USER_DEFINED) ;;
exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;;
esac
a | at | ath | athe | athen | athena ) val=athena ;;
n | no | non | none ) val=no ;;
y | ye | yes ) val=yes ;;
+ m | ms | msw ) val=msw ;;
* ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
\`lucid', \`motif', \`athena', \`yes', or \`no'."]) ;;
esac
have_terminfo mail_use_flock mail_use_lockf) && echo ""
dnl Pick up mingw32 include path
-case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
- mingw_include=`eval "dirname $mingw_include"` ;
- mingw_include="-I$mingw_include/../include/mingw32" ;
- XE_APPEND($mingw_include, c_switch_system) ;;
+case "$opsys" in mingw* | cygwin*)
+ cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
+ cygwin_include=`eval "dirname $cygwin_include"` ;
+ cygwin_include="-I$cygwin_include/../include" ;
+ extra_includes="$cygwin_include/mingw32 $cygwin_include/mingw $cygwin_include" ;
+ case "$opsys" in mingw*)
+ XE_APPEND($extra_includes, c_switch_system) ;;
+ esac
+ ;;
esac
dnl Non-ordinary link usually requires -lc
dnl Following values of CFLAGS are known to work well.
dnl Should we take debugging options into consideration?
if test "$GCC" = "yes"; then
- CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
+ CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
+ dnl glibc is intentionally not `-Wpointer-arith'-clean.
+ dnl Ulrich Drepper has rejected patches to fix the glibc header files.
+ test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
dnl I'm not convinced this is a good idea any more. -sb
dnl test "$opsys $machine" = "linux intel386" && \
dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
AC_MSG_ERROR(Aborting due to known problem)
;;
*:i*86*:2.7.2*)
- case "$GCC_VERSION" in
- 2.7.2)
- case "$CFLAGS" in
- *-O2*|*-O3*)
+ case "$CFLAGS" in
+ *-O2*|*-O3*)
+ case "$GCC_VERSION" in
+ 2.7.2)
case "$CFLAGS" in
*-fno-strength-reduce*) ;;
*)
esac
;;
esac
+ case "$CFLAGS" in
+ *-fno-caller-saves*) ;;
+ *)
+ AC_MSG_RESULT(yes)
+ AC_MSG_WARN(Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using)
+ AC_MSG_WARN(-fno-caller-saves.)
+ AC_MSG_ERROR(Aborting due to known problem)
+ ;;
+ esac
;;
esac
- case "$CFLAGS" in
- *-fno-caller-saves*) ;;
- *)
- AC_MSG_RESULT(yes)
- AC_MSG_WARN(Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using)
- AC_MSG_WARN(-fno-caller-saves.)
- AC_MSG_ERROR(Aborting due to known problem)
- ;;
- esac
;;
esac
AC_MSG_RESULT(no)
#include <X11/Xlib.h>
extern Bool XRegisterIMInstantiateCallback(
Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
-], [],
+], [],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_DEFINE(XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE)])
AC_CHECK_LIB(gdi32,main,with_msw=yes)
if test "$with_msw" = "yes"; then
AC_DEFINE(HAVE_MS_WINDOWS)
+
+ dnl The net installer only works with MS-Windows currently
+ XE_APPEND(netinstall, MAKE_SUBDIR)
+ XE_APPEND(netinstall, SRC_SUBDIR_DEPS)
+ XE_APPEND(netinstall, INSTALL_ARCH_DEP_SUBDIR)
+
install_pp="$blddir/lib-src/installexe.sh"
XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool, libs_system)
test "$with_dragndrop" != no && XE_APPEND(msw, dragndrop_proto)
AC_MSG_RESULT($with_xpm)
fi
if test "$with_xpm" = "yes"; then
+ dnl #### This code assumes that if AC_CHECK_LIB fails,
+ dnl #### then it will succeed if FOR_MSW is defined,
+ dnl #### but doesn't actually verify this assumption.
AC_DEFINE(HAVE_XPM)
XE_PREPEND(-lXpm, libs_x)
AC_MSG_CHECKING(for \"FOR_MSW\" xpm)
if test "$with_utf_2000" = "yes" ; then
AC_DEFINE(CHAR_IS_UCS4)
AC_DEFINE(UTF2000)
- AC_DEFINE(HAVE_GGC)
fi
AC_CHECKING(for Mule input methods)
if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
AC_DEFINE(USE_XFONTSET)
if test "$with_xim" = "no" ; then
- XE_ADD_OBJS(input-method-xfs.o)
+ XE_ADD_OBJS(input-method-xlib.o)
fi
fi
fi dnl with_xfs
dnl Autodetect WNN
test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) }
+ dnl gcc 2.97 fixincludes breaks inclusion of wnn/commonhd.h
+ test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/commonhd.h, ,with_wnn=no) }
dnl Detour to find crypt
if test "$with_wnn" != "no"; then
AC_CHECK_FUNCS(crypt)
AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask)
+dnl ----------------------------------------------------------------
dnl Check for PTY support functions.
-dnl getpt is the preferred pty allocation method on glibc systems.
-dnl _getpty is the preferred pty allocation method on SGI systems.
-dnl grantpt, unlockpt, ptsname are defined by Unix98.
+dnl ----------------------------------------------------------------
+
+dnl There is no "standard" pty allocation method. Every system is different.
+dnl getpt() is the preferred pty allocation method on glibc systems.
+dnl _getpty() is the preferred pty allocation method on SGI systems.
+dnl grantpt(), unlockpt(), ptsname() are defined by Unix98.
AC_CHECK_FUNCS(getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp)
-dnl openpty is the preferred pty allocation method on BSD and Tru64 systems.
-dnl openpty might be declared in pty.h or in libutil.h.
+dnl openpty() is the preferred pty allocation method on BSD and Tru64 systems.
+dnl openpty() might be declared in:
+dnl - pty.h (Tru64 or Linux)
+dnl - libutil.h (FreeBSD)
+dnl - util.h (NetBSD)
AC_CHECK_FUNC(openpty, have_openpty=yes, [
AC_CHECK_LIB(util, openpty, have_openpty=yes need_libutil=yes)])
if test "$have_openpty" = "yes"; then
AC_DEFINE(HAVE_OPENPTY)
- AC_CHECK_HEADERS(pty.h libutil.h)
+ AC_CHECK_HEADERS(pty.h libutil.h util.h, break)
test "$need_libutil" = "yes" && XE_APPEND(-lutil, libs_system)
fi
#if DB_VERSION_MAJOR > 1
yes
#endif
-], [AC_MSG_RESULT(2); dbfunc=db_open], [AC_MSG_RESULT(1); dbfunc=dbopen])
+], [AC_EGREP_CPP(yes,
+[#include <$db_h_file>
+#if DB_VERSION_MAJOR > 2
+yes
+#endif
+], [AC_MSG_RESULT(3); dbfunc=db_create],[
+ AC_MSG_RESULT(2); dbfunc=db_open])],[
+ AC_MSG_RESULT(1); dbfunc=dbopen])
AC_CHECK_FUNC($dbfunc, with_database_berkdb=yes need_libdb=no, [
AC_CHECK_LIB(db, $dbfunc, with_database_berkdb=yes need_libdb=yes)])
fi
else
dnl Find headers and libraries
AC_CHECK_HEADER(dlfcn.h, [
- AC_CHECK_LIB(dl, dlopen, [ have_dl=yes libdl=dl], [
- AC_CHECK_LIB(c, dlopen, [ have_dl=yes ])])])
+ AC_MSG_CHECKING([for dlopen in -lc])
+ AC_TRY_LINK([#include <dlfcn.h>],dnl
+ [dlopen ("", 0);], [ have_dl=yes ], [
+ AC_MSG_CHECKING([for dlopen in -ldl])
+ ac_save_LIBS="$LIBS"
+ LIBS="-ldl $LIBS"
+ AC_TRY_LINK([#include <dlfcn.h>],dnl
+ [dlopen ("", 0);], [ have_dl=yes ],
+ [LIBS="$ac_save_LIBS"])
+ ac_save_LIBS=])])
if test -n "$have_dl"; then
AC_DEFINE(HAVE_DLOPEN)
else
AC_SUBST(statedir)
AC_SUBST(libdir)
AC_SUBST(mandir)
+AC_SUBST(extra_includes)
AC_SUBST(prefix)
AC_SUBST(PREFIX_USER_DEFINED)