comparison configure.in @ 306:9ea74add5d37 r21-0b51

Import from CVS: tag r21-0b51
author cvs
date Mon, 13 Aug 2007 10:41:58 +0200
parents 3cc9f0ebfbd1
children 33bdb3d4b97f
comparison
equal deleted inserted replaced
305:18920a7e9a86 306:9ea74add5d37
77 [cat > conftest.$ac_ext <<EOF 77 [cat > conftest.$ac_ext <<EOF
78 [#]line __oline__ "configure" 78 [#]line __oline__ "configure"
79 #include "confdefs.h" 79 #include "confdefs.h"
80 [$1] 80 [$1]
81 EOF 81 EOF
82 if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit) 2>&AC_FD_CC 82 if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit $?) 2>&AC_FD_CC
83 then 83 then
84 dnl Do not remove the temporary files here, so they can be examined. 84 dnl Do not remove the temporary files here, so they can be examined.
85 ifelse([$2], , :, [$2]) 85 ifelse([$2], , :, [$2])
86 else 86 else
87 conftest_rc="$?"
87 echo "configure: failed program was:" >&AC_FD_CC 88 echo "configure: failed program was:" >&AC_FD_CC
88 cat conftest.$ac_ext >&AC_FD_CC 89 cat conftest.$ac_ext >&AC_FD_CC
89 ifelse([$3], , , [ rm -fr conftest* 90 ifelse([$3], , , [ rm -fr conftest*
90 $3 91 $3
91 ])dnl 92 ])dnl
934 fi 935 fi
935 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename") 936 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
936 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") 937 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
937 938
938 if test "$with_infodock" = "yes"; then 939 if test "$with_infodock" = "yes"; then
939 if test ! -f ../ID-INSTALL; then 940 if test ! -f ../../ID-INSTALL; then
940 echo "Cannot build InfoDock without InfoDock sources" 941 echo "Cannot build InfoDock without InfoDock sources"
941 with_infodock=no 942 with_infodock=no
942 fi 943 fi
943 fi 944 fi
944 945
1017 machine='' opsys='' 1018 machine='' opsys=''
1018 1019
1019 dnl Straightforward machine determination 1020 dnl Straightforward machine determination
1020 case "$canonical" in 1021 case "$canonical" in
1021 sparc-*-* ) machine=sparc ;; 1022 sparc-*-* ) machine=sparc ;;
1022 alpha-*-* ) machine=alpha ;; 1023 alpha*-*-* ) machine=alpha ;;
1023 vax-*-* ) machine=vax ;; 1024 vax-*-* ) machine=vax ;;
1024 mips-dec-* ) machine=pmax ;; 1025 mips-dec-* ) machine=pmax ;;
1025 mips-sgi-* ) machine=iris4d ;; 1026 mips-sgi-* ) machine=iris4d ;;
1026 romp-ibm-* ) machine=ibmrt ;; 1027 romp-ibm-* ) machine=ibmrt ;;
1027 rs6000-ibm-aix* ) machine=ibmrs6000 ;; 1028 rs6000-ibm-aix* ) machine=ibmrs6000 ;;
1592 AC_MSG_RESULT($have_glibc) 1593 AC_MSG_RESULT($have_glibc)
1593 dnl I'm tired of pop being broken with GLIBC -slb 1594 dnl I'm tired of pop being broken with GLIBC -slb
1594 dnl Well. then why not fix fucking pop? 1595 dnl Well. then why not fix fucking pop?
1595 test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE) 1596 test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE)
1596 1597
1597 AC_MSG_CHECKING(whether we are using SunPro C) 1598
1598 AC_TRY_COMPILE([],[#ifndef __SUNPRO_C 1599 dnl Identify compilers to enable compiler-specific hacks.
1599 #error Not a SunPro compiler :-( 1600 dnl Add support for other compilers HERE!
1600 ******* ======= ******** &&&&&&&& 1601 dnl GCC is already identified elsewhere.
1602 AC_TRY_RUN([int main () {
1603 #if defined __SUNPRO_C
1604 return 11;
1605 #elif defined __DECC
1606 return 12;
1607 #else
1608 return 0;
1601 #endif 1609 #endif
1602 ], __sunpro_c=yes, __sunpro_c=no) 1610 }], [],
1603 AC_MSG_RESULT($__sunpro_c) 1611 [case "$conftest_rc" in
1612 11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
1613 12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;;
1614 esac])
1615
1604 1616
1605 dnl case "$canonical" in 1617 dnl case "$canonical" in
1606 dnl *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;; 1618 dnl *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;;
1607 dnl esac 1619 dnl esac
1608 1620
1724 have_terminfo mail_use_flock mail_use_lockf) && echo "" 1736 have_terminfo mail_use_flock mail_use_lockf) && echo ""
1725 1737
1726 dnl Non-ordinary link usually requires -lc 1738 dnl Non-ordinary link usually requires -lc
1727 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc" 1739 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
1728 1740
1741 dnl Compiler-specific hacks
1742 dnl DEC C requires -std
1743 test "$__DECC" = "yes" && XE_APPEND(-std, c_switch_site)
1744
1729 dnl Calculalate value of CFLAGS: 1745 dnl Calculalate value of CFLAGS:
1730 dnl Use either command line flag, environment var, or autodetection 1746 dnl Use either command line flag, environment var, or autodetection
1731 if test "$cflags_specified" = "no"; then 1747 if test "$cflags_specified" = "no"; then
1732 dnl Following values of CFLAGS are known to work well. 1748 dnl Following values of CFLAGS are known to work well.
1733 dnl Should we take debugging options into consideration? 1749 dnl Should we take debugging options into consideration?
1737 dnl test "$opsys $machine" = "linux intel386" && \ 1753 dnl test "$opsys $machine" = "linux intel386" && \
1738 dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2" 1754 dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
1739 dnl cygwin can't cope with -O3 1755 dnl cygwin can't cope with -O3
1740 test "$opsys $machine" = "cygwin32 intel386" && \ 1756 test "$opsys $machine" = "cygwin32 intel386" && \
1741 CFLAGS="-g -O2 -Wall -Wno-switch" 1757 CFLAGS="-g -O2 -Wall -Wno-switch"
1742 elif test "$__sunpro_c" = "yes"; then 1758 elif test "$__SUNPRO_C" = "yes"; then
1743 case "$opsys" in 1759 case "$opsys" in
1744 sol2 ) CFLAGS="-v -xO4" ;; 1760 sol2 ) CFLAGS="-v -xO4" ;;
1745 sunos4* ) CFLAGS="-xO2";; 1761 sunos4* ) CFLAGS="-xO2";;
1746 esac 1762 esac
1763 elif test "$__DECC" = "yes"; then
1764 CFLAGS="-O3"
1747 elif test "$CC" = "xlc"; then 1765 elif test "$CC" = "xlc"; then
1748 CFLAGS="-O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000" 1766 CFLAGS="-O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
1767 dnl ### Add optimal CFLAGS support for other compilers HERE!
1749 else 1768 else
1750 dnl ### Add tests for other compilers here...
1751 CFLAGS="-O" ;dnl The only POSIX-approved flag 1769 CFLAGS="-O" ;dnl The only POSIX-approved flag
1752 fi 1770 fi
1753 fi 1771 fi
1754 1772
1755 dnl Inform compiler that certain flags are meant for the linker 1773 dnl Inform compiler that certain flags are meant for the linker
1887 dnl ------------------------------------- 1905 dnl -------------------------------------
1888 1906
1889 if test "$dynamic" = "no"; then add_runtime_path=no 1907 if test "$dynamic" = "no"; then add_runtime_path=no
1890 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes 1908 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
1891 else case "$opsys" in 1909 else case "$opsys" in
1892 sol2 | irix* | *bsd* ) add_runtime_path=yes ;; 1910 sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
1893 * ) add_runtime_path=no ;; 1911 * ) add_runtime_path=no ;;
1894 esac 1912 esac
1895 fi 1913 fi
1896 1914
1897 if test "$add_runtime_path" = "yes"; then 1915 if test "$add_runtime_path" = "yes"; then
1898 dnl Try to autodetect runtime library flag (usually -R), 1916 dnl Try to autodetect runtime library flag (usually -R),
1899 dnl and whether it works (or at least does no harm) 1917 dnl and whether it works (or at least does no harm)
1900 AC_MSG_CHECKING("for runtime libraries flag") 1918 AC_MSG_CHECKING("for runtime libraries flag")
1901 dash_r="" 1919 case "$opsys" in
1902 for try_dash_r in "-R" "-R " "-rpath "; do 1920 sol2 ) dash_r="-R" ;;
1903 xe_check_libs="${try_dash_r}/no/such/file-or-directory" 1921 decosf* | linux* ) dash_r="-rpath" ;;
1904 XE_PROTECT_LINKER_FLAGS(xe_check_libs) 1922 *)
1905 AC_TRY_LINK(, , dash_r="$try_dash_r") 1923 dash_r=""
1906 xe_check_libs="" 1924 for try_dash_r in "-R" "-R " "-rpath "; do
1907 test -n "$dash_r" && break 1925 xe_check_libs="${try_dash_r}/no/such/file-or-directory"
1908 done 1926 XE_PROTECT_LINKER_FLAGS(xe_check_libs)
1927 AC_TRY_LINK(, , dash_r="$try_dash_r")
1928 xe_check_libs=""
1929 test -n "$dash_r" && break
1930 done ;;
1931 esac
1909 if test -n "$dash_r"; 1932 if test -n "$dash_r";
1910 then AC_MSG_RESULT("\"${dash_r}\"") 1933 then AC_MSG_RESULT("\"${dash_r}\"")
1911 else AC_MSG_RESULT(NONE) 1934 else AC_MSG_RESULT(NONE)
1912 fi 1935 fi
1913 fi 1936 fi
2278 XE_APPEND(-I${inc_dir}, X_CFLAGS) 2301 XE_APPEND(-I${inc_dir}, X_CFLAGS)
2279 esac 2302 esac
2280 break; dnl Only need ONE X11 implementation ! 2303 break; dnl Only need ONE X11 implementation !
2281 fi 2304 fi
2282 done 2305 done
2306
2307 dnl Avoid version mismatch for shared library libXm.so on osf4
2308 if test "$GCC" = yes -a -d /usr/shlib; then XE_APPEND(-L/usr/shlib, X_LIBS); fi
2283 2309
2284 ld_switch_x_site="$X_LIBS" 2310 ld_switch_x_site="$X_LIBS"
2285 2311
2286 XE_COMPUTE_RUNPATH() 2312 XE_COMPUTE_RUNPATH()
2287 2313
3465 #endif 3491 #endif
3466 #endif 3492 #endif
3467 #include <$path> 3493 #include <$path>
3468 ],[], db_h_path="$path"; break) 3494 ],[], db_h_path="$path"; break)
3469 done 3495 done
3470 if test -z "$db_h_path" 3496 if test -z "$db_h_path"
3471 then AC_MSG_RESULT(no); with_database_berkdb=no 3497 then AC_MSG_RESULT(no); with_database_berkdb=no
3472 else AC_MSG_RESULT($db_h_path) 3498 else AC_MSG_RESULT($db_h_path)
3473 fi 3499 fi
3474 3500
3475 if test "$with_database_berkdb" != "no"; then 3501 if test "$with_database_berkdb" != "no"; then
3621 echo "creating src/gdbinit"; echo "" 3647 echo "creating src/gdbinit"; echo ""
3622 echo "source $srcdir/src/gdbinit" > src/gdbinit 3648 echo "source $srcdir/src/gdbinit" > src/gdbinit
3623 fi 3649 fi
3624 3650
3625 dnl Create top level .sbinit for Sun compilers 3651 dnl Create top level .sbinit for Sun compilers
3626 if test "$__sunpro_c" = "yes"; then 3652 if test "$__SUNPRO_C" = "yes"; then
3627 echo "creating .sbinit"; echo "" 3653 echo "creating .sbinit"; echo ""
3628 ( echo "# For use with Sun WorkShop's Source browser." 3654 ( echo "# For use with Sun WorkShop's Source browser."
3629 echo "# See sbquery(1) and sbinit(4) for more information" 3655 echo "# See sbquery(1) and sbinit(4) for more information"
3630 for dir in $MAKE_SUBDIR; do echo "import $dir"; done 3656 for dir in $MAKE_SUBDIR; do echo "import $dir"; done
3631 ) > .sbinit 3657 ) > .sbinit