comparison configure.in @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents 1d62742628b6
children 6240c7796c7a
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
77 [cat > conftest.$ac_ext <<EOF 77 [cat > conftest.$ac_ext <<EOF
78 [#]line __oline__ "configure" 78 [#]line __oline__ "configure"
79 #include "confdefs.h" 79 #include "confdefs.h"
80 [$1] 80 [$1]
81 EOF 81 EOF
82 if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit $?) 2>&AC_FD_CC 82 if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit) 2>&AC_FD_CC
83 then 83 then
84 dnl Do not remove the temporary files here, so they can be examined. 84 dnl Do not remove the temporary files here, so they can be examined.
85 ifelse([$2], , :, [$2]) 85 ifelse([$2], , :, [$2])
86 else 86 else
87 conftest_rc="$?"
88 echo "configure: failed program was:" >&AC_FD_CC 87 echo "configure: failed program was:" >&AC_FD_CC
89 cat conftest.$ac_ext >&AC_FD_CC 88 cat conftest.$ac_ext >&AC_FD_CC
90 ifelse([$3], , , [ rm -fr conftest* 89 ifelse([$3], , , [ rm -fr conftest*
91 $3 90 $3
92 ])dnl 91 ])dnl
227 dnl XE_PREPEND(value, varname) 226 dnl XE_PREPEND(value, varname)
228 define([XE_PREPEND], 227 define([XE_PREPEND],
229 [[$2]="[$1] $[$2]" && dnl 228 [[$2]="[$1] $[$2]" && dnl
230 if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi]) 229 if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi])
231 230
232 dnl XE_DIE(message)
233 define([XE_DIE], [{ echo "Error:" $1 >&2; exit 1; }])
234
235 231
236 dnl Initialize some variables set by options. 232 dnl Initialize some variables set by options.
237 dnl The variables have the same names as the options, with 233 dnl The variables have the same names as the options, with
238 dnl dashes changed to underlines. 234 dnl dashes changed to underlines.
239 235
300 mandir='${prefix}/man' 296 mandir='${prefix}/man'
301 297
302 dnl Initialize some other variables. 298 dnl Initialize some other variables.
303 subdirs= 299 subdirs=
304 MFLAGS= MAKEFLAGS= 300 MFLAGS= MAKEFLAGS=
305 SHELL=${CONFIG_SHELL-/bin/sh}
306 dnl Maximum number of lines to put in a shell here document. 301 dnl Maximum number of lines to put in a shell here document.
307 ac_max_here_lines=12 302 ac_max_here_lines=12
308 ])dnl AC_INIT_PARSE_ARGS 303 ])dnl AC_INIT_PARSE_ARGS
309 304
310 AC_INIT(src/lisp.h)dnl 305 AC_INIT(src/lisp.h)dnl
343 libdir='${exec_prefix}/lib' 338 libdir='${exec_prefix}/lib'
344 mandir='${prefix}/man/man1' 339 mandir='${prefix}/man/man1'
345 infodir='${datadir}/${PROGNAME}-${version}/info' 340 infodir='${datadir}/${PROGNAME}-${version}/info'
346 infopath='' 341 infopath=''
347 install_pp='' 342 install_pp=''
348 exe_suffix=''
349 lispdir='${datadir}/${PROGNAME}-${version}/lisp' 343 lispdir='${datadir}/${PROGNAME}-${version}/lisp'
350 dnl sitelispdir='${datadir}/xemacs/site-lisp' 344 dnl sitelispdir='${datadir}/xemacs/site-lisp'
351 pkgdir='${datadir}/${PROGNAME}-${version}/lisp' 345 pkgdir='${datadir}/${PROGNAME}-${version}/lisp'
352 package_path='' 346 package_path=''
353 etcdir='${datadir}/${PROGNAME}-${version}/etc' 347 etcdir='${datadir}/${PROGNAME}-${version}/etc'
354 lockdir='${statedir}/${PROGNAME}/lock' 348 lockdir='${statedir}/${PROGNAME}/lock'
355 archlibdir='${libdir}/${PROGNAME}-${version}/${configuration}' 349 archlibdir='${libdir}/${PROGNAME}-${version}/${configuration}'
356 docdir='${archlibdir}'
357 with_site_lisp='no' 350 with_site_lisp='no'
358 with_menubars='' 351 with_menubars=''
359 with_scrollbars='' 352 with_scrollbars=''
360 with_dialogs='' 353 with_dialogs=''
361 with_file_coding='' 354 with_file_coding=''
378 dnl the following is set to yes or no later. 371 dnl the following is set to yes or no later.
379 with_toolbars="" 372 with_toolbars=""
380 with_tty="" 373 with_tty=""
381 use_union_type="no" 374 use_union_type="no"
382 with_dnet="" 375 with_dnet=""
383 dnl dragndrop is still experimental. When it is stable, comment out the following line:
384 with_dragndrop="no"
385 376
386 dnl ------------------ 377 dnl ------------------
387 dnl Options Processing 378 dnl Options Processing
388 dnl ------------------ 379 dnl ------------------
389 380
624 \`motif', \`xlib', \`yes', or \`no'."]) ;; 615 \`motif', \`xlib', \`yes', or \`no'."]) ;;
625 esac 616 esac
626 eval "$opt=\"$val\"" 617 eval "$opt=\"$val\""
627 ;; 618 ;;
628 619
620 dnl XFontSet support?
621 "with_xfs" )
622 case "$val" in
623 y | ye | yes ) val=yes ;;
624 n | no | non | none ) val=no ;;
625 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
626 \`yes', or \`no'."]) ;;
627 esac
628 eval "$opt=\"$val\""
629 ;;
630
629 dnl Mail locking specification 631 dnl Mail locking specification
630 "mail_locking" ) 632 "mail_locking" )
631 case "$val" in 633 case "$val" in
632 lockf ) val=lockf ;; 634 lockf ) val=lockf ;;
633 flock ) val=flock ;; 635 flock ) val=flock ;;
694 dnl installed in odd places. 696 dnl installed in odd places.
695 697
696 dnl Has the user specified one of the path options? 698 dnl Has the user specified one of the path options?
697 prefix | exec_prefix | bindir | datadir | statedir | libdir | \ 699 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
698 mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \ 700 mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
699 archlibdir | docdir | package_path ) 701 archlibdir | docdir | package_path )
700 dnl If the value was omitted, get it from the next argument. 702 dnl If the value was omitted, get it from the next argument.
701 if test "$valomitted" = "yes"; then 703 if test "$valomitted" = "yes"; then
702 if test "$#" = 0; then 704 if test "$#" = 0; then
703 USAGE_ERROR("The \`--$optname' option requires a value."); 705 USAGE_ERROR("The \`--$optname' option requires a value.");
704 fi 706 fi
718 datadir ) 720 datadir )
719 AC_DEFINE(INFODIR_USER_DEFINED) 721 AC_DEFINE(INFODIR_USER_DEFINED)
720 AC_DEFINE(LISPDIR_USER_DEFINED) 722 AC_DEFINE(LISPDIR_USER_DEFINED)
721 AC_DEFINE(ETCDIR_USER_DEFINED) ;; 723 AC_DEFINE(ETCDIR_USER_DEFINED) ;;
722 statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;; 724 statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;;
723 docdir ) AC_DEFINE(DOCDIR_USER_DEFINED) ;;
724 exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;; 725 exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;;
725 esac 726 esac
726 ;; 727 ;;
727 728
728 dnl --no-create added by autoconf for use by config.status 729 dnl --no-create added by autoconf for use by config.status
878 echo Making symbolic link to "$srcdir/$dir" 879 echo Making symbolic link to "$srcdir/$dir"
879 ${LN_S} "$srcdir/$dir" "$dir" 880 ${LN_S} "$srcdir/$dir" "$dir"
880 fi 881 fi
881 done 882 done
882 883
883 dnl Do our best to deal with automounter brokenness
884 dnl CANONICALIZE_PATH(varname)
885 define([CANONICALIZE_PATH],
886 [if test -d "/net"; then
887 if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
888 $1=`echo "[$]$1" | \
889 sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
890 fi])dnl
891
892 dnl Calculate canonical name for blddir (i.e. current directory). 884 dnl Calculate canonical name for blddir (i.e. current directory).
893 dnl PWD may already be the preferable absolute name for ".", 885 dnl PWD may already be the preferable absolute name for ".",
894 dnl but we can't trust it - it is sometimes inaccurate. 886 dnl but we can't trust it - it is sometimes inaccurate.
895 absolute_pwd="`pwd`"; 887 absolute_pwd="`pwd`";
896 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd" 888 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
897 then blddir="$PWD" 889 then blddir="$PWD"
898 else blddir="$absolute_pwd"; CANONICALIZE_PATH(blddir) 890 else blddir="$absolute_pwd"
899 fi 891 fi
900 AC_SUBST(blddir) 892 AC_SUBST(blddir)
901 893
902 dnl Make srcdir absolute, if not already. It is important to 894 dnl Make srcdir absolute, if not already. It is important to
903 dnl avoid running the path through pwd unnecessary, since pwd can 895 dnl avoid running the path through pwd unnecessary, since pwd can
904 dnl give you automounter prefixes, which can go away. 896 dnl give you automounter prefixes, which can go away.
905 case "$srcdir" in 897 case "$srcdir" in
906 /* ) ;; 898 /* ) ;;
907 . ) srcdir="$blddir" ;; 899 . ) srcdir="$blddir" ;;
908 * ) srcdir="`cd $srcdir && pwd`"; CANONICALIZE_PATH(srcdir) ;; 900 * ) srcdir="`cd $srcdir && pwd`" ;;
909 esac 901 esac
910 902
911 dnl Check if the source directory already has a configured system in it. 903 dnl Check if the source directory already has a configured system in it.
912 if test `pwd` != `sh -c cd $srcdir && pwd` \ 904 if test `pwd` != `sh -c cd $srcdir && pwd` \
913 && test -f "$srcdir/src/config.h"; then 905 && test -f "$srcdir/src/config.h"; then
929 dnl ---------------------------------------- 921 dnl ----------------------------------------
930 dnl Find out which version of XEmacs this is 922 dnl Find out which version of XEmacs this is
931 dnl ---------------------------------------- 923 dnl ----------------------------------------
932 . "$srcdir/version.sh" || exit 1; 924 . "$srcdir/version.sh" || exit 1;
933 dnl Must do the following first to determine verbosity for AC_DEFINE 925 dnl Must do the following first to determine verbosity for AC_DEFINE
934 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi 926 if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
935 : "${extra_verbose=$beta}" 927 : "${extra_verbose=$beta}"
936 version="${emacs_major_version}.${emacs_minor_version}" 928 version="${emacs_major_version}.${emacs_minor_version}"
937 AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version) 929 AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version)
938 AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version) 930 AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version)
939 if test -n "$emacs_beta_version" ; then 931 if test -n "$emacs_beta_version"; then
940 if test "$beta" = "yes"; then 932 version="${version}-b${emacs_beta_version}"
941 version="${version}-b${emacs_beta_version}" 933 AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version)
942 AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version)
943 else
944 version="${version}.${emacs_beta_version}"
945 AC_DEFINE_UNQUOTED(EMACS_PATCH_LEVEL, $emacs_beta_version)
946 fi
947 fi 934 fi
948 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename") 935 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
949 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") 936 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
950 937
951 if test "$with_infodock" = "yes"; then 938 if test "$with_infodock" = "yes"; then
952 if test ! -f ../../ID-INSTALL; then 939 if test ! -f ../ID-INSTALL; then
953 echo "Cannot build InfoDock without InfoDock sources" 940 echo "Cannot build InfoDock without InfoDock sources"
954 with_infodock=no 941 with_infodock=no
955 fi 942 fi
956 fi 943 fi
957 944
971 dnl ---------------------------------- 958 dnl ----------------------------------
972 dnl Error checking and debugging flags 959 dnl Error checking and debugging flags
973 dnl ---------------------------------- 960 dnl ----------------------------------
974 dnl Error checking default to "yes" in beta versions, to "no" in releases. 961 dnl Error checking default to "yes" in beta versions, to "no" in releases.
975 dnl Same goes for --debug and --extra-verbosity. 962 dnl Same goes for --debug and --extra-verbosity.
976 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi 963 if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
977 test "${error_check_extents=$beta}" = yes && AC_DEFINE(ERROR_CHECK_EXTENTS) 964 test "${error_check_extents=$beta}" = yes && AC_DEFINE(ERROR_CHECK_EXTENTS)
978 test "${error_check_typecheck=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TYPECHECK) 965 test "${error_check_typecheck=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TYPECHECK)
979 test "${error_check_bufpos=$beta}" = yes && AC_DEFINE(ERROR_CHECK_BUFPOS) 966 test "${error_check_bufpos=$beta}" = yes && AC_DEFINE(ERROR_CHECK_BUFPOS)
980 test "${error_check_gc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GC) 967 test "${error_check_gc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GC)
981 test "${error_check_malloc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_MALLOC) 968 test "${error_check_malloc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_MALLOC)
1030 machine='' opsys='' 1017 machine='' opsys=''
1031 1018
1032 dnl Straightforward machine determination 1019 dnl Straightforward machine determination
1033 case "$canonical" in 1020 case "$canonical" in
1034 sparc-*-* ) machine=sparc ;; 1021 sparc-*-* ) machine=sparc ;;
1035 alpha*-*-* ) machine=alpha ;; 1022 alpha-*-* ) machine=alpha ;;
1036 vax-*-* ) machine=vax ;; 1023 vax-*-* ) machine=vax ;;
1037 mips-dec-* ) machine=pmax ;; 1024 mips-dec-* ) machine=pmax ;;
1038 mips-sgi-irix6* ) machine=iris6d ;;
1039 mips-sgi-* ) machine=iris4d ;; 1025 mips-sgi-* ) machine=iris4d ;;
1040 mips*-linux ) machine=mips ;;
1041 romp-ibm-* ) machine=ibmrt ;; 1026 romp-ibm-* ) machine=ibmrt ;;
1042 rs6000-ibm-aix* ) machine=ibmrs6000 ;; 1027 rs6000-ibm-aix* ) machine=ibmrs6000 ;;
1043 powerpc-ibm-aix* ) machine=ibmrs6000 ;; 1028 powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1044 powerpc*-* ) machine=powerpc ;; 1029 powerpc*-* ) machine=powerpc ;;
1045 hppa-*-* ) machine=hp800 ;; 1030 hppa-*-* ) machine=hp800 ;;
1046 m88k-dg-* ) machine=aviion ;; 1031 m88k-dg-* ) machine=aviion ;;
1047 m68*-sony-* ) machine=news ;; 1032 m68*-sony-* ) machine=news ;;
1048 mips-sony-* ) machine=news-risc ;; 1033 mips-sony-* ) machine=news-risc ;;
1049 clipper-* ) machine=clipper ;; 1034 clipper-* ) machine=clipper ;;
1050 s390-* ) machine=s390 ;;
1051 esac 1035 esac
1052 1036
1053 dnl Straightforward OS determination 1037 dnl Straightforward OS determination
1054 case "$canonical" in 1038 case "$canonical" in
1055 *-*-linux* ) opsys=linux ;; 1039 *-*-linux* ) opsys=linux ;;
1072 1056
1073 dnl AIX 1057 dnl AIX
1074 *-*-aix3.1* ) opsys=aix3-1 ;; 1058 *-*-aix3.1* ) opsys=aix3-1 ;;
1075 *-*-aix3.2.5 ) opsys=aix3-2-5 ;; 1059 *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1076 *-*-aix3* ) opsys=aix3-2 ;; 1060 *-*-aix3* ) opsys=aix3-2 ;;
1077 *-*-aix4.0* ) opsys=aix4 ;; 1061 *-*-aix4.2* ) opsys=aix4-2 ;;
1078 *-*-aix4.1* ) opsys=aix4-1 ;; 1062 *-*-aix4.1* ) opsys=aix4-1 ;;
1079 *-*-aix4* ) opsys=aix4-2 ;; 1063 *-*-aix4* ) opsys=aix4 ;;
1080 1064
1081 dnl Other generic OSes 1065 dnl Other generic OSes
1082 *-gnu* ) opsys=gnu ;; 1066 *-gnu* ) opsys=gnu ;;
1083 *-*-bsd4.[[01]] ) opsys=bsd4-1 ;; 1067 *-*-bsd4.[[01]] ) opsys=bsd4-1 ;;
1084 *-*-bsd4.2 ) opsys=bsd4-2 ;; 1068 *-*-bsd4.2 ) opsys=bsd4-2 ;;
1338 machine=mips-siemens opsys=usg5-4 1322 machine=mips-siemens opsys=usg5-4
1339 NON_GNU_CC=/usr/ccs/bin/cc 1323 NON_GNU_CC=/usr/ccs/bin/cc
1340 NON_GNU_CPP=/usr/ccs/lib/cpp 1324 NON_GNU_CPP=/usr/ccs/lib/cpp
1341 ;; 1325 ;;
1342 1326
1343 dnl NEC
1344 mips-nec-sysv*)
1345 machine=mips-nec
1346 NON_GNU_CC=/usr/ccs/bin/cc
1347 NON_GNU_CPP=/usr/ccs/lib/cpp
1348 ;;
1349
1350 dnl Silicon Graphics machines 1327 dnl Silicon Graphics machines
1351 dnl Iris 2500 and Iris 2500 Turbo (aka the Iris 3030) 1328 dnl Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1352 m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;; 1329 m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1353 m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;; 1330 m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1354 dnl Iris 4D 1331 dnl Iris 4D
1476 *-esix* ) opsys=esix ;; 1453 *-esix* ) opsys=esix ;;
1477 *-mach* ) opsys=mach-bsd4-3 ;; 1454 *-mach* ) opsys=mach-bsd4-3 ;;
1478 *-xenix* ) opsys=xenix ;; 1455 *-xenix* ) opsys=xenix ;;
1479 *-sco3.2v4* ) opsys=sco4 NON_GNU_CPP=/lib/cpp ;; 1456 *-sco3.2v4* ) opsys=sco4 NON_GNU_CPP=/lib/cpp ;;
1480 *-bsd386* | *-bsdi1* ) opsys=bsd386 ;; 1457 *-bsd386* | *-bsdi1* ) opsys=bsd386 ;;
1481 *-bsdi4* ) opsys=bsdos4 ;;
1482 *-bsdi3* ) opsys=bsdos3 ;; 1458 *-bsdi3* ) opsys=bsdos3 ;;
1483 *-bsdi2.1* ) opsys=bsdos2-1 ;; 1459 *-bsdi2.1* ) opsys=bsdos2-1 ;;
1484 *-bsdi2* ) opsys=bsdos2 ;; 1460 *-bsdi2* ) opsys=bsdos2 ;;
1485 *-sco3.2v5* ) opsys=sco5 ; 1461 *-sco3.2v5* ) opsys=sco5 ;
1486 dnl This is a pain. Like the current USL cc, SCO cc -E 1462 dnl This is a pain. Like the current USL cc, SCO cc -E
1492 if test "$dynamic" = "yes" ; then 1468 if test "$dynamic" = "yes" ; then
1493 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF" ; 1469 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF" ;
1494 else 1470 else
1495 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE" ; 1471 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE" ;
1496 fi ;; 1472 fi ;;
1497 *-sysv5* ) opsys=sco7 ;;
1498 *-386bsd* ) opsys=386bsd ;; 1473 *-386bsd* ) opsys=386bsd ;;
1499 *-freebsd* ) opsys=freebsd ;; 1474 *-freebsd* ) opsys=freebsd ;;
1500 *-nextstep* ) opsys=nextstep ;; 1475 *-nextstep* ) opsys=nextstep ;;
1501 *-pc-cygwin32 ) opsys=cygwin32 ;; 1476 *-pc-cygwin32 ) opsys=cygwin32 ;;
1502 dnl Otherwise, we fall through to the generic opsys code at the bottom. 1477 dnl Otherwise, we fall through to the generic opsys code at the bottom.
1503 esac 1478 esac
1504 ;; 1479 ;;
1505 1480
1506 dnl Linux/68k 1481 dnl Linux/68k
1507 m68k-*-linux* ) machine=m68k opsys=linux ;; 1482 m68k-*-linux* ) machine=m68k opsys=linux ;;
1508
1509 dnl Linux/arm
1510 arm-*-linux* ) machine=arm opsys=linux ;;
1511 1483
1512 esac 1484 esac
1513 1485
1514 if test -z "$machine" -o -z "$opsys"; then 1486 if test -z "$machine" -o -z "$opsys"; then
1515 (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems." 1487 (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1620 AC_MSG_RESULT($have_glibc) 1592 AC_MSG_RESULT($have_glibc)
1621 dnl I'm tired of pop being broken with GLIBC -slb 1593 dnl I'm tired of pop being broken with GLIBC -slb
1622 dnl Well. then why not fix fucking pop? 1594 dnl Well. then why not fix fucking pop?
1623 test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE) 1595 test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE)
1624 1596
1625 1597 AC_MSG_CHECKING(whether we are using SunPro C)
1626 dnl Identify compilers to enable compiler-specific hacks. 1598 AC_TRY_COMPILE([],[#ifndef __SUNPRO_C
1627 dnl Add support for other compilers HERE! 1599 #error Not a SunPro compiler :-(
1628 dnl GCC is already identified elsewhere. 1600 ******* ======= ******** &&&&&&&&
1629 AC_TRY_RUN([int main () {
1630 #if defined __SUNPRO_C
1631 return 11;
1632 #elif defined __DECC
1633 return 12;
1634 #else
1635 return 0;
1636 #endif 1601 #endif
1637 }], [], 1602 ], __sunpro_c=yes, __sunpro_c=no)
1638 [case "$conftest_rc" in 1603 AC_MSG_RESULT($__sunpro_c)
1639 11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
1640 12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;;
1641 esac])
1642
1643 1604
1644 dnl case "$canonical" in 1605 dnl case "$canonical" in
1645 dnl *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;; 1606 dnl *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;;
1646 dnl esac 1607 dnl esac
1647 1608
1763 have_terminfo mail_use_flock mail_use_lockf) && echo "" 1724 have_terminfo mail_use_flock mail_use_lockf) && echo ""
1764 1725
1765 dnl Non-ordinary link usually requires -lc 1726 dnl Non-ordinary link usually requires -lc
1766 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc" 1727 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
1767 1728
1768 dnl Compiler-specific hacks
1769 dnl DEC C requires -std
1770 test "$__DECC" = "yes" && XE_APPEND(-std, c_switch_site)
1771
1772 dnl Calculalate value of CFLAGS: 1729 dnl Calculalate value of CFLAGS:
1773 dnl Use either command line flag, environment var, or autodetection 1730 dnl Use either command line flag, environment var, or autodetection
1774 if test "$cflags_specified" = "no"; then 1731 if test "$cflags_specified" = "no"; then
1775 dnl Following values of CFLAGS are known to work well. 1732 dnl Following values of CFLAGS are known to work well.
1776 dnl Should we take debugging options into consideration? 1733 dnl Should we take debugging options into consideration?
1780 dnl test "$opsys $machine" = "linux intel386" && \ 1737 dnl test "$opsys $machine" = "linux intel386" && \
1781 dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2" 1738 dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
1782 dnl cygwin can't cope with -O3 1739 dnl cygwin can't cope with -O3
1783 test "$opsys $machine" = "cygwin32 intel386" && \ 1740 test "$opsys $machine" = "cygwin32 intel386" && \
1784 CFLAGS="-g -O2 -Wall -Wno-switch" 1741 CFLAGS="-g -O2 -Wall -Wno-switch"
1785 elif test "$__SUNPRO_C" = "yes"; then 1742 elif test "$__sunpro_c" = "yes"; then
1786 case "$opsys" in 1743 case "$opsys" in
1787 sol2 ) CFLAGS="-v -xO4" ;; 1744 sol2 ) CFLAGS="-v -xO4" ;;
1788 sunos4* ) CFLAGS="-xO2";; 1745 sunos4* ) CFLAGS="-xO2";;
1789 esac 1746 esac
1790 elif test "$__DECC" = "yes"; then
1791 CFLAGS="-O3"
1792 elif test "$CC" = "xlc"; then 1747 elif test "$CC" = "xlc"; then
1793 CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000" 1748 CFLAGS="-O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
1794 dnl ### Add optimal CFLAGS support for other compilers HERE!
1795 else 1749 else
1750 dnl ### Add tests for other compilers here...
1796 CFLAGS="-O" ;dnl The only POSIX-approved flag 1751 CFLAGS="-O" ;dnl The only POSIX-approved flag
1797 fi 1752 fi
1798 fi 1753 fi
1799 1754
1800 dnl Inform compiler that certain flags are meant for the linker 1755 dnl Inform compiler that certain flags are meant for the linker
1932 dnl ------------------------------------- 1887 dnl -------------------------------------
1933 1888
1934 if test "$dynamic" = "no"; then add_runtime_path=no 1889 if test "$dynamic" = "no"; then add_runtime_path=no
1935 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes 1890 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
1936 else case "$opsys" in 1891 else case "$opsys" in
1937 sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;; 1892 sol2 | irix* | *bsd* ) add_runtime_path=yes ;;
1938 * ) add_runtime_path=no ;; 1893 * ) add_runtime_path=no ;;
1939 esac 1894 esac
1940 fi 1895 fi
1941 1896
1942 if test "$add_runtime_path" = "yes"; then 1897 if test "$add_runtime_path" = "yes"; then
1943 dnl Try to autodetect runtime library flag (usually -R), 1898 dnl Try to autodetect runtime library flag (usually -R),
1944 dnl and whether it works (or at least does no harm) 1899 dnl and whether it works (or at least does no harm)
1945 AC_MSG_CHECKING("for runtime libraries flag") 1900 AC_MSG_CHECKING("for runtime libraries flag")
1946 case "$opsys" in 1901 dash_r=""
1947 sol2 ) dash_r="-R" ;; 1902 for try_dash_r in "-R" "-R " "-rpath "; do
1948 decosf* | linux* | irix*) dash_r="-rpath " ;; 1903 xe_check_libs="${try_dash_r}/no/such/file-or-directory"
1949 *) 1904 XE_PROTECT_LINKER_FLAGS(xe_check_libs)
1950 dash_r="" 1905 AC_TRY_LINK(, , dash_r="$try_dash_r")
1951 for try_dash_r in "-R" "-R " "-rpath "; do 1906 xe_check_libs=""
1952 xe_check_libs="${try_dash_r}/no/such/file-or-directory" 1907 test -n "$dash_r" && break
1953 XE_PROTECT_LINKER_FLAGS(xe_check_libs) 1908 done
1954 AC_TRY_LINK(, , dash_r="$try_dash_r")
1955 xe_check_libs=""
1956 test -n "$dash_r" && break
1957 done ;;
1958 esac
1959 if test -n "$dash_r"; 1909 if test -n "$dash_r";
1960 then AC_MSG_RESULT("\"${dash_r}\"") 1910 then AC_MSG_RESULT("\"${dash_r}\"")
1961 else AC_MSG_RESULT(NONE) 1911 else AC_MSG_RESULT(NONE)
1962 fi 1912 fi
1963 fi 1913 fi
1976 1926
1977 dnl XE_ADD_RUNPATH_DIR(directory) 1927 dnl XE_ADD_RUNPATH_DIR(directory)
1978 define([XE_ADD_RUNPATH_DIR],[{ 1928 define([XE_ADD_RUNPATH_DIR],[{
1979 xe_runpath_dir=$1 1929 xe_runpath_dir=$1
1980 dnl PRINT_VAR(ld_switch_site ld_switch_x_site runpath xe_runpath_dir LD_RUN_PATH xe_ldflags) 1930 dnl PRINT_VAR(ld_switch_site ld_switch_x_site runpath xe_runpath_dir LD_RUN_PATH xe_ldflags)
1981 dnl Many systems have *.so, HP-UX has *.sl, Freebsd 2.2.5 only has *.so.nn
1982 test "$xe_runpath_dir" != "/lib" -a \ 1931 test "$xe_runpath_dir" != "/lib" -a \
1983 "$xe_runpath_dir" != "/usr/lib" -a \ 1932 "$xe_runpath_dir" != "/usr/lib" -a \
1984 -n "`ls ${xe_runpath_dir}/*.s[[ol]] ${xe_runpath_dir}/*.so.* 2>/dev/null`" && \ 1933 -n "`ls ${xe_runpath_dir}/*.s[[ol]] 2>/dev/null`" && \
1985 eval "$xe_add_unique_runpath_dir" 1934 eval "$xe_add_unique_runpath_dir"
1986 }])dnl 1935 }])dnl
1987 1936
1988 dnl XE_COMPUTE_RUNPATH() 1937 dnl XE_COMPUTE_RUNPATH()
1989 define([XE_COMPUTE_RUNPATH],[ 1938 define([XE_COMPUTE_RUNPATH],[
2107 AC_PROG_INSTALL 2056 AC_PROG_INSTALL
2108 AC_PROG_YACC 2057 AC_PROG_YACC
2109 2058
2110 dnl checks for header files 2059 dnl checks for header files
2111 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) 2060 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h)
2112 AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h) 2061 AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h)
2113 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h) 2062 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h)
2114 AC_HEADER_SYS_WAIT 2063 AC_HEADER_SYS_WAIT
2115 AC_HEADER_STDC 2064 AC_HEADER_STDC
2116 AC_HEADER_TIME 2065 AC_HEADER_TIME
2117 AC_DECL_SYS_SIGLIST 2066 AC_DECL_SYS_SIGLIST
2330 esac 2279 esac
2331 break; dnl Only need ONE X11 implementation ! 2280 break; dnl Only need ONE X11 implementation !
2332 fi 2281 fi
2333 done 2282 done
2334 2283
2335 dnl Avoid version mismatch for shared library libXm.so on osf4
2336 case "$opsys" in
2337 decosf*) if test "$GCC" = yes -a -d /usr/shlib; then XE_APPEND(-L/usr/shlib, X_LIBS); fi ;;
2338 esac
2339
2340 ld_switch_x_site="$X_LIBS" 2284 ld_switch_x_site="$X_LIBS"
2341 2285
2342 XE_COMPUTE_RUNPATH() 2286 XE_COMPUTE_RUNPATH()
2343 2287
2344 if test "$extra_verbose" = "yes"; then 2288 if test "$extra_verbose" = "yes"; then
2380 xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make` 2324 xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
2381 fi 2325 fi
2382 cd .. 2326 cd ..
2383 rm -fr conftestdir 2327 rm -fr conftestdir
2384 for word in $xmkmf_defines; do 2328 for word in $xmkmf_defines; do
2385 case "$word" in -D* ) 2329 case "$word" in
2386 sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'` 2330 -D*=* ) ;;
2387 case "$word" in 2331 -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
2388 -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;; 2332 AC_DEFINE_UNQUOTED($word) ;;
2389 * ) val=1 ;;
2390 esac
2391 dnl Avoid re-AC_DEFINE-ing xmkmf symbols we've already defined above.
2392 if grep "^#define $sym " confdefs.h >/dev/null; then :; else
2393 if test "$val" = "1"
2394 then AC_DEFINE_UNQUOTED($sym)
2395 else AC_DEFINE_UNQUOTED($sym,$val)
2396 fi
2397 fi ;;
2398 esac 2333 esac
2399 done 2334 done
2400 fi 2335 fi
2401 2336
2402 dnl make sure we can find Intrinsic.h 2337 dnl make sure we can find Intrinsic.h
2478 AC_CHECKING(for MS-Windows) 2413 AC_CHECKING(for MS-Windows)
2479 AC_CHECK_LIB(gdi32,main,with_msw=yes) 2414 AC_CHECK_LIB(gdi32,main,with_msw=yes)
2480 if test "$with_msw" = "yes"; then 2415 if test "$with_msw" = "yes"; then
2481 AC_DEFINE(HAVE_MS_WINDOWS) 2416 AC_DEFINE(HAVE_MS_WINDOWS)
2482 install_pp="$blddir/lib-src/installexe.sh" 2417 install_pp="$blddir/lib-src/installexe.sh"
2483 exe_suffix=".exe"
2484 XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomctl32, libs_system) 2418 XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomctl32, libs_system)
2485 test "$with_dragndrop" != no && XE_APPEND(msw, dragndrop_proto)
2486 if test "$window_system" != x11; then 2419 if test "$window_system" != x11; then
2487 window_system=msw 2420 window_system=msw
2488 test "$with_scrollbars" != "no" && with_scrollbars=msw \ 2421 test "$with_scrollbars" != "no" && with_scrollbars=msw \
2489 && XE_ADD_OBJS(scrollbar-msw.o) 2422 && XE_ADD_OBJS(scrollbar-msw.o)
2490 test "$with_menubars" != "no" && with_menubars=msw \ 2423 test "$with_menubars" != "no" && with_menubars=msw \
2497 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o) 2430 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o)
2498 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o) 2431 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o)
2499 test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-msw.o) 2432 test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-msw.o)
2500 test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-msw.o) 2433 test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-msw.o)
2501 fi 2434 fi
2502 dnl check for our special version of select 2435 dnl check for our special version of select
2503 AC_TRY_RUN([#include <fcntl.h> 2436 AC_TRY_RUN([#include <fcntl.h>
2504 int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }], 2437 int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }],
2505 [AC_DEFINE(HAVE_MSG_SELECT)]) 2438 [AC_DEFINE(HAVE_MSG_SELECT)])
2506 const_is_losing=no 2439 const_is_losing=no
2507 with_file_coding=yes 2440 with_file_coding=yes
2510 XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o) 2443 XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o)
2511 fi 2444 fi
2512 fi 2445 fi
2513 2446
2514 AC_SUBST(install_pp) 2447 AC_SUBST(install_pp)
2515 AC_SUBST(exe_suffix)
2516 2448
2517 test -z "$window_system" && window_system="none" 2449 test -z "$window_system" && window_system="none"
2518 2450
2519 dnl Test for features that require a window system - ANY window system 2451 dnl Test for features that require a window system - ANY window system
2520 if test "$window_system" = "none"; then 2452 if test "$window_system" = "none"; then
2558 fi 2490 fi
2559 eval "with_${feature}=no" 2491 eval "with_${feature}=no"
2560 done 2492 done
2561 fi 2493 fi
2562 2494
2563 dnl Balloon Help requires the Shape extension, not available everywhere,
2564 dnl for example not on AIX 4.3.
2565 if test "$with_x11" = "yes"; then
2566 AC_CHECK_HEADER(X11/extensions/shape.h, [
2567 AC_DEFINE(HAVE_BALLOON_HELP)
2568 XE_ADD_OBJS(balloon_help.o balloon-x.o)])
2569 fi
2570
2571 dnl FSF 19.29 has some bitmapdir stuff here. 2495 dnl FSF 19.29 has some bitmapdir stuff here.
2572 bitmapdir= 2496 bitmapdir=
2573 2497
2574 case "$window_system" in 2498 case "$window_system" in
2575 x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;; 2499 x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;;
2698 dnl Autodetect LDAP 2622 dnl Autodetect LDAP
2699 AC_CHECKING(for LDAP) 2623 AC_CHECKING(for LDAP)
2700 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) } 2624 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) }
2701 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) } 2625 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) }
2702 if test "$with_ldap" != "no"; then 2626 if test "$with_ldap" != "no"; then
2703 AC_CHECK_LIB(ldap, ldap_search, with_ldap_nolber=yes, with_ldap_nolber=no) 2627 test -z "$with_umich_ldap" && { AC_CHECK_LIB(ldap, ldap_open, with_umich_ldap=yes, with_umich_ldap=no, -llber) }
2704 test "$with_ldap_nolber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_lber=yes, with_ldap_lber=no, -llber) } 2628 test "$with_umich_ldap" = "no" && { AC_CHECK_LIB(ldap10, ldap_set_option, with_ns_ldap=yes, with_ns_ldap=no) }
2705 test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krb=yes, with_ldap_krb=no, -llber -lkrb) } 2629 test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
2706 test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krbdes=yes, with_ldap_krbdes=no, -llber -lkrb -ldes) }
2707 test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
2708 fi 2630 fi
2709 if test "$with_ldap" = "yes"; then 2631 if test "$with_ldap" = "yes"; then
2710 AC_DEFINE(HAVE_LDAP) 2632 AC_DEFINE(HAVE_LDAP)
2711 XE_ADD_OBJS(eldap.o) 2633 XE_ADD_OBJS(eldap.o)
2712 if test "$with_ldap_nolber" = "yes" ; then 2634 if test "$with_umich_ldap" = "yes" ; then
2713 XE_PREPEND(-lldap, LIBS) 2635 AC_DEFINE(HAVE_UMICH_LDAP)
2714 else
2715 if test "$with_ldap_krb" = "yes" ; then
2716 XE_PREPEND(-lkrb, LIBS)
2717 fi
2718 if test "$with_ldap_krbdes" = "yes" ; then
2719 XE_PREPEND(-ldes, LIBS)
2720 XE_PREPEND(-lkrb, LIBS)
2721 fi
2722 XE_PREPEND(-llber, LIBS) 2636 XE_PREPEND(-llber, LIBS)
2723 XE_PREPEND(-lldap, LIBS) 2637 XE_PREPEND(-lldap, LIBS)
2724 fi 2638 elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
2725 AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result) 2639 AC_DEFINE(HAVE_NS_LDAP)
2640 XE_PREPEND(-lldap10, LIBS)
2641 elif test "$with_ldap" = "yes" ; then
2642 XE_PREPEND(-lldap, LIBS)
2643 fi
2726 fi 2644 fi
2727 2645
2728 dnl ---------------------- 2646 dnl ----------------------
2729 dnl Graphics libraries 2647 dnl Graphics libraries
2730 dnl ---------------------- 2648 dnl ----------------------
2731 2649
2732 if test "$window_system" != "none"; then 2650 if test "$window_system" != "none"; then
2733 AC_CHECKING(for graphics libraries) 2651 AC_CHECKING(for graphics libraries)
2734 2652
2735 dnl On IRIX 6, most graphics libraries depend on libCsup
2736 AC_CHECK_LIB(Csup,__T_9__nothrow,[LIBS="-lCsup $LIBS"])
2737
2738 dnl Autodetect Xpm 2653 dnl Autodetect Xpm
2739 xpm_problem=""
2740 if test -z "$with_xpm"; then 2654 if test -z "$with_xpm"; then
2741 AC_MSG_CHECKING(for Xpm - no older than 3.4f) 2655 AC_MSG_CHECKING(for Xpm - no older than 3.4f)
2742 xe_check_libs=-lXpm 2656 xe_check_libs=-lXpm
2743 AC_TRY_RUN([#include <X11/xpm.h> 2657 AC_TRY_RUN([#include <X11/xpm.h>
2744 int main(int c, char **v) { 2658 int main(int c, char **v) {
2745 return c == 1 ? 0 : 2659 return c == 1 ? 0 :
2746 XpmIncludeVersion != XpmLibraryVersion() ? 1 : 2660 XpmIncludeVersion != XpmLibraryVersion() ? 1 :
2747 XpmIncludeVersion < 30406 ? 2 : 0 ;}], 2661 XpmIncludeVersion < 30406 ? 2 : 0 ;}],
2748 [./conftest dummy_arg; xpm_status=$?; 2662 [./conftest dummy_arg; xpm_status=$?;
2749 if test "$xpm_status" = "0"; then 2663 if test "$?" = "0"; then
2750 with_xpm=yes; 2664 with_xpm=yes;
2751 else 2665 else
2752 with_xpm=no; 2666 with_xpm=no;
2753 if test "$xpm_status" = "1"; then 2667 if test "$?" = "1"; then
2754 xpm_problem="Xpm library version and header file version don't match!" 2668 xpm_problem="Xpm library version and header file version don't match!"
2755 elif test "$xpm_status" = "2"; then 2669 elif test "$?" = "2"; then
2756 xpm_problem="Xpm library version is too old!" 2670 xpm_problem="Xpm library version is too old!"
2757 else 2671 else
2758 xpm_problem="Internal xpm detection logic error!" 2672 xpm_problem="Internal xpm detection logic error!"
2759 fi 2673 fi
2760 echo " 2674 echo "
2761 *** WARNING *** $xpm_problem 2675 *** WARNING *** $problem
2762 I'm not touching that with a 10-foot pole! 2676 I'm not touching that with a 10-foot pole!
2763 If you really want to use the installed version of Xpm, rerun 2677 If you really want to use the installed version of Xpm, rerun
2764 configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!" 2678 configure --with-xpm=yes, but don't blame me if XEmacs crashes!"
2765 fi], 2679 fi],
2766 [with_xpm=no]) 2680 [with_xpm=no])
2767 xe_check_libs= 2681 xe_check_libs=
2768 AC_MSG_RESULT($with_xpm) 2682 AC_MSG_RESULT($with_xpm)
2769 fi 2683 fi
2780 if test "$xpm_for_msw" = "yes"; then 2694 if test "$xpm_for_msw" = "yes"; then
2781 AC_DEFINE(FOR_MSW) 2695 AC_DEFINE(FOR_MSW)
2782 fi 2696 fi
2783 fi 2697 fi
2784 2698
2785 dnl For a brief period we had the GIF code split out into a separate library,
2786 dnl but patent problems, etc. sort of squashed that idea.
2787 dnl We default to building with builtin GIF decoding
2788 if test "$with_gif" != "no"; then
2789 with_gif="yes"
2790 AC_DEFINE(HAVE_GIF)
2791 XE_ADD_OBJS(dgif_lib.o gif_io.o)
2792 fi
2793
2794 dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime 2699 dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime
2795 dnl So we always search for libz compression support. 2700 dnl So we always search for libz compression support.
2796 if test "$with_png $with_tiff" != "no no"; then 2701 if test "$with_png $with_tiff" != "no no"; then
2797 AC_CHECK_LIB(c, inflate, [:], [ 2702 AC_CHECK_LIB(c, inflate, [:], [
2798 AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[ 2703 AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[
2799 AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])]) 2704 AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])])
2705 fi
2706
2707 dnl Autodetect GIFlib
2708 AC_MSG_CHECKING(for gifreader)
2709 test -z "$with_gif" && { AC_CHECK_HEADER(gifrlib.h, ,with_gif=no) }
2710 test -z "$with_gif" && { AC_CHECK_LIB(gifreader, GetGifError,[:] ,with_gif=no) }
2711 test -z "$with_gif" && with_gif=yes
2712 if test "$with_gif" = "yes"; then
2713 AC_DEFINE(HAVE_GIF)
2714 XE_PREPEND(-lgifreader, libs_x)
2800 fi 2715 fi
2801 2716
2802 dnl autodetect JPEG 2717 dnl autodetect JPEG
2803 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) } 2718 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) }
2804 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) } 2719 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) }
2807 AC_DEFINE(HAVE_JPEG) 2722 AC_DEFINE(HAVE_JPEG)
2808 XE_PREPEND(-ljpeg, libs_x) 2723 XE_PREPEND(-ljpeg, libs_x)
2809 fi 2724 fi
2810 2725
2811 dnl autodetect PNG 2726 dnl autodetect PNG
2812 png_problem="" 2727 if test -z "$with_png"; then
2728 AC_MSG_CHECKING(for png.h - no older than 0.96)
2729 AC_EGREP_CPP(yes,
2730 [#include <png.h>
2731 #if PNG_LIBPNG_VER >= 96
2732 yes
2733 #endif
2734 ], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); with_png=no])
2735 fi
2813 test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) } 2736 test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) }
2814 test -z "$with_png" && { AC_CHECK_HEADER(png.h, ,with_png=no) }
2815 test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) } 2737 test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) }
2816 if test -z "$with_png"; then 2738 test -z "$with_png" && with_png=yes
2817 AC_MSG_CHECKING(for workable png version information)
2818 xe_check_libs="-lpng -lz"
2819 AC_TRY_RUN([#include <png.h>
2820 int main(int c, char **v) {
2821 if (c == 1) return 0;
2822 if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
2823 return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}],
2824 [./conftest dummy_arg; png_status=$?;
2825 if test "$png_status" = "0"; then
2826 with_png=yes;
2827 else
2828 with_png=no;
2829 if test "$png_status" = "1"; then
2830 png_problem="PNG library version and header file don't match!"
2831 elif test "$png_status" = "2"; then
2832 png_problem="PNG library version too old (pre 1.0.2)!"
2833 fi
2834 echo "
2835 *** WARNING *** $png_problem
2836 I'm not touching that with a 10-foot pole!
2837 If you really want to use the installed version of libPNG, rerun
2838 configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
2839 fi],
2840 [with_png=no])
2841 xe_check_libs=
2842 AC_MSG_RESULT($with_png)
2843 fi
2844 if test "$with_png" = "yes"; then 2739 if test "$with_png" = "yes"; then
2845 AC_DEFINE(HAVE_PNG) 2740 AC_DEFINE(HAVE_PNG)
2846 XE_PREPEND(-lpng, libs_x) 2741 XE_PREPEND(-lpng, libs_x)
2847 fi 2742 fi
2848 2743
2855 XE_PREPEND(-ltiff, libs_x) 2750 XE_PREPEND(-ltiff, libs_x)
2856 fi 2751 fi
2857 fi 2752 fi
2858 2753
2859 dnl ---------------------- 2754 dnl ----------------------
2860 dnl X-Specific Graphics libraries 2755 dnl Graphics libraries
2861 dnl ---------------------- 2756 dnl ----------------------
2862 2757
2863 if test "$with_x11" = "yes"; then 2758 if test "$with_x11" = "yes"; then
2864 2759
2865 AC_CHECKING(for X11 graphics libraries) 2760 AC_CHECKING(for X11 graphics libraries)
3017 dnl Do we have the XmIm* routines? And if so, do we want to use them? 2912 dnl Do we have the XmIm* routines? And if so, do we want to use them?
3018 dnl XIM seems to be flaky except on Solaris... 2913 dnl XIM seems to be flaky except on Solaris...
3019 dnl test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no 2914 dnl test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no
3020 case "$with_xim" in "" | "yes" ) 2915 case "$with_xim" in "" | "yes" )
3021 AC_CHECKING(for XIM) 2916 AC_CHECKING(for XIM)
3022 AC_CHECK_LIB(X11, XOpenIM, with_xim=xlib, with_xim=no)
3023 dnl XIM + Lesstif is not (yet?) usable 2917 dnl XIM + Lesstif is not (yet?) usable
3024 if test "$have_motif $have_lesstif" = "yes no"; then 2918 if test "$have_lesstif" = "yes"; then with_xim=xlib
3025 AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif) 2919 else AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif, with_xim=xlib)
3026 fi ;; 2920 fi
3027 esac 2921 esac
3028 if test "$with_xim" != "no"; then 2922 if test "$with_xim" != "no"; then
3029 AC_DEFINE(HAVE_XIM) 2923 AC_DEFINE(HAVE_XIM)
3030 if test "$with_xim" = "xlib"; then 2924 if test "$with_xim" = "xlib"; then
3031 AC_DEFINE(XIM_XLIB) 2925 AC_DEFINE(XIM_XLIB)
3039 if test "$with_xim" = "motif"; then 2933 if test "$with_xim" = "motif"; then
3040 with_xfs=no 2934 with_xfs=no
3041 fi 2935 fi
3042 fi 2936 fi
3043 2937
3044 dnl "with_xfs" = "yes" 2938 dnl "with_xim" = "yes"
3045 if test "$with_xfs" = "yes" ; then 2939 if test "$with_xfs" = "yes" ; then
3046 AC_CHECKING(for XFontSet) 2940 AC_CHECKING(for XFontSet)
3047 AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no) 2941 AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no)
3048 if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then 2942 if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
3049 AC_DEFINE(USE_XFONTSET) 2943 AC_DEFINE(USE_XFONTSET)
3050 if test "$with_xim" = "no" ; then 2944 if test "$with_xim" = "no" ; then
3051 XE_ADD_OBJS(input-method-xfs.o) 2945 XE_ADD_OBJS(input-method-xfs.o)
3052 fi 2946 fi
3053 fi 2947 fi
3054 fi dnl with_xfs 2948 fi dnl with_xim
3055 2949
3056 dnl Autodetect WNN 2950 dnl Autodetect WNN
3057 test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support 2951 test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
3058 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) } 2952 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) }
3059 dnl Detour to find crypt 2953 dnl Detour to find crypt
3060 if test "$with_wnn" != "no"; then 2954 if test "$with_wnn" != "no"; then
3061 AC_CHECK_FUNCS(crypt) 2955 AC_CHECK_FUNCS(crypt)
3062 test "$ac_cv_func_crypt" != "yes" && { AC_CHECK_LIB(crypt, crypt) } 2956 test "$ac_cv_func_crypt" != "yes" && { AC_CHECK_LIB(crypt, crypt) }
3063 fi 2957 fi
3064 dnl Back to our regularly scheduled wnn hunting 2958 dnl Back to our regularly scheduled wnn hunting
3065 if test -z "$with_wnn" -o "$with_wnn" = "yes"; then 2959 test -z "$with_wnn" && { AC_CHECK_LIB(wnn,jl_dic_list_e,[:],with_wnn=no) }
3066 AC_CHECK_LIB(wnn,jl_dic_list_e,libwnn=wnn,
3067 AC_CHECK_LIB(wnn4,jl_dic_list_e,libwnn=wnn4,
3068 AC_CHECK_LIB(wnn6,jl_dic_list_e,libwnn=wnn6,
3069 AC_CHECK_LIB(wnn6_fromsrc,dic_list_e,libwnn=wnn6_fromsrc,with_wnn=no))))
3070 fi
3071 test -z "$with_wnn" && with_wnn=yes 2960 test -z "$with_wnn" && with_wnn=yes
3072 if test "$with_wnn" = "yes"; then 2961 if test "$with_wnn" = "yes"; then
3073 AC_DEFINE(HAVE_WNN) 2962 AC_DEFINE(HAVE_WNN)
3074 XE_PREPEND(-l$libwnn, libs_x) 2963 XE_PREPEND(-lwnn, libs_x)
3075 XE_ADD_OBJS(mule-wnnfns.o) 2964 XE_ADD_OBJS(mule-wnnfns.o)
3076 if test "$with_wnn6" != "no"; then 2965 if test "$with_wnn6" != "no"; then
3077 AC_CHECK_LIB($libwnn, jl_fi_dic_list, with_wnn6=yes) 2966 AC_CHECK_LIB(wnn, jl_fi_dic_list, with_wnn6=yes)
3078 test "$with_wnn6" = "yes" && AC_DEFINE(WNN6) 2967 test "$with_wnn6" = "yes" && AC_DEFINE(WNN6)
3079 fi 2968 fi
3080 fi 2969 fi
3081 2970
3082 dnl Autodetect canna 2971 dnl Autodetect canna
3123 XE_COMPUTE_RUNPATH() 3012 XE_COMPUTE_RUNPATH()
3124 fi 3013 fi
3125 3014
3126 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 snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf) 3015 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 snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf)
3127 3016
3128 # Check for UNIX98 PTYs.
3129 # getpt is a glibc addition which emulates the master device on
3130 # systems without kernel support.
3131 AC_CHECK_FUNCS(grantpt unlockpt getpt ptsname killpg)
3132
3133 dnl Check for STREAM support functions.
3134 dnl Confusingly, "str" means both "string" and "SysV Streams".
3135 AC_CHECK_HEADERS(stropts.h)
3136 if test "$ac_cv_header_stropts_h" = "yes"; then
3137 AC_CHECK_FUNCS(isastream)
3138 AC_CHECK_HEADERS(strtio.h) dnl TIOCSIGNAL
3139 fi
3140
3141 dnl realpath is buggy on linux, decosf and aix4 3017 dnl realpath is buggy on linux, decosf and aix4
3142 3018
3143 dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP. 3019 dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP.
3144 dnl The realpath in ELF linux libc's is O.K. 3020 dnl The realpath in ELF linux libc's is O.K.
3145 dnl For example, call realpath on a file thirty-five or so directories deep 3021 dnl For example, call realpath on a file thirty-five or so directories deep
3146 dnl and you get ELOOP even if no symlinks at all are involved. 3022 dnl and you get ELOOP even if no symlinks at all are involved.
3147 dnl Reports as of 11/1997 indicate BSDi has problems too. 3023 dnl Reports as of 11/1997 indicate BSDi has problems too.
3148 dnl The realpath() in UnixWare2.1.3 could not get any pathname fragment in error condition.
3149 case "$opsys" in 3024 case "$opsys" in
3150 linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) XE_ADD_OBJS(realpath.o) ;; 3025 linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) XE_ADD_OBJS(realpath.o) ;;
3151 * ) 3026 * )
3152 case "$canonical" in 3027 AC_CHECK_FUNCS(realpath)
3153 *-*-sysv4.2uw2* ) XE_ADD_OBJS(realpath.o) ;; 3028 test "$ac_cv_func_realpath" != "yes" && XE_ADD_OBJS(realpath.o) ;;
3154 * ) AC_CHECK_FUNCS(realpath)
3155 test "$ac_cv_func_realpath" != "yes" && XE_ADD_OBJS(realpath.o) ;;
3156 esac ;;
3157 esac 3029 esac
3158 3030
3159 dnl If netdb.h does not declare h_errno, we must declare it by hand. 3031 dnl If netdb.h does not declare h_errno, we must declare it by hand.
3160 AC_MSG_CHECKING(whether netdb declares h_errno) 3032 AC_MSG_CHECKING(whether netdb declares h_errno)
3161 AC_TRY_LINK([#include <netdb.h>], 3033 AC_TRY_LINK([#include <netdb.h>],
3252 dnl HP-UX has a working alloca in libPW. 3124 dnl HP-UX has a working alloca in libPW.
3253 dnl case "${GCC}${opsys}" in hpux* ) 3125 dnl case "${GCC}${opsys}" in hpux* )
3254 dnl AC_CHECK_FUNC(alloca, [:], [AC_CHECK_LIB(PW, alloca)]) 3126 dnl AC_CHECK_FUNC(alloca, [:], [AC_CHECK_LIB(PW, alloca)])
3255 dnl esac 3127 dnl esac
3256 3128
3257 dnl AC_FUNC_ALLOCA doesn't know about DEC C's #pragma intrinsic(alloca)
3258 if test "$__DECC" != "yes"; then
3259 AC_FUNC_ALLOCA 3129 AC_FUNC_ALLOCA
3260 test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA) 3130 test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA)
3261 fi
3262 3131
3263 dnl Check whether vfork exists and works correctly. (This does more 3132 dnl Check whether vfork exists and works correctly. (This does more
3264 dnl than just check for its existence.) If so, it defines HAVE_VFORK_H. 3133 dnl than just check for its existence.) If so, it defines HAVE_VFORK_H.
3265 dnl If not, it defines vfork to be fork. 3134 dnl If not, it defines vfork to be fork.
3266 AC_FUNC_VFORK 3135 AC_FUNC_VFORK
3401 dnl Check for SGI and HP native sound libs 3270 dnl Check for SGI and HP native sound libs
3402 if test -z "$sound_found"; then 3271 if test -z "$sound_found"; then
3403 case "$canonical" in 3272 case "$canonical" in
3404 *-sgi-* ) 3273 *-sgi-* )
3405 if test -z "$native_sound_lib"; then 3274 if test -z "$native_sound_lib"; then
3406 AC_CHECK_HEADER(audio.h, [
3407 AC_CHECK_LIB(audio, ALopenport, native_sound_lib="-laudio") 3275 AC_CHECK_LIB(audio, ALopenport, native_sound_lib="-laudio")
3408 ])
3409 fi 3276 fi
3410 if test -n "$native_sound_lib"; then 3277 if test -n "$native_sound_lib"; then
3411 sound_found=yes sound_cflags="" 3278 sound_found=yes sound_cflags=""
3412 XE_ADD_OBJS(sgiplay.o) 3279 XE_ADD_OBJS(sgiplay.o)
3413 fi ;; 3280 fi ;;
3454 case "$with_sound" in both | nas ) 3321 case "$with_sound" in both | nas )
3455 AC_DEFINE(HAVE_NAS_SOUND) 3322 AC_DEFINE(HAVE_NAS_SOUND)
3456 XE_ADD_OBJS(nas.o) 3323 XE_ADD_OBJS(nas.o)
3457 XE_PREPEND(-laudio, libs_x) 3324 XE_PREPEND(-laudio, libs_x)
3458 dnl If the nas library does not contain the error jump point, 3325 dnl If the nas library does not contain the error jump point,
3459 dnl then we force safer behavior. 3326 dnl then we force safer behaviour.
3460 AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)]) 3327 AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)])
3461 dnl NAS <= 1.2p5 defines {BIG,LITTLE}_ENDIAN in conflict with GNU libc etc
3462 dnl Recent NAS prefixes NAS_ to avoid polluting namespace
3463 AC_EGREP_CPP(yes,
3464 [#include <audio/fileutil.h>
3465 #ifdef NAS_BIG_ENDIAN
3466 yes
3467 #endif
3468 ],[AC_DEFINE(NAS_USES_OWN_NAMESPACE)])
3469 esac 3328 esac
3470 3329
3471 dnl --------------------- 3330 dnl ---------------------
3472 dnl TTY-dependent options 3331 dnl TTY-dependent options
3473 dnl --------------------- 3332 dnl ---------------------
3557 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support. 3416 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support.
3558 dnl On FreeBSD, both DB and DBM are part of libc. 3417 dnl On FreeBSD, both DB and DBM are part of libc.
3559 dnl Note that unless support for DB/(G)DBM is explicitly disabled, we always 3418 dnl Note that unless support for DB/(G)DBM is explicitly disabled, we always
3560 dnl want to check for libdb/lib(g)dbm. Also note that libc will not be 3419 dnl want to check for libdb/lib(g)dbm. Also note that libc will not be
3561 dnl checked if we have the libraries. 3420 dnl checked if we have the libraries.
3421 dnl If support for DB/(G)DBM is requested, but we neither have libdb/lib(g)dbm,
3422 dnl nor does libc implement it, we are a bit lost :)
3562 3423
3563 AC_CHECKING(for database support) 3424 AC_CHECKING(for database support)
3564 3425
3565 dnl Check for ndbm.h, required for either kind of DBM support.
3566 if test "$with_database_gnudbm $with_database_dbm" != "no no"; then
3567 AC_CHECK_HEADER(ndbm.h, [:], [
3568 test "$with_database_gnudbm" = "yes" -o \
3569 "$with_database_dbm" = "yes" && \
3570 XE_DIE("Required DBM support cannot be provided.")
3571 with_database_gnudbm=no with_database_dbm=no])
3572 fi
3573
3574 dnl Check for DBM support in libgdbm.
3575 if test "$with_database_gnudbm" != "no"; then 3426 if test "$with_database_gnudbm" != "no"; then
3576 AC_CHECK_LIB(gdbm, dbm_open, [ 3427 AC_CHECK_HEADERS(ndbm.h, have_ndbm_h=yes)
3577 with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm], [ 3428 if test "$have_ndbm_h" = "yes"; then
3578 if test "$with_database_gnudbm" = "yes"; then 3429 AC_CHECK_LIB(gdbm, dbm_open, with_database_gnudbm=yes have_libgdbm=yes)
3579 XE_DIE("Required GNU DBM support cannot be provided.") 3430 fi
3580 fi 3431 if test "$with_database_gnudbm" != "yes"; then
3581 with_database_gnudbm=no]) 3432 AC_CHECK_FUNC(dbm_open, with_database_gnudbm=yes)
3582 fi 3433 fi
3583 3434 if test "$with_database_gnudbm" = "yes"; then
3584 dnl Check for DBM support in libc and libdbm. 3435 AC_DEFINE(HAVE_DBM)
3436 test "$have_libgdbm" = "yes" && XE_PREPEND(-lgdbm, LIBS)
3437 with_database_dbm=no
3438 else with_database_gnudbm=no
3439 fi
3440 fi
3441
3585 if test "$with_database_dbm" != "no"; then 3442 if test "$with_database_dbm" != "no"; then
3586 AC_CHECK_FUNC(dbm_open, [with_database_dbm=yes libdbm=], [ 3443 AC_CHECK_FUNC(dbm_open, with_database_dbm=yes need_libdbm=no)
3587 AC_CHECK_LIB(dbm, dbm_open, [with_database_dbm=yes libdbm=-ldbm], [ 3444 if test "$need_libdbm" != "no"; then
3588 test "$with_database_dbm" = "yes" && \ 3445 AC_CHECK_LIB(dbm, dbm_open, with_database_dbm=yes need_libdbm=yes)
3589 XE_DIE("Required DBM support cannot be provided.") 3446 fi
3590 with_database_dbm=no])]) 3447 if test "$with_database_dbm" = "yes"; then
3591 fi 3448 AC_DEFINE(HAVE_DBM)
3592 3449 test "$need_libdbm" = "yes" && XE_PREPEND(-ldbm, LIBS)
3593 dnl Tell make about the DBM support we detected. 3450 else with_database_dbm=no
3594 if test -n "$libdbm"; then XE_PREPEND("$libdbm", LIBS); fi 3451 fi
3595 if test "$with_database_gnudbm" = "yes" -o \ 3452 fi
3596 "$with_database_dbm" = "yes"; then 3453
3597 AC_DEFINE(HAVE_DBM)
3598 fi
3599
3600 dnl Check for Berkeley DB.
3601 if test "$with_database_berkdb" != "no"; then 3454 if test "$with_database_berkdb" != "no"; then
3602 AC_MSG_CHECKING(for Berkeley db.h) 3455 AC_MSG_CHECKING(for Berkeley db.h)
3603 for path in "db/db.h" "db.h"; do 3456 for path in "db/db.h" "db.h"; do
3604 AC_TRY_COMPILE([ 3457 AC_TRY_COMPILE([#ifdef HAVE_INTTYPES_H
3605 #include <stdlib.h>
3606 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
3607 #ifdef HAVE_INTTYPES_H
3608 #define __BIT_TYPES_DEFINED__ 3458 #define __BIT_TYPES_DEFINED__
3609 #include <inttypes.h> 3459 #include <inttypes.h>
3610 typedef uint8_t u_int8_t; 3460 typedef uint8_t u_int8_t;
3611 typedef uint16_t u_int16_t; 3461 typedef uint16_t u_int16_t;
3612 typedef uint32_t u_int32_t; 3462 typedef uint32_t u_int32_t;
3613 #ifdef WE_DONT_NEED_QUADS 3463 #ifdef WE_DONT_NEED_QUADS
3614 typedef uint64_t u_int64_t; 3464 typedef uint64_t u_int64_t;
3615 #endif 3465 #endif
3616 #endif 3466 #endif
3617 #endif
3618 #include <$path> 3467 #include <$path>
3619 ],[], db_h_path="$path"; break) 3468 ],[], db_h_path="$path"; break)
3620 done 3469 done
3621 if test -z "$db_h_path" 3470 if test -z "$db_h_path"
3622 then AC_MSG_RESULT(no); with_database_berkdb=no 3471 then AC_MSG_RESULT(no); with_database_berkdb=no
3623 else AC_MSG_RESULT($db_h_path) 3472 else AC_MSG_RESULT($db_h_path)
3624 fi 3473 fi
3625 3474
3626 if test "$with_database_berkdb" != "no"; then 3475 if test "$with_database_berkdb" != "no"; then
3658 dnl Usage tracking (undocumented and likely unused option) 3507 dnl Usage tracking (undocumented and likely unused option)
3659 if test "$usage_tracking" = "yes"; then 3508 if test "$usage_tracking" = "yes"; then
3660 AC_DEFINE(USAGE_TRACKING) 3509 AC_DEFINE(USAGE_TRACKING)
3661 XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS) 3510 XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS)
3662 fi 3511 fi
3663
3664 dnl cygwin can't cope with dlfcn at the moment
3665 test -z "$with_shlib" && test "$opsys $machine" = "cygwin32 intel386" && with_shlib=no
3666 3512
3667 dnl autodetect dll support 3513 dnl autodetect dll support
3668 AC_CHECK_HEADERS(dlfcn.h, have_dlfcn=yes) 3514 AC_CHECK_HEADERS(dlfcn.h, have_dlfcn=yes)
3669 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(dl, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=dl; with_shlib=yes]) } 3515 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(dl, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=dl; with_shlib=yes]) }
3670 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, _dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) } 3516 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, _dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) }
3775 echo "creating src/gdbinit"; echo "" 3621 echo "creating src/gdbinit"; echo ""
3776 echo "source $srcdir/src/gdbinit" > src/gdbinit 3622 echo "source $srcdir/src/gdbinit" > src/gdbinit
3777 fi 3623 fi
3778 3624
3779 dnl Create top level .sbinit for Sun compilers 3625 dnl Create top level .sbinit for Sun compilers
3780 if test "$__SUNPRO_C" = "yes"; then 3626 if test "$__sunpro_c" = "yes"; then
3781 echo "creating .sbinit"; echo "" 3627 echo "creating .sbinit"; echo ""
3782 ( echo "# For use with Sun WorkShop's Source browser." 3628 ( echo "# For use with Sun WorkShop's Source browser."
3783 echo "# See sbquery(1) and sbinit(4) for more information" 3629 echo "# See sbquery(1) and sbinit(4) for more information"
3784 for dir in $MAKE_SUBDIR; do echo "import $dir"; done 3630 for dir in $MAKE_SUBDIR; do echo "import $dir"; done
3785 ) > .sbinit 3631 ) > .sbinit
3902 *\$* ) eval "LOCKDIR=$LOCKDIR" ;; 3748 *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
3903 *) break ;; 3749 *) break ;;
3904 esac 3750 esac
3905 done 3751 done
3906 AC_SUBST(LOCKDIR) 3752 AC_SUBST(LOCKDIR)
3907
3908 AC_SUBST(docdir)
3909 AC_SUBST(DOCDIR_USER_DEFINED)
3910 DOCDIR=$docdir
3911 while true; do
3912 case "$DOCDIR" in
3913 *\$* ) eval "DOCDIR=$DOCDIR" ;;
3914 *) break ;;
3915 esac
3916 done
3917 AC_SUBST(DOCDIR)
3918 3753
3919 AC_SUBST(archlibdir) 3754 AC_SUBST(archlibdir)
3920 AC_SUBST(ARCHLIBDIR_USER_DEFINED) 3755 AC_SUBST(ARCHLIBDIR_USER_DEFINED)
3921 ARCHLIBDIR=$archlibdir 3756 ARCHLIBDIR=$archlibdir
3922 while true; do 3757 while true; do
3963 if test "$with_site_lisp" = "no"; then 3798 if test "$with_site_lisp" = "no"; then
3964 AC_DEFINE(INHIBIT_SITE_LISP) 3799 AC_DEFINE(INHIBIT_SITE_LISP)
3965 fi 3800 fi
3966 3801
3967 XE_SPACE(ac_configure_args, $ac_configure_args) 3802 XE_SPACE(ac_configure_args, $ac_configure_args)
3968 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$configuration") 3803 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$canonical")
3969 AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "$ac_configure_args") 3804 AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "$ac_configure_args")
3970 AC_DEFINE_UNQUOTED(config_machfile, "$machfile") 3805 AC_DEFINE_UNQUOTED(config_machfile, "$machfile")
3971 AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile") 3806 AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile")
3972 3807
3973 dnl Following are deprecated 3808 dnl Following are deprecated
4017 fi 3852 fi
4018 echo "" 3853 echo ""
4019 echo "$0 $quoted_arguments" 3854 echo "$0 $quoted_arguments"
4020 ) > Installation 3855 ) > Installation
4021 3856
4022 if test ! -z ${emacs_beta_version} ; then 3857 xemacs_betaname=""
4023 if test -z "${emacs_is_beta}" ; then 3858 test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}"
4024 xemacs_betaname=".${emacs_beta_version}"
4025 else
4026 xemacs_betaname="-b${emacs_beta_version}"
4027 fi
4028 else
4029 xemacs_betaname=""
4030 fi
4031 3859
4032 dnl Start stdout redirection to '| tee -a Installation' 3860 dnl Start stdout redirection to '| tee -a Installation'
4033 ( 3861 (
4034 echo " 3862 echo "
4035 3863
4069 if test "$with_xpm" = yes; then 3897 if test "$with_xpm" = yes; then
4070 echo " Compiling in support for XPM images." 3898 echo " Compiling in support for XPM images."
4071 elif test "$with_x11" = yes; then 3899 elif test "$with_x11" = yes; then
4072 echo " --------------------------------------------------------------------" 3900 echo " --------------------------------------------------------------------"
4073 echo " WARNING: Compiling without XPM support." 3901 echo " WARNING: Compiling without XPM support."
4074 if test "$xpm_problem" != ""; then 3902 echo " WARNING: You should strongly considering installing XPM."
4075 echo " Reason: $xpm_problem"
4076 fi
4077 echo " WARNING: You should strongly consider installing XPM."
4078 echo " WARNING: Otherwise toolbars and other graphics will look suboptimal." 3903 echo " WARNING: Otherwise toolbars and other graphics will look suboptimal."
4079 echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
4080 echo " --------------------------------------------------------------------" 3904 echo " --------------------------------------------------------------------"
4081 fi 3905 fi
4082 if test "$with_png" = yes; then
4083 echo " Compiling in support for PNG image handling."
4084 elif test "$window_system" != "none"; then
4085 echo " --------------------------------------------------------------------"
4086 echo " WARNING: Compiling without PNG image support."
4087 if test "$png_problem" != ""; then
4088 echo " Reason: $png_problem"
4089 fi
4090 echo " WARNING: You should strongly consider installing the PNG libraries."
4091 echo " WARNING: Otherwise certain images and glyphs may not display."
4092 echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
4093 echo " --------------------------------------------------------------------"
4094 fi
4095 test "$with_gif" = yes && echo " Compiling in support for (builtin) GIF image handling."
4096 test "$with_jpeg" = yes && echo " Compiling in support for JPEG image handling."
4097 test "$with_tiff" = yes && echo " Compiling in support for TIFF image handling."
4098 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." 3906 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers."
3907 test "$with_gif" = yes && echo " Compiling in support for GIF image conversion."
3908 test "$with_jpeg" = yes && echo " Compiling in support for JPEG image conversion."
3909 test "$with_png" = yes && echo " Compiling in support for PNG image conversion."
3910 test "$with_tiff" = yes && echo " Compiling in support for TIFF image conversion."
4099 case "$with_sound" in 3911 case "$with_sound" in
4100 nas ) echo " Compiling in network sound (NAS) support." ;; 3912 nas ) echo " Compiling in network sound (NAS) support." ;;
4101 native ) echo " Compiling in native sound support." ;; 3913 native ) echo " Compiling in native sound support." ;;
4102 both ) echo " Compiling in both network and native sound support." ;; 3914 both ) echo " Compiling in both network and native sound support." ;;
4103 esac 3915 esac
4105 3917
4106 test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB." 3918 test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB."
4107 test "$with_database_dbm" = yes && echo " Compiling in support for DBM." 3919 test "$with_database_dbm" = yes && echo " Compiling in support for DBM."
4108 test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." 3920 test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM."
4109 3921
4110 test "$with_ldap" = yes && echo " Compiling in support for LDAP." 3922 test "$with_umich_ldap" = yes && echo " Compiling in support for LDAP (UMich libs)."
3923 test "$with_ns_ldap" = yes && echo " Compiling in support for LDAP (Netscape SDK)."
3924 test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo " Compiling in support for LDAP (Generic)."
4111 3925
4112 test "$with_ncurses" = yes && echo " Compiling in support for ncurses." 3926 test "$with_ncurses" = yes && echo " Compiling in support for ncurses."
4113 test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)." 3927 test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)."
4114 3928
4115 test "$with_mule" = yes && echo " Compiling in Mule (multi-lingual) support." 3929 test "$with_mule" = yes && echo " Compiling in Mule (multi-lingual) support."
4143 motif ) echo " Using Motif scrollbars." ;; 3957 motif ) echo " Using Motif scrollbars." ;;
4144 athena ) echo " Using Athena scrollbars." ;; 3958 athena ) echo " Using Athena scrollbars." ;;
4145 athena3d ) echo " Using Athena-3d scrollbars." ;; 3959 athena3d ) echo " Using Athena-3d scrollbars." ;;
4146 esac 3960 esac
4147 case "$with_dialogs" in 3961 case "$with_dialogs" in
4148 motif ) 3962 motif ) echo " Using Motif dialog boxes." ;;
4149 echo " Using Motif dialog boxes."
4150 if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
4151 echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3 and higher."
4152 echo " We recommend using the Athena dialog boxes instead."
4153 echo " Install libXaw and re-run configure with --with-dialogs='athena'."
4154 echo " Read the PROBLEMS file for more information."
4155 fi; fi
4156 ;;
4157 athena ) echo " Using Athena dialog boxes." ;; 3963 athena ) echo " Using Athena dialog boxes." ;;
4158 athena3d ) echo " Using Athena-3d dialog boxes." ;; 3964 athena3d ) echo " Using Athena-3d dialog boxes." ;;
4159 esac 3965 esac
4160 test "$with_shlib" = "yes" && echo " Compiling in DLL support." 3966 test "$with_shlib" = "yes" && echo " Compiling in DLL support."
4161 test "$with_clash_detection" = yes && \ 3967 test "$with_clash_detection" = yes && \