comparison configure.in @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents d883f39b8495
children 064ab7fed2e0
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
227 dnl XE_PREPEND(value, varname) 227 dnl XE_PREPEND(value, varname)
228 define([XE_PREPEND], 228 define([XE_PREPEND],
229 [[$2]="[$1] $[$2]" && dnl 229 [[$2]="[$1] $[$2]" && dnl
230 if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi]) 230 if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi])
231 231
232 dnl XE_DIE(message)
233 define([XE_DIE], [{ echo $1 >&2; exit 1; }])
234
235 dnl XE_STRIP_4TH_COMPONENT(var)
236 dnl Changes i986-pc-linux-gnu to i986-pc-linux, as God (not RMS) intended.
237 define([XE_STRIP_4TH_COMPONENT],
238 [$1=`echo "$$1" | sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'`])
232 239
233 dnl Initialize some variables set by options. 240 dnl Initialize some variables set by options.
234 dnl The variables have the same names as the options, with 241 dnl The variables have the same names as the options, with
235 dnl dashes changed to underlines. 242 dnl dashes changed to underlines.
236 243
324 dnl ----------------------------- 331 dnl -----------------------------
325 332
326 XE_APPEND(lib-src, MAKE_SUBDIR) 333 XE_APPEND(lib-src, MAKE_SUBDIR)
327 XE_APPEND(lib-src, INSTALL_ARCH_DEP_SUBDIR) 334 XE_APPEND(lib-src, INSTALL_ARCH_DEP_SUBDIR)
328 335
329 dnl run_in_place='no'
330 prefix='/usr/local' 336 prefix='/usr/local'
331 exec_prefix='${prefix}' 337 exec_prefix='${prefix}'
332 bindir='${exec_prefix}/bin' 338 bindir='${exec_prefix}/bin'
333 dnl FSF 19.29 changes to: 339 dnl FSF 19.29 changes to:
334 dnl datadir='${prefix}/share' 340 dnl datadir='${prefix}/share'
451 457
452 dnl Process the option. 458 dnl Process the option.
453 case "$opt" in 459 case "$opt" in
454 460
455 dnl Process (many) boolean options 461 dnl Process (many) boolean options
456 run_in_place | \ 462 with_site_lisp | \
457 with_site_lisp | \
458 with_x | \ 463 with_x | \
459 with_x11 | \ 464 with_x11 | \
460 with_msw | \ 465 with_msw | \
461 with_gcc | \ 466 with_gcc | \
462 with_gnu_make | \
463 dynamic | \ 467 dynamic | \
464 with_ncurses | \ 468 with_ncurses | \
465 with_dnet | \ 469 with_dnet | \
466 with_socks | \ 470 with_socks | \
467 with_dragndrop | \ 471 with_dragndrop | \
474 with_jpeg | \ 478 with_jpeg | \
475 with_png | \ 479 with_png | \
476 with_tiff | \ 480 with_tiff | \
477 with_session | \ 481 with_session | \
478 with_xmu | \ 482 with_xmu | \
483 with_purify | \
479 with_quantify | \ 484 with_quantify | \
480 with_toolbars | \ 485 with_toolbars | \
481 with_tty | \ 486 with_tty | \
482 with_xfs | \ 487 with_xfs | \
483 with_i18n3 | \ 488 with_i18n3 | \
484 with_mule | \ 489 with_mule | \
485 with_file_coding | \ 490 with_file_coding| \
486 with_canna | \ 491 with_canna | \
487 with_wnn | \ 492 with_wnn | \
488 with_wnn6 | \ 493 with_wnn6 | \
489 with_workshop | \ 494 with_workshop | \
490 with_sparcworks | \ 495 with_sparcworks | \
491 with_tooltalk | \ 496 with_tooltalk | \
492 with_ldap | \ 497 with_ldap | \
493 with_pop | \ 498 with_pop | \
494 with_kerberos | \ 499 with_kerberos | \
495 with_hesiod | \ 500 with_hesiod | \
496 with_dnet | \ 501 with_dnet | \
497 with_infodock | \ 502 with_infodock | \
498 external_widget | \ 503 external_widget | \
499 verbose | \ 504 verbose | \
500 extra_verbose | \ 505 extra_verbose | \
501 const_is_losing | \ 506 const_is_losing | \
502 usage_tracking | \ 507 usage_tracking | \
503 use_union_type | \ 508 use_union_type | \
504 debug | \ 509 debug | \
505 use_assertions | \ 510 use_assertions | \
511 gung_ho | \
506 use_minimal_tagbits | \ 512 use_minimal_tagbits | \
507 use_indexed_lrecord_implementation | \ 513 use_indexed_lrecord_implementation | \
508 gung_ho | \
509 use_assertions | \
510 memory_usage_stats | \ 514 memory_usage_stats | \
511 with_clash_detection | \ 515 with_clash_detection | \
512 with_shlib | \ 516 with_shlib | \
513 no_doc_file ) 517 no_doc_file )
514 dnl Make sure the value given was either "yes" or "no". 518 dnl Make sure the value given was either "yes" or "no".
515 case "$val" in 519 case "$val" in
516 y | ye | yes ) val=yes ;; 520 y | ye | yes ) val=yes ;;
517 n | no ) val=no ;; 521 n | no ) val=no ;;
518 * ) USAGE_ERROR("The \`--$optname' option requires a boolean value: \`yes' or \`no'.") ;; 522 * ) USAGE_ERROR("The \`--$optname' option requires a boolean value: \`yes' or \`no'.") ;;
519 esac 523 esac
520 eval "$opt=\"$val\"" ;; 524 eval "$opt=\"$val\"" ;;
521 525
522 526
523 dnl Options that take a user-supplied value, as in --puresize=8000000 527 dnl Options that take a user-supplied value, as in --puresize=8000000
524 dnl The cache-file option is ignored (for compatibility with other configures) 528 dnl The cache-file option is ignored (for compatibility with other configures)
525 srcdir | \ 529 srcdir | \
529 cppflags | \ 533 cppflags | \
530 libs | \ 534 libs | \
531 ldflags | \ 535 ldflags | \
532 puresize | \ 536 puresize | \
533 cache_file | \ 537 cache_file | \
534 native_sound_lib | \ 538 native_sound_lib| \
535 site_lisp | \ 539 site_lisp | \
536 x_includes | \ 540 x_includes | \
537 x_libraries | \ 541 x_libraries | \
538 site_includes | \ 542 site_includes | \
539 site_libraries | \ 543 site_libraries | \
577 b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; 581 b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;;
578 d | db | dbm ) with_database_dbm=yes ;; 582 d | db | dbm ) with_database_dbm=yes ;;
579 g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;; 583 g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;;
580 * ) USAGE_ERROR(["The \`--$optname' option value 584 * ) USAGE_ERROR(["The \`--$optname' option value
581 must be either \`no' or a comma-separated list 585 must be either \`no' or a comma-separated list
582 of one or more of \`berkdb', \`dbm', or \`gnudbm'."]) ;; 586 of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."]) ;;
583 esac 587 esac
584 done 588 done
585 if test "$with_database_dbm" = "yes" -a \ 589 if test "$with_database_dbm" = "yes" -a \
586 "$with_database_gnudbm" = "yes"; then 590 "$with_database_gnudbm" = "yes"; then
587 USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified 591 USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified
615 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: 619 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
616 \`motif', \`xlib', \`yes', or \`no'."]) ;; 620 \`motif', \`xlib', \`yes', or \`no'."]) ;;
617 esac 621 esac
618 eval "$opt=\"$val\"" 622 eval "$opt=\"$val\""
619 ;; 623 ;;
620
621 dnl XFontSet support?
622 "with_xfs" )
623 case "$val" in
624 y | ye | yes ) val=yes ;;
625 n | no | non | none ) val=no ;;
626 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
627 \`yes', or \`no'."]) ;;
628 esac
629 eval "$opt=\"$val\""
630 ;;
631 624
632 dnl Mail locking specification 625 dnl Mail locking specification
633 "mail_locking" ) 626 "mail_locking" )
634 case "$val" in 627 case "$val" in
635 lockf ) val=lockf ;; 628 lockf ) val=lockf ;;
697 dnl installed in odd places. 690 dnl installed in odd places.
698 691
699 dnl Has the user specified one of the path options? 692 dnl Has the user specified one of the path options?
700 prefix | exec_prefix | bindir | datadir | statedir | libdir | \ 693 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
701 mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \ 694 mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
702 archlibdir | docdir | package_path ) 695 archlibdir | docdir | package_path )
703 dnl If the value was omitted, get it from the next argument. 696 dnl If the value was omitted, get it from the next argument.
704 if test "$valomitted" = "yes"; then 697 if test "$valomitted" = "yes"; then
705 if test "$#" = 0; then 698 if test "$#" = 0; then
706 USAGE_ERROR("The \`--$optname' option requires a value."); 699 USAGE_ERROR("The \`--$optname' option requires a value.");
707 fi 700 fi
731 "no_create" ) ;; 724 "no_create" ) ;;
732 725
733 dnl Has the user asked for some help? 726 dnl Has the user asked for some help?
734 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;; 727 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
735 728
736 dnl Has the user specified what toolkit to use for the menubars, 729 dnl Has the user specified the toolkit(s) to use for GUI elements?
737 dnl scrollbar or dialogs? 730 "with_menubars" | \
738 "with_menubars" | "with_scrollbars" | "with_dialogs" ) 731 "with_scrollbars" | \
732 "with_dialogs" )
739 case "$val" in 733 case "$val" in
740 l | lu | luc | luci | lucid ) val=lucid ;; 734 l | lu | luc | luci | lucid ) val=lucid ;;
741 m | mo | mot | moti | motif ) val=motif ;; 735 m | mo | mot | moti | motif ) val=motif ;;
742 athena3d | athena-3d ) val=athena3d ;; 736 athena3d | athena-3d ) val=athena3d ;;
743 a | at | ath | athe | athen | athena ) val=athena ;; 737 a | at | ath | athe | athen | athena ) val=athena ;;
746 \`lucid', \`motif', \`athena', \`athena3d', or \`no'."]) ;; 740 \`lucid', \`motif', \`athena', \`athena3d', or \`no'."]) ;;
747 esac 741 esac
748 eval "$opt=\"$val\"" 742 eval "$opt=\"$val\""
749 ;; 743 ;;
750 744
751 dnl Fail on unrecognized arguments. 745 dnl Obsolete legacy argument? Warn, but otherwise ignore.
746 "run_in_place" | \
747 "with_gnu_make" )
748 AC_MSG_WARN([Obsolete option \`--$optname' ignored.])
749 ;;
750
751 dnl Unrecognized option? No mercy for user errors.
752 * ) USAGE_ERROR("Unrecognized option: $arg") ;; 752 * ) USAGE_ERROR("Unrecognized option: $arg") ;;
753 753
754 esac 754 esac
755 ;; 755 ;;
756 756
757 dnl Assume anything with multiple hyphens is a configuration name. 757 dnl Assume anything with multiple hyphens is a configuration name.
758 *-*-*) configuration="$arg" ;; 758 *-*-*) configuration="$arg" ;;
759 759
760 dnl Anything else is an error 760 dnl Unrecognized argument? No mercy for user errors.
761 *) USAGE_ERROR("Unrecognized argument: $arg") ;; 761 *) USAGE_ERROR("Unrecognized argument: $arg") ;;
762 762
763 esac 763 esac
764 done 764 done
765 765
777 eval set x "$quoted_arguments"; shift 777 eval set x "$quoted_arguments"; shift
778 778
779 dnl --extra-verbose implies --verbose 779 dnl --extra-verbose implies --verbose
780 test "$extra_verbose" = "yes" && verbose=yes 780 test "$extra_verbose" = "yes" && verbose=yes
781 781
782 dnl Allow use of either ":" or spaces for lists of directories
783 define(COLON_TO_SPACE,
784 [case "$[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's/^ //' -e 's/:/ /g'`";; esac])dnl
785 COLON_TO_SPACE(site_includes)
786 COLON_TO_SPACE(site_libraries)
787 COLON_TO_SPACE(site_prefixes)
788 COLON_TO_SPACE(site_runtime_libraries)
789
790 dnl with_x is an obsolete synonym for with_x11 782 dnl with_x is an obsolete synonym for with_x11
791 test -n "$with_x" && with_x11="$with_x" 783 test -n "$with_x" && with_x11="$with_x"
792 784
785 dnl --with-quantify or --with-purify imply --use-system-malloc
786 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
787 test "$with_system_malloc" = "default" && with_system_malloc=yes
788 fi
789
793 dnl --gung-ho=val is a synonym for 790 dnl --gung-ho=val is a synonym for
794 dnl --use-minimal-tagbits=val --use-indexed-lrecord-implementation=val 791 dnl --use-minimal-tagbits=val --use-indexed-lrecord-implementation=val
795
796 if test -n "$gung_ho"; then 792 if test -n "$gung_ho"; then
797 test -z "$use_minimal_tagbits" && use_minimal_tagbits="$gung_ho" 793 test -z "$use_minimal_tagbits" && use_minimal_tagbits="$gung_ho"
798 test -z "$use_indexed_lrecord_implementation" && \ 794 test -z "$use_indexed_lrecord_implementation" && \
799 use_indexed_lrecord_implementation="$gung_ho" 795 use_indexed_lrecord_implementation="$gung_ho"
800 fi 796 fi
813 fi 809 fi
814 ]) 810 ])
815 811
816 dnl CDE requires tooltalk 812 dnl CDE requires tooltalk
817 XE_CHECK_FEATURE_DEPENDENCY(cde, tooltalk) 813 XE_CHECK_FEATURE_DEPENDENCY(cde, tooltalk)
818
819 dnl Ignore useless run-in-place flag
820 if test "$run_in_place" = "yes"; then
821 AC_MSG_WARN("The --run-in-place option is ignored because it is unnecessary.")
822 fi
823 814
824 dnl Find the source directory. 815 dnl Find the source directory.
825 case "$srcdir" in 816 case "$srcdir" in
826 817
827 dnl If srcdir is not specified, see if "." or ".." might work. 818 dnl If srcdir is not specified, see if "." or ".." might work.
854 ;; 845 ;;
855 esac 846 esac
856 847
857 dnl ########################################################################### 848 dnl ###########################################################################
858 if test -z "$configuration"; then 849 if test -z "$configuration"; then
859 AC_MSG_CHECKING("host system type") 850 dnl Guess the configuration
860 dnl Guess the configuration and remove 4th name component, if present. 851 configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
861 if configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess | \ 852 if test -z "$configuration"; then
862 sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'` ; then
863 AC_MSG_RESULT($configuration)
864 else
865 AC_MSG_RESULT(unknown)
866 USAGE_ERROR(["XEmacs has not been ported to this host type. 853 USAGE_ERROR(["XEmacs has not been ported to this host type.
867 Try explicitly specifying the CONFIGURATION when rerunning configure."]) 854 Try explicitly specifying the CONFIGURATION when rerunning configure."])
868 fi 855 fi
869 fi 856 fi
870 857
983 dnl ------------------------------ 970 dnl ------------------------------
984 dnl Given the configuration name, set machfile and opsysfile to the 971 dnl Given the configuration name, set machfile and opsysfile to the
985 dnl names of the m/*.h and s/*.h files we should use. 972 dnl names of the m/*.h and s/*.h files we should use.
986 973
987 dnl Canonicalize the configuration name. 974 dnl Canonicalize the configuration name.
988 AC_CHECKING("the configuration name") 975 AC_MSG_CHECKING("host system type")
989 dnl allow -workshop suffix on configuration name 976 dnl allow -workshop suffix on configuration name
990 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` 977 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
991 if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else 978 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
992 exit $? 979 XE_STRIP_4TH_COMPONENT(configuration)
993 fi 980 XE_STRIP_4TH_COMPONENT(canonical)
981 AC_MSG_RESULT($configuration)
994 982
995 dnl If you add support for a new configuration, add code to this 983 dnl If you add support for a new configuration, add code to this
996 dnl switch statement to recognize your configuration name and select 984 dnl switch statement to recognize your configuration name and select
997 dnl the appropriate operating system and machine description files. 985 dnl the appropriate operating system and machine description files.
998 986
1031 hppa-*-* ) machine=hp800 ;; 1019 hppa-*-* ) machine=hp800 ;;
1032 m88k-dg-* ) machine=aviion ;; 1020 m88k-dg-* ) machine=aviion ;;
1033 m68*-sony-* ) machine=news ;; 1021 m68*-sony-* ) machine=news ;;
1034 mips-sony-* ) machine=news-risc ;; 1022 mips-sony-* ) machine=news-risc ;;
1035 clipper-* ) machine=clipper ;; 1023 clipper-* ) machine=clipper ;;
1024 arm-* ) machine=arm ;;
1025 ns32k-* ) machine=ns32000 ;;
1036 esac 1026 esac
1037 1027
1038 dnl Straightforward OS determination 1028 dnl Straightforward OS determination
1039 case "$canonical" in 1029 case "$canonical" in
1040 *-*-linux* ) opsys=linux ;; 1030 *-*-linux* ) opsys=linux ;;
1101 ;; 1091 ;;
1102 1092
1103 dnl OpenBSD ports 1093 dnl OpenBSD ports
1104 *-*-openbsd* ) 1094 *-*-openbsd* )
1105 case "${canonical}" in 1095 case "${canonical}" in
1106 alpha*-*-openbsd*) machine=alpha ;;
1107 i386-*-openbsd*) machine=intel386 ;; 1096 i386-*-openbsd*) machine=intel386 ;;
1108 m68k-*-openbsd*) machine=hp9000s300 ;; 1097 m68k-*-openbsd*) machine=hp9000s300 ;;
1109 mipsel-*-openbsd*) machine=pmax ;; 1098 mipsel-*-openbsd*) machine=pmax ;;
1110 ns32k-*-openbsd*) machine=ns32000 ;;
1111 sparc-*-openbsd*) machine=sparc ;;
1112 vax-*-openbsd*) machine=vax ;;
1113 esac 1099 esac
1114 ;; 1100 ;;
1115 1101
1116 dnl Acorn RISCiX: 1102 dnl Acorn RISCiX:
1117 arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;; 1103 arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1487 ;; 1473 ;;
1488 1474
1489 dnl Linux/68k 1475 dnl Linux/68k
1490 m68k-*-linux* ) machine=m68k opsys=linux ;; 1476 m68k-*-linux* ) machine=m68k opsys=linux ;;
1491 1477
1492 dnl Linux/arm
1493 arm-*-linux* ) machine=arm opsys=linux ;;
1494
1495 esac 1478 esac
1496 1479
1497 if test -z "$machine" -o -z "$opsys"; then 1480 if test -z "$machine" -o -z "$opsys"; then
1498 (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems." 1481 (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1499 echo "$progname: Check \`etc/MACHINES' for recognized configuration names." 1482 echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1726 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf) 1709 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf)
1727 EOF 1710 EOF
1728 1711
1729 dnl The value of CPP is a quoted variable reference, so we need to do this 1712 dnl The value of CPP is a quoted variable reference, so we need to do this
1730 dnl to get its actual value... 1713 dnl to get its actual value...
1731 CPP=`eval "echo $CPP"` 1714 CPP=`eval "echo $CPP $CPPFLAGS"`
1732 define(TAB, [ ])dnl 1715 define(TAB, [ ])dnl
1733 changequote(, )dnl 1716 changequote(, )dnl
1734 eval `$CPP -Isrc $tempcname \ 1717 eval `$CPP -Isrc $tempcname \
1735 | sed -n -e "s/[ TAB]*=[ TAB\"]*/='/" -e "s/[ TAB\"]*\$/'/" -e "s/^configure___//p"` 1718 | sed -n -e "s/[ TAB]*=[ TAB\"]*/='/" -e "s/[ TAB\"]*\$/'/" -e "s/^configure___//p"`
1736 changequote([, ])dnl 1719 changequote([, ])dnl
1785 define([XE_PROTECT_LINKER_FLAGS], [ 1768 define([XE_PROTECT_LINKER_FLAGS], [
1786 if test "$GCC" = "yes"; then 1769 if test "$GCC" = "yes"; then
1787 set x $[$1]; shift; [$1]="" 1770 set x $[$1]; shift; [$1]=""
1788 while test -n "[$]1"; do 1771 while test -n "[$]1"; do
1789 case [$]1 in 1772 case [$]1 in
1790 -L | -l | -u ) [$1]="$[$1] [$]1 [$]2"; shift ;; 1773 -L | -l | -u ) [$1]="$[$1] [$]1 [$]2"; shift ;;
1791 -L* | -l* | -u* | -Wl* ) [$1]="$[$1] [$]1" ;; 1774 -L* | -l* | -u* | -Wl* | -pg ) [$1]="$[$1] [$]1" ;;
1792 -Xlinker* ) ;; 1775 -Xlinker* ) ;;
1793 * ) [$1]="$[$1] -Xlinker [$]1" ;; 1776 * ) [$1]="$[$1] -Xlinker [$]1" ;;
1794 esac 1777 esac
1795 shift 1778 shift
1796 done 1779 done
1858 1841
1859 dnl --------------------------------------------------------------- 1842 dnl ---------------------------------------------------------------
1860 dnl Add site and system specific flags to compile and link commands 1843 dnl Add site and system specific flags to compile and link commands
1861 dnl --------------------------------------------------------------- 1844 dnl ---------------------------------------------------------------
1862 1845
1863 dnl All dirs present in site-prefixes will be searched for include/ and lib/ 1846 dnl Allow use of either ":" or spaces for lists of directories
1864 dnl subdirs. This can avoid specifying both site-includes and site-libraries. 1847 define(COLON_TO_SPACE,
1865 dnl Those dirs will take precedence over the standard places, but not over 1848 [case "$[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's/^ //' -e 's/:/ /g'`";; esac])dnl
1866 dnl site-includes and site-libraries.
1867
1868 dnl --site-prefixes (multiple dirs)
1869 if test -n "$site_prefixes"; then
1870 for arg in $site_prefixes; do
1871 case "$arg" in
1872 -* ) ;;
1873 * ) argi="-I${arg}/include" ; argl="-L${arg}/lib" ;;
1874 esac
1875 XE_APPEND($argi, c_switch_site)
1876 XE_APPEND($argl, ld_switch_site)
1877 done
1878 fi
1879 1849
1880 dnl --site-libraries (multiple dirs) 1850 dnl --site-libraries (multiple dirs)
1851 COLON_TO_SPACE(site_libraries)
1881 if test -n "$site_libraries"; then 1852 if test -n "$site_libraries"; then
1882 for arg in $site_libraries; do 1853 for arg in $site_libraries; do
1883 case "$arg" in -* ) ;; * ) arg="-L${arg}" ;; esac 1854 case "$arg" in
1855 -* ) ;;
1856 * ) test -d "$arg" || \
1857 XE_DIE("Invalid site library \`$arg': no such directory")
1858 arg="-L${arg}" ;;
1859 esac
1884 XE_APPEND($arg, ld_switch_site) 1860 XE_APPEND($arg, ld_switch_site)
1885 done 1861 done
1886 fi 1862 fi
1887 1863
1888 dnl --site-includes (multiple dirs) 1864 dnl --site-includes (multiple dirs)
1865 COLON_TO_SPACE(site_includes)
1889 if test -n "$site_includes"; then 1866 if test -n "$site_includes"; then
1890 for arg in $site_includes; do 1867 for arg in $site_includes; do
1891 case "$arg" in -* ) ;; * ) arg="-I${arg}" ;; esac 1868 case "$arg" in
1869 -* ) ;;
1870 * ) test -d "$arg" || \
1871 XE_DIE("Invalid site include \`$arg': no such directory")
1872 arg="-I${arg}" ;;
1873 esac
1892 XE_APPEND($arg, c_switch_site) 1874 XE_APPEND($arg, c_switch_site)
1875 done
1876 fi
1877
1878 dnl --site-prefixes (multiple dirs)
1879 dnl --site-prefixes=dir1:dir2 is a convenient shorthand for
1880 dnl --site-libraries=dir1/lib:dir2/lib --site-includes=dir1/include:dir2/include
1881 dnl Site prefixes take precedence over the standard places, but not over
1882 dnl site-includes and site-libraries.
1883 COLON_TO_SPACE(site_prefixes)
1884 if test -n "$site_prefixes"; then
1885 for dir in $site_prefixes; do
1886 inc_dir="${dir}/include"
1887 lib_dir="${dir}/lib"
1888 if test ! -d "$dir"; then
1889 XE_DIE("Invalid site prefix \`$dir': no such directory")
1890 elif test ! -d "$inc_dir"; then
1891 XE_DIE("Invalid site prefix \`$dir': no such directory \`$inc_dir'")
1892 elif test ! -d "$lib_dir"; then
1893 XE_DIE("Invalid site prefix \`$dir': no such directory \`$lib_dir'")
1894 else
1895 XE_APPEND("-I$inc_dir", c_switch_site)
1896 XE_APPEND("-L$lib_dir", ld_switch_site)
1897 fi
1893 done 1898 done
1894 fi 1899 fi
1895 1900
1896 dnl GNU software installs by default into /usr/local/{include,lib} 1901 dnl GNU software installs by default into /usr/local/{include,lib}
1897 dnl if test -d "/usr/local/include" -a -d "/usr/local/lib"; then 1902 dnl if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
1903 for dir in "/usr/ccs/lib"; do 1908 for dir in "/usr/ccs/lib"; do
1904 test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site) 1909 test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site)
1905 done 1910 done
1906 1911
1907 dnl --site-runtime-libraries (multiple dirs) 1912 dnl --site-runtime-libraries (multiple dirs)
1913 COLON_TO_SPACE(site_runtime_libraries)
1908 if test -n "$site_runtime_libraries"; then 1914 if test -n "$site_runtime_libraries"; then
1909 LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/ */:/g'`" 1915 LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/ */:/g'`"
1910 export LD_RUN_PATH 1916 export LD_RUN_PATH
1911 fi 1917 fi
1912 1918
2090 AC_PROG_YACC 2096 AC_PROG_YACC
2091 2097
2092 dnl checks for header files 2098 dnl checks for header files
2093 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) 2099 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h)
2094 AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h) 2100 AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h)
2095 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h) 2101 AC_CHECK_HEADERS(kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h)
2096 AC_HEADER_SYS_WAIT 2102 AC_HEADER_SYS_WAIT
2097 AC_HEADER_STDC 2103 AC_HEADER_STDC
2098 AC_HEADER_TIME 2104 AC_HEADER_TIME
2099 AC_DECL_SYS_SIGLIST 2105 AC_DECL_SYS_SIGLIST
2100 2106
2462 test "$with_toolbars" != "no" && with_toolbars=msw \ 2468 test "$with_toolbars" != "no" && with_toolbars=msw \
2463 && XE_ADD_OBJS(toolbar-msw.o) 2469 && XE_ADD_OBJS(toolbar-msw.o)
2464 test "$with_dialogs" != "no" && with_dialogs=msw \ 2470 test "$with_dialogs" != "no" && with_dialogs=msw \
2465 && XE_ADD_OBJS(dialog-msw.o) 2471 && XE_ADD_OBJS(dialog-msw.o)
2466 else 2472 else
2467 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o) 2473 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o)
2468 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o) 2474 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o)
2469 test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-msw.o) 2475 test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-msw.o)
2470 test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-msw.o) 2476 test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-msw.o)
2471 fi 2477 fi
2472 dnl check for our special version of select 2478 dnl check for our special version of select
2473 AC_TRY_RUN([#include <fcntl.h> 2479 AC_TRY_RUN([#include <fcntl.h>
2474 int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }], 2480 int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }],
2475 [AC_DEFINE(HAVE_MSG_SELECT)]) 2481 [AC_DEFINE(HAVE_MSG_SELECT)])
2476 const_is_losing=no 2482 const_is_losing=no
2477 with_file_coding=yes 2483 with_file_coding=yes
2615 with_tooltalk=yes # CDE requires Tooltalk 2621 with_tooltalk=yes # CDE requires Tooltalk
2616 need_motif=yes # CDE requires Motif 2622 need_motif=yes # CDE requires Motif
2617 fi 2623 fi
2618 2624
2619 dnl Always compile OffiX unless --without-offix is given, no 2625 dnl Always compile OffiX unless --without-offix is given, no
2620 dnl X11 support is compiled in, no standard Xmu is avaiable, 2626 dnl X11 support is compiled in, no standard Xmu is available,
2621 dnl or dragndrop support is disabled 2627 dnl or dragndrop support is disabled
2622 dnl Because OffiX support currently loses when more than one display 2628 dnl Because OffiX support currently loses when more than one display
2623 dnl is in use, we now disable it by default -slb 07/10/1998. 2629 dnl is in use, we now disable it by default -slb 07/10/1998.
2624 test "$window_system" != "x11" && with_offix=no 2630 test "$window_system" != "x11" && with_offix=no
2625 if test "$with_xmu" != yes -a "$with_x11" = yes; then 2631 if test "$with_xmu" != yes -a "$with_x11" = yes; then
3388 case "$with_sound" in both | nas ) 3394 case "$with_sound" in both | nas )
3389 AC_DEFINE(HAVE_NAS_SOUND) 3395 AC_DEFINE(HAVE_NAS_SOUND)
3390 XE_ADD_OBJS(nas.o) 3396 XE_ADD_OBJS(nas.o)
3391 XE_PREPEND(-laudio, libs_x) 3397 XE_PREPEND(-laudio, libs_x)
3392 dnl If the nas library does not contain the error jump point, 3398 dnl If the nas library does not contain the error jump point,
3393 dnl then we force safer behaviour. 3399 dnl then we force safer behavior.
3394 AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)]) 3400 AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)])
3395 esac 3401 esac
3396 3402
3397 dnl --------------------- 3403 dnl ---------------------
3398 dnl TTY-dependent options 3404 dnl TTY-dependent options
3650 XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general) 3656 XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general)
3651 3657
3652 dnl Compute lists of Makefiles and subdirs 3658 dnl Compute lists of Makefiles and subdirs
3653 AC_SUBST(SRC_SUBDIR_DEPS) 3659 AC_SUBST(SRC_SUBDIR_DEPS)
3654 XE_APPEND(src, MAKE_SUBDIR) 3660 XE_APPEND(src, MAKE_SUBDIR)
3655 internal_makefile_list="Makefile" 3661 internal_makefile_list="Makefile.in"
3656 SUBDIR_MAKEFILES='' 3662 SUBDIR_MAKEFILES=''
3657 test -d lock || mkdir lock 3663 test -d lock || mkdir lock
3658 for dir in $MAKE_SUBDIR; do 3664 for dir in $MAKE_SUBDIR; do
3659 case "$dir" in */* ) dnl Implement mkdir -p 3665 case "$dir" in */* ) dnl Implement mkdir -p
3660 ( for d in `echo $dir | sed 's:/: :g'` ; do 3666 ( for d in `echo $dir | sed 's:/: :g'` ; do
3862 AC_SUBST(native_sound_lib) 3868 AC_SUBST(native_sound_lib)
3863 AC_SUBST(sound_cflags) 3869 AC_SUBST(sound_cflags)
3864 AC_SUBST(RANLIB) 3870 AC_SUBST(RANLIB)
3865 AC_SUBST(dynodump_arch) 3871 AC_SUBST(dynodump_arch)
3866 3872
3867 # The default is yes 3873 dnl Preliminary support for using a different compiler for xemacs itself.
3874 dnl Useful for building XEmacs with a C++ or 64-bit compiler.
3875 : ${XEMACS_CC:=$CC}
3876 AC_SUBST(XEMACS_CC)
3877
3878
3879 dnl The default is yes
3868 if test "$with_site_lisp" = "no"; then 3880 if test "$with_site_lisp" = "no"; then
3869 AC_DEFINE(INHIBIT_SITE_LISP) 3881 AC_DEFINE(INHIBIT_SITE_LISP)
3870 fi 3882 fi
3871 3883
3872 XE_SPACE(ac_configure_args, $ac_configure_args) 3884 XE_SPACE(ac_configure_args, $ac_configure_args)
3898 AC_DEFINE(USE_SYSTEM_MALLOC) 3910 AC_DEFINE(USE_SYSTEM_MALLOC)
3899 fi 3911 fi
3900 test "$with_i18n3" = "yes" && AC_DEFINE(I18N3) 3912 test "$with_i18n3" = "yes" && AC_DEFINE(I18N3)
3901 test "$GCC" = "yes" && AC_DEFINE(USE_GCC) 3913 test "$GCC" = "yes" && AC_DEFINE(USE_GCC)
3902 test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET) 3914 test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET)
3903 test "$with_gnu_make" = "yes" && AC_DEFINE(USE_GNU_MAKE)
3904 test "$no_doc_file" = "yes" && AC_DEFINE(NO_DOC_FILE) 3915 test "$no_doc_file" = "yes" && AC_DEFINE(NO_DOC_FILE)
3905 dnl test "$const_is_losing" = "yes" && AC_DEFINE(CONST_IS_LOSING) 3916 dnl test "$const_is_losing" = "yes" && AC_DEFINE(CONST_IS_LOSING)
3917 test "$with_purify" = "yes" && AC_DEFINE(PURIFY)
3906 test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY) 3918 test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY)
3907 test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP) 3919 test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP)
3908 test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS) 3920 test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS)
3909 test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD) 3921 test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD)
3910 test "$use_union_type" = "yes" && AC_DEFINE(USE_UNION_TYPE) 3922 test "$use_union_type" = "yes" && AC_DEFINE(USE_UNION_TYPE)
3997 case "$with_sound" in 4009 case "$with_sound" in
3998 nas ) echo " Compiling in network sound (NAS) support." ;; 4010 nas ) echo " Compiling in network sound (NAS) support." ;;
3999 native ) echo " Compiling in native sound support." ;; 4011 native ) echo " Compiling in native sound support." ;;
4000 both ) echo " Compiling in both network and native sound support." ;; 4012 both ) echo " Compiling in both network and native sound support." ;;
4001 esac 4013 esac
4002 test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously" 4014 test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously."
4003 4015
4004 test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB." 4016 test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB."
4005 test "$with_database_dbm" = yes && echo " Compiling in support for DBM." 4017 test "$with_database_dbm" = yes && echo " Compiling in support for DBM."
4006 test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." 4018 test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM."
4007 4019
4051 esac 4063 esac
4052 test "$with_shlib" = "yes" && echo " Compiling in DLL support." 4064 test "$with_shlib" = "yes" && echo " Compiling in DLL support."
4053 test "$with_clash_detection" = yes && \ 4065 test "$with_clash_detection" = yes && \
4054 echo " Clash detection will use \"$lockdir\" for locking files." 4066 echo " Clash detection will use \"$lockdir\" for locking files."
4055 echo " movemail will use \"$mail_locking\" for locking mail spool files." 4067 echo " movemail will use \"$mail_locking\" for locking mail spool files."
4056 test "$with_pop" = yes && echo " Using POP for mail access" 4068 test "$with_pop" = yes && echo " Using POP for mail access."
4057 test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication" 4069 test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication."
4058 test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host" 4070 test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host."
4059 test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." 4071 test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects."
4060 test "$use_minimal_tagbits" = yes && echo " Using Lisp_Objects with minimal tagbits." 4072 test "$use_minimal_tagbits" = yes && echo " Using Lisp_Objects with minimal tagbits."
4061 test "$use_indexed_lrecord_implementation" = yes && echo " Using indexed lrecord implementation." 4073 test "$use_indexed_lrecord_implementation" = yes && echo " Using indexed lrecord implementation."
4062 test "$debug" = yes && echo " Compiling in extra code for debugging." 4074 test "$debug" = yes && echo " Compiling in extra code for debugging."
4063 test "$memory_usage_stats" = yes && echo " Compiling in code for checking XEmacs memory usage." 4075 test "$memory_usage_stats" = yes && echo " Compiling in code for checking XEmacs memory usage."
4081 echo '")' >> Installation.el 4093 echo '")' >> Installation.el
4082 4094
4083 dnl ----------------------------------- 4095 dnl -----------------------------------
4084 dnl Now generate config.h and Makefiles 4096 dnl Now generate config.h and Makefiles
4085 dnl ----------------------------------- 4097 dnl -----------------------------------
4086
4087 dnl This has to be called in order for this variable to get into config.status 4098 dnl This has to be called in order for this variable to get into config.status
4088 AC_SUBST(internal_makefile_list) 4099 AC_SUBST(internal_makefile_list)
4089 # Remove any trailing slashes in these variables. 4100 # Remove any trailing slashes in these variables.
4090 test -n "$prefix" && 4101 test -n "$prefix" &&
4091 prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'` 4102 prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'`
4101 ac_output_files="${ac_output_files+$ac_output_files }$file" 4112 ac_output_files="${ac_output_files+$ac_output_files }$file"
4102 done 4113 done
4103 ac_output_files="$ac_output_files src/paths.h lib-src/config.values" 4114 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
4104 4115
4105 AC_OUTPUT($ac_output_files, 4116 AC_OUTPUT($ac_output_files,
4106 [for dir in $MAKE_SUBDIR; do 4117 [for dir in . $MAKE_SUBDIR; do
4107 echo creating $dir/Makefile
4108 ( 4118 (
4109 changequote(<<, >>)dnl
4110 cd $dir 4119 cd $dir
4111 rm -f junk.c 4120 rm -f junk.c
4112 < Makefile.in \ 4121 < Makefile.in \
4113 sed -e '/^# Generated/d' \ 4122 sed -e '/^# Generated/d' \
4114 -e 's%/\*\*/#.*%%' \ 4123 -e 's%/\*\*/#.*%%' \
4115 -e 's/^ *# */#/' \ 4124 -e 's/^ *# */#/' \
4125 dnl Delete Makefile.in.in comment lines
4116 -e '/^##/d' \ 4126 -e '/^##/d' \
4127 dnl Pass through CPP directives unchanged
4117 -e '/^#/ { 4128 -e '/^#/ {
4118 p 4129 p
4119 d 4130 d
4120 }' -e '/./ { 4131 }' \
4121 s/\([\"]\)/\\\1/g 4132 dnl Quote other lines to protect from CPP substitution
4133 -e '/./ {
4134 s/\([[\"]]\)/\\\1/g
4122 s/^/"/ 4135 s/^/"/
4123 s/$/"/ 4136 s/$/"/
4124 }' > junk.c; 4137 }' > junk.c;
4125 $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp; 4138
4126 < junk.cpp \ 4139 dnl Create a GNUmakefile and Makefile from Makefile.in.
4127 sed -e 's/^#.*//' \ 4140
4128 -e 's/^[ TAB][ TAB]*$//' \ 4141 changequote(<<,>>)dnl
4129 -e 's/^ /TAB/' \ 4142 dnl CPP_MAKEFILE(CPPFLAGS,filename)
4130 | sed -n -e '/^..*$/p' \ 4143 define(<<CPP_MAKEFILE>>,
4131 | sed '/^"/ { 4144 echo creating $dir/<<$2>>
4132 s/\\\([\"]\)/\1/g 4145 $CPP -I. -I${top_srcdir}/src <<$1>> junk.c \
4133 s/^[ TAB]*"// 4146 dnl Delete line directives inserted by $CPP
4134 s/"[ TAB]*$// 4147 | sed -e 's/^\#.*//' \
4135 }' > Makefile.new 4148 dnl Delete spurious blanks inserted by $CPP
4149 -e 's/^[ TAB][ TAB]*$//'\
4150 -e 's/^ /TAB/' \
4151 dnl Delete blank lines
4152 | sed -n -e '/^..*$/p' \
4153 dnl Restore lines quoted above to original contents.
4154 | sed '/^\"/ {
4155 s/\\\([\"]\)/\1/g
4156 s/^[ TAB]*\"//
4157 s/\"[ TAB]*$//
4158 }' > Makefile.new
4136 chmod 444 Makefile.new 4159 chmod 444 Makefile.new
4137 mv -f Makefile.new Makefile 4160 mv -f Makefile.new <<$2>>
4138 rm -f junk.c junk.cpp 4161 )dnl CPP_MAKEFILE
4139 changequote([, ])dnl 4162
4140 ) 4163 CPP_MAKEFILE(,Makefile)
4164 CPP_MAKEFILE(-DUSE_GNU_MAKE,GNUmakefile)
4165 changequote([,])dnl
4166 rm -f junk.c
4167 )
4141 done 4168 done
4142 4169
4143 dnl Append AC_DEFINE information to lib-src/config.values 4170 dnl Append AC_DEFINE information to lib-src/config.values
4144 dnl (AC_SUBST information is already there (see config.values.sh). 4171 dnl (AC_SUBST information is already there (see config.values.sh).
4145 sed < config.status >> lib-src/config.values \ 4172 sed < config.status >> lib-src/config.values \
4148 -e 's/^\([[^ ]]*\) $/\1 ""/' \ 4175 -e 's/^\([[^ ]]*\) $/\1 ""/' \
4149 -e 's/ 1$/ t/' 4176 -e 's/ 1$/ t/'
4150 4177
4151 ], 4178 ],
4152 [CPP="$CPP" 4179 [CPP="$CPP"
4153 CPPFLAGS="$CPPFLAGS"
4154 top_srcdir="$srcdir" 4180 top_srcdir="$srcdir"
4155 MAKE_SUBDIR="$MAKE_SUBDIR" 4181 MAKE_SUBDIR="$MAKE_SUBDIR"
4156 ]) 4182 ])dnl