Mercurial > hg > xemacs-beta
diff configure.in @ 243:f220cc83d72e r20-5b20
Import from CVS: tag r20-5b20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:17:07 +0200 |
parents | 41f2f0e326e9 |
children | 51092a27c943 |
line wrap: on
line diff
--- a/configure.in Mon Aug 13 10:16:17 2007 +0200 +++ b/configure.in Mon Aug 13 10:17:07 2007 +0200 @@ -423,11 +423,16 @@ dnl --FOO=yes. Otherwise, the value comes from the next dnl argument - see below. opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'` - val="yes" - valomitted=yes + val="yes" valomitted=yes ;; esac + dnl Support --without-FOO as a synonym for --with-FOO=no + case "${valomitted}-${opt}" in yes-without_* ) + opt=`echo $opt | sed 's/without/with/'` + valomitted="no" val="no" ;; + esac + dnl translate "-" in option string to "_" optname="$opt" opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`" @@ -716,9 +721,11 @@ esac ;; - dnl Anything not starting with a hyphen we assume is a - dnl configuration name. - *) configuration="$arg" ;; + dnl Assume anything with multiple hyphens is a configuration name. + *-*-*) configuration="$arg" ;; + + dnl Anything else is an error + *) USAGE_ERROR("Unrecognized argument: $arg") ;; esac done @@ -754,20 +761,6 @@ AC_MSG_WARN("The --run-in-place option is ignored because it is unnecessary.") fi -dnl ########################################################################### -if test "$configuration" = "" ; then - echo '- You did not tell me what kind of host system you want to configure. -- I will attempt to guess the kind of system this is.' 1>&2 - guesssys=`echo $progname | sed 's/configure$/config.guess/'` - dnl Guess the configuration and remove 4th name component, if present. - if configuration=`${CONFIG_SHELL-/bin/sh} $guesssys | \ - sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'` ; then - echo "- Looks like this is a $configuration" 1>&2 - else - USAGE_ERROR("Failed to guess the system type. You need to tell me.") - fi -fi - dnl Find the source directory. case "$srcdir" in @@ -791,8 +784,7 @@ dnl Otherwise, check if the directory they specified is okay. * ) - if test ! -d "$srcdir" -o \ - ! -f "$srcdir/src/lisp.h" -o \ + if test ! -f "$srcdir/src/lisp.h" -o \ ! -f "$srcdir/lisp/version.el" ; then USAGE_ERROR(["The directory specified with the \`--srcdir' option, \`$srcdir', doesn't seem to contain the XEmacs sources. You should @@ -802,6 +794,20 @@ ;; esac +dnl ########################################################################### +if test -z "$configuration"; then + AC_MSG_CHECKING("host system type") + dnl Guess the configuration and remove 4th name component, if present. + if configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess | \ + sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'` ; then + AC_MSG_RESULT($configuration) + else + AC_MSG_RESULT(unknown) + USAGE_ERROR(["XEmacs has not been ported to this host type. +Try explicitly specifying the CONFIGURATION when rerunning configure."]) + fi +fi + AC_PROG_LN_S dnl Make symlinks for etc, lisp, and info directories while the path @@ -1475,6 +1481,16 @@ AC_AIX +AC_MSG_CHECKING(for GNU libc) +AC_TRY_COMPILE([#include <features.h>],[ +#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) +#error Not a GNU libc system :-( +******* ======= ******** &&&&&&&& +#endif +], have_glibc=yes, have_glibc=no) +AC_MSG_RESULT($have_glibc) +test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE) + AC_MSG_CHECKING(whether we are using SunPro C) AC_TRY_COMPILE([],[#ifndef __SUNPRO_C #error Not a SunPro compiler :-( @@ -1916,8 +1932,7 @@ dnl checks for header files AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h) -AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h limits.h) -AC_CHECK_HEADERS(sys/un.h) +AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h) AC_HEADER_SYS_WAIT AC_HEADER_STDC AC_HEADER_TIME @@ -2002,6 +2017,10 @@ dnl Floating operation support is now unconditional AC_DEFINE(LISP_FLOAT_TYPE) +AC_TRY_LINK([#include <math.h>], + [return atanh(1.0) + asinh(1.0) + acosh(1.0); ], + AC_DEFINE(HAVE_INVERSE_HYPERBOLIC)) + dnl Determine type of mail locking from configure args and s&m headers AC_CHECKING(type of mail spool file locking) test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock @@ -2234,6 +2253,11 @@ dnl #### Someone, please add a better function than main AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) + dnl Problem with the MIT distribution of X on AIX + if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then + XE_APPEND(-lc_r, libs_x) + fi + fi dnl $with_x11 = yes test -z "$window_system" && window_system="none" @@ -2341,6 +2365,7 @@ if test "$with_x11" = "yes"; then AC_CHECKING(for X11 graphics libraries) + dnl Autodetect Xpm AC_MSG_CHECKING(for Xpm - no older than 3.4f) xe_check_libs=-lXpm @@ -2384,6 +2409,11 @@ test "$with_imagick" != "no" && { AC_CHECK_HEADER(magick/magick.h, ,AC_CHECK_HEADER(X11/magick/magick.h,AC_DEFINE(MAGICK_HEADERS_ARE_UNDER_X11),with_imagick=no)) } test "$with_imagick" != "no" && { dnl check the appropriate libraries for ImageMagick + dnl First, let's check libz or libgz for png... + z_libs="" + AC_CHECK_LIB(z, inflateInit_, XE_APPEND(-lz, z_libs), + AC_CHECK_LIB(gz, inflateInit_, XE_APPEND(-lgz, z_libs))) + imagick_libs="" AC_CHECK_LIB(dps, XDPSPixelsPerPoint, XE_APPEND(-ldpstk -ldps, imagick_libs),,,-ldpstk) AC_CHECK_LIB(fpx, FPX_SetToolkitMemoryLimit, XE_APPEND(-lfpx, imagick_libs)) @@ -2392,10 +2422,10 @@ AC_CHECK_LIB(jpeg, jpeg_read_header, XE_APPEND(-ljpeg, imagick_libs)) AC_CHECK_LIB(mpeg, OpenMPEG, XE_APPEND(-lmpeg, imagick_libs)) AC_CHECK_LIB(ttf, TT_Init_FreeType, XE_APPEND(-lttf, imagick_libs)) - AC_CHECK_LIB(png, png_create_read_struct, XE_APPEND(-lpng, imagick_libs), - AC_CHECK_LIB(png, png_create_read_struct, XE_APPEND(-lpng -lz, imagick_libs),,-lz)) + AC_CHECK_LIB(png, png_create_read_struct, XE_APPEND(-lpng, imagick_libs),,$z_libs) AC_CHECK_LIB(tiff, TIFFOpen, XE_APPEND(-ltiff, imagick_libs), - AC_CHECK_LIB(tiff, TIFFOpen, XE_APPEND(-ltiff -ljpeg -lz, imagick_libs),,-ljpeg -lz)) + AC_CHECK_LIB(tiff, TIFFOpen, XE_APPEND(-ltiff -ljpeg, imagick_libs),,-ljpeg $z_libs),,$z_libs) + XE_APPEND($z_libs, imagick_libs) XE_APPEND($imagick_libs, libs_x) } test -z "$with_imagick" && { AC_CHECK_LIB(Magick, MogrifyImage,[:],with_imagick=no) } @@ -2424,10 +2454,10 @@ dnl Not all toolkits support all widgets dnl if Motif is available we use it for the dialog boxes. -case "$with_menubars" in "" | "yes" | "athena" ) +case "$with_menubars" in "" | "yes" | "athena" | "athena3d" ) with_menubars="lucid" ;; esac -case "$with_dialogs" in "" | "yes" | "lucid" ) +case "$with_dialogs" in "" | "yes" | "lucid" ) if test "$have_motif" = "yes"; then with_dialogs="motif" elif test "$have_xaw" = "yes"; then with_dialogs="athena" else with_dialogs=no @@ -2606,7 +2636,7 @@ XE_COMPUTE_RUNPATH() fi -AC_CHECK_FUNCS(acosh asinh atanh cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname 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 strcasecmp strerror tzset ulimit usleep utimes waitpid) +AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname 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 strcasecmp strerror tzset ulimit usleep utimes waitpid) dnl realpath is buggy on linux, decosf and aix4