Mercurial > hg > xemacs-beta
comparison configure.in @ 157:6b37e6ddd302 r20-3b5
Import from CVS: tag r20-3b5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:40:41 +0200 |
parents | 43dd3413c7c7 |
children | 3bb7ccffb0c0 |
comparison
equal
deleted
inserted
replaced
156:60baf0b43294 | 157:6b37e6ddd302 |
---|---|
340 with_menubars='' | 340 with_menubars='' |
341 with_scrollbars='' | 341 with_scrollbars='' |
342 with_dialogs='' | 342 with_dialogs='' |
343 const_is_losing='yes' | 343 const_is_losing='yes' |
344 puresize='' | 344 puresize='' |
345 cflags='NO_CFLAGS_DEFINED' | 345 cflags='UNSPECIFIED' |
346 dynamic='' | 346 dynamic='' |
347 with_x11='' | 347 with_x11='' |
348 rel_alloc='default' | 348 rel_alloc='default' |
349 use_system_malloc='default' | 349 use_system_malloc='default' |
350 energize_version='' | 350 energize_version='' |
368 use_assertions="yes" | 368 use_assertions="yes" |
369 dnl the following is set to yes or no later. | 369 dnl the following is set to yes or no later. |
370 with_gif="" | 370 with_gif="" |
371 dnl the following is set to yes or no later. | 371 dnl the following is set to yes or no later. |
372 with_toolbars="" | 372 with_toolbars="" |
373 with_tty="" | |
373 use_union_type="no" | 374 use_union_type="no" |
374 with_dnet="" | 375 with_dnet="" |
375 | 376 |
376 dnl On Sun systems, people sometimes set up the variable CPP | 377 dnl On Sun systems, people sometimes set up the variable CPP |
377 dnl with a value that is a directory, not an executable at all. | 378 dnl with a value that is a directory, not an executable at all. |
566 If successful, $progname leaves its status in config.status. If | 567 If successful, $progname leaves its status in config.status. If |
567 unsuccessful after disturbing the status quo, it removes config.status. | 568 unsuccessful after disturbing the status quo, it removes config.status. |
568 | 569 |
569 The configure build process also used the following environment variables: | 570 The configure build process also used the following environment variables: |
570 CC C compiler to use (but configure flags take precedence) | 571 CC C compiler to use (but configure flags take precedence) |
572 CPP C preprocessor to use (such as /usr/ccs/lib/cpp or cc -E) | |
571 CFLAGS C compiler compilation flags (such as -O) | 573 CFLAGS C compiler compilation flags (such as -O) |
572 CPPFLAGS Additional compilation flags (sucha s -I) used only by the preprocessor | 574 CPPFLAGS Additional compilation flags (such as -I/foo) used only by the preprocessor |
573 LDFLAGS Additional linker flags | 575 LDFLAGS Additional linker flags (such as -L/foo) |
576 LIBS Additional libraries (such as -lfoo) | |
574 | 577 |
575 For more details on the install process, consult the INSTALL file. | 578 For more details on the install process, consult the INSTALL file. |
576 " | 579 " |
577 | 580 |
578 dnl ------------------ | 581 dnl ------------------ |
612 dnl So using an index variable does not work either. It is possible to use | 615 dnl So using an index variable does not work either. It is possible to use |
613 dnl some shell magic to make 'set x "$arguments"; shift' work portably. | 616 dnl some shell magic to make 'set x "$arguments"; shift' work portably. |
614 while test $# != 0; do | 617 while test $# != 0; do |
615 arg="$1"; shift | 618 arg="$1"; shift |
616 case "$arg" in | 619 case "$arg" in |
617 | 620 --no-create|--no-recursion) ;; |
618 dnl Anything starting with a hyphen we assume is an option. | 621 dnl Anything starting with a hyphen we assume is an option. |
619 -* ) | 622 -* ) |
620 dnl Separate the switch name from the value it is being given. | 623 dnl Separate the switch name from the value it is being given. |
621 case "$arg" in | 624 case "$arg" in |
622 -*=*) | 625 -*=*) |
705 | 708 |
706 dnl Options that take a user-supplied value, as in --puresize=8000000 | 709 dnl Options that take a user-supplied value, as in --puresize=8000000 |
707 dnl The cache-file option is ignored (for compatibility with other configures) | 710 dnl The cache-file option is ignored (for compatibility with other configures) |
708 srcdir | \ | 711 srcdir | \ |
709 compiler | \ | 712 compiler | \ |
713 cflags | \ | |
710 puresize | \ | 714 puresize | \ |
711 cache_file | \ | 715 cache_file | \ |
712 native_sound_lib | \ | 716 native_sound_lib | \ |
713 x_includes | \ | 717 x_includes | \ |
714 x_libraries | \ | 718 x_libraries | \ |
884 statedir | lockdir ) lockdir_user_defined=yes ;; | 888 statedir | lockdir ) lockdir_user_defined=yes ;; |
885 exec_prefix | libdir | archlibdir ) archlibdir_user_defined=yes ;; | 889 exec_prefix | libdir | archlibdir ) archlibdir_user_defined=yes ;; |
886 esac | 890 esac |
887 ;; | 891 ;; |
888 | 892 |
889 dnl Has the user specified values to override CFLAGS? | |
890 cflags ) | |
891 dnl If the value was omitted, get it from the next argument. | |
892 if test "$valomitted" = "yes" ; then | |
893 if test "$#" = 0; then | |
894 USAGE_ERROR("The \`--$optname' option requires a value."); | |
895 fi | |
896 val="$1"; shift | |
897 fi | |
898 eval "$opt=\"$val\"" | |
899 eval "${opt}_specified=1" | |
900 ;; | |
901 | |
902 dnl --no-create added by autoconf for use by config.status | 893 dnl --no-create added by autoconf for use by config.status |
903 "no_create" ) ;; | 894 "no_create" ) ;; |
904 | 895 |
905 dnl Has the user asked for some help? | 896 dnl Has the user asked for some help? |
906 "usage" | "help" ) echo "$usage" | ${PAGER-more}; exit 0 ;; | 897 "usage" | "help" ) echo "$usage" | ${PAGER-more}; exit 0 ;; |
1017 dnl Make symlinks for etc, lisp, and info directories while the path | 1008 dnl Make symlinks for etc, lisp, and info directories while the path |
1018 dnl is still relative. We do not symlink lock because someone may | 1009 dnl is still relative. We do not symlink lock because someone may |
1019 dnl have stuck the source on a read-only partition. Instead we | 1010 dnl have stuck the source on a read-only partition. Instead we |
1020 dnl create it as an actual directory later on if it does not already | 1011 dnl create it as an actual directory later on if it does not already |
1021 dnl exist. | 1012 dnl exist. |
1022 for dir in lisp etc man info site-lisp | 1013 for dir in lisp etc man info site-lisp; do |
1023 do | |
1024 if test ! -d "$dir" ; then | 1014 if test ! -d "$dir" ; then |
1025 echo Making symbolic link to "$srcdir/$dir" | 1015 echo Making symbolic link to "$srcdir/$dir" |
1026 ${LN_S} "$srcdir/$dir" . | 1016 ${LN_S} "$srcdir/$dir" "$dir" |
1027 fi | 1017 fi |
1028 done | 1018 done |
1029 | 1019 |
1030 dnl Make srcdir absolute, if not already. It is important to | 1020 dnl Make srcdir absolute, if not already. It is important to |
1031 dnl avoid running the path through pwd unnecessary, since pwd can | 1021 dnl avoid running the path through pwd unnecessary, since pwd can |
1223 ;; | 1213 ;; |
1224 | 1214 |
1225 dnl Cubix QBx/386 | 1215 dnl Cubix QBx/386 |
1226 i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;; | 1216 i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;; |
1227 | 1217 |
1228 dnl Cydra 5 | |
1229 cydra*-cydrome-sysv* ) machine=cydra5 opsys=usg5-3 ;; | |
1230 | |
1231 dnl Data General AViiON Machines | 1218 dnl Data General AViiON Machines |
1232 i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;; | 1219 i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;; |
1233 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;; | 1220 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;; |
1234 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;; | 1221 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;; |
1235 m88k-dg-dgux* ) opsys=dgux ;; | 1222 m88k-dg-dgux* ) opsys=dgux ;; |
1246 m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;; | 1233 m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;; |
1247 | 1234 |
1248 dnl Dual machines | 1235 dnl Dual machines |
1249 m68*-dual-sysv* ) machine=dual opsys=usg5-2 ;; | 1236 m68*-dual-sysv* ) machine=dual opsys=usg5-2 ;; |
1250 m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;; | 1237 m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;; |
1251 | |
1252 dnl Elxsi 6400 | |
1253 elxsi-elxsi-sysv* ) machine=elxsi opsys=usg5-2 ;; | |
1254 | 1238 |
1255 dnl Encore machines | 1239 dnl Encore machines |
1256 ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;; | 1240 ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;; |
1257 | 1241 |
1258 dnl Gould Power Node and NP1 | 1242 dnl Gould Power Node and NP1 |
1434 dnl Make $canonical even more so. | 1418 dnl Make $canonical even more so. |
1435 case "$canonical" in *-sunos5*) | 1419 case "$canonical" in *-sunos5*) |
1436 canonical="`echo \"$canonical\" | sed -e s/sunos5/solaris2/`";; | 1420 canonical="`echo \"$canonical\" | sed -e s/sunos5/solaris2/`";; |
1437 esac | 1421 esac |
1438 | 1422 |
1439 dnl On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib | 1423 dnl On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib |
1440 dnl On SunOS 5, use /usr/ccs/lib/cpp, need dynodump, RANLIB not needed | 1424 dnl On SunOS 5, use cc -E, need dynodump, RANLIB not needed |
1441 dnl But, SunOS 5.6 no longer needs dynodump because it has a similar | 1425 dnl But, SunOS 5.6 no longer needs dynodump because it has a similar |
1442 dnl function integrated. | 1426 dnl function integrated. |
1443 case "$canonical" in | 1427 case "$canonical" in |
1444 *-sunos4* ) | 1428 *-sunos4* ) |
1445 test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;; | 1429 #test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;; |
1430 : ;; | |
1446 *-solaris2* ) | 1431 *-solaris2* ) |
1447 test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp | 1432 #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp |
1448 RANLIB=':' | 1433 RANLIB=':' ;; |
1449 esac | 1434 esac |
1450 | 1435 |
1451 case "$canonical" in | 1436 case "$canonical" in |
1452 dnl The last Sun386 ran 4.0. | 1437 dnl The last Sun386 ran 4.0. |
1453 i[[3-9]]86-*-sunos4*) opsys=sunos4-0 ;; | 1438 i[[3-9]]86-*-sunos4*) opsys=sunos4-0 ;; |
1599 fi | 1584 fi |
1600 | 1585 |
1601 dnl Choose a compiler. | 1586 dnl Choose a compiler. |
1602 test -n "$CC" && cc_specified=yes | 1587 test -n "$CC" && cc_specified=yes |
1603 | 1588 |
1604 dnl Save the value of CFLAGS that the user specified. | |
1605 SPECIFIED_CFLAGS="$CFLAGS" | |
1606 | |
1607 if test -n "$compiler"; then CC="$compiler"; fi | 1589 if test -n "$compiler"; then CC="$compiler"; fi |
1590 | |
1591 dnl If we don't set CFLAGS here, AC_PROG_CC will set it. | |
1592 dnl But we know better what's good for us, so we do our own | |
1593 dnl computation of real CFLAGS later. | |
1594 test "$cflags" != "UNSPECIFIED" && CFLAGS="$cflags" | |
1595 xe_save_CFLAGS="$CFLAGS" | |
1608 | 1596 |
1609 dnl Some systems specify a CPP or CC to use unless we are using GCC. | 1597 dnl Some systems specify a CPP or CC to use unless we are using GCC. |
1610 test -n "$NON_GNU_CC" -a "$with_gcc" = "no" -a -z "$CC" && CC="$NON_GNU_CC" | 1598 test -n "$NON_GNU_CC" -a "$with_gcc" = "no" -a -z "$CC" && CC="$NON_GNU_CC" |
1611 AC_PROG_CC | 1599 AC_PROG_CC |
1612 | 1600 |
1615 AC_PROG_CC | 1603 AC_PROG_CC |
1616 elif test "$with_gcc" = "yes" -a "$ac_cv_prog_gcc" = "no" ; then | 1604 elif test "$with_gcc" = "yes" -a "$ac_cv_prog_gcc" = "no" ; then |
1617 CC=gcc | 1605 CC=gcc |
1618 AC_PROG_CC | 1606 AC_PROG_CC |
1619 fi | 1607 fi |
1608 CFLAGS="$xe_save_CFLAGS" | |
1620 | 1609 |
1621 if test "$GCC" = "yes"; then with_gcc=yes; else with_gcc=no; fi | 1610 if test "$GCC" = "yes"; then with_gcc=yes; else with_gcc=no; fi |
1622 test -n "$NON_GNU_CPP" -a "$with_gcc" = "no" -a -z "$CPP" && CPP="$NON_GNU_CPP" | 1611 test -n "$NON_GNU_CPP" -a "$with_gcc" = "no" -a -z "$CPP" && CPP="$NON_GNU_CPP" |
1623 | 1612 |
1624 AC_PROG_CPP | 1613 AC_PROG_CPP |
1625 | 1614 |
1626 case "$canonical" in | 1615 AC_AIX |
1627 *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;; | 1616 |
1628 esac | 1617 AC_MSG_CHECKING(whether we are using SunPro C) |
1618 AC_TRY_COMPILE([],[#ifndef __SUNPRO_C | |
1619 #error Not a SunPro compiler :-( | |
1620 #endif | |
1621 ], __sunpro_c=yes, __sunpro_c=no) | |
1622 AC_MSG_RESULT($__sunpro_c) | |
1623 | |
1624 dnl case "$canonical" in | |
1625 dnl *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;; | |
1626 dnl esac | |
1629 | 1627 |
1630 dnl -------------------------------------------------------------------- | 1628 dnl -------------------------------------------------------------------- |
1631 dnl Extract some information from the operating system and machine files | 1629 dnl Extract some information from the operating system and machine files |
1632 dnl -------------------------------------------------------------------- | 1630 dnl -------------------------------------------------------------------- |
1633 | 1631 |
1634 echo "Extracting information from the machine- and system-dependent headers..." | 1632 echo "Extracting information from the machine- and system-dependent headers..." |
1635 | |
1636 dnl First figure out CFLAGS (which we use for running the compiler here) | |
1637 dnl and REAL_CFLAGS (which we use for real compilation). | |
1638 dnl The two are the same except on a few systems, where they are made | |
1639 dnl different to work around various lossages. For example, | |
1640 dnl GCC 2.5 on Linux needs them to be different because it treats -g | |
1641 dnl as implying static linking. | |
1642 | |
1643 dnl If the CFLAGS env var is specified, we use that value | |
1644 dnl instead of the default. | |
1645 | 1633 |
1646 dnl It is not important that this name contain the PID; you cannot run | 1634 dnl It is not important that this name contain the PID; you cannot run |
1647 dnl two configures in the same directory and have anything work | 1635 dnl two configures in the same directory and have anything work |
1648 dnl anyway. | 1636 dnl anyway. |
1649 tempcname="conftest.c" | 1637 tempcname="conftest.c" |
1650 | 1638 |
1651 dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE) | 1639 dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE) |
1652 define([CPP_to_sh], | 1640 define([CPP_to_sh], |
1653 [[#]ifndef [$1] | 1641 [[#]ifndef [$1] |
1654 [#]define [$1]ifelse([$3],,, [ $3]) | 1642 [#]define [$1]ifelse([$3],,, [ "$3"]) |
1655 [#]endif | 1643 [#]endif |
1656 configure___ [$2]=[$1] | 1644 configure___ [$2]=[$1] |
1657 ]) | 1645 ]) |
1658 | 1646 |
1659 dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR) | 1647 dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR) |
1678 | 1666 |
1679 CPP_to_sh(LIBS_MACHINE, libs_machine) | 1667 CPP_to_sh(LIBS_MACHINE, libs_machine) |
1680 CPP_to_sh(LIBS_SYSTEM, libs_system) | 1668 CPP_to_sh(LIBS_SYSTEM, libs_system) |
1681 CPP_to_sh(LIBS_TERMCAP, libs_termcap) | 1669 CPP_to_sh(LIBS_TERMCAP, libs_termcap) |
1682 CPP_to_sh(LIB_STANDARD, libs_standard) | 1670 CPP_to_sh(LIB_STANDARD, libs_standard) |
1671 | |
1672 CPP_to_sh(C_SWITCH_MACHINE, c_switch_machine) | |
1683 CPP_to_sh(C_SWITCH_SYSTEM, c_switch_system) | 1673 CPP_to_sh(C_SWITCH_SYSTEM, c_switch_system) |
1684 CPP_to_sh(C_SWITCH_MACHINE, c_switch_machine) | |
1685 CPP_to_sh(C_SWITCH_X_SYSTEM, c_switch_x_system) | 1674 CPP_to_sh(C_SWITCH_X_SYSTEM, c_switch_x_system) |
1675 | |
1676 CPP_to_sh(LD_SWITCH_MACHINE, ld_switch_machine) | |
1677 CPP_to_sh(LD_SWITCH_SYSTEM, ld_switch_system) | |
1686 CPP_to_sh(LD_SWITCH_X_SYSTEM, ld_switch_x_system) | 1678 CPP_to_sh(LD_SWITCH_X_SYSTEM, ld_switch_x_system) |
1687 CPP_to_sh(LD_SWITCH_SYSTEM, ld_switch_system) | 1679 |
1688 CPP_to_sh(UNEXEC, unexec, unexec.o) | 1680 CPP_to_sh(UNEXEC, unexec, unexec.o) |
1689 CPP_to_sh(C_DEBUG_SWITCH, c_debug_switch, -g) | |
1690 CPP_to_sh(C_OPTIMIZE_SWITCH, c_optimize_switch, -O) | |
1691 | 1681 |
1692 CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link) | 1682 CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link) |
1693 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc) | 1683 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc) |
1694 CPP_boolean_to_sh(TERMINFO, have_terminfo) | 1684 CPP_boolean_to_sh(TERMINFO, have_terminfo) |
1695 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock) | 1685 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock) |
1696 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf) | 1686 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf) |
1697 | 1687 |
1688 #if 0 | |
1698 #ifdef THIS_IS_CONFIGURE | 1689 #ifdef THIS_IS_CONFIGURE |
1699 | 1690 |
1700 /* Get the CFLAGS for tests in configure. */ | 1691 /* Get the CFLAGS for tests in configure. */ |
1692 CPP_to_sh(C_DEBUG_SWITCH, c_debug_switch, -g) | |
1693 CPP_to_sh(C_OPTIMIZE_SWITCH, c_optimize_switch, -O) | |
1701 #ifdef __GNUC__ | 1694 #ifdef __GNUC__ |
1702 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '$SPECIFIED_CFLAGS' | 1695 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '$SPECIFIED_CFLAGS' |
1703 #else | 1696 #else |
1704 configure___ CFLAGS=C_DEBUG_SWITCH '$SPECIFIED_CFLAGS' | 1697 configure___ CFLAGS=C_DEBUG_SWITCH '$SPECIFIED_CFLAGS' |
1705 #endif | 1698 #endif |
1712 #else | 1705 #else |
1713 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '$SPECIFIED_CFLAGS' | 1706 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '$SPECIFIED_CFLAGS' |
1714 #endif | 1707 #endif |
1715 | 1708 |
1716 #endif /* not THIS_IS_CONFIGURE */ | 1709 #endif /* not THIS_IS_CONFIGURE */ |
1710 #endif /* 0 */ | |
1717 ' > $tempcname | 1711 ' > $tempcname |
1718 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 |
1719 dnl to get its actual value... | 1713 dnl to get its actual value... |
1720 CPP=`eval "echo $CPP"` | 1714 CPP=`eval "echo $CPP"` |
1721 eval `$CPP -Isrc $tempcname \ | 1715 eval `$CPP -Isrc $tempcname \ |
1722 | sed -n -e "s/ *= */='/" -e "s/ *\$/'/" -e "s/^configure___//p"` | 1716 | sed -n -e "s/ *=[[ \"]]*/='/" -e "s/[[ \"]]*\$/'/" -e "s/^configure___//p"` |
1723 if test -z "$SPECIFIED_CFLAGS"; then | 1717 |
1724 eval `$CPP -Isrc -DTHIS_IS_CONFIGURE $tempcname \ | 1718 dnl if test -z "$SPECIFIED_CFLAGS"; then |
1725 | sed -n -e "s/ *= */='/" -e "s/ *\$/'/" -e "s/^configure___//p"` | 1719 dnl eval `$CPP -Isrc -DTHIS_IS_CONFIGURE $tempcname \ |
1726 else | 1720 dnl | sed -n -e "s/ *=[[ \"]]*/='/" -e "s/[[ \"]]*\$/'/" -e "s/^configure___//p"` |
1727 REAL_CFLAGS="$CFLAGS" | 1721 dnl else |
1728 fi | 1722 dnl REAL_CFLAGS="$CFLAGS" |
1723 dnl fi | |
1729 | 1724 |
1730 rm $tempcname | 1725 rm $tempcname |
1731 | 1726 |
1732 dnl Non-ordinary link usually requires -lc | 1727 dnl Non-ordinary link usually requires -lc |
1733 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc" | 1728 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc" |
1734 | 1729 |
1735 dnl override CFLAGS if user wishes | 1730 dnl Calculalate value of CFLAGS: |
1736 test "$cflags" != "NO_CFLAGS_DEFINED" && REAL_CFLAGS="$cflags" | 1731 dnl Use either command line flag, environment var, or autodetection |
1732 if test -z "$CFLAGS"; then | |
1733 dnl Following values of CFLAGS are known to work well. | |
1734 dnl Should we take debugging options into consideration? | |
1735 if test "$GCC" = "yes"; then | |
1736 CFLAGS="-g -O2" | |
1737 test "$opsys" = "linux" -a "$machine" = "intel386" && \ | |
1738 CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2" | |
1739 elif test "$__sunpro_c" = "yes"; then | |
1740 case "$opsys" in | |
1741 sol2* ) CFLAGS="-v -xO4" ;; | |
1742 sunos4* ) CFLAGS="-xO3";; | |
1743 esac | |
1744 else | |
1745 CFLAGS="-O" # The only POSIX-approved flag | |
1746 fi | |
1747 fi | |
1737 | 1748 |
1738 dnl Add unexec object to link line | 1749 dnl Add unexec object to link line |
1739 XE_ADD_OBJS($unexec) | 1750 XE_ADD_OBJS($unexec) |
1740 | 1751 |
1741 dnl --------------------------------------------------------------- | 1752 dnl --------------------------------------------------------------- |
1754 if test -n "$site_includes" ; then | 1765 if test -n "$site_includes" ; then |
1755 for arg in $site_includes; do | 1766 for arg in $site_includes; do |
1756 case "$arg" in -* ) ;; * ) arg="-I${arg}" ;; esac | 1767 case "$arg" in -* ) ;; * ) arg="-I${arg}" ;; esac |
1757 XE_APPEND($arg, c_switch_site) | 1768 XE_APPEND($arg, c_switch_site) |
1758 done | 1769 done |
1770 fi | |
1771 | |
1772 dnl GNU software installs by default into /usr/local/{include,lib} | |
1773 if test -d "/usr/local/include" -a -d "/usr/local/lib"; then | |
1774 XE_APPEND("-L/usr/local/lib", ld_switch_site) | |
1775 XE_APPEND("-I/usr/local/include", c_switch_site) | |
1759 fi | 1776 fi |
1760 | 1777 |
1761 dnl Extra system-specific library directories - please add to list | 1778 dnl Extra system-specific library directories - please add to list |
1762 for dir in "/usr/ccs/lib"; do | 1779 for dir in "/usr/ccs/lib"; do |
1763 test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site) | 1780 test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site) |
1877 | 1894 |
1878 AC_PROG_RANLIB | 1895 AC_PROG_RANLIB |
1879 AC_PROG_INSTALL | 1896 AC_PROG_INSTALL |
1880 AC_PROG_YACC | 1897 AC_PROG_YACC |
1881 | 1898 |
1882 dnl checks for UNIX variants | |
1883 AC_AIX | |
1884 | |
1885 dnl checks for header files | 1899 dnl checks for header files |
1886 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) | 1900 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) |
1887 AC_CHECK_HEADERS(utime.h locale.h libgen.h) | 1901 AC_CHECK_HEADERS(utime.h locale.h libgen.h) |
1888 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h) | 1902 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h limits.h) |
1889 AC_HEADER_SYS_WAIT | 1903 AC_HEADER_SYS_WAIT |
1890 AC_HEADER_STDC | 1904 AC_HEADER_STDC |
1891 AC_HEADER_TIME | 1905 AC_HEADER_TIME |
1892 AC_DECL_SYS_SIGLIST | 1906 AC_DECL_SYS_SIGLIST |
1893 | 1907 |
1963 AC_CHECKING(type of mail spool file locking) | 1977 AC_CHECKING(type of mail spool file locking) |
1964 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock | 1978 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock |
1965 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf | 1979 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf |
1966 if test "$mail_locking" = "lockf"; then AC_DEFINE(REAL_MAIL_USE_LOCKF) | 1980 if test "$mail_locking" = "lockf"; then AC_DEFINE(REAL_MAIL_USE_LOCKF) |
1967 elif test "$mail_locking" = "flock"; then AC_DEFINE(REAL_MAIL_USE_FLOCK) | 1981 elif test "$mail_locking" = "flock"; then AC_DEFINE(REAL_MAIL_USE_FLOCK) |
1982 else mail_locking="dot-locking" | |
1968 fi | 1983 fi |
1969 | 1984 |
1970 dnl Used by getloadavg() - does not require root priveleges | 1985 dnl Used by getloadavg() - does not require root priveleges |
1971 AC_CHECK_LIB(kstat, kstat_open) | 1986 AC_CHECK_LIB(kstat, kstat_open) |
1972 | 1987 |
2113 | 2128 |
2114 dnl Autodetect -lXext | 2129 dnl Autodetect -lXext |
2115 AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x)) | 2130 AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x)) |
2116 | 2131 |
2117 dnl Require -lXt | 2132 dnl Require -lXt |
2118 case "$canonical" in *-sunos4.* ) # Bug workaround | 2133 case "$opsys" in dnl SunOS4 bug workaround |
2119 ld_switch_x_site="$ld_switch_x_site -u _XtToolkitInitialize" ;; | 2134 sunos4* ) XE_PREPEND(-u _XtToolkitInitialize -lXt, libs_x) ;; |
2135 * ) AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x), | |
2136 [AC_MSG_ERROR("Unable to find X11 libraries.")]) ;; | |
2120 esac | 2137 esac |
2121 AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x), | |
2122 [AC_MSG_ERROR("Unable to find X11 libraries.")]) | |
2123 | 2138 |
2124 AC_MSG_CHECKING(the version of X11 being used) | 2139 AC_MSG_CHECKING(the version of X11 being used) |
2125 AC_TRY_RUN([#include <X11/Intrinsic.h> | 2140 AC_TRY_RUN([#include <X11/Intrinsic.h> |
2126 main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }], | 2141 main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }], |
2127 [./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4]) | 2142 [./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4]) |
2141 else | 2156 else |
2142 AC_MSG_RESULT(no) | 2157 AC_MSG_RESULT(no) |
2143 fi | 2158 fi |
2144 | 2159 |
2145 dnl autodetect -lXmu | 2160 dnl autodetect -lXmu |
2146 case "$canonical" in *-sunos4.* ) # Bug workaround | 2161 case "$opsys" in dnl SunOS4 bug workaround |
2147 ld_switch_x_site="$ld_switch_x_site -u _get_applicationShellWidgetClass" ;; | 2162 sunos4* ) XE_PREPEND(-u _get_applicationShellWidgetClass -lXmu, libs_x) ;; |
2163 * ) if test -z "$with_xmu"; then | |
2164 AC_CHECK_LIB(Xmu, XmuConvertStandardSelection, with_xmu=yes, with_xmu=no) | |
2165 fi | |
2166 if test "$with_xmu" = "no"; then | |
2167 XE_ADD_OBJS(xmu.o) | |
2168 else | |
2169 XE_PREPEND(-lXmu, libs_x) | |
2170 fi ;; | |
2148 esac | 2171 esac |
2149 if test -z "$with_xmu"; then | |
2150 AC_CHECK_LIB(Xmu, XmuConvertStandardSelection, with_xmu=yes, with_xmu=no) | |
2151 fi | |
2152 if test "$with_xmu" = "no"; then | |
2153 XE_ADD_OBJS(xmu.o) | |
2154 else | |
2155 XE_PREPEND(-lXmu, libs_x) | |
2156 fi | |
2157 | 2172 |
2158 dnl Autodetect -lXbsd | 2173 dnl Autodetect -lXbsd |
2159 dnl #### Someone, please add a better function than main | 2174 dnl #### Someone, please add a better function than main |
2160 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) | 2175 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) |
2161 | 2176 |
2355 | 2370 |
2356 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars" | 2371 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars" |
2357 | 2372 |
2358 case "$all_widgets" in *athena* ) | 2373 case "$all_widgets" in *athena* ) |
2359 AC_DEFINE(LWLIB_USES_ATHENA) | 2374 AC_DEFINE(LWLIB_USES_ATHENA) |
2375 AC_DEFINE(NEED_ATHENA) | |
2376 XE_APPEND(lwlib-Xaw.o, lwlib_objs) | |
2360 XE_PREPEND(-lXaw, libs_x) ;; | 2377 XE_PREPEND(-lXaw, libs_x) ;; |
2361 esac | 2378 esac |
2362 | 2379 |
2363 case "$all_widgets" in *motif* ) | 2380 case "$all_widgets" in *motif* ) |
2364 AC_DEFINE(LWLIB_USES_MOTIF) | 2381 AC_DEFINE(LWLIB_USES_MOTIF) |
2382 AC_DEFINE(NEED_MOTIF) | |
2383 XE_APPEND(lwlib-Xm.o, lwlib_objs) | |
2365 need_motif=yes ;; | 2384 need_motif=yes ;; |
2366 esac | 2385 esac |
2386 | |
2387 test "$with_menubars" = "lucid" && XE_APPEND(xlwmenu.o, lwlib_objs) | |
2388 test "$with_scrollbars" = "lucid" && XE_APPEND(xlwscrollbar.o, lwlib_objs) | |
2389 case "$all_widgets" in *lucid* ) | |
2390 AC_DEFINE(NEED_LUCID) | |
2391 XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;; | |
2392 esac | |
2393 | |
2394 AC_SUBST(lwlib_objs) | |
2367 | 2395 |
2368 case "$with_scrollbars" in athena* ) AC_DEFINE(LWLIB_SCROLLBARS_ATHENA);; esac | 2396 case "$with_scrollbars" in athena* ) AC_DEFINE(LWLIB_SCROLLBARS_ATHENA);; esac |
2369 case "$with_dialogs" in athena* ) AC_DEFINE(LWLIB_DIALOGS_ATHENA) ;; esac | 2397 case "$with_dialogs" in athena* ) AC_DEFINE(LWLIB_DIALOGS_ATHENA) ;; esac |
2370 test "$with_scrollbars" = "athena3d" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D) | 2398 test "$with_scrollbars" = "athena3d" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D) |
2371 test "$with_dialogs" = "athena3d" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D) | 2399 test "$with_dialogs" = "athena3d" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D) |
2433 fi dnl with_xim | 2461 fi dnl with_xim |
2434 | 2462 |
2435 dnl Autodetect WNN | 2463 dnl Autodetect WNN |
2436 test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support | 2464 test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support |
2437 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) } | 2465 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) } |
2438 test -z "$with_wnn" && { AC_CHECK_LIB(wnn,jl_dic_list_e, ,with_wnn=no) } | 2466 test -z "$with_wnn" && { AC_CHECK_LIB(wnn,jl_dic_list_e, ,[:],with_wnn=no) } |
2439 test -z "$with_wnn" && with_wnn=yes | 2467 test -z "$with_wnn" && with_wnn=yes |
2440 if test "$with_wnn" = "yes"; then | 2468 if test "$with_wnn" = "yes"; then |
2441 AC_DEFINE(HAVE_WNN) | 2469 AC_DEFINE(HAVE_WNN) |
2442 XE_PREPEND(-lwnn, libs_x) | 2470 XE_PREPEND(-lwnn, libs_x) |
2443 XE_ADD_OBJS(mule-wnnfns.o) | 2471 XE_ADD_OBJS(mule-wnnfns.o) |
2667 dnl AIX export list | 2695 dnl AIX export list |
2668 for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp" ; do | 2696 for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp" ; do |
2669 if test -r $f; then AC_DEFINE_UNQUOTED(AIX_SMT_EXP, -bI:$f) break; fi | 2697 if test -r $f; then AC_DEFINE_UNQUOTED(AIX_SMT_EXP, -bI:$f) break; fi |
2670 done | 2698 done |
2671 | 2699 |
2672 dnl Set up the CFLAGS for real compilation, so we can substitute it. | |
2673 CFLAGS="$REAL_CFLAGS" | |
2674 | |
2675 dnl Find out which version of XEmacs this is. | 2700 dnl Find out which version of XEmacs this is. |
2676 file="$srcdir/lisp/version.el" | 2701 file="$srcdir/lisp/version.el" |
2677 version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"` | 2702 version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"` |
2678 if test -z "$version"; then | 2703 if test -z "$version"; then |
2679 echo "$progname: can't find current emacs version in \"$file\"." >&2 | 2704 echo "$progname: can't find current emacs version in \"$file\"." >&2 |
2680 exit 1 | 2705 exit 1 |
2681 fi | 2706 fi |
2682 beta=`sed -ne 's/^.*XEmacs Lucid (beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"` | 2707 beta=`sed -ne 's/^.*XEmacs Lucid (beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"` |
2683 test -n "$beta" && version="${version}-b${beta}" | 2708 test -n "$beta" && version="${version}-b${beta}" |
2684 AC_DEFINE_UNQUOTED(EMACS_VERSION, $version) | 2709 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") |
2685 main_1_id="`echo main_1_xemacs_${version}_${canonical} | sed 'y/.-/__/'`" | 2710 main_1_id="`echo main_1_xemacs_${version}_${canonical} | sed 'y/.-/__/'`" |
2686 AC_DEFINE_UNQUOTED(main_1, $main_1_id) | 2711 AC_DEFINE_UNQUOTED(main_1, $main_1_id) |
2687 | 2712 |
2688 | 2713 |
2689 dnl Check for sound of various sorts. | 2714 dnl Check for sound of various sorts. |
2982 XE_SPACE(internal_makefile_list, $internal_makefile_list $dir/Makefile.in) | 3007 XE_SPACE(internal_makefile_list, $internal_makefile_list $dir/Makefile.in) |
2983 done | 3008 done |
2984 AC_SUBST(MAKE_SUBDIR) | 3009 AC_SUBST(MAKE_SUBDIR) |
2985 AC_SUBST(SUBDIR_MAKEFILES) | 3010 AC_SUBST(SUBDIR_MAKEFILES) |
2986 | 3011 |
3012 dnl Make s&m symlinks in the src directory, for config.h | |
3013 for dir in src/s src/m; do | |
3014 if test ! -d "$dir" ; then | |
3015 echo Making symbolic link to "$srcdir/$dir" | |
3016 ${LN_S} "$srcdir/$dir" "$dir" | |
3017 fi | |
3018 done | |
3019 | |
2987 if test "$extra_verbose" = "yes"; then | 3020 if test "$extra_verbose" = "yes"; then |
2988 echo "" | 3021 echo "" |
2989 PRINT_VAR(extra_objs, | 3022 PRINT_VAR(extra_objs, |
2990 c_switch_general, c_switch_window_system, c_switch_all, | 3023 c_switch_general, c_switch_window_system, c_switch_all, |
2991 ld_switch_general, ld_switch_window_system, ld_switch_all, | 3024 ld_switch_general, ld_switch_window_system, ld_switch_all, |
2998 echo "creating src/gdbinit"; echo "" | 3031 echo "creating src/gdbinit"; echo "" |
2999 echo "source $srcdir/src/gdbinit" > src/gdbinit | 3032 echo "source $srcdir/src/gdbinit" > src/gdbinit |
3000 fi | 3033 fi |
3001 | 3034 |
3002 dnl Create top level .sbinit for Sun compilers | 3035 dnl Create top level .sbinit for Sun compilers |
3003 AC_TRY_COMPILE([],[#ifndef __SUNPRO_C | 3036 if test "$__sunpro_c" = "yes"; then |
3004 #error No Sun source browser capability | 3037 echo "creating .sbinit"; echo "" |
3005 #endif | 3038 ( echo "# For use with Sun WorkShop's Source browser." |
3006 ],[echo "creating .sbinit"; echo "" | 3039 echo "# See sbquery(1) and sbinit(4) for more information" |
3007 ( echo "# For use with Sun WorkShop's Source browser." | 3040 for dir in $MAKE_SUBDIR; do echo "import $dir"; done |
3008 echo "# See sbquery(1) and sbinit(4) for more information" | 3041 ) > .sbinit |
3009 for dir in $MAKE_SUBDIR; do echo "import $dir"; done | 3042 fi |
3010 ) > .sbinit | |
3011 ]) | |
3012 | 3043 |
3013 dnl There are no more compile tests; remove the core they created. | 3044 dnl There are no more compile tests; remove the core they created. |
3014 rm -f core | 3045 rm -f core |
3015 | 3046 |
3016 dnl ------------------------------------- | 3047 dnl ------------------------------------- |
3215 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." | 3246 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." |
3216 test "$with_offix" = yes && echo " Compiling in support for OffiX." | 3247 test "$with_offix" = yes && echo " Compiling in support for OffiX." |
3217 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." | 3248 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." |
3218 test "$with_energize" = yes && echo " Compiling in support for Lucid Energize (doesn't currently work)." | 3249 test "$with_energize" = yes && echo " Compiling in support for Lucid Energize (doesn't currently work)." |
3219 case "$with_menubars" in | 3250 case "$with_menubars" in |
3220 lucid ) echo " Using the Lucid menubar." ;; | 3251 lucid ) echo " Using Lucid menubars." ;; |
3221 motif ) echo " Using the Motif menubar." | 3252 motif ) echo " Using Motif menubars." |
3222 echo " *WARNING* The Motif menubar is currently buggy." | 3253 echo " *WARNING* The Motif menubar implementation is currently buggy." |
3223 echo " We recommend using the Lucid menubar instead." | 3254 echo " We recommend using the Lucid menubar instead." |
3224 echo " Re-run configure with --with-menubars='lucid'." ;; | 3255 echo " Re-run configure with --with-menubars='lucid'." ;; |
3225 esac | 3256 esac |
3226 case "$with_scrollbars" in | 3257 case "$with_scrollbars" in |
3227 lucid ) echo " Using the Lucid scrollbar." ;; | 3258 lucid ) echo " Using Lucid scrollbars." ;; |
3228 motif ) echo " Using the Motif scrollbar." ;; | 3259 motif ) echo " Using Motif scrollbars." ;; |
3229 athena ) echo " Using the Athena scrollbar." ;; | 3260 athena ) echo " Using Athena scrollbars." ;; |
3230 athena3d ) echo " Using the Athena-3d scrollbar." ;; | 3261 athena3d ) echo " Using Athena-3d scrollbars." ;; |
3231 esac | 3262 esac |
3232 case "$with_dialogs" in | 3263 case "$with_dialogs" in |
3233 motif ) echo " Using the Motif dialog boxes." ;; | 3264 motif ) echo " Using Motif dialog boxes." ;; |
3234 athena ) echo " Using the Athena dialog boxes." ;; | 3265 athena ) echo " Using Athena dialog boxes." ;; |
3235 athena3d ) echo " Using the Athena-3d dialog boxes." ;; | 3266 athena3d ) echo " Using Athena-3d dialog boxes." ;; |
3236 esac | 3267 esac |
3268 echo " movemail will use \"$mail_locking\" for locking mail spool files." | |
3237 test "$with_pop" = yes && echo " Using POP for mail access" | 3269 test "$with_pop" = yes && echo " Using POP for mail access" |
3238 test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication" | 3270 test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication" |
3239 test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host" | 3271 test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host" |
3240 | 3272 |
3241 test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." | 3273 test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." |