X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=configure.in;h=ab7410c8ffaa51a17ae28639186e52d7b0e060ab;hb=c22b401ea7242f5f796759d1abe3c8c3269d27b5;hp=15eced9cecc598f84b701253072bee1f9e23695e;hpb=d8bd7eee3147c839d3c74d1823c139cd54867a75;p=chise%2Fxemacs-chise.git- diff --git a/configure.in b/configure.in index 15eced9..ab7410c 100644 --- a/configure.in +++ b/configure.in @@ -57,7 +57,7 @@ dnl - no cache file dnl - non-standard options dnl - suport for extra-verbosity dnl - ordinary libs are handled separately from X libs (might be a mistake) -dnl - various random kludges (e.g. -with-dnet=no +dnl - various random kludges (e.g. -with-dnet=no) dnl PRINT_VAR(var var ...) prints values of shell variables define([PRINT_VAR],[for var in patsubst([$1],[[ @@ -369,6 +369,7 @@ with_widgets='' with_dialogs='' with_file_coding='' cpp='' cppflags='' libs='' ldflags='' +extra_includes='' dynamic='' with_x11='' with_msw='' @@ -797,6 +798,7 @@ The default is to autodetect all sound support."]) 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 @@ -1110,7 +1112,7 @@ case "$canonical" in *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;; *-dec-osf3.[[2-9]] ) opsys=decosf3-2 ;; *-dec-osf3* ) opsys=decosf3-1 ;; - *-dec-osf4* ) opsys=decosf4-0 ;; + *-dec-osf[[4-9]]* ) opsys=decosf4-0 ;; dnl DEC Ultrix *-*-ultrix[[0-3]].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;; @@ -1866,10 +1868,15 @@ test "$extra_verbose" = "yes" && \ 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 @@ -1953,10 +1960,10 @@ case `uname -s`:`uname -m`:$GCC_VERSION in 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*) ;; *) @@ -1968,17 +1975,17 @@ case `uname -s`:`uname -m`:$GCC_VERSION in 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) @@ -2339,6 +2346,7 @@ AC_PROG_YACC dnl checks for header files AC_CHECK_HEADERS(dnl a.out.h dnl + elf.h dnl cygwin/version.h dnl fcntl.h dnl inttypes.h dnl @@ -2712,17 +2720,18 @@ dnl Avoid re-AC_DEFINE-ing xmkmf symbols we've already defined above. AC_CHECK_HEADERS(X11/Xlocale.h) - dnl remove this - we should avoid checking for specific OS - AC_MSG_CHECKING(for XFree86) - if test -d "/usr/X386/include" -o \ - -f "/etc/XF86Config" -o \ - -f "/etc/X11/XF86Config" -o \ - -f "/usr/X11R6/lib/X11/XF86Config"; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_XFREE386) - else - AC_MSG_RESULT(no) - fi + dnl XFree86 has a non-standard prototype for this X11R6 function + AC_CHECK_FUNCS(XRegisterIMInstantiateCallback) + AC_MSG_CHECKING(for standard XRegisterIMInstantiateCallback prototype) + AC_TRY_COMPILE([ +#define NeedFunctionPrototypes 1 +#include +extern Bool XRegisterIMInstantiateCallback( + Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*); +], [], + [AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) + AC_DEFINE(XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE)]) dnl autodetect -lXmu test -z "$with_xmu" && { AC_CHECK_LIB(Xmu, XmuReadBitmapDataFromFile, @@ -2760,6 +2769,12 @@ if test "$with_msw" != "no"; then 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) @@ -2958,8 +2973,8 @@ fi dnl Autodetect Drag'n'Drop support dnl always included if CDE, Offix, or MSWindows are defined -AC_MSG_CHECKING(if drag and drop API is needed) if test "$with_dragndrop" != "no" ; then + AC_MSG_CHECKING(if drag and drop API is needed) if test -n "$dragndrop_proto" ; then with_dragndrop=yes AC_MSG_RESULT([yes (${dragndrop_proto} )]) @@ -3454,7 +3469,6 @@ if test "$with_mule" = "yes" ; then 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) @@ -3492,7 +3506,7 @@ if test "$with_mule" = "yes" ; then 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 @@ -3570,10 +3584,10 @@ fi 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 Check for PTY support functions. -dnl getpt is the preferred pty allocation method on glibc systems. -dnl _getpt is the preferred pty allocation method on SGI systems. +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 _getpt grantpt unlockpt ptsname killpg tcgetpgrp) +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. @@ -3587,10 +3601,10 @@ fi dnl Check for STREAM support functions. dnl Confusingly, "str" means both "string" and "SysV Streams". -AC_CHECK_HEADERS(sys/stropts.h) -if test "$ac_cv_header_sys_stropts_h" = "yes"; then +AC_CHECK_HEADERS(stropts.h) +if test "$ac_cv_header_stropts_h" = "yes"; then AC_CHECK_FUNCS(isastream) - AC_CHECK_HEADERS(sys/strtio.h) dnl TIOCSIGNAL + AC_CHECK_HEADERS(strtio.h) dnl TIOCSIGNAL fi dnl Use our own realpath always. @@ -3710,8 +3724,11 @@ dnl case "${GCC}${opsys}" in hpux* ) dnl AC_CHECK_FUNC(alloca, [:], [AC_CHECK_LIB(PW, alloca)]) dnl esac -AC_FUNC_ALLOCA -test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA) +dnl AC_FUNC_ALLOCA doesn't know about DEC C's #pragma intrinsic(alloca) +if test "$__DECC" != "yes"; then + AC_FUNC_ALLOCA + test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA) +fi dnl Check whether vfork exists and works correctly. (This does more dnl than just check for its existence.) If so, it defines HAVE_VFORK_H. @@ -4118,7 +4135,14 @@ typedef uint64_t u_int64_t; #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 @@ -4159,8 +4183,16 @@ if test "$with_modules" != "no"; then 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 ],dnl + [dlopen ("", 0);], [ have_dl=yes ], [ + AC_MSG_CHECKING([for dlopen in -ldl]) + ac_save_LIBS="$LIBS" + LIBS="-ldl $LIBS" + AC_TRY_LINK([#include ],dnl + [dlopen ("", 0);], [ have_dl=yes ], + [LIBS="$ac_save_LIBS"]) + ac_save_LIBS=])]) if test -n "$have_dl"; then AC_DEFINE(HAVE_DLOPEN) else @@ -4334,6 +4366,7 @@ AC_SUBST(pkgdir) AC_SUBST(statedir) AC_SUBST(libdir) AC_SUBST(mandir) +AC_SUBST(extra_includes) AC_SUBST(prefix) AC_SUBST(PREFIX_USER_DEFINED)