Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
242:fc816b73a05f | 243:f220cc83d72e |
---|---|
421 -*) | 421 -*) |
422 dnl If FOO is a boolean argument, --FOO is equivalent to | 422 dnl If FOO is a boolean argument, --FOO is equivalent to |
423 dnl --FOO=yes. Otherwise, the value comes from the next | 423 dnl --FOO=yes. Otherwise, the value comes from the next |
424 dnl argument - see below. | 424 dnl argument - see below. |
425 opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'` | 425 opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'` |
426 val="yes" | 426 val="yes" valomitted=yes |
427 valomitted=yes | |
428 ;; | 427 ;; |
428 esac | |
429 | |
430 dnl Support --without-FOO as a synonym for --with-FOO=no | |
431 case "${valomitted}-${opt}" in yes-without_* ) | |
432 opt=`echo $opt | sed 's/without/with/'` | |
433 valomitted="no" val="no" ;; | |
429 esac | 434 esac |
430 | 435 |
431 dnl translate "-" in option string to "_" | 436 dnl translate "-" in option string to "_" |
432 optname="$opt" | 437 optname="$opt" |
433 opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`" | 438 opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`" |
714 * ) USAGE_ERROR("Unrecognized option: $arg") ;; | 719 * ) USAGE_ERROR("Unrecognized option: $arg") ;; |
715 | 720 |
716 esac | 721 esac |
717 ;; | 722 ;; |
718 | 723 |
719 dnl Anything not starting with a hyphen we assume is a | 724 dnl Assume anything with multiple hyphens is a configuration name. |
720 dnl configuration name. | 725 *-*-*) configuration="$arg" ;; |
721 *) configuration="$arg" ;; | 726 |
727 dnl Anything else is an error | |
728 *) USAGE_ERROR("Unrecognized argument: $arg") ;; | |
722 | 729 |
723 esac | 730 esac |
724 done | 731 done |
725 | 732 |
726 dnl ------------------------- | 733 dnl ------------------------- |
750 test -n "$with_x" && with_x11="$with_x" | 757 test -n "$with_x" && with_x11="$with_x" |
751 | 758 |
752 dnl# Ignore useless run-in-place flag | 759 dnl# Ignore useless run-in-place flag |
753 if test "$run_in_place" = "yes"; then | 760 if test "$run_in_place" = "yes"; then |
754 AC_MSG_WARN("The --run-in-place option is ignored because it is unnecessary.") | 761 AC_MSG_WARN("The --run-in-place option is ignored because it is unnecessary.") |
755 fi | |
756 | |
757 dnl ########################################################################### | |
758 if test "$configuration" = "" ; then | |
759 echo '- You did not tell me what kind of host system you want to configure. | |
760 - I will attempt to guess the kind of system this is.' 1>&2 | |
761 guesssys=`echo $progname | sed 's/configure$/config.guess/'` | |
762 dnl Guess the configuration and remove 4th name component, if present. | |
763 if configuration=`${CONFIG_SHELL-/bin/sh} $guesssys | \ | |
764 sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'` ; then | |
765 echo "- Looks like this is a $configuration" 1>&2 | |
766 else | |
767 USAGE_ERROR("Failed to guess the system type. You need to tell me.") | |
768 fi | |
769 fi | 762 fi |
770 | 763 |
771 dnl Find the source directory. | 764 dnl Find the source directory. |
772 case "$srcdir" in | 765 case "$srcdir" in |
773 | 766 |
789 fi | 782 fi |
790 ;; | 783 ;; |
791 | 784 |
792 dnl Otherwise, check if the directory they specified is okay. | 785 dnl Otherwise, check if the directory they specified is okay. |
793 * ) | 786 * ) |
794 if test ! -d "$srcdir" -o \ | 787 if test ! -f "$srcdir/src/lisp.h" -o \ |
795 ! -f "$srcdir/src/lisp.h" -o \ | |
796 ! -f "$srcdir/lisp/version.el" ; then | 788 ! -f "$srcdir/lisp/version.el" ; then |
797 USAGE_ERROR(["The directory specified with the \`--srcdir' option, | 789 USAGE_ERROR(["The directory specified with the \`--srcdir' option, |
798 \`$srcdir', doesn't seem to contain the XEmacs sources. You should | 790 \`$srcdir', doesn't seem to contain the XEmacs sources. You should |
799 either run the \`$progname' script at the top of the XEmacs source | 791 either run the \`$progname' script at the top of the XEmacs source |
800 tree, or use the \`--srcdir' option to specify the XEmacs source directory."]) | 792 tree, or use the \`--srcdir' option to specify the XEmacs source directory."]) |
801 fi | 793 fi |
802 ;; | 794 ;; |
803 esac | 795 esac |
796 | |
797 dnl ########################################################################### | |
798 if test -z "$configuration"; then | |
799 AC_MSG_CHECKING("host system type") | |
800 dnl Guess the configuration and remove 4th name component, if present. | |
801 if configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess | \ | |
802 sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'` ; then | |
803 AC_MSG_RESULT($configuration) | |
804 else | |
805 AC_MSG_RESULT(unknown) | |
806 USAGE_ERROR(["XEmacs has not been ported to this host type. | |
807 Try explicitly specifying the CONFIGURATION when rerunning configure."]) | |
808 fi | |
809 fi | |
804 | 810 |
805 AC_PROG_LN_S | 811 AC_PROG_LN_S |
806 | 812 |
807 dnl Make symlinks for etc, lisp, and info directories while the path | 813 dnl Make symlinks for etc, lisp, and info directories while the path |
808 dnl is still relative. We do not symlink lock because someone may | 814 dnl is still relative. We do not symlink lock because someone may |
1473 | 1479 |
1474 AC_PROG_CPP | 1480 AC_PROG_CPP |
1475 | 1481 |
1476 AC_AIX | 1482 AC_AIX |
1477 | 1483 |
1484 AC_MSG_CHECKING(for GNU libc) | |
1485 AC_TRY_COMPILE([#include <features.h>],[ | |
1486 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
1487 #error Not a GNU libc system :-( | |
1488 ******* ======= ******** &&&&&&&& | |
1489 #endif | |
1490 ], have_glibc=yes, have_glibc=no) | |
1491 AC_MSG_RESULT($have_glibc) | |
1492 test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE) | |
1493 | |
1478 AC_MSG_CHECKING(whether we are using SunPro C) | 1494 AC_MSG_CHECKING(whether we are using SunPro C) |
1479 AC_TRY_COMPILE([],[#ifndef __SUNPRO_C | 1495 AC_TRY_COMPILE([],[#ifndef __SUNPRO_C |
1480 #error Not a SunPro compiler :-( | 1496 #error Not a SunPro compiler :-( |
1481 ******* ======= ******** &&&&&&&& | 1497 ******* ======= ******** &&&&&&&& |
1482 #endif | 1498 #endif |
1914 AC_PROG_YACC | 1930 AC_PROG_YACC |
1915 | 1931 |
1916 dnl checks for header files | 1932 dnl checks for header files |
1917 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) | 1933 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) |
1918 AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h) | 1934 AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h) |
1919 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h limits.h) | 1935 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h) |
1920 AC_CHECK_HEADERS(sys/un.h) | |
1921 AC_HEADER_SYS_WAIT | 1936 AC_HEADER_SYS_WAIT |
1922 AC_HEADER_STDC | 1937 AC_HEADER_STDC |
1923 AC_HEADER_TIME | 1938 AC_HEADER_TIME |
1924 AC_DECL_SYS_SIGLIST | 1939 AC_DECL_SYS_SIGLIST |
1925 | 1940 |
1999 dnl -lm is required by LISP_FLOAT_TYPE, among other things | 2014 dnl -lm is required by LISP_FLOAT_TYPE, among other things |
2000 AC_CHECK_LIB(m, sin) | 2015 AC_CHECK_LIB(m, sin) |
2001 | 2016 |
2002 dnl Floating operation support is now unconditional | 2017 dnl Floating operation support is now unconditional |
2003 AC_DEFINE(LISP_FLOAT_TYPE) | 2018 AC_DEFINE(LISP_FLOAT_TYPE) |
2019 | |
2020 AC_TRY_LINK([#include <math.h>], | |
2021 [return atanh(1.0) + asinh(1.0) + acosh(1.0); ], | |
2022 AC_DEFINE(HAVE_INVERSE_HYPERBOLIC)) | |
2004 | 2023 |
2005 dnl Determine type of mail locking from configure args and s&m headers | 2024 dnl Determine type of mail locking from configure args and s&m headers |
2006 AC_CHECKING(type of mail spool file locking) | 2025 AC_CHECKING(type of mail spool file locking) |
2007 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock | 2026 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock |
2008 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf | 2027 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf |
2232 | 2251 |
2233 dnl Autodetect -lXbsd | 2252 dnl Autodetect -lXbsd |
2234 dnl #### Someone, please add a better function than main | 2253 dnl #### Someone, please add a better function than main |
2235 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) | 2254 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) |
2236 | 2255 |
2256 dnl Problem with the MIT distribution of X on AIX | |
2257 if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then | |
2258 XE_APPEND(-lc_r, libs_x) | |
2259 fi | |
2260 | |
2237 fi dnl $with_x11 = yes | 2261 fi dnl $with_x11 = yes |
2238 | 2262 |
2239 test -z "$window_system" && window_system="none" | 2263 test -z "$window_system" && window_system="none" |
2240 | 2264 |
2241 if test "$window_system" = "none" ; then | 2265 if test "$window_system" = "none" ; then |
2339 dnl ---------------------- | 2363 dnl ---------------------- |
2340 | 2364 |
2341 if test "$with_x11" = "yes"; then | 2365 if test "$with_x11" = "yes"; then |
2342 | 2366 |
2343 AC_CHECKING(for X11 graphics libraries) | 2367 AC_CHECKING(for X11 graphics libraries) |
2368 | |
2344 dnl Autodetect Xpm | 2369 dnl Autodetect Xpm |
2345 AC_MSG_CHECKING(for Xpm - no older than 3.4f) | 2370 AC_MSG_CHECKING(for Xpm - no older than 3.4f) |
2346 xe_check_libs=-lXpm | 2371 xe_check_libs=-lXpm |
2347 test -z "$with_xpm" && { AC_TRY_RUN([#include <X11/xpm.h> | 2372 test -z "$with_xpm" && { AC_TRY_RUN([#include <X11/xpm.h> |
2348 int main(int c, char **v) { | 2373 int main(int c, char **v) { |
2382 | 2407 |
2383 dnl autodetect ImageMagick | 2408 dnl autodetect ImageMagick |
2384 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)) } | 2409 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)) } |
2385 test "$with_imagick" != "no" && { | 2410 test "$with_imagick" != "no" && { |
2386 dnl check the appropriate libraries for ImageMagick | 2411 dnl check the appropriate libraries for ImageMagick |
2412 dnl First, let's check libz or libgz for png... | |
2413 z_libs="" | |
2414 AC_CHECK_LIB(z, inflateInit_, XE_APPEND(-lz, z_libs), | |
2415 AC_CHECK_LIB(gz, inflateInit_, XE_APPEND(-lgz, z_libs))) | |
2416 | |
2387 imagick_libs="" | 2417 imagick_libs="" |
2388 AC_CHECK_LIB(dps, XDPSPixelsPerPoint, XE_APPEND(-ldpstk -ldps, imagick_libs),,,-ldpstk) | 2418 AC_CHECK_LIB(dps, XDPSPixelsPerPoint, XE_APPEND(-ldpstk -ldps, imagick_libs),,,-ldpstk) |
2389 AC_CHECK_LIB(fpx, FPX_SetToolkitMemoryLimit, XE_APPEND(-lfpx, imagick_libs)) | 2419 AC_CHECK_LIB(fpx, FPX_SetToolkitMemoryLimit, XE_APPEND(-lfpx, imagick_libs)) |
2390 AC_CHECK_LIB(df, DF24getdims, XE_APPEND(-ldf, imagick_libs)) | 2420 AC_CHECK_LIB(df, DF24getdims, XE_APPEND(-ldf, imagick_libs)) |
2391 AC_CHECK_LIB(jbig, jbg_dec_init, XE_APPEND(-ljbig, imagick_libs)) | 2421 AC_CHECK_LIB(jbig, jbg_dec_init, XE_APPEND(-ljbig, imagick_libs)) |
2392 AC_CHECK_LIB(jpeg, jpeg_read_header, XE_APPEND(-ljpeg, imagick_libs)) | 2422 AC_CHECK_LIB(jpeg, jpeg_read_header, XE_APPEND(-ljpeg, imagick_libs)) |
2393 AC_CHECK_LIB(mpeg, OpenMPEG, XE_APPEND(-lmpeg, imagick_libs)) | 2423 AC_CHECK_LIB(mpeg, OpenMPEG, XE_APPEND(-lmpeg, imagick_libs)) |
2394 AC_CHECK_LIB(ttf, TT_Init_FreeType, XE_APPEND(-lttf, imagick_libs)) | 2424 AC_CHECK_LIB(ttf, TT_Init_FreeType, XE_APPEND(-lttf, imagick_libs)) |
2395 AC_CHECK_LIB(png, png_create_read_struct, XE_APPEND(-lpng, imagick_libs), | 2425 AC_CHECK_LIB(png, png_create_read_struct, XE_APPEND(-lpng, imagick_libs),,$z_libs) |
2396 AC_CHECK_LIB(png, png_create_read_struct, XE_APPEND(-lpng -lz, imagick_libs),,-lz)) | |
2397 AC_CHECK_LIB(tiff, TIFFOpen, XE_APPEND(-ltiff, imagick_libs), | 2426 AC_CHECK_LIB(tiff, TIFFOpen, XE_APPEND(-ltiff, imagick_libs), |
2398 AC_CHECK_LIB(tiff, TIFFOpen, XE_APPEND(-ltiff -ljpeg -lz, imagick_libs),,-ljpeg -lz)) | 2427 AC_CHECK_LIB(tiff, TIFFOpen, XE_APPEND(-ltiff -ljpeg, imagick_libs),,-ljpeg $z_libs),,$z_libs) |
2428 XE_APPEND($z_libs, imagick_libs) | |
2399 XE_APPEND($imagick_libs, libs_x) | 2429 XE_APPEND($imagick_libs, libs_x) |
2400 } | 2430 } |
2401 test -z "$with_imagick" && { AC_CHECK_LIB(Magick, MogrifyImage,[:],with_imagick=no) } | 2431 test -z "$with_imagick" && { AC_CHECK_LIB(Magick, MogrifyImage,[:],with_imagick=no) } |
2402 test -z "$with_imagick" && with_imagick=yes | 2432 test -z "$with_imagick" && with_imagick=yes |
2403 if test "$with_imagick" = "yes"; then | 2433 if test "$with_imagick" = "yes"; then |
2422 | 2452 |
2423 dnl Finish ensuring that we have values for the various toolkit items. | 2453 dnl Finish ensuring that we have values for the various toolkit items. |
2424 dnl Not all toolkits support all widgets | 2454 dnl Not all toolkits support all widgets |
2425 dnl if Motif is available we use it for the dialog boxes. | 2455 dnl if Motif is available we use it for the dialog boxes. |
2426 | 2456 |
2427 case "$with_menubars" in "" | "yes" | "athena" ) | 2457 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" ) |
2428 with_menubars="lucid" ;; | 2458 with_menubars="lucid" ;; |
2429 esac | 2459 esac |
2430 case "$with_dialogs" in "" | "yes" | "lucid" ) | 2460 case "$with_dialogs" in "" | "yes" | "lucid" ) |
2431 if test "$have_motif" = "yes"; then with_dialogs="motif" | 2461 if test "$have_motif" = "yes"; then with_dialogs="motif" |
2432 elif test "$have_xaw" = "yes"; then with_dialogs="athena" | 2462 elif test "$have_xaw" = "yes"; then with_dialogs="athena" |
2433 else with_dialogs=no | 2463 else with_dialogs=no |
2434 fi ;; | 2464 fi ;; |
2435 esac | 2465 esac |
2604 dnl AIX needs the following library for use with Motif | 2634 dnl AIX needs the following library for use with Motif |
2605 AC_CHECK_LIB(i18n, layout_object_getvalue, [XE_PREPEND(-li18n, libs_x)]) | 2635 AC_CHECK_LIB(i18n, layout_object_getvalue, [XE_PREPEND(-li18n, libs_x)]) |
2606 XE_COMPUTE_RUNPATH() | 2636 XE_COMPUTE_RUNPATH() |
2607 fi | 2637 fi |
2608 | 2638 |
2609 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) | 2639 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) |
2610 | 2640 |
2611 dnl realpath is buggy on linux, decosf and aix4 | 2641 dnl realpath is buggy on linux, decosf and aix4 |
2612 | 2642 |
2613 dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP. | 2643 dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP. |
2614 dnl The realpath in ELF linux libc's is O.K. | 2644 dnl The realpath in ELF linux libc's is O.K. |