comparison configure.in @ 163:0132846995bd r20-3b8

Import from CVS: tag r20-3b8
author cvs
date Mon, 13 Aug 2007 09:43:35 +0200
parents 3bb7ccffb0c0
children 5a88923fcbfe
comparison
equal deleted inserted replaced
162:4de2936b4e77 163:0132846995bd
56 dnl - non-standard options 56 dnl - non-standard options
57 dnl - suport for extra-verbosity 57 dnl - suport for extra-verbosity
58 dnl - ordinary libs are handled separately from X libs (might be a mistake) 58 dnl - ordinary libs are handled separately from X libs (might be a mistake)
59 dnl - various random kludges (e.g. -with-dnet=no 59 dnl - various random kludges (e.g. -with-dnet=no
60 60
61 dnl PRINT_VAR(var, var, ...) prints values of shell variables 61 dnl PRINT_VAR(var var ...) prints values of shell variables
62 define([PRINT_VAR],[ifelse([$#] ,0, , [$#], 1, echo "[$1] = \"$[$1]\"", echo "[$1] = \"$[$1]\"" 62 define([PRINT_VAR],[for var in patsubst([$1],[[
63 [PRINT_VAR(builtin([shift],$@))])]) 63 ]+],[ ]); do eval "echo \"$var = '\$$var'\""; done])
64 64
65 dnl Disable cache files: 65 dnl Disable cache files:
66 dnl This is controversial, but I am convinced this is the right way to go, 66 dnl This is controversial, but I am convinced this is the right way to go,
67 dnl at least by default. Otherwise there are too many surprises. 67 dnl at least by default. Otherwise there are too many surprises.
68 define([AC_CACHE_LOAD], )dnl 68 define([AC_CACHE_LOAD], )dnl
940 dnl --extra-verbose implies --verbose 940 dnl --extra-verbose implies --verbose
941 test "$extra_verbose" = "yes" && verbose=yes 941 test "$extra_verbose" = "yes" && verbose=yes
942 942
943 dnl Allow use of either ":" or spaces for lists of directories 943 dnl Allow use of either ":" or spaces for lists of directories
944 define(COLON_TO_SPACE, 944 define(COLON_TO_SPACE,
945 [case "[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's:^ ::' -e 's/:/ /g'`";; esac])dnl 945 [case "$[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's:^ ::' -e 's/:/ /g'`";; esac])dnl
946 COLON_TO_SPACE(site_includes) 946 COLON_TO_SPACE(site_includes)
947 COLON_TO_SPACE(site_libraries) 947 COLON_TO_SPACE(site_libraries)
948 COLON_TO_SPACE(site_runtime_libraries) 948 COLON_TO_SPACE(site_runtime_libraries)
949 949
950 dnl with_x is obsolete synonym for with_x11 950 dnl with_x is obsolete synonym for with_x11
1099 mips-dec-* ) machine=pmax ;; 1099 mips-dec-* ) machine=pmax ;;
1100 mips-sgi-* ) machine=iris4d ;; 1100 mips-sgi-* ) machine=iris4d ;;
1101 romp-ibm-* ) machine=ibmrt ;; 1101 romp-ibm-* ) machine=ibmrt ;;
1102 rs6000-ibm-aix* ) machine=ibmrs6000 ;; 1102 rs6000-ibm-aix* ) machine=ibmrs6000 ;;
1103 powerpc-ibm-aix* ) machine=ibmrs6000 ;; 1103 powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1104 powerpc-*-* ) machine=powerpc ;; 1104 powerpc*-* ) machine=powerpc ;;
1105 hppa-*-* ) machine=hp800 ;; 1105 hppa-*-* ) machine=hp800 ;;
1106 m88k-dg-* ) machine=aviion ;; 1106 m88k-dg-* ) machine=aviion ;;
1107 m68*-sony-* ) machine=news ;; 1107 m68*-sony-* ) machine=news ;;
1108 mips-sony-* ) machine=news-risc ;; 1108 mips-sony-* ) machine=news-risc ;;
1109 clipper-* ) machine=clipper ;; 1109 clipper-* ) machine=clipper ;;
1408 dnl Hardware type 1408 dnl Hardware type
1409 case "$canonical" in 1409 case "$canonical" in
1410 m68*-sunos1* ) machine=sun1 ;; 1410 m68*-sunos1* ) machine=sun1 ;;
1411 m68*-sunos2* ) machine=sun2 ;; 1411 m68*-sunos2* ) machine=sun2 ;;
1412 m68* ) machine=sun3 ;; 1412 m68* ) machine=sun3 ;;
1413 i[[3-9]]86*-sun-sunos[[34]]* ) machine=sun386 ;; 1413 i*86*-sun-sunos[[34]]* ) machine=sun386 ;;
1414 i[[3-9]]86-*-* ) machine=intel386 ;; 1414 i*86-*-* ) machine=intel386 ;;
1415 rs6000* ) machine=rs6000 ;; 1415 rs6000* ) machine=rs6000 ;;
1416 esac 1416 esac
1417 1417
1418 dnl Make $canonical even more so. 1418 dnl Make $canonical even more so.
1419 case "$canonical" in *-sunos5*) 1419 case "$canonical" in *-sunos5*)
1420 canonical="`echo \"$canonical\" | sed -e s/sunos5/solaris2/`";; 1420 canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1421 esac 1421 esac
1422 1422
1423 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
1424 dnl On SunOS 5, use cc -E, need dynodump, RANLIB not needed 1424 dnl On SunOS 5, use cc -E, need dynodump, RANLIB not needed
1425 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
1432 #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
1433 RANLIB=':' ;; 1433 RANLIB=':' ;;
1434 esac 1434 esac
1435 1435
1436 case "$canonical" in 1436 case "$canonical" in
1437 *-solaris* )
1438 opsys=sol2
1439 os_release=`uname -r | sed -e 's/^\([[0-9]]\)\.\([[0-9]]\).*/\1\2/'`
1440 AC_DEFINE_UNQUOTED(OS_RELEASE, $os_release) ;;
1441
1437 dnl The last Sun386 ran 4.0. 1442 dnl The last Sun386 ran 4.0.
1438 i[[3-9]]86-*-sunos4*) opsys=sunos4-0 ;; 1443 i*86-*-sunos4* ) opsys=sunos4-0 ;;
1439 *-sunos4.0* ) opsys=sunos4-0 ;; 1444 *-sunos4.0* ) opsys=sunos4-0 ;;
1440 *-sunos4.1.2* ) opsys=sunos4-1-2 ;; 1445 *-sunos4.1.2* ) opsys=sunos4-1-2 ;;
1441 *-sunos4.1.3* ) opsys=sunos4-1-3 ;; 1446 *-sunos4.1.3* ) opsys=sunos4-1-3 ;;
1442 *-sunos4.1.[[4-9]]* ) opsys=sunos4-1-4 ;; 1447 *-sunos4.1.[[4-9]]* ) opsys=sunos4-1-4 ;;
1443 *-sunos4* | *-sunos ) opsys=sunos4-1 ;; 1448 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
1444
1445 *-solaris2.3* ) opsys=sol2-3 ;;
1446 *-solaris2.4* ) opsys=sol2-4 ;;
1447 *-solaris2.5* ) opsys=sol2-5 ;;
1448 *-solaris2.[[6-9]]* ) opsys=sol2-6 ;;
1449 *-solaris* ) opsys=sol2 ;;
1450
1451 *-mach* ) opsys=mach-bsd4-3 ;; 1449 *-mach* ) opsys=mach-bsd4-3 ;;
1452 * ) opsys=bsd4-2 ;; 1450 * ) opsys=bsd4-2 ;;
1453 esac 1451 esac
1454 1452
1455 case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac 1453 case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1456 1454
1457 dnl Watch out for a compiler guaranteed not to work. 1455 dnl Watch out for a compiler guaranteed not to work.
1458 case "$canonical" in 1456 test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1459 *-solaris* ) case "$CC" in /usr/ucb/cc* ) CC="" ;; esac ;;
1460 esac
1461 ;; 1457 ;;
1462 1458
1463 dnl Tadpole 68k 1459 dnl Tadpole 68k
1464 m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;; 1460 m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1465 1461
1556 case "$opsys" in 1552 case "$opsys" in
1557 hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;; 1553 hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1558 esac 1554 esac
1559 elif test "$dynamic" = "no" ; then 1555 elif test "$dynamic" = "no" ; then
1560 case "$opsys" in 1556 case "$opsys" in
1561 sol2* | decosf1-3 | decosf3-* | decosf4-* | linux ) opsys="${opsys}-static" ;; 1557 sol2 | decosf1-3 | decosf3-* | decosf4-* | linux ) opsys="${opsys}-static" ;;
1562 esac 1558 esac
1563 fi 1559 fi
1564 1560
1565 machfile="m/${machine}.h" 1561 machfile="m/${machine}.h"
1566 opsysfile="s/${opsys}.h" 1562 opsysfile="s/${opsys}.h"
1659 #define C_SWITCH_SITE 1655 #define C_SWITCH_SITE
1660 #define C_SWITCH_X_SITE 1656 #define C_SWITCH_X_SITE
1661 #define LD_SWITCH_SITE 1657 #define LD_SWITCH_SITE
1662 #define LD_SWITCH_X_SITE 1658 #define LD_SWITCH_X_SITE
1663 #define LD_SWITCH_X_SITE_AUX 1659 #define LD_SWITCH_X_SITE_AUX
1660 #define OS_RELEASE '$os_release'
1664 #include "'$srcdir'/src/'$opsysfile'" 1661 #include "'$srcdir'/src/'$opsysfile'"
1665 #include "'$srcdir'/src/'$machfile'" 1662 #include "'$srcdir'/src/'$machfile'"
1666 1663
1667 CPP_to_sh(LIBS_MACHINE, libs_machine) 1664 CPP_to_sh(LIBS_MACHINE, libs_machine)
1668 CPP_to_sh(LIBS_SYSTEM, libs_system) 1665 CPP_to_sh(LIBS_SYSTEM, libs_system)
1669 CPP_to_sh(LIBS_TERMCAP, libs_termcap) 1666 CPP_to_sh(LIBS_TERMCAP, libs_termcap)
1670 CPP_to_sh(LIB_STANDARD, libs_standard) 1667 CPP_to_sh(LIB_STANDARD, libs_standard)
1671 1668
1669 CPP_to_sh(OBJECTS_MACHINE, objects_machine)
1670 CPP_to_sh(OBJECTS_SYSTEM, objects_system)
1671
1672 CPP_to_sh(C_SWITCH_MACHINE, c_switch_machine) 1672 CPP_to_sh(C_SWITCH_MACHINE, c_switch_machine)
1673 CPP_to_sh(C_SWITCH_SYSTEM, c_switch_system) 1673 CPP_to_sh(C_SWITCH_SYSTEM, c_switch_system)
1674 CPP_to_sh(C_SWITCH_X_SYSTEM, c_switch_x_system) 1674 CPP_to_sh(C_SWITCH_X_SYSTEM, c_switch_x_system)
1675 1675
1676 CPP_to_sh(LD_SWITCH_MACHINE, ld_switch_machine) 1676 CPP_to_sh(LD_SWITCH_MACHINE, ld_switch_machine)
1677 CPP_to_sh(LD_SWITCH_SYSTEM, ld_switch_system) 1677 CPP_to_sh(LD_SWITCH_SYSTEM, ld_switch_system)
1678 CPP_to_sh(LD_SWITCH_X_SYSTEM, ld_switch_x_system) 1678 CPP_to_sh(LD_SWITCH_X_SYSTEM, ld_switch_x_system)
1679 1679
1680 CPP_to_sh(UNEXEC, unexec, unexec.o) 1680 CPP_to_sh(UNEXEC, unexec, unexec.o)
1681
1682 CPP_to_sh(LD_SWITCH_CALL_SHARED, ld_switch_call_shared)
1683 CPP_to_sh(LD_SWITCH_SHARED, ld_switch_shared, -c)
1684
1685 #ifdef ORDINARY_LINK
1686 #define LD "$(CC) $(CFLAGS)"
1687 #else /* no ORDINARY LINK */
1688 #ifdef COFF_ENCAPSULATE
1689 #define LD "$(CC) -nostdlib"
1690 #else /* not COFF_ENCAPSULATE */
1691 #ifdef LINKER
1692 #define LD LINKER
1693 #else /* ! defined (LINKER) */
1694 #define LD "ld"
1695 #endif /* ! defined (LINKER) */
1696 #endif /* ! defined (COFF_ENCAPSULATE) */
1697 #endif /* not ORDINARY_LINK */
1698 configure___ ld=LD
1699
1700 CPP_to_sh(LIB_GCC, lib_gcc)
1701 CPP_to_sh(LD_TEXT_START_ADDR, ld_text_start_addr)
1702
1703 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
1704 #ifdef NO_REMAP
1705 #ifdef COFF_ENCAPSULATE
1706 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
1707 #else /* ! defined (COFF_ENCAPSULATE) */
1708 #define START_FILES "pre-crt0.o /lib/crt0.o"
1709 #endif /* ! defined (COFF_ENCAPSULATE) */
1710 #else /* ! defined (NO_REMAP) */
1711 #define START_FILES "ecrt0.o"
1712 #endif /* ! defined (NO_REMAP) */
1713 #endif /* no ORDINARY_LINK */
1714 #ifndef START_FILES
1715 #define START_FILES
1716 #endif
1717 configure___ start_files=START_FILES
1681 1718
1682 CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link) 1719 CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link)
1683 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc) 1720 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc)
1684 CPP_boolean_to_sh(TERMINFO, have_terminfo) 1721 CPP_boolean_to_sh(TERMINFO, have_terminfo)
1685 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock) 1722 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock)
1711 ' > $tempcname 1748 ' > $tempcname
1712 dnl The value of CPP is a quoted variable reference, so we need to do this 1749 dnl The value of CPP is a quoted variable reference, so we need to do this
1713 dnl to get its actual value... 1750 dnl to get its actual value...
1714 CPP=`eval "echo $CPP"` 1751 CPP=`eval "echo $CPP"`
1715 eval `$CPP -Isrc $tempcname \ 1752 eval `$CPP -Isrc $tempcname \
1716 | sed -n -e "s/ *=[[ \"]]*/='/" -e "s/[[ \"]]*\$/'/" -e "s/^configure___//p"` 1753 | [sed -n -e "s/[ \t]*=[ \t\"]*/='/" -e "s/[ \t\"]*\$/'/" -e "s/^configure___//p"`]
1717 1754
1718 dnl if test -z "$SPECIFIED_CFLAGS"; then 1755 dnl if test -z "$SPECIFIED_CFLAGS"; then
1719 dnl eval `$CPP -Isrc -DTHIS_IS_CONFIGURE $tempcname \ 1756 dnl eval `$CPP -Isrc -DTHIS_IS_CONFIGURE $tempcname \
1720 dnl | sed -n -e "s/ *=[[ \"]]*/='/" -e "s/[[ \"]]*\$/'/" -e "s/^configure___//p"` 1757 dnl | sed -n -e "s/ *=[[ \"]]*/='/" -e "s/[[ \"]]*\$/'/" -e "s/^configure___//p"`
1721 dnl else 1758 dnl else
1722 dnl REAL_CFLAGS="$CFLAGS" 1759 dnl REAL_CFLAGS="$CFLAGS"
1723 dnl fi 1760 dnl fi
1724 1761
1725 rm $tempcname 1762 rm $tempcname
1763
1764 dnl For debugging...
1765 test "$extra_verbose" = "yes" && \
1766 PRINT_VAR(libs_machine libs_system libs_termcap libs_standard
1767 objects_machine objects_system c_switch_machine c_switch_system
1768 c_switch_x_system ld_switch_machine ld_switch_system
1769 ld_switch_x_system unexec ld_switch_call_shared ld_switch_shared
1770 ld lib_gcc ld_text_start_addr start_files ordinary_link
1771 have_terminfo mail_use_flock mail_use_lockf) && echo ""
1772
1726 1773
1727 dnl Non-ordinary link usually requires -lc 1774 dnl Non-ordinary link usually requires -lc
1728 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc" 1775 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
1729 1776
1730 dnl Calculalate value of CFLAGS: 1777 dnl Calculalate value of CFLAGS:
1736 CFLAGS="-g -O2" 1783 CFLAGS="-g -O2"
1737 test "$opsys" = "linux" -a "$machine" = "intel386" && \ 1784 test "$opsys" = "linux" -a "$machine" = "intel386" && \
1738 CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2" 1785 CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
1739 elif test "$__sunpro_c" = "yes"; then 1786 elif test "$__sunpro_c" = "yes"; then
1740 case "$opsys" in 1787 case "$opsys" in
1741 sol2* ) CFLAGS="-v -xO4" ;; 1788 sol2 ) CFLAGS="-v -xO4" ;;
1742 sunos4* ) CFLAGS="-xO3";; 1789 sunos4* ) CFLAGS="-xO2";;
1743 esac 1790 esac
1744 else 1791 else
1745 CFLAGS="-O" # The only POSIX-approved flag 1792 CFLAGS="-O" # The only POSIX-approved flag
1746 fi 1793 fi
1747 fi 1794 fi
1748 1795
1749 dnl Add unexec object to link line 1796 dnl Make sure linker flags not understood by GCC are properly wrapped.
1750 XE_ADD_OBJS($unexec) 1797 if test "$GCC" = "yes"; then
1798 define([XE_GCC_WRAP_LDFLAGS],
1799 [[$1_tmp]="$[$1]"; [$1]=""
1800 for arg in $[$1_tmp]; do
1801 case "$arg" in
1802 -L* | -l* | -R* | -u* | -Wl* | -f* ) [$1]="$[$1] $arg" ;;
1803 -Xlinker* ) ;;
1804 * ) [$1]="$[$1] -Xlinker $arg" ;;
1805 esac
1806 done])dnl
1807 XE_GCC_WRAP_LDFLAGS(ld_switch_system)
1808 XE_GCC_WRAP_LDFLAGS(ld_switch_machine)
1809 XE_GCC_WRAP_LDFLAGS(LDFLAGS)
1810 fi
1811
1812 dnl Add s&m-determined objects (including unexec) to link line
1813 test -n "$objects_machine" && XE_ADD_OBJS($objects_machine)
1814 test -n "$objects_system" && XE_ADD_OBJS($objects_system)
1815 test -n "$unexec" && XE_ADD_OBJS($unexec)
1816
1817 dnl Dynodump (Solaris 2.x, x<6)
1818 AC_MSG_CHECKING(for dynodump)
1819 if test "$unexec" != "unexsol2.o"; then
1820 AC_MSG_RESULT(no)
1821 else
1822 AC_MSG_RESULT(yes)
1823 AC_DEFINE(DYNODUMP)
1824 XE_APPEND(dynodump, MAKE_SUBDIR)
1825 case "$machine" in
1826 sparc ) dynodump_arch=sparc ;;
1827 *86* ) dynodump_arch=i386 ;;
1828 powerpc ) dynodump_arch=ppc ;;
1829 esac
1830 dnl Dynodump requires the system linker
1831 test "$GCC" = "yes" && XE_APPEND(-fno-gnu-linker, ld_switch_site)
1832 fi
1833
1834 dnl Feed s&m crud to src/Makefile
1835 AC_SUBST(ld_switch_call_shared)
1836 AC_SUBST(ld_switch_shared)
1837 AC_SUBST(start_files)
1838 test -n "$ld_text_start_addr" && start_flags="-T $ld_text_start_addr -e __start"
1839 AC_SUBST(start_flags)
1840 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
1841 test -z "$linker" && linker='$(CC) -nostdlib'
1842 test -z "$lib_gcc" && lib_gcc='`$(CC) -print-lib-gcc-file-name`'
1843 fi
1844 test "$GCC" != "yes" && lib_gcc=
1845 AC_SUBST(ld)
1846 AC_SUBST(lib_gcc)
1751 1847
1752 dnl --------------------------------------------------------------- 1848 dnl ---------------------------------------------------------------
1753 dnl Add site and system specific flags to compile and link commands 1849 dnl Add site and system specific flags to compile and link commands
1754 dnl --------------------------------------------------------------- 1850 dnl ---------------------------------------------------------------
1755 1851
1768 XE_APPEND($arg, c_switch_site) 1864 XE_APPEND($arg, c_switch_site)
1769 done 1865 done
1770 fi 1866 fi
1771 1867
1772 dnl GNU software installs by default into /usr/local/{include,lib} 1868 dnl GNU software installs by default into /usr/local/{include,lib}
1773 if test -d "/usr/local/include" -a -d "/usr/local/lib"; then 1869 dnl if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
1774 XE_APPEND("-L/usr/local/lib", ld_switch_site) 1870 dnl XE_APPEND("-L/usr/local/lib", ld_switch_site)
1775 XE_APPEND("-I/usr/local/include", c_switch_site) 1871 dnl XE_APPEND("-I/usr/local/include", c_switch_site)
1776 fi 1872 dnl fi
1777 1873
1778 dnl Extra system-specific library directories - please add to list 1874 dnl Extra system-specific library directories - please add to list
1779 for dir in "/usr/ccs/lib"; do 1875 for dir in "/usr/ccs/lib"; do
1780 test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site) 1876 test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site)
1781 done 1877 done
1790 dnl Compute runtime library path 1886 dnl Compute runtime library path
1791 dnl ------------------------------------- 1887 dnl -------------------------------------
1792 1888
1793 if test "$dynamic" = "no"; then add_runtime_path=no 1889 if test "$dynamic" = "no"; then add_runtime_path=no
1794 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes 1890 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
1795 else case "$canonical" in 1891 else case "$opsys" in
1796 *-solaris2.* | *-sgi-irix* ) add_runtime_path=yes ;; 1892 sol2 | irix* | *bsd* ) add_runtime_path=yes ;;
1797 * ) add_runtime_path=no ;; 1893 * ) add_runtime_path=no ;;
1798 esac 1894 esac
1799 fi 1895 fi
1800 1896
1801 if test "$add_runtime_path" = "yes"; then 1897 if test "$add_runtime_path" = "yes"; then
1813 then AC_MSG_RESULT("\"${dash_r}\"") 1909 then AC_MSG_RESULT("\"${dash_r}\"")
1814 else AC_MSG_RESULT(NONE) 1910 else AC_MSG_RESULT(NONE)
1815 fi 1911 fi
1816 fi 1912 fi
1817 1913
1914 xe_add_unique_runpath_dir='
1915 xe_add_p=yes
1916 for xe_dir in $runpath_dirs; do dnl Uniquify
1917 test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
1918 done
1919 if test "$xe_add_p" = "yes"; then
1920 test -n "$runpath" && runpath="${runpath}:"
1921 runpath="${runpath}${xe_runpath_dir}"
1922 runpath_dirs="$runpath_dirs $xe_runpath_dir"
1923 fi'
1924
1925
1818 dnl XE_ADD_RUNPATH_DIR(directory) 1926 dnl XE_ADD_RUNPATH_DIR(directory)
1819 define([XE_ADD_RUNPATH_DIR],[ 1927 define([XE_ADD_RUNPATH_DIR],[{
1820 xe_runpath_dir=$1 1928 xe_runpath_dir=$1
1821 if test "$xe_runpath_dir" != "/lib" -a \ 1929 dnl PRINT_VAR(ld_switch_site ld_switch_x_site runpath xe_runpath_dir LD_RUN_PATH xe_ldflags)
1930 test "$xe_runpath_dir" != "/lib" -a \
1822 "$xe_runpath_dir" != "/usr/lib" -a \ 1931 "$xe_runpath_dir" != "/usr/lib" -a \
1823 -n "`ls ${xe_runpath_dir}/*.s[[ol]] 2>/dev/null`"; then 1932 -n "`ls ${xe_runpath_dir}/*.s[[ol]] 2>/dev/null`" && \
1824 test -n "$runpath" && runpath="${runpath}:" 1933 eval "$xe_add_unique_runpath_dir"
1825 runpath="${runpath}${xe_runpath_dir}" 1934 }])dnl
1826 fi
1827 ])dnl
1828 1935
1829 dnl XE_COMPUTE_RUNPATH() 1936 dnl XE_COMPUTE_RUNPATH()
1830 define([XE_COMPUTE_RUNPATH],[ 1937 define([XE_COMPUTE_RUNPATH],[
1831 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then 1938 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
1832 dnl Remove runtime paths from current ld switches 1939 dnl Remove runtime paths from current ld switches
1833 ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/${dash_r}[[^ ]]*//"` 1940 ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//"`
1834 ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/${dash_r}[[^ ]]*//"` 1941 ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//"`
1835 dnl PRINT_VAR(ld_switch_site, ld_switch_x_site) 1942 dnl PRINT_VAR(ld_switch_site ld_switch_x_site)
1836 1943
1837 dnl Fix up Runtime path 1944 dnl Fix up Runtime path
1838 dnl If LD_RUN_PATH is set in environment, use that. 1945 dnl If LD_RUN_PATH is set in environment, use that.
1839 dnl In this case, assume user has set the right value. 1946 dnl In this case, assume user has set the right value.
1840 runpath="" 1947 runpath="" runpath_dirs=""
1841 if test -n "$LD_RUN_PATH"; then 1948 if test -n "$LD_RUN_PATH"; then
1842 runpath="$LD_RUN_PATH" 1949 runpath="$LD_RUN_PATH"
1843 elif test "$GCC" = "yes"; then 1950 elif test "$GCC" = "yes"; then
1844 dnl Compute runpath from gcc's -v output 1951 dnl Compute runpath from gcc's -v output
1952 ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
1845 echo "int main(int argc, char *argv[[]]) {return 0;}" > conftest.c 1953 echo "int main(int argc, char *argv[[]]) {return 0;}" > conftest.c
1846 xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' 1954 xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
1847 for arg in `eval "$xe_runpath_link" | grep ' -L'`; do 1955 for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
1848 case "$arg" in P,* | -L* | -R* ) 1956 case "$arg" in P,* | -L* | -R* )
1849 for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do 1957 for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
1850 XE_ADD_RUNPATH_DIR("$dir") 1958 XE_ADD_RUNPATH_DIR("$dir")
1851 done ;; 1959 done ;;
1852 esac 1960 esac
1853 done 1961 done
1962 ld_switch_run="$ld_switch_run_save"
1854 rm -f conftest* 1963 rm -f conftest*
1855 else 1964 else
1856 dnl Add all directories with .so files to runpath 1965 dnl Add all directories with .so files to runpath
1857 for arg in $ld_switch_site $ld_switch_x_site; do 1966 for arg in $ld_switch_site $ld_switch_x_site; do
1858 case "$arg" in -L*) XE_ADD_RUNPATH_DIR(`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`);; esac 1967 case "$arg" in -L*) XE_ADD_RUNPATH_DIR(`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`);; esac
1859 done 1968 done
1860 dnl Sometimes /opt/SUNWdt/lib is the only installed Motif available 1969 dnl Sometimes /opt/SUNWdt/lib is the only installed Motif available
1861 case "$canonical" in *-solaris2.[[1-4]]* ) 1970 if test "$opsys $need_motif" = "sol2 yes"; then
1862 test "$need_motif" = "yes" && runpath="${runpath}:/opt/SUNWdt/lib" ;; 1971 xe_runpath_dir="/opt/SUNWdt/lib";
1863 esac 1972 eval "$xe_add_unique_runpath_dir";
1973 fi
1864 fi dnl Compute $runpath 1974 fi dnl Compute $runpath
1865 1975
1866 if test -n "$runpath"; then 1976 if test -n "$runpath"; then
1867 ld_switch_run="${dash_r}${runpath}" 1977 ld_switch_run="${dash_r}${runpath}"
1868 test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath" 1978 test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
1896 AC_PROG_INSTALL 2006 AC_PROG_INSTALL
1897 AC_PROG_YACC 2007 AC_PROG_YACC
1898 2008
1899 dnl checks for header files 2009 dnl checks for header files
1900 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) 2010 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h)
1901 AC_CHECK_HEADERS(utime.h locale.h libgen.h) 2011 AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h)
1902 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h limits.h) 2012 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h limits.h)
1903 AC_HEADER_SYS_WAIT 2013 AC_HEADER_SYS_WAIT
1904 AC_HEADER_STDC 2014 AC_HEADER_STDC
1905 AC_HEADER_TIME 2015 AC_HEADER_TIME
1906 AC_DECL_SYS_SIGLIST 2016 AC_DECL_SYS_SIGLIST
1924 AC_DEFINE(HAVE_STRUCT_UTIMBUF)], 2034 AC_DEFINE(HAVE_STRUCT_UTIMBUF)],
1925 AC_MSG_RESULT(no)) 2035 AC_MSG_RESULT(no))
1926 2036
1927 dnl checks for typedefs 2037 dnl checks for typedefs
1928 AC_TYPE_SIGNAL 2038 AC_TYPE_SIGNAL
2039 AC_TYPE_SIZE_T
2040 AC_TYPE_PID_T
2041 AC_TYPE_UID_T
2042 AC_TYPE_MODE_T
2043 AC_TYPE_OFF_T
1929 2044
1930 AC_MSG_CHECKING(for struct timeval) 2045 AC_MSG_CHECKING(for struct timeval)
1931 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME 2046 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
1932 #include <sys/time.h> 2047 #include <sys/time.h>
1933 #include <time.h> 2048 #include <time.h>
1957 dnl check byte order 2072 dnl check byte order
1958 AC_C_BIGENDIAN 2073 AC_C_BIGENDIAN
1959 2074
1960 dnl define SIZEOF_TYPE 2075 dnl define SIZEOF_TYPE
1961 AC_CHECK_SIZEOF(short) 2076 AC_CHECK_SIZEOF(short)
1962 AC_CHECK_SIZEOF(int) 2077 if test "$ac_cv_sizeof_short" = 0; then
1963 AC_CHECK_SIZEOF(long)
1964 if test "$ac_cv_sizeof_long" = 0; then
1965 echo "" 2078 echo ""
1966 echo "*** PANIC *** Configure tests are not working - compiler is broken." 2079 echo "*** PANIC *** Configure tests are not working - compiler is broken."
1967 echo "*** PANIC *** Please examine config.log for compilation errors." 2080 echo "*** PANIC *** Please examine config.log for compilation errors."
1968 exit 1 2081 exit 1
1969 fi 2082 fi
2083 AC_CHECK_SIZEOF(int)
2084 AC_CHECK_SIZEOF(long)
2085 AC_CHECK_SIZEOF(long long)
2086 AC_CHECK_SIZEOF(void *)
1970 2087
1971 dnl check for long file names 2088 dnl check for long file names
1972 AC_SYS_LONG_FILE_NAMES 2089 AC_SYS_LONG_FILE_NAMES
1973 2090
1974 dnl -lm is required by LISP_FLOAT_TYPE, among other things 2091 dnl -lm is required by LISP_FLOAT_TYPE, among other things
1975 AC_CHECK_LIB(m, sqrt) 2092 AC_CHECK_LIB(m, sqrt)
1976 2093
1977 dnl -lPW might be needed on some systems 2094 dnl -lPW might be needed on some systems
1978 AC_CHECK_LIB(PW, main) 2095 dnl But they break more other systems.
2096 dnl AC_CHECK_LIB(PW, main)
1979 2097
1980 dnl Floating operation support is now unconditional 2098 dnl Floating operation support is now unconditional
1981 AC_DEFINE(LISP_FLOAT_TYPE) 2099 AC_DEFINE(LISP_FLOAT_TYPE)
1982 2100
1983 dnl Determine type of mail locking from configure args and s&m headers 2101 dnl Determine type of mail locking from configure args and s&m headers
2007 else AC_MSG_RESULT(yes); XE_APPEND(-xildoff, ld_switch_site) 2125 else AC_MSG_RESULT(yes); XE_APPEND(-xildoff, ld_switch_site)
2008 fi 2126 fi
2009 else AC_MSG_RESULT(no) 2127 else AC_MSG_RESULT(no)
2010 fi 2128 fi
2011 2129
2012 dnl Dynodump (Solaris 2.x, x<6)
2013 AC_MSG_CHECKING(for dynodump)
2014 case "$opsys" in sol2* )
2015 AC_MSG_RESULT(yes)
2016 AC_DEFINE(DYNODUMP)
2017 XE_APPEND(dynodump, MAKE_SUBDIR)
2018 case "$machine" in
2019 sparc ) dynodump_arch=sparc ;;
2020 *86* ) dynodump_arch=i386 ;;
2021 powerpc ) dynodump_arch=ppc ;;
2022 esac
2023 dnl Dynodump requires the system linker
2024 test "$GCC" = "yes" && XE_APPEND(-fno-gnu-linker, ld_switch_site) ;;
2025 *) AC_MSG_RESULT(no) ;;
2026 esac
2027
2028 dnl Link with "-z ignore" on Solaris if supported 2130 dnl Link with "-z ignore" on Solaris if supported
2029 case "$opsys" in sol2-[[6-9]]* ) 2131 if test "$opsys" = "sol2" -a "${OS_RELEASE:-0}" -ge 56; then
2030 AC_MSG_CHECKING(for \"-z ignore\" linker flag) 2132 AC_MSG_CHECKING(for \"-z ignore\" linker flag)
2031 case "`ld -h 2>&1`" in 2133 case "`ld -h 2>&1`" in
2032 *-z\ ignore\|record* ) AC_MSG_RESULT(yes) 2134 *-z\ ignore\|record* ) AC_MSG_RESULT(yes)
2033 XE_PREPEND(-z ignore, ld_switch_site) ;; 2135 XE_PREPEND(-z ignore, ld_switch_site) ;;
2034 *) AC_MSG_RESULT(no) ;; 2136 *) AC_MSG_RESULT(no) ;;
2035 esac ;; 2137 esac
2036 esac 2138 fi
2037 2139
2038 dnl ---------------------- 2140 dnl ----------------------
2039 dnl Choose a window system 2141 dnl Choose a window system
2040 dnl ---------------------- 2142 dnl ----------------------
2041 2143
2111 2213
2112 XE_COMPUTE_RUNPATH() 2214 XE_COMPUTE_RUNPATH()
2113 2215
2114 if test "$extra_verbose" = "yes"; then 2216 if test "$extra_verbose" = "yes"; then
2115 echo; echo "X11 compilation variables:" 2217 echo; echo "X11 compilation variables:"
2116 PRINT_VAR(x_libraries, x_includes, X_CFLAGS, X_LIBS, X_PRE_LIBS, X_EXTRA_LIBS) 2218 PRINT_VAR(x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS)
2117 echo 2219 echo
2220 fi
2221
2222 dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO
2223 AC_CHECKING(for X defines extracted by xmkmf)
2224 rm -fr conftestdir
2225 if mkdir conftestdir; then
2226 cd conftestdir
2227 cat > Imakefile <<'EOF'
2228 xetest:
2229 @echo ${PROTO_DEFINES} ${STD_DEFINES}
2230 EOF
2231 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2232 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2233 xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
2234 fi
2235 cd ..
2236 rm -fr conftestdir
2237 for word in $xmkmf_defines; do
2238 case "$word" in
2239 -D*=* ) ;;
2240 -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
2241 AC_DEFINE_UNQUOTED($word) ;;
2242 esac
2243 done
2118 fi 2244 fi
2119 2245
2120 dnl make sure we can find Intrinsic.h 2246 dnl make sure we can find Intrinsic.h
2121 AC_CHECK_HEADER(X11/Intrinsic.h, , 2247 AC_CHECK_HEADER(X11/Intrinsic.h, ,
2122 [AC_MSG_ERROR("Unable to find X11 header files.")]) 2248 [AC_MSG_ERROR("Unable to find X11 header files.")])
2181 dnl #### Someone, please add a better function than main 2307 dnl #### Someone, please add a better function than main
2182 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) 2308 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x))
2183 2309
2184 dnl Autodetect -lXaw 2310 dnl Autodetect -lXaw
2185 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no) 2311 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no)
2186
2187 dnl Autodetect -DNARROWPROTO
2188 AC_MSG_CHECKING(for NARROWPROTO)
2189 rm -fr conftestdir
2190 if mkdir conftestdir; then
2191 cd conftestdir
2192 cat > Imakefile <<'EOF'
2193 xetest:
2194 @echo 'proto_defines="${PROTO_DEFINES}"'
2195 EOF
2196 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2197 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2198 eval `${MAKE-make} xetest 2>/dev/null | grep -v make`
2199 case "$proto_defines" in *NARROWPROTO* ) narrowproto=yes ;; esac
2200 fi
2201 cd ..
2202 rm -fr conftestdir
2203 fi
2204 test -z "$narrowproto" && narrowproto=no
2205 AC_MSG_RESULT($narrowproto)
2206 test "$narrowproto" = "yes" && AC_DEFINE(NARROWPROTO)
2207 2312
2208 fi dnl $with_x11 = yes 2313 fi dnl $with_x11 = yes
2209 2314
2210 test -z "$window_system" && window_system="none" 2315 test -z "$window_system" && window_system="none"
2211 2316
2327 AC_DEFINE(HAVE_GIF) 2432 AC_DEFINE(HAVE_GIF)
2328 XE_ADD_OBJS(dgif_lib.o gif_err.o gifalloc.o) 2433 XE_ADD_OBJS(dgif_lib.o gif_err.o gifalloc.o)
2329 fi 2434 fi
2330 2435
2331 dnl Autodetect Xpm 2436 dnl Autodetect Xpm
2332 AC_MSG_CHECKING(for Xpm) 2437 AC_MSG_CHECKING(for Xpm - no older than 3.4f)
2333 xe_check_libs=-lXpm 2438 xe_check_libs=-lXpm
2334 test -z "$with_xpm" && { AC_TRY_RUN([#include <X11/xpm.h> 2439 test -z "$with_xpm" && { AC_TRY_RUN([#include <X11/xpm.h>
2335 int main(int argc, char *argv[]) { 2440 int main(int c, char **v) {
2336 return (XpmIncludeVersion != XpmLibraryVersion()) || 2441 return c == 1 ? 0 :
2337 XpmIncludeVersion < 30406; 2442 XpmIncludeVersion != XpmLibraryVersion() ? 1 :
2338 }], with_xpm=yes, with_xpm=no) 2443 XpmIncludeVersion < 30406 ? 2 :
2444 0 ;
2445 }], [./conftest foobar; xpm_status=$?;
2446 if test "$xpm_status" = "0"; then with_xpm=yes; else with_xpm=no; fi;],
2447 with_xpm=no, with_xpm=no)
2339 } 2448 }
2340 xe_check_libs= 2449 xe_check_libs=
2341 AC_MSG_RESULT($with_xpm) 2450 AC_MSG_RESULT($with_xpm)
2451 if test "$xpm_status" = "1" -o "$xpm_status" = "2"; then
2452 test "$xpm_status" = "1" && problem="Xpm library version and header file version don't match!"
2453 test "$xpm_status" = "2" && problem="Xpm library version is too old!"
2454 echo "
2455 *** WARNING *** $problem
2456 I'm not touching that with a 10-foot pole!
2457 If you really want to use the installed version of Xpm, rerun
2458 configure --with-xpm=yes, but don't blame me if XEmacs crashes!
2459 "
2460 fi
2342 if test "$with_xpm" = "yes"; then 2461 if test "$with_xpm" = "yes"; then
2343 AC_DEFINE(HAVE_XPM) 2462 AC_DEFINE(HAVE_XPM)
2344 XE_PREPEND(-lXpm, libs_x) 2463 XE_PREPEND(-lXpm, libs_x)
2345 fi 2464 fi
2346 2465
2477 AC_CHECK_LIB(intl, strerror) 2596 AC_CHECK_LIB(intl, strerror)
2478 2597
2479 AC_CHECKING(for Mule input methods) 2598 AC_CHECKING(for Mule input methods)
2480 dnl Do we have the XmIm* routines? And if so, do we want to use them? 2599 dnl Do we have the XmIm* routines? And if so, do we want to use them?
2481 dnl XIM seems to be flaky except on Solaris... 2600 dnl XIM seems to be flaky except on Solaris...
2482 test -z "$with_xim" && case "$opsys" in sol2* ) ;; *) with_xim=no ;; esac 2601 test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no
2483 case "$with_xim" in "" | "yes" ) 2602 case "$with_xim" in "" | "yes" )
2484 AC_CHECKING(for XIM) 2603 AC_CHECKING(for XIM)
2485 AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif, with_xim=xlib) 2604 AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif, with_xim=xlib)
2486 esac 2605 esac
2487 if test "$with_xim" != "no" ; then 2606 if test "$with_xim" != "no" ; then
2655 2774
2656 dnl Check whether strcoll exists and works correctly. (This does more 2775 dnl Check whether strcoll exists and works correctly. (This does more
2657 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL. 2776 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL.
2658 AC_FUNC_STRCOLL 2777 AC_FUNC_STRCOLL
2659 2778
2779 dnl If `getpgrp' takes no argument (the POSIX.1 version), define
2780 dnl `GETPGRP_VOID'. Otherwise, it is the BSD version, which takes a
2781 dnl process ID as an argument.
2782 AC_CHECK_FUNCS(getpgrp)
2783 AC_FUNC_GETPGRP
2784
2660 dnl We used to call AC_FUNC_MMAP here 2785 dnl We used to call AC_FUNC_MMAP here
2661 dnl Instead we now use following, suggested by Neal Becker 2786 dnl Instead we now use following, suggested by Neal Becker
2662 AC_MSG_CHECKING(for working mmap) 2787 AC_MSG_CHECKING(for working mmap)
2663 case "$opsys" in ultrix* ) have_mmap=no ;; *) 2788 case "$opsys" in ultrix* ) have_mmap=no ;; *)
2664 AC_TRY_RUN([#include <stdio.h> 2789 AC_TRY_RUN([#include <stdio.h>
2733 for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp" ; do 2858 for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp" ; do
2734 if test -r $f; then AC_DEFINE_UNQUOTED(AIX_SMT_EXP, -bI:$f) break; fi 2859 if test -r $f; then AC_DEFINE_UNQUOTED(AIX_SMT_EXP, -bI:$f) break; fi
2735 done 2860 done
2736 2861
2737 dnl Find out which version of XEmacs this is. 2862 dnl Find out which version of XEmacs this is.
2738 file="$srcdir/lisp/version.el" 2863 . "$srcdir/version.sh" || exit 1;
2739 version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"` 2864 #version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"`
2740 if test -z "$version"; then 2865 #if test -z "$version"; then
2741 echo "$progname: can't find current emacs version in \"$file\"." >&2 2866 # echo "$progname: can't find current emacs version in \"$file\"." >&2
2742 exit 1 2867 # exit 1
2743 fi 2868 #fi
2744 beta=`sed -ne 's/^.*beta.*(beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"` 2869 #beta=`sed -ne 's/^.*beta.*(beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"`
2745 test -n "$beta" && version="${version}-b${beta}" 2870 #test -n "$beta" && version="${version}-b${beta}"
2871 version="${emacs_major_version}.${emacs_minor_version}"
2872 AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version)
2873 AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version)
2874 if test -n "$emacs_beta_version"; then
2875 version="${version}-b${emacs_beta_version}"
2876 AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version)
2877 fi
2878 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
2746 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") 2879 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
2747 main_1_id=`echo main_1_xemacs_${version}_${canonical} | sed 'y/.-/__/'` 2880 canonical_version=`echo ${version}_${canonical} | sed 'y/.-/__/'`
2748 AC_DEFINE_UNQUOTED(main_1, $main_1_id) 2881 AC_DEFINE_UNQUOTED(CANONICAL_VERSION, $canonical_version)
2749 2882
2750 2883
2751 dnl Check for sound of various sorts. 2884 dnl Check for sound of various sorts.
2752 2885
2753 dnl Autodetect native sound 2886 dnl Autodetect native sound
2926 fi 3059 fi
2927 eval "with_${feature}=no" 3060 eval "with_${feature}=no"
2928 done 3061 done
2929 fi dnl with_tty 3062 fi dnl with_tty
2930 3063
3064 dnl Do we need event-unixoid.o ?
3065 test "$with_x11" = "yes" -o "$with_tty" = "yes" && XE_ADD_OBJS(event-unixoid.o)
3066
2931 dnl Database support 3067 dnl Database support
2932 dnl <mdiers@logware.de> 3068 dnl <mdiers@logware.de>
2933 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support. 3069 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support.
2934 dnl On FreeBSD, both DB and DBM are part of libc. 3070 dnl On FreeBSD, both DB and DBM are part of libc.
2935 dnl Note that unless support for DB/(G)DBM is explicitly disabled, we always 3071 dnl Note that unless support for DB/(G)DBM is explicitly disabled, we always
3054 fi 3190 fi
3055 done 3191 done
3056 3192
3057 if test "$extra_verbose" = "yes"; then 3193 if test "$extra_verbose" = "yes"; then
3058 echo "" 3194 echo ""
3059 PRINT_VAR(extra_objs, 3195 PRINT_VAR(extra_objs
3060 c_switch_general, c_switch_window_system, c_switch_all, 3196 c_switch_general c_switch_window_system c_switch_all
3061 ld_switch_general, ld_switch_window_system, ld_switch_all, 3197 ld_switch_general ld_switch_window_system ld_switch_all
3062 ld_libs_general, ld_libs_window_system, ld_libs_all) 3198 ld_libs_general ld_libs_window_system ld_libs_all)
3063 echo "" 3199 echo ""
3064 fi 3200 fi
3065 3201
3066 dnl Create some auxiliary files 3202 dnl Create some auxiliary files
3067 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then 3203 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
3340 dnl except ./Makefile from $srcdir/Makefile.in 3476 dnl except ./Makefile from $srcdir/Makefile.in
3341 3477
3342 AC_OUTPUT($internal_makefile_list,[ 3478 AC_OUTPUT($internal_makefile_list,[
3343 for dir in $MAKE_SUBDIR; do 3479 for dir in $MAKE_SUBDIR; do
3344 echo creating $dir/Makefile 3480 echo creating $dir/Makefile
3345 ( 3481 ([
3346 cd $dir 3482 cd $dir
3347 rm -f junk.c 3483 rm -f junk.c
3348 sed -e 's/^# Generated.*//' -e 's%/\*\*/#.*%%' < Makefile.in > junk.c; 3484 < Makefile.in \
3485 sed -e 's/^# Generated.*//' \
3486 -e 's%/\*\*/#.*%%' \
3487 -e 's/^[ \f\t]*#[ \f\t]*/#/' \
3488 -e '/^##/d' \
3489 -e '/^#/ {
3490 p
3491 d
3492 }' -e '/./ {
3493 s/\([\"]\)/\\\1/g
3494 s/^/"/
3495 s/$/"/
3496 }' > junk.c;
3349 $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp; 3497 $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp;
3350 < junk.cpp \ 3498 < junk.cpp \
3351 sed -e 's/^#.*//' \ 3499 sed -e 's/^#.*//' \
3352 -e 's/^[[ \f\t]][[ \f\t]]*$//' \ 3500 -e 's/^[ \f\t][ \f\t]*$//' \
3353 -e 's/^ / /' \ 3501 -e 's/^ / /' \
3354 | sed -n -e '/^..*$/p' \ 3502 | sed -n -e '/^..*$/p' \
3355 > Makefile.new 3503 | sed '/^"/ {
3504 s/\\\([\"]\)/\1/g
3505 s/^"//
3506 s/"$//
3507 }' > Makefile.new
3356 chmod 444 Makefile.new 3508 chmod 444 Makefile.new
3357 mv -f Makefile.new Makefile 3509 mv -f Makefile.new Makefile
3358 rm -f junk.c junk.cpp 3510 rm -f junk.c junk.cpp
3359 ) 3511 ])
3360 done 3512 done
3361 ], 3513 ],
3362 [CPP="$CPP" 3514 [CPP="$CPP"
3363 CPPFLAGS="$CPPFLAGS" 3515 CPPFLAGS="$CPPFLAGS"
3364 top_srcdir="$srcdir" 3516 top_srcdir="$srcdir"