Mercurial > hg > xemacs-beta
comparison configure.in @ 1889:bf8be6575eae
[xemacs-hg @ 2004-01-28 11:20:34 by stephent]
configure fixes <87ektkgw4y.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Wed, 28 Jan 2004 11:20:42 +0000 |
parents | b37a2b08a901 |
children | 84785da441f9 |
comparison
equal
deleted
inserted
replaced
1888:71e9a0048be8 | 1889:bf8be6575eae |
---|---|
74 ]+],[ ]); do eval "echo \"$var = '\$$var'\""; done]) | 74 ]+],[ ]); do eval "echo \"$var = '\$$var'\""; done]) |
75 | 75 |
76 dnl Disable cache files: | 76 dnl Disable cache files: |
77 dnl This is controversial, but I am convinced this is the right way to go, | 77 dnl This is controversial, but I am convinced this is the right way to go, |
78 dnl at least by default. Otherwise there are too many surprises. | 78 dnl at least by default. Otherwise there are too many surprises. |
79 dnl It's been several years, and nobody noticed. -- sjt, 2004-01-28 | |
79 define([AC_CACHE_LOAD], )dnl | 80 define([AC_CACHE_LOAD], )dnl |
80 define([AC_CACHE_SAVE], )dnl | 81 define([AC_CACHE_SAVE], )dnl |
81 define([AC_CACHE_VAL], [ | 82 define([AC_CACHE_VAL], [ |
82 $2 | 83 $2 |
83 ])dnl | 84 ])dnl |
246 dnl XE_STRIP_4TH_COMPONENT(var) | 247 dnl XE_STRIP_4TH_COMPONENT(var) |
247 dnl Changes i986-pc-linux-gnu to i986-pc-linux, as God (not RMS) intended. | 248 dnl Changes i986-pc-linux-gnu to i986-pc-linux, as God (not RMS) intended. |
248 define([XE_STRIP_4TH_COMPONENT], | 249 define([XE_STRIP_4TH_COMPONENT], |
249 [$1=`echo "$$1" | sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'`]) | 250 [$1=`echo "$$1" | sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'`]) |
250 | 251 |
251 dnl Initialize some variables set by options. | |
252 dnl The variables have the same names as the options, with | |
253 dnl dashes changed to underlines. | |
254 | |
255 define([USAGE_ERROR], | 252 define([USAGE_ERROR], |
256 [(echo "$progname: Usage error:" | 253 [(echo "$progname: Usage error:" |
257 echo " " $1 | 254 echo " " $1 |
258 echo " Use \`$progname --help' to show usage.") >&2 && exit 1]) | 255 echo " Use \`$progname --help' to show usage.") >&2 && exit 1]) |
259 | 256 |
277 unset CDPATH | 274 unset CDPATH |
278 else | 275 else |
279 if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi | 276 if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi |
280 fi | 277 fi |
281 | 278 |
282 dnl srcdir is used internally by autoconf macros | 279 dnl Find the source directory. |
283 dnl parse it here | 280 dnl srcdir is used internally by autoconf macros, |
284 for xe_parse_arg in "$@"; do | 281 dnl so parse it here. |
282 for xe_parse_arg; do | |
285 case $xe_parse_arg in | 283 case $xe_parse_arg in |
286 --srcdir) USAGE_ERROR("The \`--srcdir' option requires a boolean value: \`yes' or \`no'.") ;; | 284 --srcdir) USAGE_ERROR(["The \`--srcdir' option requires a string value."]) ;; |
287 --srcdir=*) srcdir=`echo $xe_parse_arg | sed -e 's/--srcdir=//'` ;; | 285 --srcdir=*) srcdir=`echo $xe_parse_arg | sed -e 's/--srcdir=//'` ;; |
288 *) ;; | 286 *) ;; |
289 esac | 287 esac |
290 done | 288 done |
291 | 289 |
308 x_includes=NONE | 306 x_includes=NONE |
309 x_libraries=NONE | 307 x_libraries=NONE |
310 | 308 |
311 dnl Initialize some other variables. | 309 dnl Initialize some other variables. |
312 subdirs= | 310 subdirs= |
313 MFLAGS= MAKEFLAGS= | 311 MFLAGS= |
312 MAKEFLAGS= | |
314 SHELL=${CONFIG_SHELL-/bin/sh} | 313 SHELL=${CONFIG_SHELL-/bin/sh} |
315 dnl Maximum number of lines to put in a shell here document. | 314 dnl Maximum number of lines to put in a shell here document. |
316 ac_max_here_lines=12 | 315 ac_max_here_lines=12 |
317 ])dnl AC_INIT_PARSE_ARGS | 316 ])dnl AC_INIT_PARSE_ARGS |
318 | 317 |
319 AC_INIT(src/lisp.h)dnl | 318 AC_INIT(src/lisp.h)dnl |
320 AC_CONFIG_HEADER(src/config.h lwlib/config.h) | 319 AC_CONFIG_HEADER(src/config.h lwlib/config.h) |
320 | |
321 dnl Remove any more than one leading "." element from the path name. | 321 dnl Remove any more than one leading "." element from the path name. |
322 dnl If we do not remove them, then another "./" will be prepended to | 322 dnl If we do not remove them, then another "./" will be prepended to |
323 dnl the file name each time we use config.status, and the program name | 323 dnl the file name each time we use config.status, and the program name |
324 dnl will get larger and larger. This would not be a problem, except | 324 dnl will get larger and larger. This would not be a problem, except |
325 dnl that since progname gets recorded in all the Makefiles this script | 325 dnl that since progname gets recorded in all the Makefiles this script |
441 dnl some shell magic to make 'set x "$arguments"; shift' work portably. | 441 dnl some shell magic to make 'set x "$arguments"; shift' work portably. |
442 while test $# != 0; do | 442 while test $# != 0; do |
443 arg="$1"; shift | 443 arg="$1"; shift |
444 case "$arg" in | 444 case "$arg" in |
445 --no-create|--no-recursion) ;; | 445 --no-create|--no-recursion) ;; |
446 --srcdir=*) ;; | 446 --srcdir=*) ;; dnl Ignore here; parsed during AC_INIT. |
447 dnl Anything starting with a hyphen we assume is an option. | 447 dnl Anything starting with a hyphen we assume is an option. |
448 -* ) | 448 -* ) |
449 dnl Separate the switch name from the value it is being given. | 449 dnl Separate the switch name from the value it is being given. |
450 case "$arg" in | 450 case "$arg" in |
451 -*=*) | 451 -*=*) |
766 fi | 766 fi |
767 echeck_notfirst=true | 767 echeck_notfirst=true |
768 done | 768 done |
769 ;; | 769 ;; |
770 | 770 |
771 dnl Has the user tried to tell us where the X files are? | |
772 dnl I think these are dopey, but no less than three alpha | |
773 dnl testers, at large sites, have said they have their X files | |
774 dnl installed in odd places. | |
775 | |
776 dnl Has the user specified one of the path options? | 771 dnl Has the user specified one of the path options? |
777 prefix | exec_prefix | bindir | datadir | statedir | libdir | \ | 772 prefix | exec_prefix | bindir | datadir | statedir | libdir | \ |
778 mandir | infodir | infopath | lispdir | etcdir | \ | 773 mandir | infodir | infopath | lispdir | etcdir | \ |
779 archlibdir | docdir | package_path | moduledir ) | 774 archlibdir | docdir | package_path | moduledir ) |
780 dnl If the value was omitted, get it from the next argument. | 775 dnl If the value was omitted, get it from the next argument. |
895 ]) | 890 ]) |
896 | 891 |
897 dnl CDE requires tooltalk | 892 dnl CDE requires tooltalk |
898 XE_CHECK_FEATURE_DEPENDENCY(cde, tooltalk) | 893 XE_CHECK_FEATURE_DEPENDENCY(cde, tooltalk) |
899 | 894 |
900 dnl Find the source directory. | 895 dnl Done parsing options. |
901 case "$srcdir" in | |
902 | |
903 dnl If srcdir is not specified, try directory part of $0, ".", or "..". | |
904 "" ) | |
905 for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[[^/]]*$||'`" "." ".." ; do | |
906 if test -f "$dir/src/lisp.h" -a \ | |
907 -f "$dir/lisp/version.el" ; then | |
908 srcdir="$dir" | |
909 break | |
910 fi | |
911 done | |
912 if test -z "$srcdir" ; then | |
913 USAGE_ERROR(["None of the path to configure, the current directory, | |
914 and its parent seem to contain the XEmacs sources. If you do not want | |
915 to build XEmacs in its source tree, you should run \`$progname' in the | |
916 directory in which you wish to build XEmacs, using the \`--srcdir' option | |
917 to say where the sources may be found."]) | |
918 fi | |
919 ;; | |
920 | |
921 dnl Otherwise, check if the directory they specified is okay. | |
922 * ) | |
923 if test ! -f "$srcdir/src/lisp.h" -o \ | |
924 ! -f "$srcdir/lisp/version.el" ; then | |
925 USAGE_ERROR(["The directory specified with the \`--srcdir' option, | |
926 \`$srcdir', doesn't seem to contain the XEmacs sources. You should | |
927 either run the \`$progname' script at the top of the XEmacs source | |
928 tree, or use the \`--srcdir' option to specify the XEmacs source directory."]) | |
929 fi | |
930 ;; | |
931 esac | |
932 | |
933 dnl ########################################################################### | 896 dnl ########################################################################### |
934 if test -z "$configuration"; then | 897 if test -z "$configuration"; then |
935 dnl Guess the configuration | 898 dnl Guess the configuration |
936 configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess` | 899 configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess` |
937 if test -z "$configuration"; then | 900 if test -z "$configuration"; then |
1018 version="${version}.${emacs_beta_version}" | 981 version="${version}.${emacs_beta_version}" |
1019 AC_DEFINE_UNQUOTED(EMACS_PATCH_LEVEL, $emacs_beta_version) | 982 AC_DEFINE_UNQUOTED(EMACS_PATCH_LEVEL, $emacs_beta_version) |
1020 fi | 983 fi |
1021 fi | 984 fi |
1022 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename") | 985 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename") |
1023 if test "X$xemacs_extra_name" != "X"; then | 986 if test "$xemacs_extra_name" != ""; then |
1024 AC_DEFINE_UNQUOTED(XEMACS_EXTRA_NAME, "$xemacs_extra_name") | 987 AC_DEFINE_UNQUOTED(XEMACS_EXTRA_NAME, "$xemacs_extra_name") |
1025 fi | 988 fi |
1026 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") | 989 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") |
1027 | 990 |
1028 if test "$with_infodock" = "yes"; then | 991 if test "$with_infodock" = "yes"; then |
1720 [case "$conftest_rc" in | 1683 [case "$conftest_rc" in |
1721 11) echo "You appear to be using GCC version 3 or above."; __GCC3=yes ;; | 1684 11) echo "You appear to be using GCC version 3 or above."; __GCC3=yes ;; |
1722 esac]) | 1685 esac]) |
1723 fi | 1686 fi |
1724 | 1687 |
1688 dnl Support for using a different compiler for xemacs itself. | |
1689 dnl Useful for building XEmacs with a C++ compiler. | |
1690 dnl For example, `configure --compiler=gcc --xemacs-compiler=g++ | |
1691 | |
1692 dnl The compiler used to build xemacs, as opposed to the compiler | |
1693 dnl used by configure and lib-src, is determined from the following | |
1694 dnl sources, in order of priority: | |
1695 dnl o --xemacs-compiler configure flag | |
1696 dnl o XEMACS_CC environment variable | |
1697 dnl o same as the regular compiler, (determined previously) | |
1698 | |
1699 dnl We don't do AC_PROG_CC for XEMACS_CC; if we can't trust these people.... | |
1700 test -n "$xemacs_compiler" && XEMACS_CC="$xemacs_compiler" | |
1701 : ${XEMACS_CC:="$CC"} | |
1702 | |
1725 dnl Figure out what C preprocessor to use. | 1703 dnl Figure out what C preprocessor to use. |
1726 | 1704 |
1727 dnl On Sun systems, people sometimes set up the variable CPP | 1705 dnl On Sun systems, people sometimes set up the variable CPP |
1728 dnl with a value that is a directory, not an executable at all. | 1706 dnl with a value that is a directory, not an executable at all. |
1729 dnl Detect that case, and ignore that value. | 1707 dnl Detect that case, and ignore that value. |
1990 c_switch_system="$xe_save_c_switch_system"]) | 1968 c_switch_system="$xe_save_c_switch_system"]) |
1991 AC_MSG_RESULT($need_kalloca) | 1969 AC_MSG_RESULT($need_kalloca) |
1992 test "$need_kalloca" = "yes" && XE_APPEND(-Kalloca,c_switch_system) | 1970 test "$need_kalloca" = "yes" && XE_APPEND(-Kalloca,c_switch_system) |
1993 fi | 1971 fi |
1994 | 1972 |
1973 dnl If we're specifying XEMACS_CC, it'd better be in the same family | |
1974 dnl as CC or the following flag calculations are bogus. | |
1975 dnl #### We may want to actually error and abort here, but I am not sure. | |
1976 if test "$CC" != "$XEMACS_CC"; then | |
1977 if test "$XEMACS_CC" = "g++" -a "$GCC" != "yes"; then | |
1978 AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong]) | |
1979 xemacs_cc_cc_mismatch=yes | |
1980 elif test -n "$GCC" -a "$XEMACS_CC" != "g++"; then | |
1981 AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong]) | |
1982 xemacs_cc_cc_mismatch=yes | |
1983 dnl #### Add other detectable mismatches here. | |
1984 else | |
1985 xemacs_cc_cc_mismatch=no | |
1986 fi | |
1987 fi | |
1988 | |
1989 dnl #### This may need to be overhauled so that all of XEMACS_CC's flags | |
1990 dnl are handled separately, not just the xe_cflags_warning stuff. | |
1991 | |
1995 dnl Calculate value of CFLAGS: | 1992 dnl Calculate value of CFLAGS: |
1996 dnl Use either command line flag, environment var, or autodetection | 1993 dnl Use either command line flag, environment var, or autodetection |
1997 if test "$cflags_specified" = "no"; then | 1994 if test "$cflags_specified" = "no"; then |
1998 dnl Following values of CFLAGS are known to work well. | 1995 dnl Following values of CFLAGS are known to work well. |
1999 dnl Should we take debugging options into consideration? | 1996 dnl Should we take debugging options into consideration? |
2000 if test "$GCC" = "yes"; then | 1997 if test "$GCC" = "yes"; then |
2001 CFLAGS="-g -O3" | 1998 CFLAGS="-g -O3" |
2002 dnl I'm not convinced this is a good idea any more. -sb | |
2003 dnl test "$opsys $machine" = "linux intel386" && \ | |
2004 dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2" | |
2005 elif test "$__SUNPRO_C" = "yes"; then | 1999 elif test "$__SUNPRO_C" = "yes"; then |
2006 case "$opsys" in | 2000 case "$opsys" in |
2007 sol2 ) CFLAGS="-xO4" ;; | 2001 sol2 ) CFLAGS="-xO4" ;; |
2008 sunos4* ) CFLAGS="-xO2" ;; | 2002 sunos4* ) CFLAGS="-xO2" ;; |
2009 esac | 2003 esac |
2017 else | 2011 else |
2018 CFLAGS="-O" ;dnl The only POSIX-approved flag | 2012 CFLAGS="-O" ;dnl The only POSIX-approved flag |
2019 fi | 2013 fi |
2020 fi | 2014 fi |
2021 | 2015 |
2022 dnl Calculate warning flags. We now separate the flags for warnings from | 2016 dnl Calculate warning flags. We separate the flags for warnings from |
2023 dnl the other flags because we really really want the warnings to be seen | 2017 dnl the other flags because we want to force the warnings to be seen |
2024 dnl by everyone. | 2018 dnl by everyone who doesn't specifically override them. |
2019 | |
2020 dnl If this stays nil, it will be set to cflags_warning before use. | |
2021 xe_cflags_warning="" | |
2025 | 2022 |
2026 if test "$cflags_warning_specified" = "no"; then | 2023 if test "$cflags_warning_specified" = "no"; then |
2027 dnl Following warning flags are known to work well. | 2024 dnl Following warning flags are known to work well. |
2028 if test "$GCC" = "yes"; then | 2025 if test "$__SUNPRO_C" = "yes"; then |
2029 cflags_warning="-Wall -Wno-switch -Winline -Wmissing-prototypes" | |
2030 dnl Yuck, bad compares have been worth at least 3 crashes! | |
2031 cflags_warning="$cflags_warning -Wsign-compare" | |
2032 dnl NOTE: The following three, as well as -Wmissing-declarations and | |
2033 dnl -Weffc++ below, have been recently added. If you are getting | |
2034 dnl grief from them, please notify ben@xemacs.org! | |
2035 cflags_warning="$cflags_warning -Wundef -Wstrict-prototypes" | |
2036 if test "$__GCC3" = "yes"; then | |
2037 cflags_warning="$cflags_warning -Wpacked" | |
2038 fi | |
2039 dnl With g++, -Wshadow produces five zillion utterly random warnings -- | |
2040 dnl a local var named `buffer' conflicts with `struct buffer' for | |
2041 dnl example. Even with gcc, -Wshadow is questionable because of its | |
2042 dnl complaints about parameters with the same names as global functions. | |
2043 if test "$xemacs_compiler" != "g++"; then | |
2044 dnl no -Wmissing-declarations under g++. | |
2045 cflags_warning="$cflags_warning -Wshadow -Wmissing-declarations" | |
2046 else | |
2047 cflags_warning="$cflags_warning -Weffc++" | |
2048 fi | |
2049 dnl glibc is intentionally not `-Wpointer-arith'-clean. | |
2050 dnl Ulrich Drepper has rejected patches to fix the glibc header files. | |
2051 test "$have_glibc" != "yes" && \ | |
2052 cflags_warning="$cflags_warning -Wpointer-arith" | |
2053 elif test "$__SUNPRO_C" = "yes"; then | |
2054 case "$opsys" in | 2026 case "$opsys" in |
2055 sol2 ) cflags_warning="-v" ;; | 2027 sol2 ) cflags_warning="-v" ;; |
2056 esac | 2028 esac |
2057 elif test "$CC" = "xlc"; then | 2029 elif test "$CC" = "xlc"; then |
2058 cflags_warning="-qinfo" | 2030 cflags_warning="-qinfo" |
2031 elif test "$GCC" = "yes"; then | |
2032 cflags_warning="-Wall -Wno-switch -Winline -Wmissing-prototypes" | |
2033 dnl Yuck, bad compares have been worth at least 3 crashes! | |
2034 cflags_warning="$cflags_warning -Wsign-compare" | |
2035 cflags_warning="$cflags_warning -Wundef -Wstrict-prototypes" | |
2036 if test "$__GCC3" = "yes"; then | |
2037 cflags_warning="$cflags_warning -Wpacked" | |
2038 fi | |
2039 dnl Warning flags for the XEMACS_CC compiler | |
2040 dnl With g++, -Wshadow produces five zillion utterly random warnings -- | |
2041 dnl a local var named `buffer' conflicts with `struct buffer' for | |
2042 dnl example. Even with gcc, -Wshadow is questionable because of its | |
2043 dnl complaints about parameters with the same names as global functions. | |
2044 dnl There is no -Wmissing-declarations under g++. | |
2045 dnl But gcc warns about -Weffc++ in C compiles. | |
2046 test "$xemacs_compiler" = "g++" && \ | |
2047 xe_cflags_warning="$cflags_warning -Weffc++" | |
2048 cflags_warning="$cflags_warning -Wshadow -Wmissing-declarations" | |
2049 dnl glibc is intentionally not `-Wpointer-arith'-clean. | |
2050 dnl Ulrich Drepper has rejected patches to fix the glibc header files. | |
2051 test "$have_glibc" != "yes" && \ | |
2052 cflags_warning="$cflags_warning -Wpointer-arith" | |
2059 elif test "$__ICC" = "yes"; then | 2053 elif test "$__ICC" = "yes"; then |
2060 cflags_warning="-Wall -w1" | 2054 cflags_warning="-Wall -w1" |
2055 dnl **** If more gcc/g++ flags are added, from here on must handle | |
2056 dnl **** cflags_warning and xe_cflags_warning in parallel | |
2061 dnl ### Add optimal cflags_warning support for other compilers HERE! | 2057 dnl ### Add optimal cflags_warning support for other compilers HERE! |
2062 fi | 2058 fi |
2063 fi | 2059 fi |
2064 | 2060 |
2065 dnl Now combine all C flags. Put the warning flags first so that | 2061 dnl Now combine all C flags. Put the warning flags first so that |
2066 dnl user-specified flags will override. | 2062 dnl user-specified flags will override. |
2063 dnl Flags for CC: | |
2067 CFLAGS="$cflags_warning $CFLAGS" | 2064 CFLAGS="$cflags_warning $CFLAGS" |
2065 dnl Flags for XEMACS_CC: | |
2066 test -z "xe_cflags_warning" && xe_cflags_warning=cflags_warning | |
2067 XE_CFLAGS="$xe_cflags_warning $CFLAGS" | |
2068 | 2068 |
2069 dnl Search for GCC specific build problems we know about | 2069 dnl Search for GCC specific build problems we know about |
2070 if test "$GCC" = "yes"; then | 2070 if test "$GCC" = "yes"; then |
2071 AC_MSG_CHECKING(for buggy gcc versions) | 2071 AC_MSG_CHECKING(for buggy gcc versions) |
2072 GCC_VERSION=`$CC --version` | 2072 GCC_VERSION=`$CC --version` |
2222 test "$GCC" != "yes" && lib_gcc= | 2222 test "$GCC" != "yes" && lib_gcc= |
2223 AC_SUBST(ld) | 2223 AC_SUBST(ld) |
2224 AC_SUBST(lib_gcc) | 2224 AC_SUBST(lib_gcc) |
2225 | 2225 |
2226 dnl --------------------------------------------------------------- | 2226 dnl --------------------------------------------------------------- |
2227 dnl Get version information for: | |
2228 dnl C compiler, libc | |
2229 dnl #### should do CC compiler, too, if different from XEMACS_CC | |
2230 dnl --------------------------------------------------------------- | |
2231 | |
2232 compiler_version="" | |
2233 gcc_compiler_specs="" | |
2234 libc_version="" | |
2235 | |
2236 AC_MSG_CHECKING(for compiler version information) | |
2237 | |
2238 dnl First try portable compilers, then crack system secrets | |
2239 dnl #### Is this code correct if $XEMACS_CC != $CC? XEMACS_CC hasn't been | |
2240 dnl run through the AC_PROG_CC mill. | |
2241 dnl Would anybody really build libsrc with GCC and XEmacs with non-GCC? | |
2242 if test "$GCC" = "yes"; then | |
2243 compiler_version=`$XEMACS_CC --version | head -1` | |
2244 gcc_compiler_specs=`$XEMACS_CC -v 2>&1 | sed 's/.* \([[^ ]]\)/\1/' | head -1` | |
2245 else case "$XEMACS_CC" in | |
2246 dnl The Intel cc compiler | |
2247 icc*) | |
2248 compiler_version=`icc -V 2>&1 | head -1` | |
2249 ;; | |
2250 dnl non-gcc machine-specific magic - contributions welcome | |
2251 *) case "$canonical" in | |
2252 *-*-aix* ) | |
2253 dnl Yes, it's this ugly for AIX... | |
2254 realcc=`which $XEMACS_CC` | |
2255 dnl Might be a symlink created by replaceCset command | |
2256 if test -L $realcc ; then | |
2257 ccdir=`dirname $realcc` | |
2258 ccprog=`/bin/ls -l $realcc | sed 's/.* \([[^ ]]\)/\1/'` | |
2259 dnl This doesn't handle ../../xlc type stuff, but I've not seen one... | |
2260 case $ccprog in | |
2261 */*) realcc=$ccprog;; | |
2262 *) realcc=$ccdir/$ccprog;; | |
2263 esac | |
2264 fi | |
2265 lpp=`lslpp -wqc $realcc | cut -f2 -d:` | |
2266 if test ! -z "$lpp" ; then | |
2267 lppstr=`lslpp -Lqc $lpp` | |
2268 lpplev=`echo "$lppstr" | cut -f3 -d:` | |
2269 lppdesc=`echo "$lppstr" | cut -f8 -d:` | |
2270 fi | |
2271 if test ! -z "$lpplev" ; then | |
2272 compiler_version="$lpp $lpplev - $lppdesc" | |
2273 fi | |
2274 ;; | |
2275 | |
2276 *-*-solaris*) | |
2277 compiler_version=`$XEMACS_CC -V 2>&1 | head -1` | |
2278 ;; | |
2279 | |
2280 alpha*-dec-osf*) | |
2281 compiler_version=`$XEMACS_CC -V | tr '\n' ' '` | |
2282 ;; | |
2283 | |
2284 mips-sgi-irix*) | |
2285 compiler_version=`$XEMACS_CC -version` | |
2286 ;; | |
2287 esac | |
2288 esac | |
2289 fi | |
2290 | |
2291 dnl Awww, shucks. | |
2292 if test -z "$compiler_version"; then | |
2293 compiler_version="detection failed (please report this)" | |
2294 fi | |
2295 | |
2296 AC_MSG_CHECKING(for compiler version information) | |
2297 | |
2298 case "$canonical" in | |
2299 *-*-linux*) | |
2300 dnl #### who would ever _not_ be running the distro's libc? | |
2301 dnl Maybe it would be better to get/augment this info with ldd? | |
2302 if test -f /etc/redhat-release ; then | |
2303 libc_version=`rpm -q glibc` | |
2304 elif test -f /etc/debian_version ; then | |
2305 libc_version=`dpkg-query --showformat='${version}' --show libc6` | |
2306 libc_version="GNU libc $libc_version (Debian)" | |
2307 dnl need SuSE et al checks here... | |
2308 fi | |
2309 dnl #### Tested on Debian, does this actually work elsewhere? ;-) | |
2310 if test -z "$libc_version"; then | |
2311 libc_version=`ls /lib/libc-*.so | sed -e 's,/lib/libc-\(.*\)\.so,\1,'` | |
2312 fi | |
2313 ;; | |
2314 | |
2315 *-*-aix*) | |
2316 libc_version="bos.rte.libc `lslpp -Lqc bos.rte.libc | cut -f3 -d:`" | |
2317 ;; | |
2318 | |
2319 *-*-solaris*) | |
2320 libc=`pkginfo -l SUNWcsl | grep VERSION: | awk '{print $2}'` | |
2321 libc_version="SUNWcsl $libc" | |
2322 | |
2323 ;; | |
2324 | |
2325 mips-sgi-irix*) | |
2326 libc_version="IRIX libc `uname -sRm`" | |
2327 ;; | |
2328 | |
2329 alpha*-dec-osf*) | |
2330 dnl Another ugly case | |
2331 (cd /usr/.smdb.; | |
2332 libc_version=` grep -h libc.so *.inv | awk '$9 == "f" {print $12}' | tr '\n' ','` | |
2333 ) | |
2334 ;; | |
2335 esac | |
2336 | |
2337 dnl Awww, shucks. | |
2338 if test -z "libc_version"; then | |
2339 libc_version="detection failed (please report this)" | |
2340 fi | |
2341 | |
2342 dnl --------------------------------------------------------------- | |
2227 dnl Add site and system specific flags to compile and link commands | 2343 dnl Add site and system specific flags to compile and link commands |
2228 dnl --------------------------------------------------------------- | 2344 dnl --------------------------------------------------------------- |
2229 | 2345 |
2230 dnl Allow use of either ":" or spaces for lists of directories | 2346 dnl Allow use of either ":" or spaces for lists of directories |
2231 define(COLON_TO_SPACE, | 2347 define(COLON_TO_SPACE, |
3183 | 3299 |
3184 dnl This one is for the static initializeds variables in | 3300 dnl This one is for the static initializeds variables in |
3185 dnl offix.c, so that the thing is dumped after lastfile.o | 3301 dnl offix.c, so that the thing is dumped after lastfile.o |
3186 AC_SUBST(dnd_objs) | 3302 AC_SUBST(dnd_objs) |
3187 | 3303 |
3188 dnl Support for using a different compiler for xemacs itself. | 3304 dnl Autodetect dll support |
3189 dnl Useful for building XEmacs with a C++ compiler. | |
3190 dnl For example, `configure --compiler=gcc --xemacs-compiler=g++ | |
3191 | |
3192 dnl The compiler used to build xemacs, as opposed to the compiler | |
3193 dnl used by configure and lib-src, is determined from the following | |
3194 dnl sources, in order of priority: | |
3195 dnl o --xemacs-compiler configure flag | |
3196 dnl o XEMACS_CC environment variable | |
3197 dnl o same as the regular compiler, (determined previously) | |
3198 test -n "$xemacs_compiler" && XEMACS_CC="$xemacs_compiler" | |
3199 : ${XEMACS_CC:="$CC"} | |
3200 | 3305 |
3201 dnl If g++ is used, we have to explicitly link modules with -lstdc++ on Cygwin | 3306 dnl If g++ is used, we have to explicitly link modules with -lstdc++ on Cygwin |
3202 dnl to avoid undefined symbol errors. This will never hurt, so just do it on | 3307 dnl to avoid undefined symbol errors. This will never hurt, so just do it on |
3203 dnl all platforms in case others have the same brain damage. | 3308 dnl all platforms in case others have the same brain damage. |
3204 if test "$xemacs_compiler" = "g++"; then | 3309 if test "$xemacs_compiler" = "g++"; then |
3206 else | 3311 else |
3207 LIBSTDCPP= | 3312 LIBSTDCPP= |
3208 fi | 3313 fi |
3209 AC_SUBST(LIBSTDCPP) | 3314 AC_SUBST(LIBSTDCPP) |
3210 | 3315 |
3211 dnl Autodetect dll support | |
3212 dnl This must come before the detection code for anything that is in a module | 3316 dnl This must come before the detection code for anything that is in a module |
3213 if test "$with_modules" != "no"; then | 3317 if test "$with_modules" != "no"; then |
3214 AC_CHECKING(for module support) | 3318 AC_CHECKING(for module support) |
3215 | 3319 |
3216 dnl Check for MS-Windows | 3320 dnl Check for MS-Windows |
5060 AC_SUBST(sound_cflags) | 5164 AC_SUBST(sound_cflags) |
5061 AC_SUBST(RANLIB) | 5165 AC_SUBST(RANLIB) |
5062 AC_SUBST(dynodump_arch) | 5166 AC_SUBST(dynodump_arch) |
5063 | 5167 |
5064 AC_SUBST(XEMACS_CC) | 5168 AC_SUBST(XEMACS_CC) |
5169 AC_SUBST(XE_CFLAGS) | |
5065 | 5170 |
5066 dnl The default is yes | 5171 dnl The default is yes |
5067 if test "$with_prefix" = "yes"; then | 5172 if test "$with_prefix" = "yes"; then |
5068 AC_DEFINE(PREFIX_USER_DEFINED) | 5173 AC_DEFINE(PREFIX_USER_DEFINED) |
5069 fi | 5174 fi |
5116 | 5221 |
5117 dnl ------------------------------- | 5222 dnl ------------------------------- |
5118 dnl Report on what we decided to do | 5223 dnl Report on what we decided to do |
5119 dnl ------------------------------- | 5224 dnl ------------------------------- |
5120 | 5225 |
5226 dnl #### We should tag this as the _build_ environment. | |
5227 dnl Before doing that, though, must check if tools care about line 1. | |
5228 | |
5121 ( | 5229 ( |
5122 dnl /etc/osversion is on SONY NEWS-OS | 5230 dnl /etc/osversion is on SONY NEWS-OS |
5123 if test -f /etc/osversion; then dnl SONY NEWS-OS | 5231 if test -f /etc/osversion; then dnl SONY NEWS-OS |
5124 echo "osversion: `cat /etc/osversion`" | 5232 echo "osversion: `cat /etc/osversion`" |
5125 else | 5233 else |
5144 echo " | 5252 echo " |
5145 | 5253 |
5146 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" $xemacs_extra_name configured for \`$canonical'. | 5254 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" $xemacs_extra_name configured for \`$canonical'. |
5147 " | 5255 " |
5148 echo " | 5256 echo " |
5149 Compilation / Installation:" | 5257 Compilation Environment and Installation Defaults:" |
5150 echo " Source code location: $srcdir" | 5258 echo " Source code location: $srcdir" |
5151 echo " Installation prefix: $prefix" | 5259 echo " Installation prefix: $prefix" |
5152 if test -n "$site_includes"; then | 5260 if test -n "$site_includes"; then |
5153 echo " Additional header files: $site_includes" | 5261 echo " Additional header files: $site_includes" |
5154 fi | 5262 fi |
5169 if test -n "$machfile" | 5277 if test -n "$machfile" |
5170 then echo " Machine description file: \`$machfile'" | 5278 then echo " Machine description file: \`$machfile'" |
5171 else echo " Not using any machine description file" | 5279 else echo " Not using any machine description file" |
5172 fi | 5280 fi |
5173 | 5281 |
5174 echo " Compiler: $XEMACS_CC $CFLAGS" | 5282 echo " Compiler version: $compiler_version" |
5283 if test -n "$gcc_compiler_specs"; then | |
5284 echo " - GCC specs file: $gcc_compiler_specs" | |
5285 fi | |
5286 echo " - Compiler command: $XEMACS_CC $XE_CFLAGS" | |
5287 if test "$CC" != "$XEMACS_CC"; then | |
5288 echo " Compiler version for lib-src: (detection code unimplemented)" | |
5289 echo " - Compiler command for lib-src: $CC $CFLAGS" | |
5290 if test "$xemacs_cc_cc_mismatch" = "yes"; then | |
5291 echo " WARNING: CC and XEMACS_CC mismatched; check CFLAGS carefully." | |
5292 fi | |
5293 fi | |
5294 echo " libc version: $libc_version" | |
5175 echo " Relocating allocator for buffers: $rel_alloc" | 5295 echo " Relocating allocator for buffers: $rel_alloc" |
5176 echo " GNU version of malloc: ${GNU_MALLOC}${GNU_MALLOC_reason}" | 5296 echo " GNU version of malloc: ${GNU_MALLOC}${GNU_MALLOC_reason}" |
5177 case "$ld_switch_site" in | 5297 case "$ld_switch_site" in |
5178 *nocombreloc*) echo " Linking with \`-z nocombreloc'. | 5298 *nocombreloc*) echo " Linking with \`-z nocombreloc'. |
5179 - Consider configuring with --pdump." ;; | 5299 - Consider configuring with --pdump." ;; |