207
+ − 1 dnl Define our own header notice with own copyright
149
+ − 2 define([AC_INIT_NOTICE],
+ − 3 [#### Configuration script for XEmacs. Largely divergent from FSF.
+ − 4 #### Guess values for system-dependent variables and create Makefiles.
+ − 5 #### Generated automatically using autoconf version] AC_ACVERSION [
460
+ − 6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
0
+ − 7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
149
+ − 8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
1318
+ − 9 #### Copyright (C) 1995, 1996, 2002, 2003 Ben Wing.
460
+ − 10 #### Copyright (C) 2000, 2001 Martin Buchholz.
388
+ − 11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
0
+ − 12
+ − 13 ### Don't edit this script!
+ − 14 ### This script was automatically generated by the `autoconf' program
+ − 15 ### from the file `./configure.in'.
+ − 16 ### To rebuild it, execute the command
+ − 17 ### autoconf
442
+ − 18 ### in the this directory. You must have autoconf version 2.13 or later.
724
+ − 19 ### Note: this script has not yet been ported to autoconf version 2.5x.
0
+ − 20
+ − 21 ### This file is part of XEmacs.
+ − 22
+ − 23 ### XEmacs is free software; you can redistribute it and/or modify it
+ − 24 ### under the terms of the GNU General Public License as published by
+ − 25 ### the Free Software Foundation; either version 2, or (at your
+ − 26 ### option) any later version.
+ − 27
+ − 28 ### XEmacs is distributed in the hope that it will be useful, but
+ − 29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
+ − 30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ − 31 ### General Public License for more details.
+ − 32
+ − 33 ### You should have received a copy of the GNU General Public License
+ − 34 ### along with XEmacs; see the file COPYING. If not, write to the Free
+ − 35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ − 36 ### 02111-1307, USA.
+ − 37
149
+ − 38 ### For usage, run `./configure --help'
+ − 39 ### For more detailed information on building and installing XEmacs,
+ − 40 ### read the file `INSTALL'.
0
+ − 41 ###
+ − 42 ### If configure succeeds, it leaves its status in config.status.
149
+ − 43 ### A log of configuration tests can be found in config.log.
0
+ − 44 ### If configure fails after disturbing the status quo,
+ − 45 ### config.status is removed.
149
+ − 46 ])
+ − 47
+ − 48 dnl Since XEmacs has configuration requirements that autoconf cannot
+ − 49 dnl meet, this file is an unholy marriage of custom-baked
+ − 50 dnl configuration code and autoconf macros.
+ − 51
+ − 52 dnl We use the m4 quoting characters [ ] (as established by the
+ − 53 dnl autoconf system), so quote them like this: [[foo]]
+ − 54
442
+ − 55 AC_PREREQ(2.13)dnl
1111
+ − 56
+ − 57 dnl #### Doesn't work currently. it would be really nice if we could
+ − 58 dnl get this working, because many autoconfs v2.5 come with support for
+ − 59 dnl v2.1 source files but get snafued by our nasty configure.ac kludge.
+ − 60 dnl
+ − 61 dnl m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), 2.5), -1,
+ − 62 dnl [m4_fatal([Autoconf version 2.5 or higher not supported])])
+ − 63
149
+ − 64 dnl Redefine some standard autoconf macros
+ − 65 dnl here is how XEmacs is different:
+ − 66 dnl - no cache file
+ − 67 dnl - non-standard options
708
+ − 68 dnl - support for extra-verbosity
149
+ − 69 dnl - ordinary libs are handled separately from X libs (might be a mistake)
444
+ − 70 dnl - various random kludges (e.g. -with-dnet=no)
149
+ − 71
163
+ − 72 dnl PRINT_VAR(var var ...) prints values of shell variables
+ − 73 define([PRINT_VAR],[for var in patsubst([$1],[[
+ − 74 ]+],[ ]); do eval "echo \"$var = '\$$var'\""; done])
153
+ − 75
149
+ − 76 dnl Disable cache files:
+ − 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.
+ − 79 define([AC_CACHE_LOAD], )dnl
+ − 80 define([AC_CACHE_SAVE], )dnl
+ − 81 define([AC_CACHE_VAL], [
+ − 82 $2
+ − 83 ])dnl
+ − 84
151
+ − 85 dnl Redefine AC_TRY_RUN_NATIVE to not throw away stderr while running
+ − 86 dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
+ − 87 define([AC_TRY_RUN_NATIVE],
+ − 88 [cat > conftest.$ac_ext <<EOF
+ − 89 [#]line __oline__ "configure"
+ − 90 #include "confdefs.h"
+ − 91 [$1]
+ − 92 EOF
373
+ − 93 if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit $?) 2>&AC_FD_CC
151
+ − 94 then
+ − 95 dnl Do not remove the temporary files here, so they can be examined.
+ − 96 ifelse([$2], , :, [$2])
+ − 97 else
373
+ − 98 conftest_rc="$?"
151
+ − 99 echo "configure: failed program was:" >&AC_FD_CC
+ − 100 cat conftest.$ac_ext >&AC_FD_CC
+ − 101 ifelse([$3], , , [ rm -fr conftest*
+ − 102 $3
+ − 103 ])dnl
+ − 104 fi
284
+ − 105 rm -fr conftest*])dnl AC_TRY_RUN_NATIVE
151
+ − 106
+ − 107
149
+ − 108 dnl Avoid spurious cross-compiling warnings from AC_TRY_RUN
+ − 109 dnl XEmacs is unlikely to ever cross-compile
+ − 110 define([AC_TRY_RUN],[AC_TRY_RUN_NATIVE([$1], [$2], [$3])])dnl
+ − 111
+ − 112 dnl Redefine AC_DEFINE* to provide more output if extra_verbose
+ − 113 dnl Set VARIABLE to VALUE, verbatim, or 1.
+ − 114 dnl AC_DEFINE(VARIABLE [, VALUE])
+ − 115 define([AC_DEFINE],
+ − 116 [{ test "$extra_verbose" = "yes" && cat << \EOF
+ − 117 Defining $1[]ifelse($#, 2, [ = $2],)
+ − 118 EOF
+ − 119 cat >> confdefs.h <<\EOF
+ − 120 [#define] $1 ifelse($#, 2, [$2], 1)
+ − 121 EOF
+ − 122 }
284
+ − 123 ])dnl AC_DEFINE
149
+ − 124
+ − 125 define([AC_DEFINE_UNQUOTED],
+ − 126 [{ test "$extra_verbose" = "yes" && cat << EOF
+ − 127 Defining $1[]ifelse($#, 2, [ = $2],)
+ − 128 EOF
+ − 129 cat >> confdefs.h <<EOF
+ − 130 [#define] $1 ifelse($#, 2, [$2], 1)
+ − 131 EOF
+ − 132 }
284
+ − 133 ])dnl AC_DEFINE_UNQUOTED
149
+ − 134
+ − 135 dnl redefine AC_CHECK_LIB in accordance with our own value of ac_link
+ − 136 dnl Add in extra kludgy check to support with_dnet=no
708
+ − 137 dnl Add in extra LDFLAGS arg, which PRECEDES libs
149
+ − 138 dnl Support --with-dnet=no
+ − 139
+ − 140 dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
+ − 141 dnl [, OTHER-LIBRARIES] [, LDFLAGS]]]])
+ − 142 define([AC_CHECK_LIB],
151
+ − 143 [ifelse([$1],dnet, [if test "$with_dnet" = "no" ; then
149
+ − 144 ac_cv_lib_dnet_dnet_ntoa=no
+ − 145 ifelse([$4], , , [$4]
+ − 146 )dnl
+ − 147 else
+ − 148 ])]
+ − 149 AC_CHECK_LIB_ORIG_HACKED([$1],[$2],[$3],[$4],[$5], [$6])
+ − 150 [ifelse([$1],dnet,[fi
+ − 151 ])]dnl
284
+ − 152 )dnl AC_CHECK_LIB
149
+ − 153
+ − 154 define([AC_CHECK_LIB_ORIG_HACKED],
+ − 155 [ifelse([$5],,AC_MSG_CHECKING([for $2 in -l$1]),
+ − 156 xe_msg_checking="for [$2] in -l[$1]"
+ − 157 test -n "[$5]" && xe_msg_checking="$xe_msg_checking using extra libs [$5]"
+ − 158 AC_MSG_CHECKING("$xe_msg_checking"))
+ − 159 dnl Use a cache variable name containing both the library and function name,
+ − 160 dnl because the test really is for library $1 defining function $2, not
+ − 161 dnl just for library $1. Separate tests with the same $1 and different $2s
+ − 162 dnl may have different results.
+ − 163 ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+ − 164 AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
+ − 165 [xe_check_libs="$6 -l$1 $5"
+ − 166 AC_TRY_LINK(dnl
+ − 167 ifelse([$2], [main], , dnl Avoid conflicting decl of main.
+ − 168 [/* Override any gcc2 internal prototype to avoid an error. */
+ − 169 ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+ − 170 extern "C"
+ − 171 #endif
+ − 172 ])dnl
+ − 173 [/* We use char because int might match the return type of a gcc2
+ − 174 builtin and then its argument prototype would still apply. */
+ − 175 char $2();
+ − 176 ]),
+ − 177 [$2()],
+ − 178 eval "ac_cv_lib_$ac_lib_var=yes",
+ − 179 eval "ac_cv_lib_$ac_lib_var=no")
+ − 180 xe_check_libs=""
+ − 181 ])dnl
151
+ − 182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
149
+ − 183 AC_MSG_RESULT(yes)
+ − 184 ifelse([$3], ,
+ − 185 [changequote(, )dnl
+ − 186 ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ − 187 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ − 188 changequote([, ])dnl
+ − 189 AC_DEFINE_UNQUOTED($ac_tr_lib)
151
+ − 190 XE_PREPEND([-l$1], LIBS)
149
+ − 191 ], [$3])
+ − 192 else
+ − 193 AC_MSG_RESULT(no)
+ − 194 ifelse([$4], , , [$4
+ − 195 ])dnl
+ − 196 fi
284
+ − 197 ])dnl AC_CHECK_LIB_ORIG_HACKED
149
+ − 198
+ − 199
+ − 200 dnl AC_LANG_C()
+ − 201 define([AC_LANG_C],
+ − 202 [define([AC_LANG], [C])dnl
+ − 203 ac_ext=c
+ − 204 dnl CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ − 205 dnl ac_cpp='$CPP $CPPFLAGS'
+ − 206 dnl ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
+ − 207 dnl ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
151
+ − 208 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
+ − 209 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
462
+ − 210 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
149
+ − 211 ac_cpp='$CPP '"$xe_cppflags"
151
+ − 212 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&AC_FD_CC'
+ − 213 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC'
149
+ − 214 cross_compiling=no
284
+ − 215 ]) dnl AC_LANG_C
149
+ − 216
155
+ − 217 dnl The construct foo=`echo $w1 $w2 $w3` fails on some systems if $w1 = -e or -n
+ − 218 dnl So we use the following instead.
+ − 219 dnl XE_SPACE(var, words)
+ − 220 define([XE_SPACE],[
+ − 221 T=""
+ − 222 for W in $2; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+ − 223 $1="$T"
284
+ − 224 ])dnl XE_SPACE
151
+ − 225
+ − 226 dnl XE_ADD_OBJS(foo.o ...)
+ − 227 define([XE_ADD_OBJS],
+ − 228 [extra_objs="$extra_objs [$1]" && dnl
+ − 229 if test "$extra_verbose" = "yes"; then
+ − 230 echo " xemacs will be linked with \"[$1]\""
284
+ − 231 fi])dnl XE_ADD_OBJS
151
+ − 232
+ − 233 dnl XE_APPEND(value, varname)
+ − 234 define([XE_APPEND],
+ − 235 [[$2]="$[$2] [$1]" && dnl
+ − 236 if test "$extra_verbose" = "yes"; then echo " Appending \"[$1]\" to \$[$2]"; fi])
+ − 237
+ − 238 dnl XE_PREPEND(value, varname)
+ − 239 define([XE_PREPEND],
+ − 240 [[$2]="[$1] $[$2]" && dnl
+ − 241 if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi])
+ − 242
380
+ − 243 dnl XE_DIE(message)
384
+ − 244 define([XE_DIE], [{ echo "Error:" $1 >&2; exit 1; }])
380
+ − 245
+ − 246 dnl XE_STRIP_4TH_COMPONENT(var)
+ − 247 dnl Changes i986-pc-linux-gnu to i986-pc-linux, as God (not RMS) intended.
+ − 248 define([XE_STRIP_4TH_COMPONENT],
+ − 249 [$1=`echo "$$1" | sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'`])
151
+ − 250
+ − 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
1259
+ − 255 define([USAGE_ERROR],
+ − 256 [(echo "$progname: Usage error:"
+ − 257 echo " " $1
+ − 258 echo " Use \`$progname --help' to show usage.") >&2 && exit 1])
+ − 259
149
+ − 260 define([AC_INIT_PARSE_ARGS],[
284
+ − 261
+ − 262 dnl Get sane consistent behavior from various shells
+ − 263 dnl Avoid losing with weird user CDPATHs
+ − 264
+ − 265 if test -n "$ZSH_VERSION"; then
+ − 266 dnl zsh's Bourne shell emulation options
+ − 267 setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
+ − 268 setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
+ − 269 setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
+ − 270 setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
+ − 271 dnl zsh-3.1-beta drops core on the following
+ − 272 dnl unset CDPATH
+ − 273 if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
+ − 274 elif test -n "$BASH_VERSION"; then
+ − 275 dnl Use Posix mode with bash
+ − 276 set -o posix
+ − 277 unset CDPATH
+ − 278 else
+ − 279 if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
+ − 280 fi
+ − 281
1259
+ − 282 dnl srcdir is used internally by autoconf macros
+ − 283 dnl parse it here
+ − 284 for xe_parse_arg in "$@"; do
+ − 285 case $xe_parse_arg in
+ − 286 --srcdir) USAGE_ERROR("The \`--srcdir' option requires a boolean value: \`yes' or \`no'.") ;;
+ − 287 --srcdir=*) srcdir=`echo $xe_parse_arg | sed -e 's/--srcdir=//'` ;;
+ − 288 *) ;;
+ − 289 esac
+ − 290 done
+ − 291
149
+ − 292 dnl Initialize some variables set by options.
+ − 293 dnl The variables have the same names as the options, with
+ − 294 dnl dashes changed to underlines.
+ − 295 exec_prefix=NONE
+ − 296 host=NONE
+ − 297 no_create=
+ − 298 nonopt=NONE
+ − 299 no_recursion=
+ − 300 prefix=NONE
+ − 301 program_prefix=NONE
+ − 302 program_suffix=NONE
+ − 303 program_transform_name=s,x,x,
+ − 304 silent=
+ − 305 site=
+ − 306 target=NONE
+ − 307 verbose=
+ − 308 x_includes=NONE
+ − 309 x_libraries=NONE
153
+ − 310
149
+ − 311 dnl Initialize some other variables.
+ − 312 subdirs=
+ − 313 MFLAGS= MAKEFLAGS=
442
+ − 314 SHELL=${CONFIG_SHELL-/bin/sh}
149
+ − 315 dnl Maximum number of lines to put in a shell here document.
+ − 316 ac_max_here_lines=12
284
+ − 317 ])dnl AC_INIT_PARSE_ARGS
+ − 318
149
+ − 319 AC_INIT(src/lisp.h)dnl
276
+ − 320 AC_CONFIG_HEADER(src/config.h lwlib/config.h)
149
+ − 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
+ − 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
+ − 325 dnl that since progname gets recorded in all the Makefiles this script
+ − 326 dnl produces, move-if-change thinks they're different when they're
+ − 327 dnl not.
+ − 328 dnl
+ − 329 dnl It would be nice if we could put the ./ in a \( \) group and then
+ − 330 dnl apply the * operator to that, so we remove as many leading './././'s
+ − 331 dnl as are present, but some seds (like Ultrix's sed) don't allow you to
+ − 332 dnl apply * to a \( \) group. Bleah.
0
+ − 333 progname="`echo $0 | sed 's:^\./\./:\./:'`"
+ − 334
149
+ − 335 dnl -----------------------------
+ − 336 dnl Establish some default values
+ − 337 dnl -----------------------------
+ − 338
151
+ − 339 XE_APPEND(lib-src, MAKE_SUBDIR)
167
+ − 340 XE_APPEND(lib-src, INSTALL_ARCH_DEP_SUBDIR)
149
+ − 341
0
+ − 342 prefix='/usr/local'
+ − 343 exec_prefix='${prefix}'
+ − 344 bindir='${exec_prefix}/bin'
149
+ − 345 dnl FSF 19.29 changes to:
+ − 346 dnl datadir='${prefix}/share'
+ − 347 dnl sharedstatedir='${prefix}/com'
+ − 348 dnl libexecdir='${exec_prefix}/libexec'
0
+ − 349 datadir='${prefix}/lib'
+ − 350 statedir='${prefix}/lib'
+ − 351 libdir='${exec_prefix}/lib'
+ − 352 mandir='${prefix}/man/man1'
422
+ − 353 inststaticdir='${PROGNAME}'
+ − 354 instvardir='${PROGNAME}-${version}'
+ − 355 infodir='${datadir}/${instvardir}/info'
274
+ − 356 infopath=''
276
+ − 357 install_pp=''
422
+ − 358 lispdir='${datadir}/${instvardir}/lisp'
668
+ − 359 moduledir='${libdir}/${instvardir}/${configuration}/modules'
422
+ − 360 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
668
+ − 361 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
274
+ − 362 package_path=''
422
+ − 363 etcdir='${datadir}/${instvardir}/etc'
668
+ − 364 archlibdir='${libdir}/${instvardir}/${configuration}'
420
+ − 365 docdir='${archlibdir}'
462
+ − 366 with_netinstall="no"
420
+ − 367 with_prefix='yes'
269
+ − 368 with_site_lisp='no'
388
+ − 369 with_site_modules='yes'
1111
+ − 370 need_modules_common=''
0
+ − 371 with_menubars=''
+ − 372 with_scrollbars=''
420
+ − 373 with_widgets=''
0
+ − 374 with_dialogs=''
272
+ − 375 cpp='' cppflags='' libs='' ldflags=''
452
+ − 376 extra_includes=''
0
+ − 377 dynamic=''
+ − 378 with_x11=''
263
+ − 379 with_msw=''
0
+ − 380 rel_alloc='default'
181
+ − 381 with_system_malloc='default'
261
+ − 382 with_dlmalloc='default'
0
+ − 383 native_sound_lib=''
462
+ − 384 dnl These should be set to the empty string when we want gtk / gnome to
+ − 385 dnl be auto-detected instead of manually specified.
+ − 386 with_gtk='no'
+ − 387 with_gnome='no'
272
+ − 388 dnl use_assertions should be 'yes' by default. Too many people in this
149
+ − 389 dnl world have core dumps turned off by default or \"cannot find where the
+ − 390 dnl core file went\". At least we should get some useful output ...
153
+ − 391 use_assertions="yes"
149
+ − 392 dnl the following is set to yes or no later.
153
+ − 393 with_toolbars=""
157
+ − 394 with_tty=""
153
+ − 395 use_union_type="no"
+ − 396 with_dnet=""
1155
+ − 397 dnl pdump defaults per opsys
+ − 398 pdump=""
771
+ − 399 dnl dragndrop is still experimental, except on Windows. When it is stable, comment out the following line:
+ − 400 with_dragndrop_default="no"
708
+ − 401 dnl Too annoying, even if mandated by IPv6 (and I'm not even sure of that)
724
+ − 402 dnl #### Change this to yes when somebody understands IPv6 and handle bugs.
708
+ − 403 with_ipv6_cname="no"
0
+ − 404
149
+ − 405 dnl ------------------
+ − 406 dnl Options Processing
+ − 407 dnl ------------------
0
+ − 408
149
+ − 409 dnl Record all the arguments, so we can save them in config.status.
0
+ − 410 arguments="$@"
+ − 411
149
+ − 412 dnl Shell Magic: Quote the quoted arguments in ARGUMENTS. At a later date,
+ − 413 dnl in order to get the arguments back in $@, we have to do an
+ − 414 dnl 'eval set x "$quoted_arguments"; shift'
+ − 415 dnl # We use sed to turn embedded ' into '"'"'. I truly hate sh quoting.
120
+ − 416 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
0
+ − 417 quoted_arguments=
+ − 418 for i in "$@"; do
120
+ − 419 case "$i" in
+ − 420 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ − 421 | --no-cr | --no-c) ;;
153
+ − 422 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ − 423 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
120
+ − 424 *)
159
+ − 425 quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
120
+ − 426 quoted_arguments="$quoted_arguments '$quoted_i'" ;;
+ − 427 esac
0
+ − 428 done
+ − 429
149
+ − 430 dnl Do not use shift -- that destroys the argument list, which autoconf needs
+ − 431 dnl to produce config.status. It turns out that "set - $arguments" does not
+ − 432 dnl work portably.
+ − 433 dnl However, it also turns out that many shells cannot expand ${10} at all.
+ − 434 dnl So using an index variable does not work either. It is possible to use
+ − 435 dnl some shell magic to make 'set x "$arguments"; shift' work portably.
70
+ − 436 while test $# != 0; do
0
+ − 437 arg="$1"; shift
149
+ − 438 case "$arg" in
157
+ − 439 --no-create|--no-recursion) ;;
1259
+ − 440 --srcdir=*) ;;
149
+ − 441 dnl Anything starting with a hyphen we assume is an option.
0
+ − 442 -* )
149
+ − 443 dnl Separate the switch name from the value it is being given.
+ − 444 case "$arg" in
0
+ − 445 -*=*)
149
+ − 446 opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([[^=]]*\)=.*$:\1:'`
+ − 447 val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[[^=]]*=\(.*\)$:\1:'`
0
+ − 448 valomitted=no
+ − 449 ;;
149
+ − 450 dnl special case these strings since echo may silently eat them:
+ − 451 dnl --help ) opt=help val=yes valomitted=yes ;;
+ − 452 dnl --version ) opt=version val=yes valomitted=yes ;;
+ − 453 dnl -e ) opt=e val=yes valomitted=yes ;;
+ − 454 dnl -E ) opt=E val=yes valomitted=yes ;;
+ − 455 dnl -n ) opt=n val=yes valomitted=yes ;;
0
+ − 456 -*)
149
+ − 457 dnl If FOO is a boolean argument, --FOO is equivalent to
+ − 458 dnl --FOO=yes. Otherwise, the value comes from the next
+ − 459 dnl argument - see below.
+ − 460 opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
243
+ − 461 val="yes" valomitted=yes
0
+ − 462 ;;
+ − 463 esac
+ − 464
274
+ − 465 dnl translate "-" in option string to "_"
+ − 466 optname="$opt"
+ − 467 opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
+ − 468
243
+ − 469 dnl Support --without-FOO as a synonym for --with-FOO=no
+ − 470 case "${valomitted}-${opt}" in yes-without_* )
+ − 471 opt=`echo $opt | sed 's/without/with/'`
+ − 472 valomitted="no" val="no" ;;
+ − 473 esac
+ − 474
149
+ − 475 dnl Process the option.
+ − 476 case "$opt" in
+ − 477
+ − 478 dnl Process (many) boolean options
380
+ − 479 with_site_lisp | \
420
+ − 480 with_prefix | \
+ − 481 with_site_modules | \
70
+ − 482 with_x | \
+ − 483 with_x11 | \
462
+ − 484 with_gtk | \
+ − 485 with_gnome | \
263
+ − 486 with_msw | \
70
+ − 487 with_gcc | \
+ − 488 dynamic | \
149
+ − 489 with_ncurses | \
+ − 490 with_dnet | \
+ − 491 with_socks | \
282
+ − 492 with_dragndrop | \
70
+ − 493 with_cde | \
+ − 494 with_offix | \
149
+ − 495 with_gpm | \
+ − 496 with_xpm | \
+ − 497 with_xface | \
251
+ − 498 with_gif | \
+ − 499 with_jpeg | \
+ − 500 with_png | \
+ − 501 with_tiff | \
771
+ − 502 with_zlib | \
414
+ − 503 with_wmcommand | \
70
+ − 504 with_xmu | \
380
+ − 505 with_purify | \
149
+ − 506 with_quantify | \
70
+ − 507 with_toolbars | \
+ − 508 with_tty | \
215
+ − 509 with_xfs | \
70
+ − 510 with_mule | \
771
+ − 511 with_default_eol_detection | \
70
+ − 512 with_canna | \
+ − 513 with_wnn | \
98
+ − 514 with_wnn6 | \
149
+ − 515 with_workshop | \
70
+ − 516 with_sparcworks | \
380
+ − 517 with_tooltalk | \
259
+ − 518 with_ldap | \
442
+ − 519 with_postgresql | \
118
+ − 520 with_pop | \
+ − 521 with_kerberos | \
+ − 522 with_hesiod | \
136
+ − 523 with_dnet | \
280
+ − 524 with_infodock | \
724
+ − 525 with_netinstall | \
+ − 526 with_ipv6_cname | \
70
+ − 527 external_widget | \
925
+ − 528 use_kkcc | \
120
+ − 529 verbose | \
+ − 530 extra_verbose | \
380
+ − 531 usage_tracking | \
+ − 532 use_union_type | \
424
+ − 533 pdump | \
70
+ − 534 debug | \
+ − 535 use_assertions | \
+ − 536 memory_usage_stats | \
173
+ − 537 with_clash_detection | \
422
+ − 538 with_modules | \
442
+ − 539 quick_build )
149
+ − 540 dnl Make sure the value given was either "yes" or "no".
+ − 541 case "$val" in
0
+ − 542 y | ye | yes ) val=yes ;;
380
+ − 543 n | no ) val=no ;;
149
+ − 544 * ) USAGE_ERROR("The \`--$optname' option requires a boolean value: \`yes' or \`no'.") ;;
0
+ − 545 esac
380
+ − 546 eval "$opt=\"$val\"" ;;
149
+ − 547
+ − 548
398
+ − 549 dnl Options that take a user-supplied value, as in --x-includes=/usr/X11R6/include
153
+ − 550 dnl The cache-file option is ignored (for compatibility with other configures)
70
+ − 551 compiler | \
596
+ − 552 xemacs_compiler | \
157
+ − 553 cflags | \
1111
+ − 554 cflags_warning | \
272
+ − 555 cpp | \
+ − 556 cppflags | \
+ − 557 libs | \
+ − 558 ldflags | \
153
+ − 559 cache_file | \
380
+ − 560 native_sound_lib| \
267
+ − 561 site_lisp | \
70
+ − 562 x_includes | \
+ − 563 x_libraries | \
+ − 564 site_includes | \
+ − 565 site_libraries | \
209
+ − 566 site_prefixes | \
149
+ − 567 site_runtime_libraries )
+ − 568 dnl If the value was omitted, get it from the next argument.
+ − 569 if test "$valomitted" = "yes" ; then
+ − 570 dnl Get the next argument from the argument list, if there is one.
+ − 571 if test "$#" = 0 ; then
+ − 572 USAGE_ERROR("The \`--$optname' option requires a value.");
0
+ − 573 fi
+ − 574 val="$1"; shift
+ − 575 fi
149
+ − 576 eval "$opt=\"$val\""
0
+ − 577 ;;
+ − 578
149
+ − 579 dnl Options that take "yes", "no", or "default" values
70
+ − 580 rel_alloc | \
261
+ − 581 with_dlmalloc | \
181
+ − 582 with_debug_malloc | use_debug_malloc | \
+ − 583 with_system_malloc | use_system_malloc )
149
+ − 584 case "$val" in
0
+ − 585 y | ye | yes ) val=yes ;;
+ − 586 n | no ) val=no ;;
181
+ − 587 d | de | def | defa | defau | defaul | default ) val=default ;;
149
+ − 588 * ) USAGE_ERROR(["The \`--$optname' option requires one of these values:
120
+ − 589 \`yes', \`no', or \`default'."]) ;;
0
+ − 590 esac
265
+ − 591 case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
149
+ − 592 eval "$opt=\"$val\""
0
+ − 593 ;;
+ − 594
149
+ − 595 dnl Has the user requested database support?
70
+ − 596 "with_database" )
120
+ − 597 with_database_berkdb=no
+ − 598 with_database_dbm=no
426
+ − 599 with_database_gdbm=no
300
+ − 600 for x in `echo "$val" | sed -e 's/,/ /g'` ; do
149
+ − 601 case "$x" in
426
+ − 602 no ) ;;
+ − 603 b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;;
+ − 604 d | db | dbm ) with_database_dbm=yes ;;
+ − 605 g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes ;;
+ − 606 * ) USAGE_ERROR(["The \`--$optname' option value
120
+ − 607 must be either \`no' or a comma-separated list
380
+ − 608 of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."]) ;;
120
+ − 609 esac
+ − 610 done
426
+ − 611 if test "$with_database_dbm" = "yes" -a \
+ − 612 "$with_database_gdbm" = "yes"; then
120
+ − 613 USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified
149
+ − 614 with the \`--$optname' option.")
0
+ − 615 fi
70
+ − 616 ;;
0
+ − 617
149
+ − 618 dnl Has the user requested sound support?
0
+ − 619 "with_sound" )
426
+ − 620 dnl values is a subset of all,native,nas,esd
+ − 621 dnl or their negatives: none,nonative,nonas,noesd
+ − 622 for x in `echo "$val" | sed -e 's/,/ /g'` ; do
+ − 623 case "$x" in
+ − 624 dnl all and none are only permitted as the first in the list.
+ − 625 n | no | non | none ) new_sdefault=no ;;
+ − 626 a | al | all | both ) new_sdefault=yes ;;
+ − 627
+ − 628 native ) with_native_sound=yes ;;
+ − 629 nonative ) with_native_sound=no ;;
+ − 630
+ − 631 nas ) with_nas_sound=yes ;;
+ − 632 nonas ) with_nas_sound=no ;;
+ − 633
432
+ − 634 esd ) with_esd_sound=yes ;;
+ − 635 noesd ) with_esd_sound=no ;;
426
+ − 636
+ − 637 * ) bogus_sound=yes ;;
+ − 638 esac
+ − 639 if test "$bogus_sound" -o \
+ − 640 \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
+ − 641 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
+ − 642 USAGE_ERROR(["Valid types for the \`--$optname' option are:
+ − 643 $types.
724
+ − 644 Option \`all' or \`none' must be first in the list.
+ − 645 The default is to autodetect native and NAS sound support."])
426
+ − 646 elif test -n "$new_sdefault" ; then
+ − 647 with_native_sound=$new_sdefault
+ − 648 with_nas_sound=$new_sdefault
432
+ − 649 with_esd_sound=$new_sdefault
426
+ − 650 new_sdefault= # reset this
+ − 651 fi
+ − 652 sound_notfirst=true
+ − 653 done
2
+ − 654 ;;
+ − 655
442
+ − 656 dnl Has the user specified a preferred Athena widget set?
434
+ − 657 dnl This bit expands any alias names out for us...
+ − 658 "with_athena" )
+ − 659 case "$val" in
+ − 660 xa | xaw ) val=xaw ;;
+ − 661 3 | 3d | xaw3d ) val=3d ;;
+ − 662 dnl No `n' for next, someone may try `no'
+ − 663 ne | nex | next | naxtaw) val=next ;;
+ − 664 dnl Have not tested the next two...
+ − 665 9 | 95 | xaw95 ) val=95 ;;
+ − 666 xp | xpm | xawxpm ) val=xpm ;;
+ − 667 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
+ − 668 \`xaw', \`3d', \`next', \`95', or \`xpm'."]) ;;
+ − 669 esac
+ − 670 eval "$opt=\"$val\""
+ − 671 ;;
+ − 672
149
+ − 673 dnl Has the user requested XIM support?
70
+ − 674 "with_xim" )
149
+ − 675 case "$val" in
+ − 676 y | ye | yes ) val=yes ;;
+ − 677 n | no | non | none ) val=no ;;
+ − 678 x | xl | xli | xlib ) val=xlib ;;
+ − 679 m | mo | mot | moti | motif ) val=motif ;;
+ − 680 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
120
+ − 681 \`motif', \`xlib', \`yes', or \`no'."]) ;;
0
+ − 682 esac
149
+ − 683 eval "$opt=\"$val\""
0
+ − 684 ;;
+ − 685
149
+ − 686 dnl Mail locking specification
+ − 687 "mail_locking" )
+ − 688 case "$val" in
+ − 689 lockf ) val=lockf ;;
+ − 690 flock ) val=flock ;;
438
+ − 691 file | dot ) val=file ;;
+ − 692 locking ) val=locking ;;
149
+ − 693 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
438
+ − 694 \`lockf', \`flock', \`file', \`locking', or \`mmdf'."]) ;;
0
+ − 695 esac
149
+ − 696 eval "$opt=\"$val\""
0
+ − 697 ;;
+ − 698
149
+ − 699 dnl Has the user requested error-checking?
0
+ − 700 "error_checking" )
149
+ − 701 dnl value can be all, none, and/or a list of categories to check.
665
+ − 702 dnl Example: --error-checking=all,noextents,nocharbpos
149
+ − 703 dnl Example: --error-checking=none,malloc,gc
+ − 704
267
+ − 705 for x in `echo "$val" | sed -e 's/,/ /g'` ; do
149
+ − 706 case "$x" in
+ − 707 dnl all and none are only permitted as the first in the list.
0
+ − 708 n | no | non | none ) new_default=no ;;
+ − 709 a | al | all ) new_default=yes ;;
+ − 710
+ − 711 extents ) error_check_extents=yes ;;
+ − 712 noextents ) error_check_extents=no ;;
+ − 713
800
+ − 714 types ) error_check_types=yes ;;
+ − 715 notypes ) error_check_types=no ;;
+ − 716
+ − 717 text ) error_check_text=yes ;;
+ − 718 notext ) error_check_text=no ;;
0
+ − 719
+ − 720 gc ) error_check_gc=yes ;;
+ − 721 nogc ) error_check_gc=no ;;
+ − 722
+ − 723 malloc ) error_check_malloc=yes ;;
+ − 724 nomalloc ) error_check_malloc=no ;;
149
+ − 725
414
+ − 726 byte_code ) error_check_byte_code=yes ;;
+ − 727 nobyte_code ) error_check_byte_code=no ;;
+ − 728
800
+ − 729 glyphs ) error_check_glyphs=yes ;;
+ − 730 noglyphs ) error_check_glyphs=no ;;
+ − 731
+ − 732 display ) error_check_display=yes ;;
+ − 733 nodisplay ) error_check_display=no ;;
+ − 734
+ − 735 structures ) error_check_structures=yes ;;
+ − 736 nostructures ) error_check_structures=no ;;
442
+ − 737
0
+ − 738 * ) bogus_error_check=yes ;;
+ − 739 esac
70
+ − 740 if test "$bogus_error_check" -o \
+ − 741 \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
267
+ − 742 if test "$error_check_default" = yes ; then
800
+ − 743 types="\`all' (default), \`none', \`noextents', \`notypes', \`notext', \`nogc', \`nomalloc', \`noglyphs', \`nobyte-code', \`nodisplay', \`nostructures'."
0
+ − 744 else
800
+ − 745 types="\`all', \`none' (default), \`extents', \`types', \`text', \`gc', \`malloc', \`glyphs', \`byte-code', \`display', \`structures'."
0
+ − 746 fi
149
+ − 747 USAGE_ERROR(["Valid types for the \`--$optname' option are:
120
+ − 748 $types."])
151
+ − 749 elif test -n "$new_default" ; then
0
+ − 750 error_check_extents=$new_default
800
+ − 751 error_check_types=$new_default
+ − 752 error_check_text=$new_default
0
+ − 753 error_check_gc=$new_default
+ − 754 error_check_malloc=$new_default
414
+ − 755 error_check_byte_code=$new_default
442
+ − 756 error_check_glyphs=$new_default
800
+ − 757 error_check_display=$new_default
+ − 758 error_check_structures=$new_default
0
+ − 759 new_default= # reset this
+ − 760 fi
+ − 761 echeck_notfirst=true
+ − 762 done
+ − 763 ;;
+ − 764
149
+ − 765 dnl Has the user tried to tell us where the X files are?
+ − 766 dnl I think these are dopey, but no less than three alpha
+ − 767 dnl testers, at large sites, have said they have their X files
+ − 768 dnl installed in odd places.
+ − 769
+ − 770 dnl Has the user specified one of the path options?
0
+ − 771 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
1349
+ − 772 mandir | infodir | infopath | lispdir | etcdir | \
864
+ − 773 archlibdir | docdir | package_path | moduledir )
149
+ − 774 dnl If the value was omitted, get it from the next argument.
151
+ − 775 if test "$valomitted" = "yes"; then
+ − 776 if test "$#" = 0; then
149
+ − 777 USAGE_ERROR("The \`--$optname' option requires a value.");
120
+ − 778 fi
+ − 779 val="$1"; shift
0
+ − 780 fi
149
+ − 781 eval "$opt=\"$val\""
+ − 782
278
+ − 783 dnl You need to synchronize this with the way the
+ − 784 dnl default values are built.
+ − 785 case "$opt" in
420
+ − 786 dnl prefix is taken care of by --with-prefix
+ − 787 exec_prefix ) AC_DEFINE(EXEC_PREFIX_USER_DEFINED) ;;
274
+ − 788 lispdir ) AC_DEFINE(LISPDIR_USER_DEFINED) ;;
388
+ − 789 sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;;
+ − 790 moduledir ) AC_DEFINE(MODULEDIR_USER_DEFINED) ;;
274
+ − 791 etcdir ) AC_DEFINE(ETCDIR_USER_DEFINED) ;;
+ − 792 infodir ) AC_DEFINE(INFODIR_USER_DEFINED) ;;
+ − 793 infopath ) AC_DEFINE(INFOPATH_USER_DEFINED) ;;
+ − 794 package_path ) AC_DEFINE(PACKAGE_PATH_USER_DEFINED) ;;
278
+ − 795 datadir )
462
+ − 796 AC_DEFINE(INFODIR_USER_DEFINED)
+ − 797 AC_DEFINE(LISPDIR_USER_DEFINED)
+ − 798 AC_DEFINE(MODULEDIR_USER_DEFINED)
458
+ − 799 AC_DEFINE(ETCDIR_USER_DEFINED)
+ − 800 AC_DEFINE(DOCDIR_USER_DEFINED)
+ − 801 AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;;
420
+ − 802 docdir ) AC_DEFINE(DOCDIR_USER_DEFINED) ;;
274
+ − 803 exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;;
149
+ − 804 esac
0
+ − 805 ;;
+ − 806
149
+ − 807 dnl --no-create added by autoconf for use by config.status
+ − 808 "no_create" ) ;;
+ − 809
+ − 810 dnl Has the user asked for some help?
215
+ − 811 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
149
+ − 812
380
+ − 813 dnl Has the user specified the toolkit(s) to use for GUI elements?
+ − 814 "with_menubars" | \
+ − 815 "with_scrollbars" | \
442
+ − 816 "with_dialogs" | \
420
+ − 817 "with_widgets" )
149
+ − 818 case "$val" in
0
+ − 819 l | lu | luc | luci | lucid ) val=lucid ;;
724
+ − 820 mo | mot | moti | motif ) val=motif ;;
0
+ − 821 a | at | ath | athe | athen | athena ) val=athena ;;
442
+ − 822 n | no | non | none ) val=no ;;
+ − 823 y | ye | yes ) val=yes ;;
726
+ − 824 dnl Explicit --with-widgets on command line means yes.
+ − 825 "") val=yes ;;
462
+ − 826 g | gt | gtk ) val=gtk ;;
724
+ − 827 ms | msw ) val=msw ;;
149
+ − 828 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
585
+ − 829 \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."]) ;;
0
+ − 830 esac
149
+ − 831 eval "$opt=\"$val\""
0
+ − 832 ;;
+ − 833
380
+ − 834 dnl Obsolete legacy argument? Warn, but otherwise ignore.
424
+ − 835 "use_minimal_tagbits" | \
+ − 836 "use_indexed_lrecord_implementation" | \
380
+ − 837 "run_in_place" | \
442
+ − 838 "const_is_losing" | \
380
+ − 839 "with_gnu_make" )
+ − 840 AC_MSG_WARN([Obsolete option \`--$optname' ignored.])
+ − 841 ;;
+ − 842
+ − 843 dnl Unrecognized option? No mercy for user errors.
149
+ − 844 * ) USAGE_ERROR("Unrecognized option: $arg") ;;
0
+ − 845
+ − 846 esac
+ − 847 ;;
+ − 848
243
+ − 849 dnl Assume anything with multiple hyphens is a configuration name.
+ − 850 *-*-*) configuration="$arg" ;;
+ − 851
380
+ − 852 dnl Unrecognized argument? No mercy for user errors.
243
+ − 853 *) USAGE_ERROR("Unrecognized argument: $arg") ;;
0
+ − 854
+ − 855 esac
+ − 856 done
+ − 857
149
+ − 858 dnl -------------------------
+ − 859 dnl Finish options processing
+ − 860 dnl -------------------------
+ − 861
272
+ − 862 dnl Several options are equivalent to, and override, environment variables.
+ − 863 test -n "$cpp" && CPP="$cpp"
+ − 864 test -n "$cppflags" && CPPFLAGS="$cppflags"
+ − 865 test -n "$libs" && LIBS="$libs"
+ − 866 test -n "$ldflags" && LDFLAGS="$ldflags"
+ − 867
149
+ − 868 dnl Get the arguments back. See the diatribe on Shell Magic above.
0
+ − 869 eval set x "$quoted_arguments"; shift
+ − 870
149
+ − 871 dnl --extra-verbose implies --verbose
+ − 872 test "$extra_verbose" = "yes" && verbose=yes
+ − 873
187
+ − 874 dnl with_x is an obsolete synonym for with_x11
149
+ − 875 test -n "$with_x" && with_x11="$with_x"
+ − 876
380
+ − 877 dnl --with-quantify or --with-purify imply --use-system-malloc
+ − 878 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
+ − 879 test "$with_system_malloc" = "default" && with_system_malloc=yes
+ − 880 fi
+ − 881
284
+ − 882 dnl XE_CHECK_FEATURE_DEPENDENCY(feature1, feature2)
+ − 883 define([XE_CHECK_FEATURE_DEPENDENCY],
+ − 884 [if test "$with_$1 $with_$2" = "yes no"; then
+ − 885 USAGE_ERROR("--with-$1 requires --with-$2")
+ − 886 elif test "$with_$2" = "no" ; then with_$1=no
+ − 887 elif test "$with_$1" = "yes"; then with_$2=yes
+ − 888 fi
+ − 889 ])
+ − 890
+ − 891 dnl CDE requires tooltalk
+ − 892 XE_CHECK_FEATURE_DEPENDENCY(cde, tooltalk)
+ − 893
149
+ − 894 dnl Find the source directory.
+ − 895 case "$srcdir" in
+ − 896
1259
+ − 897 dnl If srcdir is not specified, try directory part of $0, ".", or "..".
0
+ − 898 "" )
120
+ − 899 for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[[^/]]*$||'`" "." ".." ; do
+ − 900 if test -f "$dir/src/lisp.h" -a \
+ − 901 -f "$dir/lisp/version.el" ; then
149
+ − 902 srcdir="$dir"
70
+ − 903 break
+ − 904 fi
+ − 905 done
149
+ − 906 if test -z "$srcdir" ; then
1259
+ − 907 USAGE_ERROR(["None of the path to configure, the current directory,
+ − 908 and its parent seem to contain the XEmacs sources. If you do not want
+ − 909 to build XEmacs in its source tree, you should run \`$progname' in the
+ − 910 directory in which you wish to build XEmacs, using the \`--srcdir' option
+ − 911 to say where the sources may be found."])
120
+ − 912 fi
0
+ − 913 ;;
+ − 914
149
+ − 915 dnl Otherwise, check if the directory they specified is okay.
0
+ − 916 * )
243
+ − 917 if test ! -f "$srcdir/src/lisp.h" -o \
149
+ − 918 ! -f "$srcdir/lisp/version.el" ; then
120
+ − 919 USAGE_ERROR(["The directory specified with the \`--srcdir' option,
149
+ − 920 \`$srcdir', doesn't seem to contain the XEmacs sources. You should
+ − 921 either run the \`$progname' script at the top of the XEmacs source
120
+ − 922 tree, or use the \`--srcdir' option to specify the XEmacs source directory."])
0
+ − 923 fi
+ − 924 ;;
+ − 925 esac
+ − 926
243
+ − 927 dnl ###########################################################################
+ − 928 if test -z "$configuration"; then
380
+ − 929 dnl Guess the configuration
+ − 930 configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
+ − 931 if test -z "$configuration"; then
243
+ − 932 USAGE_ERROR(["XEmacs has not been ported to this host type.
+ − 933 Try explicitly specifying the CONFIGURATION when rerunning configure."])
+ − 934 fi
+ − 935 fi
+ − 936
149
+ − 937 AC_PROG_LN_S
+ − 938
+ − 939 dnl Make symlinks for etc, lisp, and info directories while the path
+ − 940 dnl is still relative. We do not symlink lock because someone may
+ − 941 dnl have stuck the source on a read-only partition. Instead we
+ − 942 dnl create it as an actual directory later on if it does not already
+ − 943 dnl exist.
438
+ − 944 for dir in lisp etc man info tests; do
149
+ − 945 if test ! -d "$dir" ; then
+ − 946 echo Making symbolic link to "$srcdir/$dir"
157
+ − 947 ${LN_S} "$srcdir/$dir" "$dir"
0
+ − 948 fi
+ − 949 done
104
+ − 950
392
+ − 951 dnl Do our best to deal with automounter brokenness
+ − 952 dnl CANONICALIZE_PATH(varname)
+ − 953 define([CANONICALIZE_PATH],
+ − 954 [if test -d "/net"; then
+ − 955 if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
+ − 956 $1=`echo "[$]$1" | \
+ − 957 sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
+ − 958 fi])dnl
+ − 959
181
+ − 960 dnl Calculate canonical name for blddir (i.e. current directory).
+ − 961 dnl PWD may already be the preferable absolute name for ".",
+ − 962 dnl but we can't trust it - it is sometimes inaccurate.
+ − 963 absolute_pwd="`pwd`";
187
+ − 964 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
181
+ − 965 then blddir="$PWD"
392
+ − 966 else blddir="$absolute_pwd"; CANONICALIZE_PATH(blddir)
181
+ − 967 fi
+ − 968 AC_SUBST(blddir)
+ − 969
149
+ − 970 dnl Make srcdir absolute, if not already. It is important to
+ − 971 dnl avoid running the path through pwd unnecessary, since pwd can
+ − 972 dnl give you automounter prefixes, which can go away.
+ − 973 case "$srcdir" in
0
+ − 974 /* ) ;;
181
+ − 975 . ) srcdir="$blddir" ;;
392
+ − 976 * ) srcdir="`cd $srcdir && pwd`"; CANONICALIZE_PATH(srcdir) ;;
0
+ − 977 esac
+ − 978
149
+ − 979 dnl Check if the source directory already has a configured system in it.
+ − 980 if test `pwd` != `sh -c cd $srcdir && pwd` \
+ − 981 && test -f "$srcdir/src/config.h"; then
+ − 982 (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
0
+ − 983 echo " as a build directory right now; it has been configured in its own"
+ − 984 echo " right. To configure in another directory as well, you MUST"
+ − 985 echo " use GNU make. If you do not have GNU make, then you must"
149
+ − 986 echo " now do \`make distclean' in $srcdir,"
+ − 987 echo " and then run $progname again.") >&2
120
+ − 988 extrasub='/^VPATH[[ ]]*=/c\
0
+ − 989 vpath %.c $(srcdir)\
+ − 990 vpath %.h $(srcdir)\
+ − 991 vpath %.y $(srcdir)\
+ − 992 vpath %.l $(srcdir)\
+ − 993 vpath %.s $(srcdir)\
+ − 994 vpath %.in $(srcdir)'
+ − 995 fi
+ − 996
171
+ − 997 dnl ----------------------------------------
+ − 998 dnl Find out which version of XEmacs this is
+ − 999 dnl ----------------------------------------
+ − 1000 . "$srcdir/version.sh" || exit 1;
173
+ − 1001 dnl Must do the following first to determine verbosity for AC_DEFINE
414
+ − 1002 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
173
+ − 1003 : "${extra_verbose=$beta}"
171
+ − 1004 version="${emacs_major_version}.${emacs_minor_version}"
+ − 1005 AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version)
+ − 1006 AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version)
414
+ − 1007 if test -n "$emacs_beta_version" ; then
+ − 1008 if test "$beta" = "yes"; then
+ − 1009 version="${version}-b${emacs_beta_version}"
+ − 1010 AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version)
+ − 1011 else
+ − 1012 version="${version}.${emacs_beta_version}"
+ − 1013 AC_DEFINE_UNQUOTED(EMACS_PATCH_LEVEL, $emacs_beta_version)
+ − 1014 fi
171
+ − 1015 fi
+ − 1016 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
975
+ − 1017 if test "X$xemacs_extra_name" != "X"; then
+ − 1018 AC_DEFINE_UNQUOTED(XEMACS_EXTRA_NAME, "$xemacs_extra_name")
+ − 1019 fi
171
+ − 1020 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
+ − 1021
280
+ − 1022 if test "$with_infodock" = "yes"; then
420
+ − 1023 if test ! -f ../../ID-INSTALL; then
280
+ − 1024 echo "Cannot build InfoDock without InfoDock sources"
+ − 1025 with_infodock=no
+ − 1026 fi
+ − 1027 fi
+ − 1028
+ − 1029 if test "$with_infodock" = "yes"; then
+ − 1030 dnl InfoDock version numbers. XEmacs will use the same style of numbering
+ − 1031 dnl after the release of XEmacs 21.0.
+ − 1032 AC_DEFINE_UNQUOTED(INFODOCK_MAJOR_VERSION, $infodock_major_version)
+ − 1033 AC_DEFINE_UNQUOTED(INFODOCK_MINOR_VERSION, $infodock_minor_version)
+ − 1034 AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version)
+ − 1035 version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
+ − 1036 PROGNAME=infodock
+ − 1037 CPPFLAGS="$CPPFLAGS -DINFODOCK"
+ − 1038 else
+ − 1039 PROGNAME=xemacs
+ − 1040 fi
278
+ − 1041
442
+ − 1042 AC_DEFINE_UNQUOTED(EMACS_PROGNAME, "$PROGNAME")
+ − 1043
171
+ − 1044 dnl ----------------------------------
+ − 1045 dnl Error checking and debugging flags
+ − 1046 dnl ----------------------------------
+ − 1047 dnl Error checking default to "yes" in beta versions, to "no" in releases.
+ − 1048 dnl Same goes for --debug and --extra-verbosity.
414
+ − 1049 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
800
+ − 1050 test "${error_check_extents=$beta}" = yes && AC_DEFINE(ERROR_CHECK_EXTENTS)
+ − 1051 test "${error_check_types=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TYPES)
+ − 1052 test "${error_check_text=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TEXT)
+ − 1053 test "${error_check_gc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GC)
+ − 1054 test "${error_check_malloc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_MALLOC)
+ − 1055 test "${error_check_byte_code=$beta}" = yes && AC_DEFINE(ERROR_CHECK_BYTE_CODE)
+ − 1056 test "${error_check_glyphs=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GLYPHS)
+ − 1057 test "${error_check_display=$beta}" = yes && AC_DEFINE(ERROR_CHECK_DISPLAY)
+ − 1058 test "${error_check_structures=$beta}" = yes && AC_DEFINE(ERROR_CHECK_STRUCTURES)
171
+ − 1059 dnl debug=yes must be set when error checking is present. This should be
+ − 1060 dnl fixed up.
+ − 1061 dnl debug implies other options
272
+ − 1062 if test "${debug:=$beta}" = "yes"; then
771
+ − 1063 use_assertions=yes
+ − 1064 memory_usage_stats=yes
171
+ − 1065 AC_DEFINE(DEBUG_XEMACS)
+ − 1066 fi
+ − 1067 test "$use_assertions" = "yes" && AC_DEFINE(USE_ASSERTIONS)
+ − 1068 test "$memory_usage_stats" = "yes" && AC_DEFINE(MEMORY_USAGE_STATS)
+ − 1069
149
+ − 1070 dnl ------------------------------
+ − 1071 dnl Determine the s&m files to use
+ − 1072 dnl ------------------------------
+ − 1073 dnl Given the configuration name, set machfile and opsysfile to the
+ − 1074 dnl names of the m/*.h and s/*.h files we should use.
+ − 1075
+ − 1076 dnl Canonicalize the configuration name.
380
+ − 1077 AC_MSG_CHECKING("host system type")
217
+ − 1078 dnl allow -workshop suffix on configuration name
+ − 1079 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
380
+ − 1080 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
+ − 1081 XE_STRIP_4TH_COMPONENT(configuration)
+ − 1082 XE_STRIP_4TH_COMPONENT(canonical)
+ − 1083 AC_MSG_RESULT($configuration)
0
+ − 1084
149
+ − 1085 dnl If you add support for a new configuration, add code to this
+ − 1086 dnl switch statement to recognize your configuration name and select
+ − 1087 dnl the appropriate operating system and machine description files.
+ − 1088
+ − 1089 dnl You would hope that you could choose an m/*.h file pretty much
+ − 1090 dnl based on the machine portion of the configuration name, and an s-
+ − 1091 dnl file based on the operating system portion. However, it turns out
+ − 1092 dnl that each m/*.h file is pretty manufacturer-specific - for
+ − 1093 dnl example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
+ − 1094 dnl all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
+ − 1095 dnl machines. So we basically have to have a special case for each
+ − 1096 dnl configuration name.
+ − 1097
+ − 1098 dnl As far as handling version numbers on operating systems is
+ − 1099 dnl concerned, make sure things will fail in a fixable way. If
+ − 1100 dnl /etc/MACHINES says nothing about version numbers, be
+ − 1101 dnl prepared to handle anything reasonably. If version numbers
+ − 1102 dnl matter, be sure /etc/MACHINES says something about it.
+ − 1103
+ − 1104 dnl Eric Raymond says we should accept strings like "sysvr4" to mean
+ − 1105 dnl "System V Release 4"; he writes, "The old convention encouraged"
+ − 1106 dnl "confusion between `system' and `release' levels'."
+ − 1107
151
+ − 1108 machine='' opsys=''
149
+ − 1109
+ − 1110 dnl Straightforward machine determination
+ − 1111 case "$canonical" in
+ − 1112 sparc-*-* ) machine=sparc ;;
373
+ − 1113 alpha*-*-* ) machine=alpha ;;
149
+ − 1114 vax-*-* ) machine=vax ;;
+ − 1115 mips-dec-* ) machine=pmax ;;
440
+ − 1116 mips-sgi-irix6* ) machine=iris6d ;;
149
+ − 1117 mips-sgi-* ) machine=iris4d ;;
424
+ − 1118 mips*-linux ) machine=mips ;;
149
+ − 1119 romp-ibm-* ) machine=ibmrt ;;
+ − 1120 rs6000-ibm-aix* ) machine=ibmrs6000 ;;
+ − 1121 powerpc-ibm-aix* ) machine=ibmrs6000 ;;
163
+ − 1122 powerpc*-* ) machine=powerpc ;;
149
+ − 1123 hppa-*-* ) machine=hp800 ;;
+ − 1124 m88k-dg-* ) machine=aviion ;;
+ − 1125 m68*-sony-* ) machine=news ;;
+ − 1126 mips-sony-* ) machine=news-risc ;;
+ − 1127 clipper-* ) machine=clipper ;;
442
+ − 1128 arm* ) machine=arm ;;
380
+ − 1129 ns32k-* ) machine=ns32000 ;;
149
+ − 1130 esac
+ − 1131
+ − 1132 dnl Straightforward OS determination
+ − 1133 case "$canonical" in
+ − 1134 *-*-linux* ) opsys=linux ;;
+ − 1135 *-*-netbsd* ) opsys=netbsd ;;
286
+ − 1136 *-*-openbsd* ) opsys=openbsd ;;
149
+ − 1137 *-*-nextstep* ) opsys=nextstep ;;
+ − 1138 *-*-vms ) opsys=vms ;;
+ − 1139
+ − 1140 dnl DEC OSF
+ − 1141 *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
+ − 1142 *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
+ − 1143 *-dec-osf3.[[2-9]] ) opsys=decosf3-2 ;;
+ − 1144 *-dec-osf3* ) opsys=decosf3-1 ;;
444
+ − 1145 *-dec-osf[[4-9]]* ) opsys=decosf4-0 ;;
149
+ − 1146
+ − 1147 dnl DEC Ultrix
+ − 1148 *-*-ultrix[[0-3]].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
+ − 1149 *-*-ultrix4.[[12]]* ) opsys=bsd4-3 ;;
+ − 1150 *-*-ultrix* ) opsys=ultrix4-3 ;;
+ − 1151
+ − 1152 dnl AIX
1294
+ − 1153 *-*-aix3.1* ) opsys=aix3-1 ;;
+ − 1154 *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
+ − 1155 *-*-aix3* ) opsys=aix3-2 ;;
+ − 1156 *-*-aix4.0* ) opsys=aix4 ;;
+ − 1157 *-*-aix4.1* ) opsys=aix4-1 ;;
+ − 1158 *-*-aix[[4-9]]* ) opsys=aix4-2 ;;
149
+ − 1159
+ − 1160 dnl Other generic OSes
+ − 1161 *-gnu* ) opsys=gnu ;;
+ − 1162 *-*-bsd4.[[01]] ) opsys=bsd4-1 ;;
+ − 1163 *-*-bsd4.2 ) opsys=bsd4-2 ;;
+ − 1164 *-*-bsd4.3 ) opsys=bsd4-3 ;;
+ − 1165 *-*-aos4.2 ) opsys=bsd4-2 ;;
+ − 1166 *-*-aos* ) opsys=bsd4-3 ;;
+ − 1167 *-*-sysv0 | *-*-sysvr0 ) opsys=usg5-0 ;;
+ − 1168 *-*-sysv2 | *-*-sysvr2 ) opsys=usg5-2 ;;
+ − 1169 *-*-sysv2.2 | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
+ − 1170 *-*-sysv3* | *-*-sysvr3* ) opsys=usg5-3 ;;
+ − 1171 *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
+ − 1172 *-*-sysv4.[[2-9]]* | *-sysvr4.[[2-9]]* )
+ − 1173 if test -z "$NON_GNU_CPP" ; then
151
+ − 1174 for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
+ − 1175 if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
+ − 1176 done
149
+ − 1177 fi
+ − 1178 opsys=usg5-4-2 ;;
+ − 1179 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
+ − 1180 *-*-mach_bsd4.3* ) opsys=mach-bsd4-3 ;;
+ − 1181 esac
+ − 1182
+ − 1183 case "$canonical" in
+ − 1184
+ − 1185 dnl NetBSD ports
0
+ − 1186 *-*-netbsd* )
149
+ − 1187 case "$canonical" in
120
+ − 1188 i[[3-9]]86-*-netbsd*) machine=intel386 ;;
0
+ − 1189 hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
149
+ − 1190 dnl Yes, this is somewhat bogus.
0
+ − 1191 machine=hp9000s300 ;;
70
+ − 1192 pc532-*-netbsd* | ns32k-*-netbsd* ) machine=ns32000 ;;
+ − 1193 pmax-*-netbsd* | mips-*-netbsd* ) machine=pmax ;;
0
+ − 1194 esac
+ − 1195 ;;
+ − 1196
286
+ − 1197 dnl OpenBSD ports
+ − 1198 *-*-openbsd* )
+ − 1199 case "${canonical}" in
+ − 1200 i386-*-openbsd*) machine=intel386 ;;
+ − 1201 m68k-*-openbsd*) machine=hp9000s300 ;;
+ − 1202 mipsel-*-openbsd*) machine=pmax ;;
+ − 1203 esac
+ − 1204 ;;
+ − 1205
149
+ − 1206 dnl Acorn RISCiX:
70
+ − 1207 arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
+ − 1208 arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
0
+ − 1209
149
+ − 1210 dnl Alliant machines
70
+ − 1211 fx80-alliant-* ) machine=alliant4 opsys=bsd4-2 ;;
+ − 1212 i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
0
+ − 1213
149
+ − 1214 dnl Altos 3068
70
+ − 1215 m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
0
+ − 1216
149
+ − 1217 dnl Amdahl UTS
70
+ − 1218 580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
0
+ − 1219
149
+ − 1220 dnl Apollo, Domain/OS
70
+ − 1221 m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
149
+ − 1222
+ − 1223 dnl AT&T 3b2, 3b5, 3b15, 3b20
70
+ − 1224 we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
0
+ − 1225
149
+ − 1226 dnl AT&T 3b1 - The Mighty Unix PC!
70
+ − 1227 m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
0
+ − 1228
149
+ − 1229 dnl Bull machines
74
+ − 1230 rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
+ − 1231 m68*-bull-sysv3* ) machine=dpx2 opsys=usg5-3 ;; # dpx2
+ − 1232 m68*-bull-sysv2* ) machine=sps7 opsys=usg5-2 ;; # sps7
0
+ − 1233
149
+ − 1234 dnl CCI 5/32, 6/32 -- see "Tahoe".
+ − 1235
+ − 1236 dnl Celerity
70
+ − 1237 celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
0
+ − 1238
149
+ − 1239 dnl Convex
0
+ − 1240 *-convex-bsd* | *-convex-convexos* )
+ − 1241 machine=convex opsys=bsd4-3
+ − 1242 NON_GNU_CPP="cc -E -P"
+ − 1243 ;;
+ − 1244
149
+ − 1245 dnl Cubix QBx/386
120
+ − 1246 i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
0
+ − 1247
864
+ − 1248 dnl Darwin, a.k.a. MacOS X (based on Mach and Freebsd)
+ − 1249 *-*-darwin*)
+ − 1250 opsys=darwin
+ − 1251 ;;
+ − 1252
149
+ − 1253 dnl Data General AViiON Machines
120
+ − 1254 i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
149
+ − 1255 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
+ − 1256 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
+ − 1257 m88k-dg-dgux* ) opsys=dgux ;;
+ − 1258
+ − 1259 dnl Motorola Delta machines
+ − 1260 m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
0
+ − 1261 m88k-motorola-sysv4* )
149
+ − 1262 dnl jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
+ − 1263 dnl needs POSIX_SIGNALS and therefore needs usg5-4-2.
+ − 1264 dnl I hope there are not other 4.0 versions for this machine
+ − 1265 dnl which really need usg5-4 instead.
0
+ − 1266 machine=delta88k opsys=usg5-4-2
+ − 1267 ;;
70
+ − 1268 m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
0
+ − 1269
149
+ − 1270 dnl Dual machines
70
+ − 1271 m68*-dual-sysv* ) machine=dual opsys=usg5-2 ;;
+ − 1272 m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
0
+ − 1273
149
+ − 1274 dnl Encore machines
70
+ − 1275 ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
0
+ − 1276
149
+ − 1277 dnl Gould Power Node and NP1
70
+ − 1278 pn-gould-bsd4.2* ) machine=gould opsys=bsd4-2 ;;
+ − 1279 pn-gould-bsd4.3* ) machine=gould opsys=bsd4-3 ;;
+ − 1280 np1-gould-bsd* ) machine=gould-np1 opsys=bsd4-3 ;;
0
+ − 1281
149
+ − 1282 dnl Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
+ − 1283 dnl as far as XEmacs is concerned).
0
+ − 1284 m88k-harris-cxux* )
149
+ − 1285 dnl Build needs to be different on 7.0 and later releases
0
+ − 1286 case "`uname -r`" in
120
+ − 1287 [[56]].[[0-9]] ) machine=nh4000 opsys=cxux ;;
+ − 1288 [[7]].[[0-9]] ) machine=nh4000 opsys=cxux7 ;;
0
+ − 1289 esac
+ − 1290 NON_GNU_CPP="/lib/cpp"
+ − 1291 ;;
149
+ − 1292 dnl Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
70
+ − 1293 m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
149
+ − 1294 dnl Harris power pc NightHawk running Power UNIX (Series 6000)
+ − 1295 powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
+ − 1296
+ − 1297 dnl Honeywell XPS100
70
+ − 1298 xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
0
+ − 1299
149
+ − 1300 dnl HP 9000 series 200 or 300
70
+ − 1301 m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
+ − 1302
149
+ − 1303 dnl HP-UX
70
+ − 1304 *-hp-hpux* )
149
+ − 1305 dnl Figure out machine and opsys orthogonally
+ − 1306 case "$canonical" in
70
+ − 1307 m68* ) machine=hp9000s300 ;;
+ − 1308 hppa* ) machine=hp800 ;;
+ − 1309 esac
+ − 1310
149
+ − 1311 case "$canonical" in
+ − 1312 *-hp-hpux7* ) opsys=hpux ;;
+ − 1313 *-hp-hpux8* ) opsys=hpux8 ;;
+ − 1314 *-hp-hpux9* ) opsys=hpux9 ;;
+ − 1315 *-hp-hpux10* ) opsys=hpux10 ;;
269
+ − 1316 *-hp-hpux11* ) opsys=hpux11 ;;
151
+ − 1317 * ) opsys=hpux ;;
0
+ − 1318 esac
74
+ − 1319
149
+ − 1320 dnl HP has a broken "strcat"
151
+ − 1321 case "$opsys" in hpux9 | hpux10 ) XE_ADD_OBJS(strcat.o) ;; esac
149
+ − 1322
269
+ − 1323 if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
+ − 1324 ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
149
+ − 1325 NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
+ − 1326
+ − 1327 case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
0
+ − 1328 ;;
+ − 1329
149
+ − 1330 dnl Orion machines
70
+ − 1331 orion-orion-bsd* ) machine=orion opsys=bsd4-2 ;;
+ − 1332 clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
0
+ − 1333
149
+ − 1334 dnl IBM machines
120
+ − 1335 i[[3-9]]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
+ − 1336 i[[3-9]]86-ibm-aix1.[[23]]* | i[[3-9]]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
70
+ − 1337 i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
149
+ − 1338 romp-ibm-aos* ) opsys=bsd4-3 ;;
+ − 1339 romp-ibm-bsd* ) opsys=bsd4-3 ;;
+ − 1340 romp-ibm-mach* ) opsys=mach-bsd4-3 ;;
+ − 1341
+ − 1342 dnl Integrated Solutions "Optimum V"
70
+ − 1343 m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
+ − 1344 m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
0
+ − 1345
149
+ − 1346 dnl Intel 386 machines where we do care about the manufacturer
120
+ − 1347 i[[3-9]]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
0
+ − 1348
149
+ − 1349 dnl Prime EXL
120
+ − 1350 i[[3-9]]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
0
+ − 1351
149
+ − 1352 dnl Sequent Symmetry running Dynix
120
+ − 1353 i[[3-9]]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
0
+ − 1354
149
+ − 1355 dnl Sequent Symmetry running DYNIX/ptx
+ − 1356 i[[3-9]]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
+ − 1357
+ − 1358 dnl Unspecified sysv on an ncr machine defaults to svr4.2.
+ − 1359 dnl (Plain usg5-4 does not turn on POSIX signals, which we need.)
120
+ − 1360 i[[3-9]]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
0
+ − 1361
149
+ − 1362 dnl Intel Paragon OSF/1
70
+ − 1363 i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
0
+ − 1364
149
+ − 1365 dnl Intel 860
+ − 1366 i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
+ − 1367
+ − 1368 dnl Masscomp machines
70
+ − 1369 m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
0
+ − 1370
149
+ − 1371 dnl Megatest machines
70
+ − 1372 m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
0
+ − 1373
149
+ − 1374 dnl Workstations sold by MIPS
+ − 1375 dnl This is not necessarily all workstations using the MIPS processor -
+ − 1376 dnl Irises are produced by SGI, and DECstations by DEC.
+ − 1377 mips-mips-usg* ) machine=mips4 ;;
70
+ − 1378 mips-mips-riscos4 )
+ − 1379 machine=mips4
0
+ − 1380 NON_GNU_CC="cc -systype bsd43"
+ − 1381 NON_GNU_CPP="cc -systype bsd43 -E"
149
+ − 1382 case "$canonical" in
70
+ − 1383 mips-mips-riscos4* ) opsys=bsd4-3 ;;
+ − 1384 mips-mips-riscos5* ) opsys=riscos5 ;;
+ − 1385 esac
0
+ − 1386 ;;
70
+ − 1387 mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
+ − 1388 mips-mips-* ) machine=mips opsys=usg5-2-2 ;;
0
+ − 1389
149
+ − 1390 dnl NeXT
70
+ − 1391 m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
0
+ − 1392
149
+ − 1393 dnl The complete machine from National Semiconductor
70
+ − 1394 ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
0
+ − 1395
149
+ − 1396 dnl NCR machines
70
+ − 1397 m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32 opsys=usg5-2-2 ;;
+ − 1398 m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
0
+ − 1399
149
+ − 1400 dnl Nixdorf Targon 31
70
+ − 1401 m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
0
+ − 1402
149
+ − 1403 dnl Nu (TI or LMI)
70
+ − 1404 m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
0
+ − 1405
149
+ − 1406 dnl Plexus
70
+ − 1407 m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
0
+ − 1408
149
+ − 1409 dnl Pyramid machines
70
+ − 1410 pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
0
+ − 1411
149
+ − 1412 dnl Sequent Balance
70
+ − 1413 ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
+ − 1414 ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
0
+ − 1415
149
+ − 1416 dnl Siemens Nixdorf
0
+ − 1417 mips-siemens-sysv* | mips-sni-sysv*)
+ − 1418 machine=mips-siemens opsys=usg5-4
+ − 1419 NON_GNU_CC=/usr/ccs/bin/cc
+ − 1420 NON_GNU_CPP=/usr/ccs/lib/cpp
+ − 1421 ;;
+ − 1422
377
+ − 1423 dnl NEC
+ − 1424 mips-nec-sysv*)
+ − 1425 machine=mips-nec
+ − 1426 NON_GNU_CC=/usr/ccs/bin/cc
+ − 1427 NON_GNU_CPP=/usr/ccs/lib/cpp
+ − 1428 ;;
+ − 1429
149
+ − 1430 dnl Silicon Graphics machines
+ − 1431 dnl Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
70
+ − 1432 m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
+ − 1433 m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
149
+ − 1434 dnl Iris 4D
+ − 1435 mips-sgi-irix3.* ) opsys=irix3-3 ;;
+ − 1436 mips-sgi-irix4.* ) opsys=irix4-0 ;;
207
+ − 1437 mips-sgi-irix6* ) opsys=irix6-0 ;;
149
+ − 1438 mips-sgi-irix5.1* ) opsys=irix5-1 ;;
+ − 1439 mips-sgi-irix5.2* ) opsys=irix5-2 ;;
+ − 1440 mips-sgi-irix5.* ) opsys=irix5-3 ;;
+ − 1441 mips-sgi-irix* ) opsys=irix5-0 ;;
+ − 1442
+ − 1443 dnl SONY machines
+ − 1444 *-sony-newsos[[34]]* | *-sony-news[[34]]* ) opsys=bsd4-3 ;;
+ − 1445 *-sony-news* ) opsys=newsos5 ;;
+ − 1446
+ − 1447 dnl Stride
70
+ − 1448 m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
0
+ − 1449
149
+ − 1450 dnl Suns
0
+ − 1451 *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
149
+ − 1452 dnl Hardware type
+ − 1453 case "$canonical" in
0
+ − 1454 m68*-sunos1* ) machine=sun1 ;;
+ − 1455 m68*-sunos2* ) machine=sun2 ;;
+ − 1456 m68* ) machine=sun3 ;;
163
+ − 1457 i*86*-sun-sunos[[34]]* ) machine=sun386 ;;
+ − 1458 i*86-*-* ) machine=intel386 ;;
0
+ − 1459 rs6000* ) machine=rs6000 ;;
149
+ − 1460 esac
+ − 1461
+ − 1462 dnl Make $canonical even more so.
+ − 1463 case "$canonical" in *-sunos5*)
163
+ − 1464 canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
0
+ − 1465 esac
149
+ − 1466
157
+ − 1467 dnl On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib
+ − 1468 dnl On SunOS 5, use cc -E, need dynodump, RANLIB not needed
149
+ − 1469 dnl But, SunOS 5.6 no longer needs dynodump because it has a similar
+ − 1470 dnl function integrated.
+ − 1471 case "$canonical" in
0
+ − 1472 *-sunos4* )
157
+ − 1473 #test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;;
+ − 1474 : ;;
70
+ − 1475 *-solaris2* )
157
+ − 1476 #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
+ − 1477 RANLIB=':' ;;
151
+ − 1478 esac
149
+ − 1479
+ − 1480 case "$canonical" in
163
+ − 1481 *-solaris* )
+ − 1482 opsys=sol2
+ − 1483 os_release=`uname -r | sed -e 's/^\([[0-9]]\)\.\([[0-9]]\).*/\1\2/'`
+ − 1484 AC_DEFINE_UNQUOTED(OS_RELEASE, $os_release) ;;
+ − 1485
149
+ − 1486 dnl The last Sun386 ran 4.0.
163
+ − 1487 i*86-*-sunos4* ) opsys=sunos4-0 ;;
74
+ − 1488 *-sunos4.0* ) opsys=sunos4-0 ;;
+ − 1489 *-sunos4.1.2* ) opsys=sunos4-1-2 ;;
110
+ − 1490 *-sunos4.1.3* ) opsys=sunos4-1-3 ;;
120
+ − 1491 *-sunos4.1.[[4-9]]* ) opsys=sunos4-1-4 ;;
74
+ − 1492 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
+ − 1493 *-mach* ) opsys=mach-bsd4-3 ;;
+ − 1494 * ) opsys=bsd4-2 ;;
0
+ − 1495 esac
70
+ − 1496
149
+ − 1497 case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
+ − 1498
+ − 1499 dnl Watch out for a compiler guaranteed not to work.
163
+ − 1500 test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
0
+ − 1501 ;;
70
+ − 1502
149
+ − 1503 dnl Tadpole 68k
70
+ − 1504 m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
0
+ − 1505
149
+ − 1506 dnl Tahoe machines
70
+ − 1507 tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
+ − 1508 tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
0
+ − 1509
149
+ − 1510 dnl Tandem Integrity S2
70
+ − 1511 mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
0
+ − 1512
149
+ − 1513 dnl Tektronix XD88
70
+ − 1514 m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
0
+ − 1515
149
+ − 1516 dnl Tektronix 16000 box (6130?)
70
+ − 1517 ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
149
+ − 1518 dnl Tektronix 4300
+ − 1519 dnl src/m/tek4300.h hints that this is a m68k machine.
70
+ − 1520 m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
0
+ − 1521
149
+ − 1522 dnl Titan P2 or P3
70
+ − 1523 titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
0
+ − 1524
149
+ − 1525 dnl Ustation E30 (SS5E)
70
+ − 1526 m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
0
+ − 1527
149
+ − 1528 dnl Vaxen.
0
+ − 1529 vax-dec-* )
149
+ − 1530 case "$canonical" in
+ − 1531 *-sysv[[01]]* | *-sysvr[[01]]* ) opsys=usg5-0 ;;
+ − 1532 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
+ − 1533 *-mach* ) opsys=mach-bsd4-3 ;;
0
+ − 1534 esac
+ − 1535 ;;
+ − 1536
149
+ − 1537 dnl Whitechapel MG1
70
+ − 1538 ns16k-whitechapel-* ) machine=mg1 ;;
0
+ − 1539
149
+ − 1540 dnl Wicat
70
+ − 1541 m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
0
+ − 1542
149
+ − 1543 dnl Intel 386 machines where we do not care about the manufacturer
120
+ − 1544 i[[3-9]]86-*-* )
0
+ − 1545 machine=intel386
149
+ − 1546 case "$canonical" in
120
+ − 1547 *-isc1.* | *-isc2.[[01]]* ) opsys=386-ix ;;
0
+ − 1548 *-isc2.2* ) opsys=isc2-2 ;;
+ − 1549 *-isc4.0* ) opsys=isc4-0 ;;
+ − 1550 *-isc4.* ) opsys=isc4-1
+ − 1551 GCC_TEST_OPTIONS=-posix
+ − 1552 NON_GCC_TEST_OPTIONS=-Xp
+ − 1553 ;;
+ − 1554 *-isc* ) opsys=isc3-0 ;;
149
+ − 1555 *-esix5* ) opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
0
+ − 1556 *-esix* ) opsys=esix ;;
+ − 1557 *-mach* ) opsys=mach-bsd4-3 ;;
+ − 1558 *-xenix* ) opsys=xenix ;;
149
+ − 1559 *-sco3.2v4* ) opsys=sco4 NON_GNU_CPP=/lib/cpp ;;
0
+ − 1560 *-bsd386* | *-bsdi1* ) opsys=bsd386 ;;
392
+ − 1561 *-bsdi4* ) opsys=bsdos4 ;;
110
+ − 1562 *-bsdi3* ) opsys=bsdos3 ;;
0
+ − 1563 *-bsdi2.1* ) opsys=bsdos2-1 ;;
+ − 1564 *-bsdi2* ) opsys=bsdos2 ;;
460
+ − 1565 *-sco3.2v5* ) opsys=sco5 ;;
422
+ − 1566 *-sysv5* ) opsys=sco7 ;;
70
+ − 1567 *-386bsd* ) opsys=386bsd ;;
+ − 1568 *-freebsd* ) opsys=freebsd ;;
0
+ − 1569 *-nextstep* ) opsys=nextstep ;;
398
+ − 1570 *-pc-cygwin* ) opsys=cygwin32 ;;
+ − 1571 *-pc-mingw* ) opsys=mingw32 ;
+ − 1572 test -z "$with_tty" && with_tty="no";;
149
+ − 1573 dnl Otherwise, we fall through to the generic opsys code at the bottom.
0
+ − 1574 esac
+ − 1575 ;;
+ − 1576
149
+ − 1577 dnl Linux/68k
70
+ − 1578 m68k-*-linux* ) machine=m68k opsys=linux ;;
+ − 1579
0
+ − 1580 esac
+ − 1581
505
+ − 1582 dnl Initialize machine from $canonical if not in our database above.
442
+ − 1583 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
505
+ − 1584
+ − 1585 dnl Initialize opsys from `uname -s` if not in our database above.
+ − 1586 test -z "$opsys" && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
442
+ − 1587
+ − 1588 dnl Use configure-time autodetection if s&m not available
+ − 1589 if test -r "${srcdir}/src/m/${machine}.h"; then
+ − 1590 machfile="m/${machine}.h"
+ − 1591 AC_DEFINE_UNQUOTED(config_machfile, "$machfile")
+ − 1592 else
+ − 1593 echo "XEmacs has no builtin knowledge of \`$machine' machines."
+ − 1594 echo "Using configure-time autodetection only."
0
+ − 1595 fi
+ − 1596
442
+ − 1597 if test -r "${srcdir}/src/s/${opsys}.h"; then
+ − 1598 opsysfile="s/${opsys}.h"
+ − 1599 AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile")
+ − 1600 else
+ − 1601 echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
+ − 1602 echo "Using configure-time autodetection only."
+ − 1603 fi
+ − 1604
1155
+ − 1605 dnl --------------------------------------------------------------
+ − 1606 dnl $opsys detection complete; defaults depending on $opsys follow
+ − 1607 dnl --------------------------------------------------------------
+ − 1608
+ − 1609 if test -z "$pdump"; then
+ − 1610 case "$opsys" in
1442
+ − 1611 linux* ) pdump=yes ;; dnl glibc 2.3.1 seems to hose unexec
+ − 1612 darwin ) pdump=yes ;; dnl No "native" working dumper available
+ − 1613 * ) pdump=no ;;
1155
+ − 1614 esac
+ − 1615 fi
442
+ − 1616
173
+ − 1617 if test -z "$dynamic"; then
+ − 1618 case "$opsys" in
388
+ − 1619 hpux* | sunos4* ) dynamic=no ;;
173
+ − 1620 *) dynamic=yes ;;
+ − 1621 esac
+ − 1622 fi
+ − 1623 if test "$dynamic" = "yes"; then
149
+ − 1624 case "$opsys" in
74
+ − 1625 hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
173
+ − 1626 decosf* ) ld_call_shared="-call_shared" ;;
1259
+ − 1627 darwin ) AC_DEFINE(DLSYM_NEEDS_UNDERSCORE) ;;
0
+ − 1628 esac
173
+ − 1629 else dnl "$dynamic" = "no"
149
+ − 1630 case "$opsys" in
187
+ − 1631 sol2 )
173
+ − 1632 echo "Static linking is not supported on Solaris 2."
+ − 1633 echo "Rerun configure without specifying --dynamic=no."
+ − 1634 exit 1 ;;
+ − 1635 linux ) ld_call_shared="-Bstatic" ;;
+ − 1636 decosf* ) ld_call_shared="-non_shared" ;;
0
+ − 1637 esac
+ − 1638 fi
+ − 1639
1442
+ − 1640 dnl Tools configuration
+ − 1641 case "$opsys" in
+ − 1642 aix* ) NON_GNU_CC=xlc ;; dnl Use xlc by default on AIX
+ − 1643 darwin ) RANLIB="ranlib -c" ;; dnl Avoid link error in lwlib-config.c
+ − 1644 esac
207
+ − 1645
280
+ − 1646 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
177
+ − 1647 AC_DEFINE_UNQUOTED(STACK_TRACE_EYE_CATCHER, $stack_trace_eye_catcher)
173
+ − 1648
149
+ − 1649 dnl --------------------------------------------------
+ − 1650 dnl Determine the compiler, set up for feature testing
+ − 1651 dnl --------------------------------------------------
+ − 1652
151
+ − 1653 dnl Sun Development environment support
+ − 1654 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
284
+ − 1655 XE_CHECK_FEATURE_DEPENDENCY(workshop, tooltalk)
151
+ − 1656 if test "$with_workshop" = "yes"; then
+ − 1657 AC_DEFINE(SUNPRO)
+ − 1658 fi
+ − 1659
442
+ − 1660 if test "$with_clash_detection" != "no"; then
175
+ − 1661 AC_DEFINE(CLASH_DETECTION)
+ − 1662 fi
+ − 1663
169
+ − 1664 dnl Choose a compiler from (in order)
+ − 1665 dnl --compiler, env var CC, with_gcc=no && ${NON_GNU_CC:-cc}, AC_PROG_CC
+ − 1666 test -n "$compiler" && CC="$compiler"
+ − 1667 if test "$with_gcc" = "no"; then dnl Try to find a non-gcc compiler
+ − 1668 case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
+ − 1669 fi
149
+ − 1670
157
+ − 1671 dnl If we don't set CFLAGS here, AC_PROG_CC will set it.
+ − 1672 dnl But we know better what's good for us, so we do our own
+ − 1673 dnl computation of real CFLAGS later.
272
+ − 1674 dnl --cflags overrides environment variable CFLAGS
+ − 1675 test "${cflags-unset}" != unset && CFLAGS="$cflags"
+ − 1676 if test "${CFLAGS-unset}" != unset
+ − 1677 then cflags_specified=yes;
+ − 1678 else cflags_specified=no;
+ − 1679 fi
+ − 1680
1111
+ − 1681 if test "${cflags_warning-unset}" != unset
+ − 1682 then cflags_warning_specified=yes;
+ − 1683 else cflags_warning_specified=no;
+ − 1684 fi
+ − 1685
157
+ − 1686 xe_save_CFLAGS="$CFLAGS"
+ − 1687
169
+ − 1688 AC_PROG_CC dnl Autoconf has its own magic for compiler autodetection
+ − 1689
+ − 1690 dnl Retry using random guesswork if AC_PROG_CC got it wrong...
+ − 1691 if test "$with_gcc" = "no" -a "$GCC" = "yes"; then
149
+ − 1692 CC=${NON_GNU_CC-cc}
+ − 1693 AC_PROG_CC
169
+ − 1694 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
149
+ − 1695 CC=gcc
+ − 1696 AC_PROG_CC
0
+ − 1697 fi
157
+ − 1698 CFLAGS="$xe_save_CFLAGS"
149
+ − 1699
1123
+ − 1700 dnl Determine GCC version.
+ − 1701 if test "$GCC" = "yes"; then
+ − 1702 AC_TRY_RUN([int main () {
+ − 1703 #if __GNUC__ >= 3
+ − 1704 return 11;
+ − 1705 #else
+ − 1706 return 0;
+ − 1707 #endif
+ − 1708 }], [],
+ − 1709 [case "$conftest_rc" in
+ − 1710 11) echo "You appear to be using GCC version 3 or above."; __GCC3=yes ;;
+ − 1711 esac])
+ − 1712 fi
+ − 1713
171
+ − 1714 dnl Figure out what C preprocessor to use.
+ − 1715
+ − 1716 dnl On Sun systems, people sometimes set up the variable CPP
+ − 1717 dnl with a value that is a directory, not an executable at all.
+ − 1718 dnl Detect that case, and ignore that value.
+ − 1719 test -n "$CPP" -a -d "$CPP" && CPP=
+ − 1720
169
+ − 1721 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
149
+ − 1722
+ − 1723 AC_PROG_CPP
+ − 1724
442
+ − 1725 dnl --------------------------------------------------------------------
+ − 1726 dnl Compiler feature macros
+ − 1727 dnl --------------------------------------------------------------------
+ − 1728
+ − 1729 AC_AIX dnl Defines _ALL_SOURCE on AIX.
+ − 1730
+ − 1731 dnl We want feature macros defined here *and* in config.h.in, so that
+ − 1732 dnl the compilation environment at configure time and compile time agree.
398
+ − 1733
243
+ − 1734 AC_MSG_CHECKING(for GNU libc)
+ − 1735 AC_TRY_COMPILE([#include <features.h>],[
+ − 1736 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
+ − 1737 #error Not a GNU libc system :-(
+ − 1738 ******* ======= ******** &&&&&&&&
+ − 1739 #endif
+ − 1740 ], have_glibc=yes, have_glibc=no)
+ − 1741 AC_MSG_RESULT($have_glibc)
265
+ − 1742 dnl I'm tired of pop being broken with GLIBC -slb
272
+ − 1743 dnl Well. then why not fix fucking pop?
+ − 1744 test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE)
243
+ − 1745
442
+ − 1746 dnl We'd like to use vendor extensions, where available.
+ − 1747 dnl We'd like to use functions from the latest Unix98 standards.
+ − 1748 dnl See http://www.opengroup.org/onlinepubs/007908799/xsh/compilation.html
+ − 1749 case "$opsys" in
+ − 1750 sol2)
+ − 1751 AC_DEFINE(__EXTENSIONS__)
+ − 1752 dnl Solaris 2 before 2.5 had some bugs with feature test macro interaction.
+ − 1753 if test "$os_release" -ge 55; then
+ − 1754 AC_DEFINE(_XOPEN_SOURCE,500)
+ − 1755 AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
+ − 1756 fi ;;
+ − 1757 linux)
+ − 1758 AC_DEFINE(_POSIX_C_SOURCE,199506L)
+ − 1759 AC_DEFINE(_XOPEN_SOURCE,500)
+ − 1760 AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
+ − 1761 ;;
+ − 1762 esac
373
+ − 1763
+ − 1764 dnl Identify compilers to enable compiler-specific hacks.
+ − 1765 dnl Add support for other compilers HERE!
+ − 1766 dnl GCC is already identified elsewhere.
+ − 1767 AC_TRY_RUN([int main () {
+ − 1768 #if defined __SUNPRO_C
+ − 1769 return 11;
+ − 1770 #elif defined __DECC
+ − 1771 return 12;
442
+ − 1772 #elif defined __USLC__ && defined __SCO_VERSION__
+ − 1773 return 13;
373
+ − 1774 #else
+ − 1775 return 0;
157
+ − 1776 #endif
373
+ − 1777 }], [],
+ − 1778 [case "$conftest_rc" in
+ − 1779 11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
+ − 1780 12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;;
442
+ − 1781 13) echo "You appear to be using the SCO C compiler." ; __USLC__=yes ;;
373
+ − 1782 esac])
+ − 1783
157
+ − 1784
+ − 1785 dnl case "$canonical" in
+ − 1786 dnl *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;;
+ − 1787 dnl esac
149
+ − 1788
+ − 1789 dnl --------------------------------------------------------------------
+ − 1790 dnl Extract some information from the operating system and machine files
+ − 1791 dnl --------------------------------------------------------------------
+ − 1792
+ − 1793 echo "Extracting information from the machine- and system-dependent headers..."
+ − 1794
+ − 1795 dnl It is not important that this name contain the PID; you cannot run
+ − 1796 dnl two configures in the same directory and have anything work
+ − 1797 dnl anyway.
+ − 1798 tempcname="conftest.c"
+ − 1799
+ − 1800 dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE)
+ − 1801 define([CPP_to_sh],
+ − 1802 [[#]ifndef [$1]
157
+ − 1803 [#]define [$1]ifelse([$3],,, [ "$3"])
149
+ − 1804 [#]endif
+ − 1805 configure___ [$2]=[$1]
284
+ − 1806 ])dnl CPP_to_sh
149
+ − 1807
+ − 1808 dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR)
+ − 1809 define([CPP_boolean_to_sh],
+ − 1810 [[#]ifdef [$1]
+ − 1811 configure___ [$2]=yes
+ − 1812 [#]else
+ − 1813 configure___ [$2]=no
+ − 1814 [#]endif
284
+ − 1815 ])dnl CPP_boolean_to_sh
+ − 1816
442
+ − 1817 cat > $tempcname < confdefs.h
+ − 1818 cat >> $tempcname <<EOF
149
+ − 1819 #define NOT_C_CODE
+ − 1820 #define C_SWITCH_SITE
+ − 1821 #define C_SWITCH_X_SITE
+ − 1822 #define LD_SWITCH_SITE
+ − 1823 #define LD_SWITCH_X_SITE
+ − 1824 #define LD_SWITCH_X_SITE_AUX
284
+ − 1825 #define OS_RELEASE $os_release
442
+ − 1826
+ − 1827 #ifdef config_opsysfile
284
+ − 1828 #include "$srcdir/src/$opsysfile"
442
+ − 1829 #endif
+ − 1830
+ − 1831 #ifdef config_machfile
284
+ − 1832 #include "$srcdir/src/$machfile"
442
+ − 1833 #endif
149
+ − 1834
+ − 1835 CPP_to_sh(LIBS_MACHINE, libs_machine)
+ − 1836 CPP_to_sh(LIBS_SYSTEM, libs_system)
+ − 1837 CPP_to_sh(LIBS_TERMCAP, libs_termcap)
+ − 1838 CPP_to_sh(LIB_STANDARD, libs_standard)
157
+ − 1839
163
+ − 1840 CPP_to_sh(OBJECTS_MACHINE, objects_machine)
+ − 1841 CPP_to_sh(OBJECTS_SYSTEM, objects_system)
+ − 1842
149
+ − 1843 CPP_to_sh(C_SWITCH_MACHINE, c_switch_machine)
157
+ − 1844 CPP_to_sh(C_SWITCH_SYSTEM, c_switch_system)
+ − 1845
+ − 1846 CPP_to_sh(LD_SWITCH_MACHINE, ld_switch_machine)
+ − 1847 CPP_to_sh(LD_SWITCH_SYSTEM, ld_switch_system)
+ − 1848
557
+ − 1849 CPP_to_sh(UNEXEC, unexec)
+ − 1850
+ − 1851 CPP_to_sh(SYSTEM_TYPE, system_type)
149
+ − 1852
163
+ − 1853 CPP_to_sh(LD_SWITCH_SHARED, ld_switch_shared, -c)
+ − 1854
442
+ − 1855 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
+ − 1856 configure___ ordinary_ld=ORDINARY_LD
+ − 1857
163
+ − 1858 #ifdef ORDINARY_LINK
442
+ − 1859 #define LD ORDINARY_LD
163
+ − 1860 #else /* no ORDINARY LINK */
+ − 1861 #ifdef COFF_ENCAPSULATE
284
+ − 1862 #define LD "\$(CC) -nostdlib"
163
+ − 1863 #else /* not COFF_ENCAPSULATE */
+ − 1864 #ifdef LINKER
+ − 1865 #define LD LINKER
+ − 1866 #else /* ! defined (LINKER) */
+ − 1867 #define LD "ld"
+ − 1868 #endif /* ! defined (LINKER) */
+ − 1869 #endif /* ! defined (COFF_ENCAPSULATE) */
+ − 1870 #endif /* not ORDINARY_LINK */
+ − 1871 configure___ ld=LD
+ − 1872
+ − 1873 CPP_to_sh(LIB_GCC, lib_gcc)
+ − 1874 CPP_to_sh(LD_TEXT_START_ADDR, ld_text_start_addr)
+ − 1875
+ − 1876 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
+ − 1877 #ifdef NO_REMAP
+ − 1878 #ifdef COFF_ENCAPSULATE
+ − 1879 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
+ − 1880 #else /* ! defined (COFF_ENCAPSULATE) */
+ − 1881 #define START_FILES "pre-crt0.o /lib/crt0.o"
+ − 1882 #endif /* ! defined (COFF_ENCAPSULATE) */
+ − 1883 #else /* ! defined (NO_REMAP) */
+ − 1884 #define START_FILES "ecrt0.o"
+ − 1885 #endif /* ! defined (NO_REMAP) */
+ − 1886 #endif /* no ORDINARY_LINK */
+ − 1887 #ifndef START_FILES
+ − 1888 #define START_FILES
+ − 1889 #endif
+ − 1890 configure___ start_files=START_FILES
+ − 1891
153
+ − 1892 CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link)
149
+ − 1893 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc)
+ − 1894 CPP_boolean_to_sh(TERMINFO, have_terminfo)
438
+ − 1895 dnl The MAIL_USE_xxx variables come from the s&m headers
149
+ − 1896 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock)
+ − 1897 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf)
438
+ − 1898 CPP_boolean_to_sh(MAIL_USE_LOCKING, mail_use_locking)
398
+ − 1899 CPP_boolean_to_sh(HAVE_WIN32_PROCESSES, win32_processes)
284
+ − 1900 EOF
+ − 1901
149
+ − 1902 dnl The value of CPP is a quoted variable reference, so we need to do this
+ − 1903 dnl to get its actual value...
380
+ − 1904 CPP=`eval "echo $CPP $CPPFLAGS"`
165
+ − 1905 define(TAB, [ ])dnl
+ − 1906 changequote(, )dnl
149
+ − 1907 eval `$CPP -Isrc $tempcname \
165
+ − 1908 | sed -n -e "s/[ TAB]*=[ TAB\"]*/='/" -e "s/[ TAB\"]*\$/'/" -e "s/^configure___//p"`
+ − 1909 changequote([, ])dnl
153
+ − 1910
149
+ − 1911 rm $tempcname
+ − 1912
557
+ − 1913 dnl s&m files shouldn't be required to define anything, or even to exist.
+ − 1914 dnl So we default SYSTEM_TYPE to the obvious documented standard, `uname -s`,
+ − 1915 dnl appropriately emacsulated.
+ − 1916 test -z "$system_type" && \
+ − 1917 AC_DEFINE_UNQUOTED(SYSTEM_TYPE,"`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`")
+ − 1918
+ − 1919 dnl If the s&m files don't define a system-specific dumper, simply use pdump.
+ − 1920 dnl Sometime in the future, we'll remove all definitions of UNEXEC
+ − 1921 dnl from all the s&m files.
+ − 1922 test -z "$unexec" && pdump=yes
+ − 1923
442
+ − 1924 if test "$pdump" = "yes"; then
+ − 1925 ordinary_link="yes"
+ − 1926 ld="${ordinary_ld}"
+ − 1927 start_files=
+ − 1928 libs_standard=
+ − 1929 unexec=
+ − 1930 lib_gcc=
+ − 1931 fi
+ − 1932
163
+ − 1933 dnl For debugging...
+ − 1934 test "$extra_verbose" = "yes" && \
+ − 1935 PRINT_VAR(libs_machine libs_system libs_termcap libs_standard
+ − 1936 objects_machine objects_system c_switch_machine c_switch_system
201
+ − 1937 ld_switch_machine ld_switch_system unexec ld_switch_shared
163
+ − 1938 ld lib_gcc ld_text_start_addr start_files ordinary_link
+ − 1939 have_terminfo mail_use_flock mail_use_lockf) && echo ""
+ − 1940
462
+ − 1941 dnl Pick up mingw include path
+ − 1942 dnl We only cope with headers in mingw, not mingw32: no previous version of
+ − 1943 dnl XEmacs supported mingw and cygnus have made this incompatible change
+ − 1944 dnl so we just go with the flow.
458
+ − 1945 case "$opsys" in mingw* | cygwin*)
452
+ − 1946 cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
+ − 1947 cygwin_include=`eval "dirname $cygwin_include"` ;
+ − 1948 cygwin_include="-I$cygwin_include/../include" ;
462
+ − 1949 extra_includes="$cygwin_include/mingw $cygwin_include" ;
458
+ − 1950 case "$opsys" in mingw*)
452
+ − 1951 XE_APPEND($extra_includes, c_switch_system) ;;
+ − 1952 esac
458
+ − 1953 ;;
438
+ − 1954 esac
+ − 1955
153
+ − 1956 dnl Non-ordinary link usually requires -lc
+ − 1957 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
+ − 1958
442
+ − 1959 dnl -----------------------
373
+ − 1960 dnl Compiler-specific hacks
442
+ − 1961 dnl -----------------------
+ − 1962
+ − 1963 dnl DEC C `-std1' means ANSI C mode
+ − 1964 test "$__DECC" = "yes" && XE_APPEND(-std1, c_switch_site)
+ − 1965
+ − 1966 dnl Some versions of SCO native compiler need -Kalloca
+ − 1967 if test "$__USLC__" = yes; then
+ − 1968 AC_MSG_CHECKING(for whether the -Kalloca compiler flag is needed)
+ − 1969 need_kalloca=no
+ − 1970 AC_TRY_LINK([], [void *x = alloca(4);], [:], [
+ − 1971 xe_save_c_switch_system="$c_switch_system"
+ − 1972 c_switch_system="$c_switch_system -Kalloca"
+ − 1973 AC_TRY_LINK([], [void *x = alloca(4);], [ need_kalloca=yes ])
+ − 1974 c_switch_system="$xe_save_c_switch_system"])
+ − 1975 AC_MSG_RESULT($need_kalloca)
+ − 1976 test "$need_kalloca" = "yes" && XE_APPEND(-Kalloca,c_switch_system)
+ − 1977 fi
373
+ − 1978
464
+ − 1979 dnl Calculate value of CFLAGS:
157
+ − 1980 dnl Use either command line flag, environment var, or autodetection
272
+ − 1981 if test "$cflags_specified" = "no"; then
157
+ − 1982 dnl Following values of CFLAGS are known to work well.
+ − 1983 dnl Should we take debugging options into consideration?
1123
+ − 1984 if test "$GCC" = "yes"; then
1111
+ − 1985 CFLAGS="-g -O3"
+ − 1986 dnl I'm not convinced this is a good idea any more. -sb
+ − 1987 dnl test "$opsys $machine" = "linux intel386" && \
+ − 1988 dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
+ − 1989 elif test "$__SUNPRO_C" = "yes"; then
+ − 1990 case "$opsys" in
+ − 1991 sol2 ) CFLAGS="-xO4" ;;
+ − 1992 sunos4* ) CFLAGS="-xO2" ;;
+ − 1993 esac
+ − 1994 elif test "$__DECC" = "yes"; then
+ − 1995 CFLAGS="-O3"
+ − 1996 elif test "$CC" = "xlc"; then
+ − 1997 CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qro -qmaxmem=20000"
+ − 1998 dnl ### Add optimal CFLAGS support for other compilers HERE!
+ − 1999 else
+ − 2000 CFLAGS="-O" ;dnl The only POSIX-approved flag
+ − 2001 fi
+ − 2002 fi
+ − 2003
+ − 2004 dnl Calculate warning flags. We now separate the flags for warnings from
+ − 2005 dnl the other flags because we really really want the warnings to be seen
+ − 2006 dnl by everyone.
+ − 2007
+ − 2008 if test "$cflags_warning_specified" = "no"; then
+ − 2009 dnl Following warning flags are known to work well.
1123
+ − 2010 if test "$GCC" = "yes"; then
1111
+ − 2011 cflags_warning="-Wall -Wno-switch -Winline -Wmissing-prototypes"
464
+ − 2012 dnl Yuck, bad compares have been worth at least 3 crashes!
1111
+ − 2013 cflags_warning="$cflags_warning -Wsign-compare"
+ − 2014 dnl NOTE: The following three, as well as -Wmissing-declarations and
+ − 2015 dnl -Weffc++ below, have been recently added. If you are getting
+ − 2016 dnl grief from them, please notify ben@xemacs.org!
1123
+ − 2017 cflags_warning="$cflags_warning -Wundef -Wstrict-prototypes"
+ − 2018 if test "$__GCC3" = "yes"; then
+ − 2019 cflags_warning="$cflags_warning -Wpacked"
+ − 2020 fi
771
+ − 2021 dnl With g++, -Wshadow produces five zillion utterly random warnings --
+ − 2022 dnl a local var named `buffer' conflicts with `struct buffer' for
+ − 2023 dnl example. Even with gcc, -Wshadow is questionable because of its
+ − 2024 dnl complaints about parameters with the same names as global functions.
664
+ − 2025 if test "$xemacs_compiler" != "g++"; then
1111
+ − 2026 dnl no -Wmissing-declarations under g++.
+ − 2027 cflags_warning="$cflags_warning -Wshadow -Wmissing-declarations"
+ − 2028 else
+ − 2029 cflags_warning="$cflags_warning -Weffc++"
664
+ − 2030 fi
458
+ − 2031 dnl glibc is intentionally not `-Wpointer-arith'-clean.
+ − 2032 dnl Ulrich Drepper has rejected patches to fix the glibc header files.
1111
+ − 2033 test "$have_glibc" != "yes" && \
+ − 2034 cflags_warning="$cflags_warning -Wpointer-arith"
373
+ − 2035 elif test "$__SUNPRO_C" = "yes"; then
157
+ − 2036 case "$opsys" in
1111
+ − 2037 sol2 ) cflags_warning="-v" ;;
157
+ − 2038 esac
207
+ − 2039 elif test "$CC" = "xlc"; then
1111
+ − 2040 cflags_warning="-qinfo"
+ − 2041 dnl ### Add optimal cflags_warning support for other compilers HERE!
157
+ − 2042 fi
+ − 2043 fi
151
+ − 2044
1111
+ − 2045 dnl Now combine all C flags. Put the warning flags first so that
+ − 2046 dnl user-specified flags will override.
+ − 2047 CFLAGS="$cflags_warning $CFLAGS"
+ − 2048
442
+ − 2049 dnl Search for GCC specific build problems we know about
+ − 2050 if test "$GCC" = "yes"; then
+ − 2051 AC_MSG_CHECKING(for buggy gcc versions)
+ − 2052 GCC_VERSION=`$CC --version`
+ − 2053 case `uname -s`:`uname -m`:$GCC_VERSION in
+ − 2054 dnl egcs 2.90.21 (egcs-1.00 release)
+ − 2055 dnl egcs 2.90.29 (egcs-1.0.3 release)
+ − 2056 *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
+ − 2057 dnl Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures
+ − 2058 dnl without also using `-fno-schedule-insns'.
+ − 2059 case "$CFLAGS" in
+ − 2060 *-O2*|*-O3*)
+ − 2061 case "$CFLAGS" in
+ − 2062 *-fno-schedule-insns*) ;;
+ − 2063 *)
+ − 2064 AC_MSG_RESULT(yes)
559
+ − 2065 AC_MSG_WARN([Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures])
+ − 2066 AC_MSG_WARN([without also using -fno-schedule-insns.])
+ − 2067 AC_MSG_ERROR([Aborting due to known problem])
442
+ − 2068 ;;
+ − 2069 esac
+ − 2070 ;;
+ − 2071 esac
+ − 2072 ;;
+ − 2073 dnl egcs-2.91.57 (egcs-1.1 release)
+ − 2074 dnl egcs-2.91.66 (egcs-1.1.2 release)
+ − 2075 Linux:alpha:egcs-2.91.*)
+ − 2076 AC_MSG_RESULT(yes)
559
+ − 2077 AC_MSG_WARN([There have been reports of egcs-1.1 not compiling XEmacs correctly on])
+ − 2078 AC_MSG_WARN([Alpha Linux. There have also been reports that egcs-1.0.3a is O.K.])
+ − 2079 AC_MSG_ERROR([Aborting due to known problem])
442
+ − 2080 ;;
+ − 2081 *:i*86*:2.7.2*)
448
+ − 2082 case "$CFLAGS" in
+ − 2083 *-O2*|*-O3*)
+ − 2084 case "$GCC_VERSION" in
+ − 2085 2.7.2)
442
+ − 2086 case "$CFLAGS" in
+ − 2087 *-fno-strength-reduce*) ;;
+ − 2088 *)
+ − 2089 AC_MSG_RESULT(yes)
559
+ − 2090 AC_MSG_WARN([Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using])
+ − 2091 AC_MSG_WARN([-fno-strength-reduce.])
+ − 2092 AC_MSG_ERROR([Aborting due to known problem])
442
+ − 2093 ;;
+ − 2094 esac
+ − 2095 ;;
+ − 2096 esac
448
+ − 2097 case "$CFLAGS" in
+ − 2098 *-fno-caller-saves*) ;;
+ − 2099 *)
+ − 2100 AC_MSG_RESULT(yes)
559
+ − 2101 AC_MSG_WARN([Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using])
+ − 2102 AC_MSG_WARN([-fno-caller-saves.])
+ − 2103 AC_MSG_ERROR([Aborting due to known problem])
448
+ − 2104 ;;
+ − 2105 esac
442
+ − 2106 ;;
+ − 2107 esac
+ − 2108 ;;
+ − 2109 esac
+ − 2110 AC_MSG_RESULT(no)
+ − 2111 fi
+ − 2112
846
+ − 2113 dnl GNU ld now defaults to combreloc, which screws up unexec, but not pdump.
+ − 2114 dnl Note that it's OK if the GNU style long option causes non-GNU ld to barf
+ − 2115 dnl a usage message, that's often good enough. Please report it, though.
+ − 2116 dnl #### Should make this Solaris-friendly.
+ − 2117 dnl Link with -z nocombreloc for now.
+ − 2118 if test "$pdump" != "yes"; then
+ − 2119 AC_MSG_CHECKING(for \"-z nocombreloc\" linker flag)
+ − 2120 case "`ld --help 2>&1`" in
+ − 2121 *-z\ nocombreloc* ) AC_MSG_RESULT(yes)
+ − 2122 XE_PREPEND(-z nocombreloc, ld_switch_site) ;;
+ − 2123 *) AC_MSG_RESULT(no) ;;
+ − 2124 esac
+ − 2125 fi
+ − 2126
+ − 2127
272
+ − 2128 dnl Inform compiler that certain flags are meant for the linker
+ − 2129 dnl XE_PROTECT_LINKER_FLAGS(shell_var)
+ − 2130 define([XE_PROTECT_LINKER_FLAGS], [
163
+ − 2131 if test "$GCC" = "yes"; then
272
+ − 2132 set x $[$1]; shift; [$1]=""
+ − 2133 while test -n "[$]1"; do
+ − 2134 case [$]1 in
380
+ − 2135 -L | -l | -u ) [$1]="$[$1] [$]1 [$]2"; shift ;;
+ − 2136 -L* | -l* | -u* | -Wl* | -pg ) [$1]="$[$1] [$]1" ;;
163
+ − 2137 -Xlinker* ) ;;
272
+ − 2138 * ) [$1]="$[$1] -Xlinker [$]1" ;;
163
+ − 2139 esac
272
+ − 2140 shift
+ − 2141 done
+ − 2142 fi])dnl
+ − 2143 XE_PROTECT_LINKER_FLAGS(ld_switch_system)
+ − 2144 XE_PROTECT_LINKER_FLAGS(ld_switch_machine)
846
+ − 2145 XE_PROTECT_LINKER_FLAGS(ld_switch_site)
272
+ − 2146 XE_PROTECT_LINKER_FLAGS(LDFLAGS)
+ − 2147 XE_PROTECT_LINKER_FLAGS(ld_call_shared)
163
+ − 2148
+ − 2149 dnl Add s&m-determined objects (including unexec) to link line
+ − 2150 test -n "$objects_machine" && XE_ADD_OBJS($objects_machine)
+ − 2151 test -n "$objects_system" && XE_ADD_OBJS($objects_system)
442
+ − 2152 test -n "$unexec" && test ! "$pdump" = "yes" && XE_ADD_OBJS($unexec)
+ − 2153 test "$pdump" = "yes" && XE_ADD_OBJS(dumper.o)
163
+ − 2154
+ − 2155 dnl Dynodump (Solaris 2.x, x<6)
+ − 2156 AC_MSG_CHECKING(for dynodump)
+ − 2157 if test "$unexec" != "unexsol2.o"; then
+ − 2158 AC_MSG_RESULT(no)
+ − 2159 else
+ − 2160 AC_MSG_RESULT(yes)
+ − 2161 AC_DEFINE(DYNODUMP)
+ − 2162 XE_APPEND(dynodump, MAKE_SUBDIR)
175
+ − 2163 XE_APPEND(dynodump, SRC_SUBDIR_DEPS)
163
+ − 2164 case "$machine" in
+ − 2165 sparc ) dynodump_arch=sparc ;;
+ − 2166 *86* ) dynodump_arch=i386 ;;
+ − 2167 powerpc ) dynodump_arch=ppc ;;
+ − 2168 esac
+ − 2169 dnl Dynodump requires the system linker
+ − 2170 test "$GCC" = "yes" && XE_APPEND(-fno-gnu-linker, ld_switch_site)
+ − 2171 fi
+ − 2172
+ − 2173 dnl Feed s&m crud to src/Makefile
207
+ − 2174
272
+ − 2175 dnl Linux/powerpc needs the following magic for some reason
274
+ − 2176 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
272
+ − 2177
207
+ − 2178 if test "$unexec" = "unexaix.o"; then
+ − 2179 dnl AIX needs various hacks to make static linking work.
219
+ − 2180 if test "$dynamic" = "no"; then
207
+ − 2181 start_flags="-Wl,-bnso,-bnodelcsect"
209
+ − 2182 test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
272
+ − 2183 for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
207
+ − 2184 if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
+ − 2185 done
+ − 2186 for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
+ − 2187 if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
+ − 2188 done
294
+ − 2189 AC_CHECK_LIB(C, terminateAndUnload, XE_APPEND(-lC, libs_system))
219
+ − 2190 fi
207
+ − 2191 elif test -n "$ld_text_start_addr"; then
+ − 2192 start_flags="-T $ld_text_start_addr -e __start"
+ − 2193 fi
+ − 2194 AC_SUBST(start_flags)
+ − 2195
163
+ − 2196 AC_SUBST(ld_switch_shared)
+ − 2197 AC_SUBST(start_files)
+ − 2198 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
+ − 2199 test -z "$linker" && linker='$(CC) -nostdlib'
175
+ − 2200 test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
163
+ − 2201 fi
+ − 2202 test "$GCC" != "yes" && lib_gcc=
+ − 2203 AC_SUBST(ld)
+ − 2204 AC_SUBST(lib_gcc)
151
+ − 2205
+ − 2206 dnl ---------------------------------------------------------------
+ − 2207 dnl Add site and system specific flags to compile and link commands
+ − 2208 dnl ---------------------------------------------------------------
+ − 2209
380
+ − 2210 dnl Allow use of either ":" or spaces for lists of directories
+ − 2211 define(COLON_TO_SPACE,
+ − 2212 [case "$[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's/^ //' -e 's/:/ /g'`";; esac])dnl
209
+ − 2213
151
+ − 2214 dnl --site-libraries (multiple dirs)
380
+ − 2215 COLON_TO_SPACE(site_libraries)
151
+ − 2216 if test -n "$site_libraries"; then
+ − 2217 for arg in $site_libraries; do
380
+ − 2218 case "$arg" in
+ − 2219 -* ) ;;
+ − 2220 * ) test -d "$arg" || \
+ − 2221 XE_DIE("Invalid site library \`$arg': no such directory")
+ − 2222 arg="-L${arg}" ;;
+ − 2223 esac
151
+ − 2224 XE_APPEND($arg, ld_switch_site)
+ − 2225 done
+ − 2226 fi
+ − 2227
+ − 2228 dnl --site-includes (multiple dirs)
380
+ − 2229 COLON_TO_SPACE(site_includes)
272
+ − 2230 if test -n "$site_includes"; then
151
+ − 2231 for arg in $site_includes; do
380
+ − 2232 case "$arg" in
+ − 2233 -* ) ;;
+ − 2234 * ) test -d "$arg" || \
+ − 2235 XE_DIE("Invalid site include \`$arg': no such directory")
+ − 2236 arg="-I${arg}" ;;
+ − 2237 esac
151
+ − 2238 XE_APPEND($arg, c_switch_site)
+ − 2239 done
+ − 2240 fi
+ − 2241
380
+ − 2242 dnl --site-prefixes (multiple dirs)
+ − 2243 dnl --site-prefixes=dir1:dir2 is a convenient shorthand for
+ − 2244 dnl --site-libraries=dir1/lib:dir2/lib --site-includes=dir1/include:dir2/include
+ − 2245 dnl Site prefixes take precedence over the standard places, but not over
+ − 2246 dnl site-includes and site-libraries.
+ − 2247 COLON_TO_SPACE(site_prefixes)
+ − 2248 if test -n "$site_prefixes"; then
+ − 2249 for dir in $site_prefixes; do
398
+ − 2250 lib_dir="${dir}/lib"
416
+ − 2251 inc_dir="${dir}/include"
380
+ − 2252 if test ! -d "$dir"; then
+ − 2253 XE_DIE("Invalid site prefix \`$dir': no such directory")
+ − 2254 elif test ! -d "$lib_dir"; then
+ − 2255 XE_DIE("Invalid site prefix \`$dir': no such directory \`$lib_dir'")
+ − 2256 else
414
+ − 2257 if test -d "$inc_dir"; then
+ − 2258 XE_APPEND("-I$inc_dir", c_switch_site)
+ − 2259 fi
380
+ − 2260 XE_APPEND("-L$lib_dir", ld_switch_site)
+ − 2261 fi
+ − 2262 done
+ − 2263 fi
+ − 2264
157
+ − 2265 dnl GNU software installs by default into /usr/local/{include,lib}
163
+ − 2266 dnl if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
+ − 2267 dnl XE_APPEND("-L/usr/local/lib", ld_switch_site)
+ − 2268 dnl XE_APPEND("-I/usr/local/include", c_switch_site)
+ − 2269 dnl fi
157
+ − 2270
151
+ − 2271 dnl Extra system-specific library directories - please add to list
+ − 2272 for dir in "/usr/ccs/lib"; do
440
+ − 2273 test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
151
+ − 2274 done
+ − 2275
+ − 2276 dnl --site-runtime-libraries (multiple dirs)
380
+ − 2277 COLON_TO_SPACE(site_runtime_libraries)
272
+ − 2278 if test -n "$site_runtime_libraries"; then
165
+ − 2279 LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/ */:/g'`"
151
+ − 2280 export LD_RUN_PATH
+ − 2281 fi
+ − 2282
440
+ − 2283 dnl Linux systems have dynamic runtime library directories listed in
+ − 2284 dnl /etc/ld.so.conf. Since those are used at run time, it seems pretty
+ − 2285 dnl safe to use them at link time, and less controversial than forcing
+ − 2286 dnl the run-time to use the link-time libraries. This also helps avoid
+ − 2287 dnl mismatches between the link-time and run-time libraries.
+ − 2288
442
+ − 2289 dnl #### Unfortunately, there are horrible libc4 and libc5 libraries
+ − 2290 dnl listed in /etc/ld.so.conf on some systems, and including them on
+ − 2291 dnl the link path leads to linking in utterly broken libc's.
+ − 2292 dnl There are many clever ways of approaching this problem,
708
+ − 2293 dnl but finding one that actually works...
440
+ − 2294
+ − 2295 dnl if test -z "$LD_RUN_PATH" -a -r "/etc/ld.so.conf"; then
+ − 2296 dnl for dir in `cat /etc/ld.so.conf`; do
+ − 2297 dnl test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
+ − 2298 dnl done
+ − 2299 dnl add_runtime_path=no
+ − 2300 dnl fi
+ − 2301
151
+ − 2302 dnl -------------------------------------
+ − 2303 dnl Compute runtime library path
+ − 2304 dnl -------------------------------------
+ − 2305
440
+ − 2306 if test -n "$add_runtime_path"; then :;
+ − 2307 elif test "$dynamic" = "no"; then add_runtime_path=no
151
+ − 2308 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
163
+ − 2309 else case "$opsys" in
373
+ − 2310 sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
151
+ − 2311 * ) add_runtime_path=no ;;
+ − 2312 esac
0
+ − 2313 fi
+ − 2314
151
+ − 2315 if test "$add_runtime_path" = "yes"; then
+ − 2316 dnl Try to autodetect runtime library flag (usually -R),
+ − 2317 dnl and whether it works (or at least does no harm)
+ − 2318 AC_MSG_CHECKING("for runtime libraries flag")
373
+ − 2319 case "$opsys" in
377
+ − 2320 sol2 ) dash_r="-R" ;;
392
+ − 2321 decosf* | linux* | irix*) dash_r="-rpath " ;;
373
+ − 2322 *)
+ − 2323 dash_r=""
+ − 2324 for try_dash_r in "-R" "-R " "-rpath "; do
+ − 2325 xe_check_libs="${try_dash_r}/no/such/file-or-directory"
+ − 2326 XE_PROTECT_LINKER_FLAGS(xe_check_libs)
+ − 2327 AC_TRY_LINK(, , dash_r="$try_dash_r")
+ − 2328 xe_check_libs=""
+ − 2329 test -n "$dash_r" && break
+ − 2330 done ;;
+ − 2331 esac
151
+ − 2332 if test -n "$dash_r";
+ − 2333 then AC_MSG_RESULT("\"${dash_r}\"")
+ − 2334 else AC_MSG_RESULT(NONE)
+ − 2335 fi
+ − 2336 fi
+ − 2337
163
+ − 2338 xe_add_unique_runpath_dir='
+ − 2339 xe_add_p=yes
+ − 2340 for xe_dir in $runpath_dirs; do dnl Uniquify
+ − 2341 test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
+ − 2342 done
+ − 2343 if test "$xe_add_p" = "yes"; then
+ − 2344 test -n "$runpath" && runpath="${runpath}:"
+ − 2345 runpath="${runpath}${xe_runpath_dir}"
+ − 2346 runpath_dirs="$runpath_dirs $xe_runpath_dir"
+ − 2347 fi'
+ − 2348
+ − 2349
155
+ − 2350 dnl XE_ADD_RUNPATH_DIR(directory)
163
+ − 2351 define([XE_ADD_RUNPATH_DIR],[{
155
+ − 2352 xe_runpath_dir=$1
163
+ − 2353 dnl PRINT_VAR(ld_switch_site ld_switch_x_site runpath xe_runpath_dir LD_RUN_PATH xe_ldflags)
+ − 2354 test "$xe_runpath_dir" != "/lib" -a \
155
+ − 2355 "$xe_runpath_dir" != "/usr/lib" -a \
371
+ − 2356 -n "`ls ${xe_runpath_dir}/*.s[[ol]] 2>/dev/null`" && \
163
+ − 2357 eval "$xe_add_unique_runpath_dir"
+ − 2358 }])dnl
155
+ − 2359
+ − 2360 dnl XE_COMPUTE_RUNPATH()
151
+ − 2361 define([XE_COMPUTE_RUNPATH],[
+ − 2362 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
+ − 2363 dnl Remove runtime paths from current ld switches
165
+ − 2364 ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"`
+ − 2365 ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"`
163
+ − 2366 dnl PRINT_VAR(ld_switch_site ld_switch_x_site)
151
+ − 2367
+ − 2368 dnl Fix up Runtime path
+ − 2369 dnl If LD_RUN_PATH is set in environment, use that.
+ − 2370 dnl In this case, assume user has set the right value.
163
+ − 2371 runpath="" runpath_dirs=""
151
+ − 2372 if test -n "$LD_RUN_PATH"; then
+ − 2373 runpath="$LD_RUN_PATH"
155
+ − 2374 elif test "$GCC" = "yes"; then
+ − 2375 dnl Compute runpath from gcc's -v output
163
+ − 2376 ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
155
+ − 2377 echo "int main(int argc, char *argv[[]]) {return 0;}" > conftest.c
+ − 2378 xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
+ − 2379 for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
+ − 2380 case "$arg" in P,* | -L* | -R* )
159
+ − 2381 for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
155
+ − 2382 XE_ADD_RUNPATH_DIR("$dir")
+ − 2383 done ;;
+ − 2384 esac
+ − 2385 done
163
+ − 2386 ld_switch_run="$ld_switch_run_save"
155
+ − 2387 rm -f conftest*
151
+ − 2388 else
+ − 2389 dnl Add all directories with .so files to runpath
+ − 2390 for arg in $ld_switch_site $ld_switch_x_site; do
159
+ − 2391 case "$arg" in -L*) XE_ADD_RUNPATH_DIR(`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`);; esac
151
+ − 2392 done
+ − 2393 dnl Sometimes /opt/SUNWdt/lib is the only installed Motif available
163
+ − 2394 if test "$opsys $need_motif" = "sol2 yes"; then
+ − 2395 xe_runpath_dir="/opt/SUNWdt/lib";
+ − 2396 eval "$xe_add_unique_runpath_dir";
+ − 2397 fi
155
+ − 2398 fi dnl Compute $runpath
151
+ − 2399
+ − 2400 if test -n "$runpath"; then
+ − 2401 ld_switch_run="${dash_r}${runpath}"
272
+ − 2402 XE_PROTECT_LINKER_FLAGS(ld_switch_run)
151
+ − 2403 test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
+ − 2404 fi
+ − 2405 fi
+ − 2406 ])dnl
+ − 2407 XE_COMPUTE_RUNPATH()
+ − 2408
+ − 2409 dnl -----------------------------------
+ − 2410 dnl Do some misc autoconf-special tests
+ − 2411 dnl -----------------------------------
149
+ − 2412
+ − 2413 dnl Do the opsystem or machine files prohibit the use of the GNU malloc?
+ − 2414 dnl Assume not, until told otherwise.
+ − 2415 GNU_MALLOC=yes
261
+ − 2416 if test "$with_dlmalloc" != "no"; then
+ − 2417 doug_lea_malloc=yes
+ − 2418 else
+ − 2419 doug_lea_malloc=no
+ − 2420 fi
259
+ − 2421 after_morecore_hook_exists=yes
255
+ − 2422 AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
+ − 2423 AC_MSG_CHECKING(whether __after_morecore_hook exists)
+ − 2424 AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0],
+ − 2425 [AC_MSG_RESULT(yes)],
+ − 2426 [AC_MSG_RESULT(no)
259
+ − 2427 after_morecore_hook_exists=no])
149
+ − 2428 if test "$system_malloc" = "yes" ; then
+ − 2429 GNU_MALLOC=no
+ − 2430 GNU_MALLOC_reason="
442
+ − 2431 - The GNU allocators don't work with this system configuration."
181
+ − 2432 elif test "$with_system_malloc" = "yes" ; then
149
+ − 2433 GNU_MALLOC=no
+ − 2434 GNU_MALLOC_reason="
442
+ − 2435 - User chose not to use GNU allocators."
181
+ − 2436 elif test "$with_debug_malloc" = "yes" ; then
177
+ − 2437 GNU_MALLOC=no
+ − 2438 GNU_MALLOC_reason="
442
+ − 2439 - User chose to use Debugging Malloc."
149
+ − 2440 fi
+ − 2441
442
+ − 2442 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
+ − 2443 GNU_MALLOC_reason="
+ − 2444 - Using Doug Lea's new malloc from the GNU C Library."
255
+ − 2445 AC_DEFINE(DOUG_LEA_MALLOC)
259
+ − 2446 if test "$after_morecore_hook_exists" = "no" ; then
+ − 2447 GNU_MALLOC_reason="
442
+ − 2448 - Using Doug Lea's new malloc from the Linux C Library."
259
+ − 2449 AC_DEFINE(_NO_MALLOC_WARNING_)
+ − 2450 fi
255
+ − 2451 fi
+ − 2452
267
+ − 2453 dnl #### mcheck is broken in all versions of Linux libc and glibc.
+ − 2454 dnl Try this again when 2.1 hits the streets.
+ − 2455 dnl Avoid using free-hook.c if support exists for malloc debugging in libc
+ − 2456 dnl have_libmcheck=no
+ − 2457 dnl if test "$error_check_malloc" = "yes" -a \
+ − 2458 dnl "$have_glibc" = "yes" -a \
+ − 2459 dnl "$doug_lea_malloc" = "yes"; then
+ − 2460 dnl AC_CHECK_HEADERS(mcheck.h)
+ − 2461 dnl AC_CHECK_LIB(mcheck, mcheck, have_libmcheck=yes, have_libmcheck=no)
+ − 2462 dnl fi
+ − 2463
+ − 2464 dnl if test "$have_libmcheck" = "yes"; then
+ − 2465 dnl AC_DEFINE(HAVE_LIBMCHECK)
+ − 2466 dnl libmcheck=-lmcheck
+ − 2467 dnl AC_SUBST(libmcheck)
+ − 2468 dnl fi
+ − 2469
149
+ − 2470 dnl Some other nice autoconf tests. If you add a test here which
+ − 2471 dnl should make an entry in src/config.h, do not forget to add an
+ − 2472 dnl #undef clause to src/config.h.in for autoconf to modify.
120
+ − 2473
0
+ − 2474 AC_PROG_RANLIB
+ − 2475 AC_PROG_INSTALL
+ − 2476 AC_PROG_YACC
+ − 2477
+ − 2478 dnl checks for header files
442
+ − 2479 AC_CHECK_HEADERS(dnl
+ − 2480 a.out.h dnl
446
+ − 2481 elf.h dnl
442
+ − 2482 cygwin/version.h dnl
+ − 2483 fcntl.h dnl
+ − 2484 inttypes.h dnl
+ − 2485 libgen.h dnl
+ − 2486 locale.h dnl
911
+ − 2487 wchar.h dnl
442
+ − 2488 mach/mach.h dnl
+ − 2489 sys/param.h dnl
+ − 2490 sys/pstat.h dnl
+ − 2491 sys/time.h dnl
+ − 2492 sys/timeb.h dnl
777
+ − 2493 sys/times.h dnl
442
+ − 2494 sys/un.h dnl
+ − 2495 ulimit.h dnl
+ − 2496 unistd.h dnl
+ − 2497 )
155
+ − 2498 AC_HEADER_SYS_WAIT
149
+ − 2499 AC_HEADER_STDC
+ − 2500 AC_HEADER_TIME
+ − 2501 AC_DECL_SYS_SIGLIST
+ − 2502
460
+ − 2503
+ − 2504 dnl ----------------------------------------------------------------
+ − 2505 dnl Checking for utime() or utimes().
+ − 2506 dnl We prefer utime, since it is more standard.
+ − 2507 dnl Some systems have utime.h but do not declare the struct anyplace,
+ − 2508 dnl so we use a more sophisticated test for utime than AC_CHECK_FUNCS.
+ − 2509 dnl ----------------------------------------------------------------
+ − 2510 AC_MSG_CHECKING(for utime)
+ − 2511 AC_TRY_COMPILE([#include <sys/types.h>
+ − 2512 #include <utime.h>],
+ − 2513 [struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);],
149
+ − 2514 [AC_MSG_RESULT(yes)
460
+ − 2515 AC_DEFINE(HAVE_UTIME)],
+ − 2516 [AC_MSG_RESULT(no)
+ − 2517 dnl We don't have utime(); how about utimes()?
+ − 2518 AC_CHECK_FUNCS(utimes)])
+ − 2519
0
+ − 2520
+ − 2521 dnl checks for typedefs
149
+ − 2522 AC_TYPE_SIGNAL
163
+ − 2523 AC_TYPE_SIZE_T
+ − 2524 AC_TYPE_PID_T
+ − 2525 AC_TYPE_UID_T
+ − 2526 AC_TYPE_MODE_T
+ − 2527 AC_TYPE_OFF_T
426
+ − 2528 AC_CHECK_TYPE(ssize_t, int)
410
+ − 2529
1442
+ − 2530 dnl not AC_CHECK_TYPE; lisp.h does hairy conditional typedef
+ − 2531 if test "$ac_cv_header_inttypes_h" != "yes"; then
+ − 2532 AC_MSG_CHECKING(for intptr_t in sys/types.h)
+ − 2533 AC_TRY_COMPILE([#include <sys/types.h>
+ − 2534 intptr_t x;
+ − 2535 ],[],[AC_MSG_RESULT(yes)
+ − 2536 AC_DEFINE(HAVE_INTPTR_T_IN_SYS_TYPES_H,1)],
+ − 2537 [AC_MSG_RESULT(no)])
+ − 2538 fi
+ − 2539
442
+ − 2540 dnl check for Unix98 socklen_t
+ − 2541 AC_MSG_CHECKING(for socklen_t)
1427
+ − 2542 AC_TRY_COMPILE([#include <sys/types.h>
+ − 2543 #include <sys/socket.h>
442
+ − 2544 socklen_t x;
+ − 2545 ],[],[AC_MSG_RESULT(yes)],[
1427
+ − 2546 AC_TRY_COMPILE([#include <sys/types.h>
+ − 2547 #include <sys/socket.h>
442
+ − 2548 int accept (int, struct sockaddr *, size_t *);
+ − 2549 ],[],[
+ − 2550 AC_MSG_RESULT(size_t)
+ − 2551 AC_DEFINE(socklen_t,size_t)], [
+ − 2552 AC_MSG_RESULT(int)
+ − 2553 AC_DEFINE(socklen_t,int)])])
+ − 2554
149
+ − 2555 AC_MSG_CHECKING(for struct timeval)
+ − 2556 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
0
+ − 2557 #include <sys/time.h>
+ − 2558 #include <time.h>
+ − 2559 #else
+ − 2560 #ifdef HAVE_SYS_TIME_H
+ − 2561 #include <sys/time.h>
+ − 2562 #else
+ − 2563 #include <time.h>
+ − 2564 #endif
149
+ − 2565 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;],
+ − 2566 [AC_MSG_RESULT(yes)
0
+ − 2567 HAVE_TIMEVAL=yes
+ − 2568 AC_DEFINE(HAVE_TIMEVAL)],
149
+ − 2569 [AC_MSG_RESULT(no)
+ − 2570 HAVE_TIMEVAL=no])
0
+ − 2571
+ − 2572 dnl checks for structure members
+ − 2573 AC_STRUCT_TM
149
+ − 2574 AC_STRUCT_TIMEZONE
0
+ − 2575
+ − 2576 dnl checks for compiler characteristics
149
+ − 2577 AC_C_CONST
0
+ − 2578
+ − 2579 dnl check for Make feature
149
+ − 2580 AC_PROG_MAKE_SET
0
+ − 2581
+ − 2582 dnl check byte order
149
+ − 2583 AC_C_BIGENDIAN
0
+ − 2584
151
+ − 2585 dnl define SIZEOF_TYPE
+ − 2586 AC_CHECK_SIZEOF(short)
163
+ − 2587 if test "$ac_cv_sizeof_short" = 0; then
159
+ − 2588 echo ""
+ − 2589 echo "*** PANIC *** Configure tests are not working - compiler is broken."
+ − 2590 echo "*** PANIC *** Please examine config.log for compilation errors."
+ − 2591 exit 1
+ − 2592 fi
163
+ − 2593 AC_CHECK_SIZEOF(int)
+ − 2594 AC_CHECK_SIZEOF(long)
+ − 2595 AC_CHECK_SIZEOF(long long)
+ − 2596 AC_CHECK_SIZEOF(void *)
151
+ − 2597
0
+ − 2598 dnl check for long file names
149
+ − 2599 AC_SYS_LONG_FILE_NAMES
0
+ − 2600
1117
+ − 2601 dnl -lm is required for floating point support, among other things
398
+ − 2602 AC_CHECK_FUNC(sin, ,AC_CHECK_LIB(m, sin))
149
+ − 2603
243
+ − 2604 AC_TRY_LINK([#include <math.h>],
+ − 2605 [return atanh(1.0) + asinh(1.0) + acosh(1.0); ],
+ − 2606 AC_DEFINE(HAVE_INVERSE_HYPERBOLIC))
+ − 2607
567
+ − 2608 dnl See if mkstemp is available
+ − 2609 AC_CHECK_FUNCS(mkstemp)
+ − 2610
149
+ − 2611 dnl Determine type of mail locking from configure args and s&m headers
+ − 2612 AC_CHECKING(type of mail spool file locking)
438
+ − 2613 AC_CHECK_FUNCS(lockf flock)
+ − 2614 dnl The mail_use_xxx variables are set according to the s&m headers.
149
+ − 2615 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
+ − 2616 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
438
+ − 2617 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
442
+ − 2618 if test -z "$mail_locking"; then
+ − 2619 case "$opsys" in cygwin* | mingw*)
+ − 2620 mail_locking=pop ;;
+ − 2621 esac
+ − 2622 fi
+ − 2623
438
+ − 2624 if test "$mail_locking" = "lockf"; then AC_DEFINE(MAIL_LOCK_LOCKF)
+ − 2625 elif test "$mail_locking" = "flock"; then AC_DEFINE(MAIL_LOCK_FLOCK)
+ − 2626 elif test "$mail_locking" = "locking"; then AC_DEFINE(MAIL_LOCK_LOCKING)
442
+ − 2627 elif test "$mail_locking" = "pop"; then
+ − 2628 with_pop=yes
+ − 2629 mail_locking=
438
+ − 2630 else mail_locking="dot-locking"; AC_DEFINE(MAIL_LOCK_DOT)
410
+ − 2631 fi
438
+ − 2632 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
+ − 2633 XE_DIE("lockf mail locking requested but not available.")
+ − 2634 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
+ − 2635 XE_DIE("flock mail locking requested but not available.")
+ − 2636 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
+ − 2637 XE_DIE("locking mail locking requested but not available.")
410
+ − 2638
278
+ − 2639 case "$opsys" in decosf*)
+ − 2640 AC_CHECK_LIB(pthreads, cma_open)
+ − 2641 test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
+ − 2642 c_switch_site="$c_switch_site -threads" ;;
+ − 2643 esac
151
+ − 2644
708
+ − 2645 dnl ----------------------------------------------------------------
+ − 2646 dnl Miscellaneous flags
+ − 2647 dnl ----------------------------------------------------------------
+ − 2648
151
+ − 2649 AC_MSG_CHECKING(whether the -xildoff compiler flag is required)
+ − 2650 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
+ − 2651 if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
+ − 2652 then AC_MSG_RESULT(no);
+ − 2653 else AC_MSG_RESULT(yes); XE_APPEND(-xildoff, ld_switch_site)
+ − 2654 fi
+ − 2655 else AC_MSG_RESULT(no)
+ − 2656 fi
+ − 2657
155
+ − 2658 dnl Link with "-z ignore" on Solaris if supported
442
+ − 2659 if test "$opsys" = "sol2"; then
+ − 2660 if test "$os_release" -ge 56; then
+ − 2661 AC_MSG_CHECKING(for \"-z ignore\" linker flag)
+ − 2662 case "`ld -h 2>&1`" in
+ − 2663 *-z\ ignore\|record* ) AC_MSG_RESULT(yes)
+ − 2664 XE_PREPEND(-z ignore, ld_switch_site) ;;
+ − 2665 *) AC_MSG_RESULT(no) ;;
+ − 2666 esac
+ − 2667 fi
163
+ − 2668 fi
155
+ − 2669
149
+ − 2670 dnl ----------------------
+ − 2671 dnl Choose a window system
+ − 2672 dnl ----------------------
+ − 2673
+ − 2674 AC_CHECKING("for specified window system")
+ − 2675
462
+ − 2676 dnl Autodetection of Gdk libraries and includes
+ − 2677 dnl -------------------------------------------
+ − 2678 dnl On some systems (FreeBSD springs to mind), they use
+ − 2679 dnl versions on the utility routines, so instead of gtk-config
+ − 2680 dnl you must use gtk12-config, etc, etc.
+ − 2681
+ − 2682 GNOME_CONFIG=no
+ − 2683 GTK_CONFIG=no
+ − 2684
+ − 2685 if test "$with_gnome" != "no"; then
+ − 2686 AC_MSG_CHECKING(for GNOME configuration script)
+ − 2687 for possible in gnome-config
+ − 2688 do
+ − 2689 possible_version=`${possible} --version 2> /dev/null`
+ − 2690 if test "x${possible_version}" != "x"; then
+ − 2691 GNOME_CONFIG="${possible}"
+ − 2692 with_gnome=yes
+ − 2693 with_gtk=yes
+ − 2694 break
+ − 2695 fi
+ − 2696 done
+ − 2697 AC_MSG_RESULT([${GNOME_CONFIG}])
+ − 2698 fi
+ − 2699
+ − 2700 if test "${GNOME_CONFIG}" != "no"; then
+ − 2701 GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
+ − 2702 GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
+ − 2703 AC_DEFINE(HAVE_GNOME)
+ − 2704 XE_APPEND(${GNOME_LIBS}, libs_gtk)
+ − 2705 XE_APPEND(${GNOME_CFLAGS}, c_switch_gtk)
+ − 2706 fi
+ − 2707
+ − 2708 if test "$with_gtk" != "no";then
+ − 2709 AC_MSG_CHECKING(for GTK configuration script)
+ − 2710 for possible in gtk12-config gtk14-config gtk-config
+ − 2711 do
+ − 2712 possible_version=`${possible} --version 2> /dev/null`
+ − 2713 if test "x${possible_version}" != "x"; then
+ − 2714 GTK_CONFIG="${possible}"
527
+ − 2715 case "${possible_version}" in
+ − 2716 1.0.*) AC_MSG_WARN([GTK 1.2 is required, please upgrade your version of GTK.]); with_gtk=no;;
+ − 2717 1.3.*) AC_MSG_WARN([GTK 1.3 is not supported right now]); with_gtk=no;;
+ − 2718 1.2.*)
+ − 2719 with_gtk=yes
+ − 2720 break
+ − 2721 ;;
+ − 2722 *) AC_MSG_WARN([Found unsupported version of GTK: $possible_version]);;
+ − 2723 esac
462
+ − 2724 fi
+ − 2725 done
+ − 2726 AC_MSG_RESULT([${GTK_CONFIG}])
+ − 2727 fi
+ − 2728
+ − 2729 if test "${GTK_CONFIG}" != "no"; then
+ − 2730 AC_MSG_CHECKING(gtk version)
+ − 2731 GTK_VERSION=`${GTK_CONFIG} --version`
+ − 2732 AC_MSG_RESULT(${GTK_VERSION})
+ − 2733
+ − 2734 AC_MSG_CHECKING(gtk libs)
+ − 2735 GTK_LIBS=`${GTK_CONFIG} --libs`
+ − 2736 XE_APPEND(${GTK_LIBS}, libs_gtk)
+ − 2737 AC_MSG_RESULT(${GTK_LIBS})
+ − 2738
+ − 2739 AC_MSG_CHECKING(gtk cflags)
+ − 2740 GTK_CFLAGS=`${GTK_CONFIG} --cflags`
720
+ − 2741 if test "$GCC" = "yes"; then
+ − 2742 GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
+ − 2743 fi
462
+ − 2744 XE_APPEND(${GTK_CFLAGS}, c_switch_gtk)
+ − 2745 AC_MSG_RESULT(${GTK_CFLAGS})
+ − 2746
+ − 2747 AC_CHECK_LIB(gdk_imlib, main, XE_PREPEND(-lgdk_imlib, libs_gtk))
+ − 2748 AC_CHECK_LIB(Imlib, Imlib_init, XE_APPEND(-lImlib, libs_gtk))
+ − 2749 AC_CHECK_FUNCS(gdk_imlib_init)
+ − 2750
+ − 2751 AC_DEFINE(HAVE_XPM)
+ − 2752 AC_DEFINE(HAVE_GTK)
+ − 2753 AC_SUBST(GTK_CONFIG)
+ − 2754
+ − 2755 window_system=gtk
+ − 2756 with_gtk=yes
+ − 2757 with_x11=no
+ − 2758
+ − 2759 test "${with_scrollbars}" != "no" && with_scrollbars=gtk
+ − 2760 test "${with_toolbars}" != no && with_toolbars=gtk
+ − 2761 test "${with_menubars}" != "no" && with_menubars=gtk
+ − 2762 test "${with_dialogs}" != "no" && with_dialogs=gtk
+ − 2763 test "${with_widgets}" != "no" && with_widgets=gtk
+ − 2764
+ − 2765 dnl Check for libglade support (it rocks)
+ − 2766 OLD_CFLAGS="${CFLAGS}"
724
+ − 2767 OLD_CPPFLAGS="${CPPFLAGS}"
462
+ − 2768 OLD_LDFLAGS="${LDFLAGS}"
+ − 2769 CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
724
+ − 2770 CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
462
+ − 2771 LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
+ − 2772 AC_CHECK_HEADERS(glade/glade.h glade.h)
+ − 2773 AC_CHECK_LIB(xml, main, XE_PREPEND(-lxml, libs_gtk))
+ − 2774 AC_CHECK_LIB(glade, main, XE_PREPEND(-lglade, libs_gtk))
+ − 2775 AC_CHECK_LIB(glade-gnome, main, XE_PREPEND(-lglade-gnome, libs_gtk))
+ − 2776 AC_EGREP_HEADER([char \*txtdomain;], [glade/glade-xml.h],
+ − 2777 [AC_MSG_RESULT(yes)
+ − 2778 AC_DEFINE(LIBGLADE_XML_TXTDOMAIN,1)],
+ − 2779 [AC_MSG_RESULT(no)])
+ − 2780 CFLAGS="${OLD_CFLAGS}"
724
+ − 2781 CPPFLAGS="${OLD_CPPFLAGS}"
462
+ − 2782 LDFLAGS="${OLD_LDFLAGS}"
+ − 2783 fi
+ − 2784
+ − 2785 dnl We may eventually prefer gtk/gdk over vanilla X11...
+ − 2786
187
+ − 2787 if test "$with_x11" != "no"; then
+ − 2788 dnl User-specified --x-includes or --x-libraries implies --with-x11.
+ − 2789 test "$x_includes $x_libraries" != "NONE NONE" && \
+ − 2790 window_system=x11 with_x11=yes
+ − 2791
272
+ − 2792 dnl Autodetection of X11 libraries and includes
+ − 2793 dnl -------------------------------------------
+ − 2794 dnl AC_PATH_XTRA thinks it can find our X headers and includes, but
+ − 2795 dnl it often gets it wrong, so we only use it as a last resort.
+ − 2796
187
+ − 2797 dnl $OPENWINHOME implies --x-includes and --x-libraries
+ − 2798 dnl Not (yet) handled by autoconf2
272
+ − 2799 if test "$x_includes $x_libraries" = "NONE NONE" \
+ − 2800 -a -n "$OPENWINHOME" \
+ − 2801 -a "$OPENWINHOME" != "/usr/openwin" \
+ − 2802 -a -d "$OPENWINHOME"; then
187
+ − 2803 test -d "$OPENWINHOME/lib" && x_libraries="$OPENWINHOME/lib"
+ − 2804 test -d "$OPENWINHOME/include" && x_includes="$OPENWINHOME/include"
+ − 2805 test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
272
+ − 2806 fi
+ − 2807
+ − 2808 if test "$x_includes" = "NONE"; then
+ − 2809 dnl AC_PATH_XTRA often guesses /usr/include, when some other
+ − 2810 dnl include directory is a MUCH better guess (Linux, HP-UX 10.20).
+ − 2811 dnl This is a workaround for idiot (esp. HP) system vendors, who
+ − 2812 dnl provide a /usr/include/X11, but DON'T FULLY POPULATE IT.
+ − 2813 for dir in "/usr/X11" "/usr/X11R6"; do
+ − 2814 if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
+ − 2815 done
+ − 2816 fi
+ − 2817
+ − 2818 if test "$x_libraries" = "NONE"; then
+ − 2819 for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
+ − 2820 if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
+ − 2821 done
149
+ − 2822 fi
187
+ − 2823
149
+ − 2824 AC_PATH_XTRA # Autoconf claims to find X library and include dirs for us.
+ − 2825 if test "$no_x" = "yes"
+ − 2826 then with_x11=no window_system=none HAVE_X_WINDOWS=no
+ − 2827 else with_x11=yes window_system=x11 HAVE_X_WINDOWS=yes
+ − 2828 fi
+ − 2829 fi
+ − 2830
462
+ − 2831 dnl #### wmperry:: !x11 != NONE
+ − 2832 dnl case "$with_x11" in
+ − 2833 dnl yes ) window_system=x11 HAVE_X_WINDOWS=yes ;;
+ − 2834 dnl no ) window_system=none HAVE_X_WINDOWS=no ;;
+ − 2835 dnl esac
0
+ − 2836
149
+ − 2837 if test "$with_x11" = "yes"; then
+ − 2838 AC_DEFINE(HAVE_X_WINDOWS)
151
+ − 2839 XE_APPEND(lwlib, MAKE_SUBDIR)
175
+ − 2840 XE_APPEND(lwlib, SRC_SUBDIR_DEPS)
149
+ − 2841
1454
+ − 2842
+ − 2843 dnl Look for Motif, but only if not found in $x_includes and $x_libraries
+ − 2844 AC_CHECK_HEADER(Xm/Xm.h, [AC_CHECK_LIB(Xm, XmStringFree, got_motif=yes)])
+ − 2845
+ − 2846 if test "$got_motif" != "yes"; then
+ − 2847 dnl Try to find Motif/CDE/Tooltalk dirs
+ − 2848 dnl These take precedence over other X libs/includes, so PRE-pend
+ − 2849 for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
+ − 2850 "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
+ − 2851 inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
+ − 2852 if test -d "$lib_dir" -a -d "$inc_dir"; then
+ − 2853 case "$x_libraries" in *"$lib_dir"* ) ;; *)
+ − 2854 x_libraries="$lib_dir $x_libraries"
+ − 2855 XE_PREPEND(-L${lib_dir}, X_LIBS) ;;
+ − 2856 esac
+ − 2857 case "$x_includes" in "$inc_dir"* ) ;; *)
+ − 2858 x_includes="$inc_dir $x_includes"
+ − 2859 XE_PREPEND(-I${inc_dir}, X_CFLAGS) ;;
+ − 2860 esac
+ − 2861 break; dnl only need ONE Motif implementation!
+ − 2862 fi
+ − 2863 done
+ − 2864 fi
149
+ − 2865
+ − 2866 dnl Contrib X libs/includes do NOT take precedence, so AP-pend
+ − 2867 for rel in "X11R6" "X11R5" "X11R4"; do
+ − 2868 lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
+ − 2869 if test -d "$lib_dir" -a -d "$inc_dir"; then
151
+ − 2870 case "$x_libraries" in *"$lib_dir"* ) ;; *)
+ − 2871 x_libraries="$x_libraries $lib_dir"
+ − 2872 XE_APPEND(-L${lib_dir}, X_LIBS)
149
+ − 2873 esac
151
+ − 2874 case "$x_includes" in "$inc_dir"* ) ;; *)
+ − 2875 x_includes="$x_includes $inc_dir"
+ − 2876 XE_APPEND(-I${inc_dir}, X_CFLAGS)
149
+ − 2877 esac
+ − 2878 break; dnl Only need ONE X11 implementation !
0
+ − 2879 fi
149
+ − 2880 done
+ − 2881
373
+ − 2882 dnl Avoid version mismatch for shared library libXm.so on osf4
442
+ − 2883 case "$opsys" in
+ − 2884 decosf*) if test "$GCC" = yes -a -d /usr/shlib; then XE_APPEND(-L/usr/shlib, X_LIBS); fi ;;
+ − 2885 esac
373
+ − 2886
149
+ − 2887 ld_switch_x_site="$X_LIBS"
+ − 2888
151
+ − 2889 XE_COMPUTE_RUNPATH()
+ − 2890
149
+ − 2891 if test "$extra_verbose" = "yes"; then
+ − 2892 echo; echo "X11 compilation variables:"
163
+ − 2893 PRINT_VAR(x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS)
149
+ − 2894 echo
+ − 2895 fi
+ − 2896
265
+ − 2897 dnl Set up bitmaps search path.
+ − 2898 dnl The original suggestion was to unconditionally to append X11/bitmaps
+ − 2899 dnl to each element of $x_includes, I'm pretty sure this is the wrong
+ − 2900 dnl thing to do. We test for bitmaps and X11/bitmaps directories on each
+ − 2901 dnl element and add them to BITMAPDIR if they exist.
+ − 2902 bitmapdirs=
+ − 2903 if test "$x_includes" != NONE; then
+ − 2904 for i in $x_includes; do
+ − 2905 if test -d "$i/bitmaps"; then
+ − 2906 bitmapdirs="$i/bitmaps:$bitmapdirs"
+ − 2907 fi
+ − 2908 if test -d "$i/X11/bitmaps"; then
+ − 2909 bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
+ − 2910 fi
+ − 2911 done
+ − 2912 bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
+ − 2913 fi
+ − 2914 test ! -z "$bitmapdirs" && AC_DEFINE_UNQUOTED(BITMAPDIR, "$bitmapdirs")
+ − 2915
163
+ − 2916 dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO
+ − 2917 AC_CHECKING(for X defines extracted by xmkmf)
+ − 2918 rm -fr conftestdir
+ − 2919 if mkdir conftestdir; then
+ − 2920 cd conftestdir
+ − 2921 cat > Imakefile <<'EOF'
+ − 2922 xetest:
+ − 2923 @echo ${PROTO_DEFINES} ${STD_DEFINES}
+ − 2924 EOF
+ − 2925 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+ − 2926 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ − 2927 xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
+ − 2928 fi
+ − 2929 cd ..
+ − 2930 rm -fr conftestdir
+ − 2931 for word in $xmkmf_defines; do
535
+ − 2932 case "$word" in
464
+ − 2933 -D__STDC__*) ;;
+ − 2934 -D* )
442
+ − 2935 sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
+ − 2936 case "$word" in
+ − 2937 -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
+ − 2938 * ) val=1 ;;
+ − 2939 esac
+ − 2940 dnl Avoid re-AC_DEFINE-ing xmkmf symbols we've already defined above.
+ − 2941 if grep "^#define $sym " confdefs.h >/dev/null; then :; else
+ − 2942 if test "$val" = "1"
+ − 2943 then AC_DEFINE_UNQUOTED($sym)
+ − 2944 else AC_DEFINE_UNQUOTED($sym,$val)
+ − 2945 fi
+ − 2946 fi ;;
163
+ − 2947 esac
+ − 2948 done
+ − 2949 fi
+ − 2950
149
+ − 2951 dnl make sure we can find Intrinsic.h
+ − 2952 AC_CHECK_HEADER(X11/Intrinsic.h, ,
559
+ − 2953 [AC_MSG_ERROR([Unable to find X11 header files.])])
149
+ − 2954
153
+ − 2955 dnl -lXt and -lX11 are required
149
+ − 2956 dnl Some broken systems require the magic "-b i486-linuxaout" flag
+ − 2957 AC_CHECK_LIB(X11, XOpenDisplay, have_lib_x11=yes)
+ − 2958 if test "$have_lib_x11" != "yes"; then
+ − 2959 AC_CHECK_LIB(X11, XGetFontProperty,
+ − 2960 ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site",
559
+ − 2961 [AC_MSG_ERROR([Unable to find X11 libraries.])],
149
+ − 2962 -b i486-linuxaout)
+ − 2963 fi
+ − 2964 libs_x="-lX11"
151
+ − 2965 test "$extra_verbose" = "yes" && echo " Setting libs_x to \"-lX11\""
149
+ − 2966
153
+ − 2967 dnl Autodetect -lXext
+ − 2968 AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x))
+ − 2969
+ − 2970 dnl Require -lXt
169
+ − 2971 AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x),
559
+ − 2972 AC_MSG_ERROR([Unable to find X11 libraries.]))
149
+ − 2973
+ − 2974 AC_MSG_CHECKING(the version of X11 being used)
+ − 2975 AC_TRY_RUN([#include <X11/Intrinsic.h>
272
+ − 2976 int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }],
151
+ − 2977 [./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4])
+ − 2978 AC_MSG_RESULT(R${x11_release})
+ − 2979 AC_DEFINE_UNQUOTED(THIS_IS_X11R${x11_release})
149
+ − 2980
442
+ − 2981 if test "${x11_release}" = "4"; then
+ − 2982 case "$with_widgets" in
+ − 2983 "" | "no") with_widgets=no ;;
+ − 2984 *) XE_DIE("Widget support requires X11R5 or greater") ;;
+ − 2985 esac
+ − 2986 fi
+ − 2987
+ − 2988 AC_CHECK_FUNCS(XConvertCase)
+ − 2989
149
+ − 2990 AC_CHECK_HEADERS(X11/Xlocale.h)
+ − 2991
444
+ − 2992 dnl XFree86 has a non-standard prototype for this X11R6 function
+ − 2993 AC_CHECK_FUNCS(XRegisterIMInstantiateCallback)
+ − 2994 AC_MSG_CHECKING(for standard XRegisterIMInstantiateCallback prototype)
+ − 2995 AC_TRY_COMPILE([
+ − 2996 #define NeedFunctionPrototypes 1
+ − 2997 #include <X11/Xlib.h>
+ − 2998 extern Bool XRegisterIMInstantiateCallback(
+ − 2999 Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
535
+ − 3000 ], [],
444
+ − 3001 [AC_MSG_RESULT(yes)],
+ − 3002 [AC_MSG_RESULT(no)
+ − 3003 AC_DEFINE(XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE)])
149
+ − 3004
+ − 3005 dnl autodetect -lXmu
169
+ − 3006 test -z "$with_xmu" && { AC_CHECK_LIB(Xmu, XmuReadBitmapDataFromFile,
+ − 3007 with_xmu=yes, with_xmu=no) }
185
+ − 3008 if test "$with_xmu" = "no"; then
+ − 3009 XE_ADD_OBJS(xmu.o)
187
+ − 3010 else
185
+ − 3011 XE_PREPEND(-lXmu, libs_x)
+ − 3012 AC_DEFINE(HAVE_XMU)
169
+ − 3013 fi
149
+ − 3014
+ − 3015 dnl Autodetect -lXbsd
+ − 3016 dnl #### Someone, please add a better function than main
151
+ − 3017 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x))
149
+ − 3018
243
+ − 3019 dnl Problem with the MIT distribution of X on AIX
+ − 3020 if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
272
+ − 3021 dnl X11R6 requires thread-safe code on AIX for some reason
274
+ − 3022 if test "$GCC" = "yes"; then
+ − 3023 XE_PREPEND(-mthreads, X_CFLAGS)
+ − 3024 XE_PREPEND(-mthreads, libs_x)
+ − 3025 else
+ − 3026 case "$CC" in
+ − 3027 "xlc" ) CC="xlc_r" ;;
+ − 3028 "xlC" ) CC="xlC_r" ;;
+ − 3029 "cc" ) CC="cc_r" ;;
+ − 3030 esac
+ − 3031 fi
243
+ − 3032 fi
+ − 3033
149
+ − 3034 fi dnl $with_x11 = yes
+ − 3035
265
+ − 3036 if test "$with_msw" != "no"; then
+ − 3037 AC_CHECKING(for MS-Windows)
+ − 3038 AC_CHECK_LIB(gdi32,main,with_msw=yes)
+ − 3039 if test "$with_msw" = "yes"; then
+ − 3040 AC_DEFINE(HAVE_MS_WINDOWS)
448
+ − 3041
+ − 3042 dnl The net installer only works with MS-Windows currently
462
+ − 3043 if test "$with_netinstall" = "yes"; then
+ − 3044 XE_APPEND(netinstall, MAKE_SUBDIR)
+ − 3045 XE_APPEND(netinstall, SRC_SUBDIR_DEPS)
+ − 3046 XE_APPEND(netinstall, INSTALL_ARCH_DEP_SUBDIR)
+ − 3047 fi
458
+ − 3048
276
+ − 3049 install_pp="$blddir/lib-src/installexe.sh"
771
+ − 3050 XE_APPEND(-limm32 -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lole32 -luuid -lwinspool -lmpr, libs_system)
+ − 3051 if test "$with_dragndrop" != no; then
+ − 3052 XE_APPEND(msw, dragndrop_proto)
+ − 3053 with_dragndrop=yes
+ − 3054 fi
265
+ − 3055 if test "$window_system" != x11; then
771
+ − 3056 window_system=msw
+ − 3057 test "$with_scrollbars" != "no" && with_scrollbars=msw
+ − 3058 test "$with_menubars" != "no" && with_menubars=msw
+ − 3059 test "$with_toolbars" != "no" && with_toolbars=msw
+ − 3060 test "$with_dialogs" != "no" && with_dialogs=msw
+ − 3061 test "$with_widgets" != "no" && with_widgets=msw
265
+ − 3062 fi
380
+ − 3063 dnl check for our special version of select
278
+ − 3064 AC_TRY_RUN([#include <fcntl.h>
+ − 3065 int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }],
771
+ − 3066 [AC_DEFINE(HAVE_MSG_SELECT)])
265
+ − 3067 fi
+ − 3068 fi
+ − 3069
276
+ − 3070 AC_SUBST(install_pp)
+ − 3071
771
+ − 3072 test -z "$with_dragndrop" && with_dragndrop="$with_dragndrop_default"
149
+ − 3073 test -z "$window_system" && window_system="none"
+ − 3074
272
+ − 3075 dnl Test for features that require a window system - ANY window system
+ − 3076 if test "$window_system" = "none"; then
388
+ − 3077 for feature in menubars scrollbars toolbars dialogs dragndrop xface
272
+ − 3078 do
+ − 3079 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+ − 3080 AC_MSG_WARN([--with-$feature ignored: Not valid without window system support])
+ − 3081 fi
+ − 3082 eval "with_${feature}=no"
+ − 3083 done
+ − 3084 else
+ − 3085 test -z "$with_toolbars" && with_toolbars=yes
+ − 3086 fi
+ − 3087
+ − 3088 dnl ### Test for features that require mswindows support - currently none
+ − 3089 dnl ### MS-Windows folks: add code here..... (martin)
+ − 3090 if test "$with_msw" != "yes"; then
+ − 3091 for feature in MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
+ − 3092 do
+ − 3093 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+ − 3094 AC_MSG_WARN([--with-$feature ignored: Not valid without MS-Windows support])
+ − 3095 fi
+ − 3096 eval "with_${feature}=no"
+ − 3097 done
+ − 3098 else
+ − 3099 :
+ − 3100 fi
+ − 3101
+ − 3102 dnl Test for features that require X11 support
+ − 3103 if test "$with_x11" != "yes"; then
+ − 3104 dnl It ought to be reasonable to have no output device at all, and only use
+ − 3105 dnl XEmacs in --batch mode.
+ − 3106 dnl if test "$with_tty" = "no" ; then
+ − 3107 dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.])
+ − 3108 dnl fi
434
+ − 3109 for feature in tooltalk cde offix wmcommand xim xmu nas_sound
149
+ − 3110 do
+ − 3111 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+ − 3112 AC_MSG_WARN([--with-$feature ignored: Not valid without X support])
0
+ − 3113 fi
149
+ − 3114 eval "with_${feature}=no"
70
+ − 3115 done
0
+ − 3116 fi
120
+ − 3117
442
+ − 3118 dnl Balloon Help requires the Shape extension, not available everywhere,
+ − 3119 dnl for example not on AIX 4.3.
+ − 3120 if test "$with_x11" = "yes"; then
+ − 3121 AC_CHECK_HEADER(X11/extensions/shape.h, [
+ − 3122 AC_DEFINE(HAVE_BALLOON_HELP)
771
+ − 3123 ])
442
+ − 3124 fi
+ − 3125
149
+ − 3126 dnl FSF 19.29 has some bitmapdir stuff here.
0
+ − 3127 bitmapdir=
+ − 3128
149
+ − 3129 case "$window_system" in
70
+ − 3130 x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;;
272
+ − 3131 msw ) HAVE_X_WINDOWS=no ; echo " Using MS-Windows." ;;
462
+ − 3132 gtk )
+ − 3133 HAVE_X_WINDOWS=no
+ − 3134 test "$with_gnome" = "yes" && echo " Using GNOME."
+ − 3135 test "$with_gnome" = "no" && echo " Using GTK."
+ − 3136 ;;
70
+ − 3137 none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;;
0
+ − 3138 esac
+ − 3139
149
+ − 3140 case "$x_libraries" in *X11R4* )
+ − 3141 test "$opsys" = "hpux9" && opsysfile="s/hpux9-x11r4.h"
+ − 3142 test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
+ − 3143 esac
+ − 3144
414
+ − 3145 dnl Enable or disable proper handling of WM_COMMAND
+ − 3146 AC_CHECKING(for WM_COMMAND option);
+ − 3147 dnl if test "$with_wmcommand" = "yes"; then
+ − 3148 if test "$with_wmcommand" != "no"; then
+ − 3149 AC_DEFINE(HAVE_WMCOMMAND)
177
+ − 3150 fi
+ − 3151
149
+ − 3152 dnl Autodetect Xauth
159
+ − 3153 dnl -lXau is only used by gnuclient, so use a special variable for Xauth X libs
149
+ − 3154 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
+ − 3155 test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h, ,with_xauth=no) }
+ − 3156 test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no) }
+ − 3157 test -z "$with_xauth" && with_xauth=yes
+ − 3158 if test "$with_xauth" = "yes"; then
+ − 3159 AC_DEFINE(HAVE_XAUTH)
462
+ − 3160 XE_SPACE(libs_xauth, $GTK_LIBS $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS)
100
+ − 3161 fi
159
+ − 3162 AC_SUBST(libs_xauth)
100
+ − 3163
282
+ − 3164 dnl This one is for the static initializeds variables in
+ − 3165 dnl offix.c, so that the thing is dumped after lastfile.o
274
+ − 3166 AC_SUBST(dnd_objs)
+ − 3167
1111
+ − 3168 dnl Support for using a different compiler for xemacs itself.
+ − 3169 dnl Useful for building XEmacs with a C++ compiler.
+ − 3170 dnl For example, `configure --compiler=gcc --xemacs-compiler=g++
+ − 3171
+ − 3172 dnl The compiler used to build xemacs, as opposed to the compiler
+ − 3173 dnl used by configure and lib-src, is determined from the following
+ − 3174 dnl sources, in order of priority:
+ − 3175 dnl o --xemacs-compiler configure flag
+ − 3176 dnl o XEMACS_CC environment variable
+ − 3177 dnl o same as the regular compiler, (determined previously)
+ − 3178 test -n "$xemacs_compiler" && XEMACS_CC="$xemacs_compiler"
+ − 3179 : ${XEMACS_CC:="$CC"}
+ − 3180
997
+ − 3181
149
+ − 3182 dnl Autodetect tooltalk
+ − 3183 if test "$with_tooltalk" != "no" ; then
+ − 3184 dnl autodetect the location of tt_c.h
+ − 3185 dnl tt_c.h might be in Tt or desktop include directories
+ − 3186 for dir in "" "Tt/" "desktop/" ; do
442
+ − 3187 AC_CHECK_HEADER(${dir}tt_c.h, tt_c_h_file="${dir}tt_c.h"; break)
149
+ − 3188 done
442
+ − 3189 if test -z "$tt_c_h_file"; then
284
+ − 3190 if test "$with_tooltalk" = "yes"; then
+ − 3191 USAGE_ERROR("Unable to find required tooltalk header files.")
+ − 3192 fi
+ − 3193 with_tooltalk=no
+ − 3194 fi
0
+ − 3195 fi
149
+ − 3196 if test "$with_tooltalk" != "no" ; then
+ − 3197 for extra_libs in "" "-lI18N -lce" "-lcxx"; do
+ − 3198 AC_CHECK_LIB(tt, tt_message_create,
284
+ − 3199 tt_libs="-ltt $extra_libs"; break, [:],$extra_libs)
0
+ − 3200 done
284
+ − 3201 if test -z "$tt_libs"; then
+ − 3202 if test "$with_tooltalk" = "yes"; then
+ − 3203 USAGE_ERROR("Unable to find required tooltalk libraries.")
+ − 3204 fi
+ − 3205 with_tooltalk=no
+ − 3206 fi
149
+ − 3207 fi
284
+ − 3208 test -z "$with_tooltalk" && with_tooltalk=yes
149
+ − 3209 if test "$with_tooltalk" = "yes"; then
+ − 3210 AC_DEFINE(TOOLTALK)
442
+ − 3211 AC_DEFINE_UNQUOTED(TT_C_H_FILE, "$tt_c_h_file")
151
+ − 3212 XE_PREPEND($tt_libs, libs_x)
0
+ − 3213 fi
+ − 3214
149
+ − 3215 dnl Autodetect CDE
+ − 3216 test -z "$with_cde" && { AC_CHECK_HEADER(Dt/Dt.h, , with_cde=no) }
+ − 3217 test -z "$with_cde" && { AC_CHECK_LIB(DtSvc, DtDndDragStart, [:], with_cde=no) }
581
+ − 3218 if test "$with_dragndrop" = "no" ; then
+ − 3219 if test "$with_cde" = "yes" ; then
+ − 3220 AC_MSG_WARN([--with-cde forced to \`no'; no generic Drag'n'Drop support])
+ − 3221 fi
282
+ − 3222 with_cde=no
+ − 3223 fi
581
+ − 3224 test -z "$with_cde" && with_cde=yes
149
+ − 3225 if test "$with_cde" = "yes" ; then
+ − 3226 AC_DEFINE(HAVE_CDE)
151
+ − 3227 XE_PREPEND(-lDtSvc, libs_x)
282
+ − 3228 XE_APPEND(CDE, dragndrop_proto)
149
+ − 3229 with_tooltalk=yes # CDE requires Tooltalk
167
+ − 3230 need_motif=yes # CDE requires Motif
149
+ − 3231 fi
+ − 3232
288
+ − 3233 dnl Always compile OffiX unless --without-offix is given, no
380
+ − 3234 dnl X11 support is compiled in, no standard Xmu is available,
288
+ − 3235 dnl or dragndrop support is disabled
300
+ − 3236 dnl Because OffiX support currently loses when more than one display
+ − 3237 dnl is in use, we now disable it by default -slb 07/10/1998.
288
+ − 3238 test "$window_system" != "x11" && with_offix=no
+ − 3239 if test "$with_xmu" != yes -a "$with_x11" = yes; then
581
+ − 3240 if test "$with_offix" = "yes" ; then
+ − 3241 AC_MSG_WARN([--with-offix forced to \`no'; no real Xmu support])
+ − 3242 fi
288
+ − 3243 with_offix=no
+ − 3244 fi
+ − 3245 if test "$with_dragndrop" = no; then
581
+ − 3246 if test "$with_offix" = "yes" ; then
+ − 3247 AC_MSG_WARN([--with-offix forced to \`no'; no generic Drag'n'Drop support])
+ − 3248 fi
288
+ − 3249 with_offix=no
+ − 3250 fi
+ − 3251 if test "$with_cde" = yes; then
581
+ − 3252 if test "$with_offix" = "yes" ; then
+ − 3253 AC_MSG_WARN([--with-offix forced to \`no'; CDE already found])
+ − 3254 fi
288
+ − 3255 with_offix=no
+ − 3256 fi
300
+ − 3257 test -z "$with_offix" && with_offix=no
288
+ − 3258 if test "$with_offix" = "yes"; then
+ − 3259 AC_DEFINE(HAVE_OFFIX_DND)
+ − 3260 XE_APPEND(offix.o, dnd_objs)
+ − 3261 XE_APPEND(OffiX, dragndrop_proto)
+ − 3262 fi
462
+ − 3263 if test "$with_gtk" = "yes"; then
+ − 3264 XE_APPEND(GTK, dragndrop_proto)
+ − 3265 fi
288
+ − 3266
282
+ − 3267 dnl Autodetect Drag'n'Drop support
+ − 3268 dnl always included if CDE, Offix, or MSWindows are defined
+ − 3269 if test "$with_dragndrop" != "no" ; then
446
+ − 3270 AC_MSG_CHECKING(if drag and drop API is needed)
282
+ − 3271 if test -n "$dragndrop_proto" ; then
+ − 3272 with_dragndrop=yes
+ − 3273 AC_MSG_RESULT([yes (${dragndrop_proto} )])
+ − 3274 AC_DEFINE(HAVE_DRAGNDROP)
+ − 3275 XE_APPEND(dragdrop.o, extra_objs)
+ − 3276 else
+ − 3277 with_dragndrop=no
+ − 3278 AC_MSG_RESULT(no)
+ − 3279 fi
+ − 3280 fi
+ − 3281
442
+ − 3282
193
+ − 3283 dnl ----------------------
278
+ − 3284 dnl Graphics libraries
193
+ − 3285 dnl ----------------------
+ − 3286
278
+ − 3287 if test "$window_system" != "none"; then
+ − 3288 AC_CHECKING(for graphics libraries)
272
+ − 3289
724
+ − 3290 dnl add special code to handle xpm-nox on Cygwin (csw)
+ − 3291 dnl -- should only happen if CYGWIN && WITH_XPM && WITH_MSW && !WITH_X
+ − 3292 libpath_xpm=
+ − 3293 incpath_xpm=
+ − 3294 case "$opsys" in
+ − 3295 cygwin*)
+ − 3296 cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
+ − 3297 cygwin_top=`eval "dirname ${cygwin_top}"`;
+ − 3298 cygwin_top="${cygwin_top}/..";
+ − 3299 case "$window_system" in
+ − 3300 dnl use "standard" search pattern
+ − 3301 x11) ;;
+ − 3302 dnl hardcode "standard" non-X11 xpm lib/inc dirs
+ − 3303 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
+ − 3304 incpath_xpm="-I${cygwin_top}/include/noX"
+ − 3305 ;;
+ − 3306 dnl not supported on cygwin (yet?)
+ − 3307 gtk) ;;
+ − 3308 dnl probably not reached...
+ − 3309 none) ;;
+ − 3310 dnl ditto
+ − 3311 *) ;;
+ − 3312 esac
+ − 3313 ;;
+ − 3314 dnl use "standard" search pattern for all other OS's
+ − 3315 *) ;;
+ − 3316 esac
193
+ − 3317 dnl Autodetect Xpm
373
+ − 3318 xpm_problem=""
272
+ − 3319 if test -z "$with_xpm"; then
724
+ − 3320 XE_PREPEND("$incpath_xpm", CFLAGS)
+ − 3321 XE_PREPEND("$libpath_xpm", LDFLAGS)
272
+ − 3322 AC_MSG_CHECKING(for Xpm - no older than 3.4f)
+ − 3323 xe_check_libs=-lXpm
442
+ − 3324 AC_TRY_RUN([#define XPM_NUMBERS
+ − 3325 #include <X11/xpm.h>
272
+ − 3326 int main(int c, char **v) {
+ − 3327 return c == 1 ? 0 :
+ − 3328 XpmIncludeVersion != XpmLibraryVersion() ? 1 :
+ − 3329 XpmIncludeVersion < 30406 ? 2 : 0 ;}],
+ − 3330 [./conftest dummy_arg; xpm_status=$?;
373
+ − 3331 if test "$xpm_status" = "0"; then
272
+ − 3332 with_xpm=yes;
+ − 3333 else
+ − 3334 with_xpm=no;
373
+ − 3335 if test "$xpm_status" = "1"; then
272
+ − 3336 xpm_problem="Xpm library version and header file version don't match!"
373
+ − 3337 elif test "$xpm_status" = "2"; then
272
+ − 3338 xpm_problem="Xpm library version is too old!"
+ − 3339 else
+ − 3340 xpm_problem="Internal xpm detection logic error!"
+ − 3341 fi
+ − 3342 echo "
373
+ − 3343 *** WARNING *** $xpm_problem
278
+ − 3344 I'm not touching that with a 10-foot pole!
+ − 3345 If you really want to use the installed version of Xpm, rerun
373
+ − 3346 configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
278
+ − 3347 fi],
272
+ − 3348 [with_xpm=no])
+ − 3349 xe_check_libs=
+ − 3350 AC_MSG_RESULT($with_xpm)
193
+ − 3351 fi
+ − 3352 if test "$with_xpm" = "yes"; then
460
+ − 3353 dnl #### This code assumes that if AC_CHECK_LIB fails,
+ − 3354 dnl #### then it will succeed if FOR_MSW is defined,
458
+ − 3355 dnl #### but doesn't actually verify this assumption.
193
+ − 3356 AC_DEFINE(HAVE_XPM)
724
+ − 3357 XE_PREPEND("$libpath_xpm", LDFLAGS)
193
+ − 3358 XE_PREPEND(-lXpm, libs_x)
724
+ − 3359 XE_PREPEND("$incpath_xpm", CFLAGS)
278
+ − 3360 AC_MSG_CHECKING(for \"FOR_MSW\" xpm)
+ − 3361 xe_check_libs=-lXpm
+ − 3362 AC_TRY_LINK(, [XpmCreatePixmapFromData()],
+ − 3363 [xpm_for_msw=no],
+ − 3364 [xpm_for_msw=yes])
+ − 3365 xe_check_libs=
+ − 3366 AC_MSG_RESULT($xpm_for_msw)
+ − 3367 if test "$xpm_for_msw" = "yes"; then
+ − 3368 AC_DEFINE(FOR_MSW)
+ − 3369 fi
193
+ − 3370 fi
+ − 3371
388
+ − 3372 dnl Autodetect XFACE
+ − 3373 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) }
+ − 3374 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) }
+ − 3375 test -z "$with_xface" && with_xface=yes
+ − 3376 if test "$with_xface" = "yes"; then
+ − 3377 AC_DEFINE(HAVE_XFACE)
+ − 3378 XE_PREPEND(-lcompface, libs_x)
+ − 3379 fi
+ − 3380
373
+ − 3381 dnl For a brief period we had the GIF code split out into a separate library,
+ − 3382 dnl but patent problems, etc. sort of squashed that idea.
+ − 3383 dnl We default to building with builtin GIF decoding
+ − 3384 if test "$with_gif" != "no"; then
+ − 3385 with_gif="yes"
+ − 3386 AC_DEFINE(HAVE_GIF)
+ − 3387 fi
+ − 3388
278
+ − 3389 dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime
+ − 3390 dnl So we always search for libz compression support.
+ − 3391 if test "$with_png $with_tiff" != "no no"; then
+ − 3392 AC_CHECK_LIB(c, inflate, [:], [
+ − 3393 AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[
+ − 3394 AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])])
193
+ − 3395 fi
+ − 3396
251
+ − 3397 dnl autodetect JPEG
+ − 3398 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) }
+ − 3399 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) }
+ − 3400 test -z "$with_jpeg" && with_jpeg=yes
+ − 3401 if test "$with_jpeg" = "yes"; then
+ − 3402 AC_DEFINE(HAVE_JPEG)
+ − 3403 XE_PREPEND(-ljpeg, libs_x)
193
+ − 3404 fi
+ − 3405
251
+ − 3406 dnl autodetect PNG
373
+ − 3407 png_problem=""
+ − 3408 test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) }
+ − 3409 test -z "$with_png" && { AC_CHECK_HEADER(png.h, ,with_png=no) }
+ − 3410 test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) }
371
+ − 3411 if test -z "$with_png"; then
373
+ − 3412 AC_MSG_CHECKING(for workable png version information)
+ − 3413 xe_check_libs="-lpng -lz"
+ − 3414 AC_TRY_RUN([#include <png.h>
+ − 3415 int main(int c, char **v) {
+ − 3416 if (c == 1) return 0;
+ − 3417 if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
+ − 3418 return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}],
+ − 3419 [./conftest dummy_arg; png_status=$?;
+ − 3420 if test "$png_status" = "0"; then
+ − 3421 with_png=yes;
+ − 3422 else
+ − 3423 with_png=no;
+ − 3424 if test "$png_status" = "1"; then
+ − 3425 png_problem="PNG library version and header file don't match!"
+ − 3426 elif test "$png_status" = "2"; then
+ − 3427 png_problem="PNG library version too old (pre 1.0.2)!"
+ − 3428 fi
+ − 3429 echo "
+ − 3430 *** WARNING *** $png_problem
+ − 3431 I'm not touching that with a 10-foot pole!
+ − 3432 If you really want to use the installed version of libPNG, rerun
+ − 3433 configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
+ − 3434 fi],
+ − 3435 [with_png=no])
+ − 3436 xe_check_libs=
+ − 3437 AC_MSG_RESULT($with_png)
371
+ − 3438 fi
251
+ − 3439 if test "$with_png" = "yes"; then
+ − 3440 AC_DEFINE(HAVE_PNG)
272
+ − 3441 XE_PREPEND(-lpng, libs_x)
251
+ − 3442 fi
+ − 3443
+ − 3444 dnl autodetect TIFF
286
+ − 3445 test -z "$with_tiff" && { AC_CHECK_HEADER(tiffio.h, ,with_tiff=no) }
+ − 3446 test -z "$with_tiff" && { AC_CHECK_LIB(tiff, TIFFClientOpen,[:],with_tiff=no) }
272
+ − 3447 test -z "$with_tiff" && with_tiff=yes
251
+ − 3448 if test "$with_tiff" = "yes"; then
+ − 3449 AC_DEFINE(HAVE_TIFF)
272
+ − 3450 XE_PREPEND(-ltiff, libs_x)
251
+ − 3451 fi
278
+ − 3452 fi
+ − 3453
+ − 3454 dnl ----------------------
462
+ − 3455 dnl GTK-Specific Graphics libraries
+ − 3456 dnl ----------------------
+ − 3457
+ − 3458 if test "$with_gtk" = "yes"; then
+ − 3459 dnl Autodetect XFACE
+ − 3460 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) }
+ − 3461 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) }
+ − 3462 test -z "$with_xface" && with_xface=yes
+ − 3463 if test "$with_xface" = "yes"; then
+ − 3464 AC_DEFINE(HAVE_XFACE)
+ − 3465 XE_PREPEND(-lcompface, libs_gtk)
+ − 3466 fi
+ − 3467 fi
+ − 3468
+ − 3469
+ − 3470 dnl ----------------------
373
+ − 3471 dnl X-Specific Graphics libraries
278
+ − 3472 dnl ----------------------
+ − 3473
+ − 3474 if test "$with_x11" = "yes"; then
+ − 3475 AC_CHECKING(for X11 graphics libraries)
724
+ − 3476 fi
+ − 3477
726
+ − 3478 dnl We don't automatically trigger widgets if athena is present
+ − 3479 dnl because of stability concerns.
+ − 3480 dnl But if the user wants widgets, still offer him autodetections
+ − 3481 case "$with_widgets" in
+ − 3482 "yes" | "athena") detect_athena=yes ;;
+ − 3483 *) detect_athena=no ;;
+ − 3484 esac
+ − 3485
+ − 3486 if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
434
+ − 3487 AC_CHECKING(for the Athena widgets)
+ − 3488
+ − 3489 dnl What in heck did the user actually want?
+ − 3490 case "$with_athena" in
438
+ − 3491 dnl This is the default, old fashioned flat Athena.
434
+ − 3492 "xaw" | "") athena_variant=Xaw athena_3d=no ;;
+ − 3493 "3d") athena_variant=Xaw3d athena_3d=yes ;;
+ − 3494 "next") athena_variant=neXtaw athena_3d=yes ;;
+ − 3495 "95") athena_variant=Xaw95 athena_3d=yes ;;
+ − 3496 "xpm") athena_variant=XawXpm athena_3d=yes ;;
+ − 3497 *) XE_DIE("Unknown Athena widget set \`$with_athena'. This should not happen.") ;;
+ − 3498 esac
+ − 3499
+ − 3500 dnl Search for the Athena library...
+ − 3501 if test "$athena_3d" = "no"; then
438
+ − 3502 AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb,
434
+ − 3503 [
+ − 3504 dnl Must not be a 3d library...
438
+ − 3505 AC_CHECK_LIB($athena_variant, threeDClassRec,
559
+ − 3506 AC_MSG_WARN([Could not find a non-3d Athena widget library.]),
434
+ − 3507 athena_lib=$athena_variant)
438
+ − 3508 ],
559
+ − 3509 AC_MSG_WARN([Could not find an Athena widget library.]))
434
+ − 3510 else
+ − 3511 dnl The real configuration, need 3d library
+ − 3512 AC_CHECK_LIB($athena_variant, threeDClassRec, athena_lib=$athena_variant,
+ − 3513 dnl OK, couldn't find it with a proper name, try the standard Athena lib
+ − 3514 dnl If that is 3d, presume the user asked for what they have installed.
438
+ − 3515 AC_CHECK_LIB(Xaw, threeDClassRec,
434
+ − 3516 [
438
+ − 3517 athena_lib=Xaw;
559
+ − 3518 AC_MSG_WARN([Assuming that libXaw is actually $athena_variant.]);
434
+ − 3519 ],
559
+ − 3520 AC_MSG_WARN([Could not find a 3d Athena widget library that looked like $athena_variant.])))
434
+ − 3521 fi
+ − 3522
+ − 3523 dnl Now we locate the Athena headers that we need.
+ − 3524 if test "$athena_3d" = "no"; then
+ − 3525 AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
559
+ − 3526 AC_MSG_WARN([Could not find a non-3d Athena header set.]),
434
+ − 3527 AC_CHECK_HEADER(X11/Xaw/XawInit.h,
+ − 3528 athena_h_path=X11/Xaw,
559
+ − 3529 AC_MSG_WARN([Could not find a non-3d Athena header set.])))
434
+ − 3530 else
+ − 3531 dnl The three-d Athena headers are so much more slippery.
+ − 3532 dnl Curse this `Lets replace standard libraries' thing that they did. :/
+ − 3533 AC_CHECK_HEADER(X11/$athena_variant/XawInit.h,
+ − 3534 AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
+ − 3535 athena_h_path=X11/$athena_variant,))
+ − 3536
440
+ − 3537 dnl Is the variant specific header directory directly under include?
+ − 3538 if test -z "$athena_h_path"; then
+ − 3539 AC_CHECK_HEADER($athena_variant/XawInit.h,
+ − 3540 AC_CHECK_HEADER($athena_variant/ThreeD.h,
+ − 3541 athena_h_path=$athena_variant,))
+ − 3542 fi
+ − 3543
434
+ − 3544 dnl If we couldn't find the specific variant, try the generic Athena 3d headers
+ − 3545 if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
+ − 3546 AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,
+ − 3547 AC_CHECK_HEADER(X11/Xaw3d/ThreeD.h,
+ − 3548 [
559
+ − 3549 AC_MSG_WARN([Assuming that X11/Xaw3d headers are suitable for $athena_variant.])
434
+ − 3550 athena_h_path=X11/Xaw3d
+ − 3551 ],))
+ − 3552 fi
+ − 3553
440
+ − 3554 dnl Also generic 3d headers directly under include dir
+ − 3555 if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
+ − 3556 AC_CHECK_HEADER(Xaw3d/XawInit.h,
+ − 3557 AC_CHECK_HEADER(Xaw3d/ThreeD.h,
+ − 3558 [
559
+ − 3559 AC_MSG_WARN([Assuming that Xaw3d headers are suitable for $athena_variant.])
440
+ − 3560 athena_h_path=Xaw3d
+ − 3561 ],))
+ − 3562 fi
+ − 3563
434
+ − 3564 dnl If nothing yet found, see if Xaw is a 3d header set...
+ − 3565 dnl We AC_MSG_WARN if we fail because I am all out of ideas...
+ − 3566 if test -z "$athena_h_path"; then
+ − 3567 AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
+ − 3568 [
559
+ − 3569 AC_MSG_WARN([Assuming that X11/Xaw headers are suitable for $athena_variant.])
434
+ − 3570 athena_h_path=X11/Xaw
+ − 3571 ],
559
+ − 3572 AC_MSG_WARN([Could not find a suitable 3d Athena header set.]))
434
+ − 3573 fi
+ − 3574 fi
+ − 3575
+ − 3576 dnl Do we actually have a usable Athena widget set? Please?
+ − 3577 if test -n "$athena_lib" -a -n "$athena_h_path"; then
+ − 3578 have_xaw=yes
+ − 3579 else
+ − 3580 have_xaw=no
+ − 3581 fi
424
+ − 3582
724
+ − 3583 else
+ − 3584 have_xaw=no
726
+ − 3585 fi dnl "$with_x11" = "yes" -a "detect_athena" = "yes"
724
+ − 3586
+ − 3587 if test "$with_x11" = "yes"; then
193
+ − 3588 dnl autodetect Motif - but only add to libs_x later (if necessary)
151
+ − 3589 AC_CHECK_HEADER(Xm/Xm.h,
+ − 3590 [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)],
+ − 3591 have_motif=no)
+ − 3592
272
+ − 3593 if test "$have_motif" = "yes"; then
+ − 3594 dnl autodetect lesstif
+ − 3595 AC_MSG_CHECKING(for Lesstif)
+ − 3596 AC_EGREP_CPP(yes,
+ − 3597 [#include <Xm/Xm.h>
+ − 3598 #ifdef LESSTIF_VERSION
+ − 3599 yes
+ − 3600 #endif
+ − 3601 ], have_lesstif=yes, have_lesstif=no)
+ − 3602 AC_MSG_RESULT($have_lesstif)
+ − 3603 fi
+ − 3604
193
+ − 3605 fi dnl "$with_x11" = "yes"
+ − 3606
149
+ − 3607 dnl Finish ensuring that we have values for the various toolkit items.
+ − 3608 dnl Not all toolkits support all widgets
+ − 3609 dnl if Motif is available we use it for the dialog boxes.
+ − 3610
434
+ − 3611 case "$with_menubars" in "" | "yes" | "athena" )
149
+ − 3612 with_menubars="lucid" ;;
+ − 3613 esac
243
+ − 3614 case "$with_dialogs" in "" | "yes" | "lucid" )
434
+ − 3615 if test "$have_motif" = "yes"; then with_dialogs="motif"
+ − 3616 elif test "$have_xaw" = "yes"; then with_dialogs="athena"
771
+ − 3617 elif test "$with_msw" = "yes"; then with_dialogs="msw"
149
+ − 3618 else with_dialogs=no
+ − 3619 fi ;;
+ − 3620 esac
+ − 3621 case "$with_scrollbars" in "" | "yes" )
+ − 3622 with_scrollbars="lucid" ;;
+ − 3623 esac
424
+ − 3624 case "$with_widgets" in "" | "yes" | "lucid")
420
+ − 3625 if test "$have_motif" = "yes"; then with_widgets="motif"
424
+ − 3626 elif test "$have_xaw" = "yes"; then with_widgets="athena"
771
+ − 3627 elif test "$with_msw" = "yes"; then with_widgets="msw"
420
+ − 3628 else with_widgets=no
+ − 3629 fi ;;
+ − 3630 esac
+ − 3631
+ − 3632 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
412
+ − 3633
424
+ − 3634 case "$all_widgets" in
434
+ − 3635 *athena* )
+ − 3636 if test "$have_xaw" != "yes"; then
+ − 3637 XE_DIE("Could not find a suitable Athena library to build with.")
+ − 3638 fi
+ − 3639
+ − 3640 dnl Add the Lucid widget Athena code
+ − 3641 XE_APPEND(lwlib-Xaw.o, lwlib_objs)
+ − 3642
+ − 3643 dnl Add the Athena widget library we located earlier
+ − 3644 XE_PREPEND(-l$athena_lib, libs_x)
+ − 3645
442
+ − 3646 dnl Tell lwlib where to find the Athena header files.
+ − 3647 dnl Many people have tried to create a `smart' way of doing this,
+ − 3648 dnl but all have failed. Before changing the following ugly definitions,
+ − 3649 dnl consult the veterans of many a battle.
+ − 3650 AC_DEFINE_UNQUOTED(ATHENA_Scrollbar_h_,"$athena_h_path/Scrollbar.h")
+ − 3651 AC_DEFINE_UNQUOTED(ATHENA_Dialog_h_,"$athena_h_path/Dialog.h")
+ − 3652 AC_DEFINE_UNQUOTED(ATHENA_Form_h_,"$athena_h_path/Form.h")
+ − 3653 AC_DEFINE_UNQUOTED(ATHENA_Command_h_,"$athena_h_path/Command.h")
+ − 3654 AC_DEFINE_UNQUOTED(ATHENA_Label_h_,"$athena_h_path/Label.h")
+ − 3655 AC_DEFINE_UNQUOTED(ATHENA_LabelP_h_,"$athena_h_path/LabelP.h")
+ − 3656 AC_DEFINE_UNQUOTED(ATHENA_Toggle_h_,"$athena_h_path/Toggle.h")
+ − 3657 AC_DEFINE_UNQUOTED(ATHENA_ToggleP_h_,"$athena_h_path/ToggleP.h")
+ − 3658 AC_DEFINE_UNQUOTED(ATHENA_AsciiText_h_,"$athena_h_path/AsciiText.h")
+ − 3659 AC_DEFINE_UNQUOTED(ATHENA_XawInit_h_,"$athena_h_path/XawInit.h")
434
+ − 3660
+ − 3661 AC_DEFINE(LWLIB_USES_ATHENA)
+ − 3662 AC_DEFINE(NEED_ATHENA)
442
+ − 3663 need_athena="yes"
434
+ − 3664
+ − 3665 if test "$athena_3d" = "yes"; then
+ − 3666 AC_DEFINE(HAVE_ATHENA_3D)
+ − 3667 fi
+ − 3668 ;;
70
+ − 3669 esac
+ − 3670
149
+ − 3671 case "$all_widgets" in *motif* )
+ − 3672 AC_DEFINE(LWLIB_USES_MOTIF)
157
+ − 3673 AC_DEFINE(NEED_MOTIF)
+ − 3674 XE_APPEND(lwlib-Xm.o, lwlib_objs)
149
+ − 3675 need_motif=yes ;;
+ − 3676 esac
+ − 3677
157
+ − 3678 test "$with_menubars" = "lucid" && XE_APPEND(xlwmenu.o, lwlib_objs)
219
+ − 3679 test "$with_menubars" = "motif" && XE_APPEND(xlwmenu.o, lwlib_objs)
157
+ − 3680 test "$with_scrollbars" = "lucid" && XE_APPEND(xlwscrollbar.o, lwlib_objs)
424
+ − 3681 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
+ − 3682 XE_APPEND(xlwtabs.o xlwgcs.o, lwlib_objs)
+ − 3683 case "$with_widgets" in athena* )
+ − 3684 XE_APPEND(xlwradio.o xlwcheckbox.o xlwgauge.o, lwlib_objs);;
+ − 3685 esac
157
+ − 3686 case "$all_widgets" in *lucid* )
+ − 3687 AC_DEFINE(NEED_LUCID)
+ − 3688 XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;;
+ − 3689 esac
+ − 3690
+ − 3691 AC_SUBST(lwlib_objs)
+ − 3692
434
+ − 3693 test "$with_scrollbars" = "athena" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA)
+ − 3694 test "$with_dialogs" = "athena" && AC_DEFINE(LWLIB_DIALOGS_ATHENA)
+ − 3695
+ − 3696 if test "$athena_3d" = "yes"; then
+ − 3697 test "$with_scrollbars" = "athena" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D)
+ − 3698 test "$with_dialogs" = "athena" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D)
+ − 3699 fi
+ − 3700
424
+ − 3701 case "$with_widgets" in athena* ) AC_DEFINE(LWLIB_WIDGETS_ATHENA);; esac
+ − 3702 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
+ − 3703 AC_DEFINE(LWLIB_TABS_LUCID)
149
+ − 3704
+ − 3705 test "$with_menubars" != "no" && AC_DEFINE(HAVE_MENUBARS)
+ − 3706 test "$with_scrollbars" != "no" && AC_DEFINE(HAVE_SCROLLBARS)
+ − 3707 test "$with_dialogs" != "no" && AC_DEFINE(HAVE_DIALOGS)
+ − 3708 test "$with_toolbars" != "no" && AC_DEFINE(HAVE_TOOLBARS)
440
+ − 3709 test "$with_widgets" != "no" && AC_DEFINE(HAVE_WIDGETS)
149
+ − 3710
+ − 3711 test "$with_menubars" = "lucid" && AC_DEFINE(LWLIB_MENUBARS_LUCID)
+ − 3712 test "$with_scrollbars" = "lucid" && AC_DEFINE(LWLIB_SCROLLBARS_LUCID)
+ − 3713
+ − 3714 test "$with_menubars" = "motif" && AC_DEFINE(LWLIB_MENUBARS_MOTIF)
+ − 3715 test "$with_scrollbars" = "motif" && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF)
+ − 3716 test "$with_dialogs" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF)
424
+ − 3717 test "$with_widgets" = "motif" && AC_DEFINE(LWLIB_WIDGETS_MOTIF)
412
+ − 3718
151
+ − 3719 dnl ----------------------
+ − 3720 dnl Mule-dependent options
+ − 3721 dnl ----------------------
+ − 3722
272
+ − 3723 test -z "$with_mule" && with_mule=no
149
+ − 3724
227
+ − 3725 dnl if test "$with_mule" = "yes" && test ! -d "$srcdir/lisp/mule"; then
+ − 3726 dnl echo "Attempt to Build with Mule without Mule/Lisp"
+ − 3727 dnl echo "Please install the XEmacs/Mule tarball or"
+ − 3728 dnl echo "rerun configure with --with-mule=no"
+ − 3729 dnl exit 1
+ − 3730 dnl fi
207
+ − 3731
771
+ − 3732 if test "$with_default_eol_detection" = "yes"; then
+ − 3733 AC_DEFINE(HAVE_DEFAULT_EOL_DETECTION)
559
+ − 3734 fi
+ − 3735
70
+ − 3736 if test "$with_mule" = "yes" ; then
151
+ − 3737 AC_CHECKING(for Mule-related features)
149
+ − 3738 AC_DEFINE(MULE)
+ − 3739
+ − 3740 dnl Use -lintl to get internationalized strerror for Mule
155
+ − 3741 AC_CHECK_HEADERS(libintl.h)
149
+ − 3742 AC_CHECK_LIB(intl, strerror)
+ − 3743
+ − 3744 AC_CHECKING(for Mule input methods)
+ − 3745 dnl Do we have the XmIm* routines? And if so, do we want to use them?
151
+ − 3746 dnl XIM seems to be flaky except on Solaris...
272
+ − 3747 dnl test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no
149
+ − 3748 case "$with_xim" in "" | "yes" )
+ − 3749 AC_CHECKING(for XIM)
392
+ − 3750 AC_CHECK_LIB(X11, XOpenIM, with_xim=xlib, with_xim=no)
272
+ − 3751 dnl XIM + Lesstif is not (yet?) usable
392
+ − 3752 if test "$have_motif $have_lesstif" = "yes no"; then
+ − 3753 AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif)
+ − 3754 fi ;;
149
+ − 3755 esac
272
+ − 3756 if test "$with_xim" != "no"; then
70
+ − 3757 AC_DEFINE(HAVE_XIM)
149
+ − 3758 if test "$with_xim" = "xlib"; then
+ − 3759 AC_DEFINE(XIM_XLIB)
151
+ − 3760 XE_ADD_OBJS(input-method-xlib.o)
+ − 3761 fi
149
+ − 3762 if test "$with_xim" = "motif"; then
+ − 3763 AC_DEFINE(XIM_MOTIF)
+ − 3764 need_motif=yes
151
+ − 3765 XE_ADD_OBJS(input-method-motif.o)
70
+ − 3766 fi
215
+ − 3767 if test "$with_xim" = "motif"; then
177
+ − 3768 with_xfs=no
+ − 3769 fi
215
+ − 3770 fi
+ − 3771
392
+ − 3772 dnl "with_xfs" = "yes"
215
+ − 3773 if test "$with_xfs" = "yes" ; then
+ − 3774 AC_CHECKING(for XFontSet)
+ − 3775 AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no)
177
+ − 3776 if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
+ − 3777 AC_DEFINE(USE_XFONTSET)
215
+ − 3778 if test "$with_xim" = "no" ; then
450
+ − 3779 XE_ADD_OBJS(input-method-xlib.o)
215
+ − 3780 fi
177
+ − 3781 fi
392
+ − 3782 fi dnl with_xfs
149
+ − 3783
+ − 3784 dnl Autodetect WNN
+ − 3785 test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
167
+ − 3786 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) }
458
+ − 3787 dnl gcc 2.97 fixincludes breaks inclusion of wnn/commonhd.h
+ − 3788 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/commonhd.h, ,with_wnn=no) }
167
+ − 3789 dnl Detour to find crypt
+ − 3790 if test "$with_wnn" != "no"; then
+ − 3791 AC_CHECK_FUNCS(crypt)
+ − 3792 test "$ac_cv_func_crypt" != "yes" && { AC_CHECK_LIB(crypt, crypt) }
+ − 3793 fi
+ − 3794 dnl Back to our regularly scheduled wnn hunting
377
+ − 3795 if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
+ − 3796 AC_CHECK_LIB(wnn,jl_dic_list_e,libwnn=wnn,
+ − 3797 AC_CHECK_LIB(wnn4,jl_dic_list_e,libwnn=wnn4,
+ − 3798 AC_CHECK_LIB(wnn6,jl_dic_list_e,libwnn=wnn6,
+ − 3799 AC_CHECK_LIB(wnn6_fromsrc,dic_list_e,libwnn=wnn6_fromsrc,with_wnn=no))))
+ − 3800 fi
149
+ − 3801 test -z "$with_wnn" && with_wnn=yes
+ − 3802 if test "$with_wnn" = "yes"; then
+ − 3803 AC_DEFINE(HAVE_WNN)
377
+ − 3804 XE_PREPEND(-l$libwnn, libs_x)
284
+ − 3805 if test "$with_wnn6" != "no"; then
377
+ − 3806 AC_CHECK_LIB($libwnn, jl_fi_dic_list, with_wnn6=yes)
284
+ − 3807 test "$with_wnn6" = "yes" && AC_DEFINE(WNN6)
+ − 3808 fi
151
+ − 3809 fi
149
+ − 3810
+ − 3811 dnl Autodetect canna
267
+ − 3812 canna_includes_found=no
+ − 3813 if test "$with_canna" != "no"; then
+ − 3814 AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes)
+ − 3815 fi
+ − 3816 if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
+ − 3817 -d "/usr/local/canna/include"; then
+ − 3818 save_c_switch_site="$c_switch_site"
+ − 3819 c_switch_site="$c_switch_site -I/usr/local/canna/include"
+ − 3820 AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes)
+ − 3821 if test "$canna_includes_found" != "yes"; then
+ − 3822 c_switch_site="$save_c_switch_site"
+ − 3823 with_canna="no"
+ − 3824 fi
+ − 3825 fi
+ − 3826
149
+ − 3827 test -z "$with_canna" && { AC_CHECK_HEADER(canna/RK.h, , with_canna=no) }
+ − 3828 test -z "$with_canna" && { AC_CHECK_LIB(RKC, RkBgnBun, [:],with_canna=no) }
+ − 3829 test -z "$with_canna" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],with_canna=no) }
+ − 3830 test -z "$with_canna" && with_canna=yes
+ − 3831 if test "$with_canna" = "yes"; then
+ − 3832 AC_DEFINE(HAVE_CANNA)
151
+ − 3833 XE_PREPEND(-lcanna -lRKC, libs_x)
+ − 3834 fi
155
+ − 3835
151
+ − 3836 else dnl "$with_mule" = "no"
149
+ − 3837 for feature in xim canna wnn; do
+ − 3838 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
559
+ − 3839 AC_MSG_WARN([--with-${feature} ignored: Not valid without Mule support])
149
+ − 3840 fi
+ − 3841 eval "with_${feature}=no"
100
+ − 3842 done
151
+ − 3843 fi dnl with_mule
100
+ − 3844
149
+ − 3845
+ − 3846 dnl At this point, we know whether we need the motif lib or not.
151
+ − 3847 if test "$need_motif" = "yes" ; then
+ − 3848 XE_PREPEND(-lXm, libs_x)
207
+ − 3849 dnl AIX needs the following library for use with Motif
+ − 3850 AC_CHECK_LIB(i18n, layout_object_getvalue, [XE_PREPEND(-li18n, libs_x)])
151
+ − 3851 XE_COMPUTE_RUNPATH()
+ − 3852 fi
+ − 3853
1070
+ − 3854 dnl ----------------------------------------------------------------
+ − 3855 dnl Check for POSIX functions.
+ − 3856 dnl ----------------------------------------------------------------
+ − 3857
1202
+ − 3858 AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd link logb lrand48 matherr mkdir mktime perror poll random readlink rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror strlwr strupr symlink tzset ulimit usleep waitpid vsnprintf fsync ftruncate umask wcslen wcscmp)
442
+ − 3859
1070
+ − 3860 dnl getaddrinfo() is borked under hpux11
+ − 3861 if test "$ac_cv_func_getaddrinfo" != "no" ; then
+ − 3862 case "$opsys" in
+ − 3863 hpux11 )
+ − 3864 AC_MSG_WARN([Use of getaddrinfo is disabled for HP-UX 11.XX.])
+ − 3865 ac_cv_func_getaddrinfo=no
+ − 3866 ;;
+ − 3867 esac
+ − 3868 fi
+ − 3869
458
+ − 3870 dnl ----------------------------------------------------------------
535
+ − 3871 dnl Check for Unixoid pty/process support.
458
+ − 3872 dnl ----------------------------------------------------------------
+ − 3873
+ − 3874 dnl There is no "standard" pty allocation method. Every system is different.
+ − 3875 dnl getpt() is the preferred pty allocation method on glibc systems.
+ − 3876 dnl _getpty() is the preferred pty allocation method on SGI systems.
+ − 3877 dnl grantpt(), unlockpt(), ptsname() are defined by Unix98.
444
+ − 3878 AC_CHECK_FUNCS(getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp)
442
+ − 3879
458
+ − 3880 dnl openpty() is the preferred pty allocation method on BSD and Tru64 systems.
+ − 3881 dnl openpty() might be declared in:
+ − 3882 dnl - pty.h (Tru64 or Linux)
+ − 3883 dnl - libutil.h (FreeBSD)
+ − 3884 dnl - util.h (NetBSD)
442
+ − 3885 AC_CHECK_FUNC(openpty, have_openpty=yes, [
+ − 3886 AC_CHECK_LIB(util, openpty, have_openpty=yes need_libutil=yes)])
+ − 3887 if test "$have_openpty" = "yes"; then
+ − 3888 AC_DEFINE(HAVE_OPENPTY)
535
+ − 3889 AC_CHECK_HEADERS(libutil.h util.h, break)
442
+ − 3890 test "$need_libutil" = "yes" && XE_APPEND(-lutil, libs_system)
+ − 3891 fi
+ − 3892
535
+ − 3893 dnl Check for system-specific pty header files
+ − 3894 dnl Often the TIOCSIG* symbols are hiding there.
+ − 3895 case "$opsys" in
+ − 3896 dnl HPUX pty.h #defines TRUE and FALSE, so just use ptyio.h there.
+ − 3897 hpux*) AC_CHECK_HEADERS(sys/ptyio.h) ;;
+ − 3898 *) AC_CHECK_HEADERS(pty.h)
+ − 3899 test "$ac_cv_header_pty_h" = "no" && AC_CHECK_HEADERS(sys/pty.h)
+ − 3900 ;;
+ − 3901 esac
+ − 3902
442
+ − 3903 dnl Check for STREAM support functions.
+ − 3904 dnl Confusingly, "str" means both "string" and "SysV Streams".
444
+ − 3905 AC_CHECK_HEADERS(stropts.h)
+ − 3906 if test "$ac_cv_header_stropts_h" = "yes"; then
442
+ − 3907 AC_CHECK_FUNCS(isastream)
444
+ − 3908 AC_CHECK_HEADERS(strtio.h) dnl TIOCSIGNAL
442
+ − 3909 fi
440
+ − 3910
442
+ − 3911 dnl Check whether the system provides getloadavg().
398
+ − 3912 AC_CHECK_FUNCS(getloadavg)
+ − 3913
442
+ − 3914 if test "$ac_cv_func_getloadavg" = "yes"; then
+ − 3915 dnl Solaris 8 declares getloadavg() in <sys/loadavg.h>.
+ − 3916 dnl glibc 2.2 declares getloadavg() in <stdlib.h>...
+ − 3917 dnl ...if we #define _GNU_SOURCE, which we do.
+ − 3918 AC_CHECK_HEADERS(sys/loadavg.h)
+ − 3919 else
+ − 3920 dnl We define our own getloadavg() using lower level functions.
398
+ − 3921 XE_ADD_OBJS(getloadavg.o)
+ − 3922
+ − 3923 dnl Used by getloadavg() - does not require root priveleges
+ − 3924 AC_CHECK_LIB(kstat, kstat_open)
442
+ − 3925 AC_CHECK_HEADERS(kstat.h)
398
+ − 3926
+ − 3927 dnl Another way to get the load average
+ − 3928 AC_CHECK_LIB(kvm, kvm_read)
+ − 3929 fi
151
+ − 3930
149
+ − 3931 dnl If netdb.h does not declare h_errno, we must declare it by hand.
+ − 3932 AC_MSG_CHECKING(whether netdb declares h_errno)
+ − 3933 AC_TRY_LINK([#include <netdb.h>],
+ − 3934 [return h_errno;],
+ − 3935 [AC_MSG_RESULT(yes)
+ − 3936 AC_DEFINE(HAVE_H_ERRNO)],
+ − 3937 [AC_MSG_RESULT(no)])
+ − 3938
+ − 3939 AC_MSG_CHECKING(for sigsetjmp)
+ − 3940 AC_TRY_COMPILE([#include <setjmp.h>],
70
+ − 3941 [sigjmp_buf bar; sigsetjmp (bar, 0);],
149
+ − 3942 [AC_MSG_RESULT(yes)
+ − 3943 AC_DEFINE(HAVE_SIGSETJMP)],
+ − 3944 [AC_MSG_RESULT(no)])
+ − 3945
+ − 3946 AC_MSG_CHECKING(whether localtime caches TZ)
+ − 3947 AC_CACHE_VAL(emacs_cv_localtime_cache,
+ − 3948 [if test "$ac_cv_func_tzset" = "yes"; then
+ − 3949 AC_TRY_RUN([#include <time.h>
+ − 3950 #if STDC_HEADERS
0
+ − 3951 # include <stdlib.h>
+ − 3952 #endif
+ − 3953 extern char **environ;
+ − 3954 unset_TZ ()
+ − 3955 {
+ − 3956 char **from, **to;
+ − 3957 for (to = from = environ; (*to = *from); from++)
+ − 3958 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
+ − 3959 to++;
+ − 3960 }
149
+ − 3961 char TZ_GMT0[] = "TZ=GMT0";
+ − 3962 char TZ_PST8[] = "TZ=PST8";
0
+ − 3963 main()
+ − 3964 {
+ − 3965 time_t now = time ((time_t *) 0);
+ − 3966 int hour_GMT0, hour_unset;
149
+ − 3967 if (putenv (TZ_GMT0) != 0)
0
+ − 3968 exit (1);
+ − 3969 hour_GMT0 = localtime (&now)->tm_hour;
+ − 3970 unset_TZ ();
+ − 3971 hour_unset = localtime (&now)->tm_hour;
149
+ − 3972 if (putenv (TZ_PST8) != 0)
0
+ − 3973 exit (1);
+ − 3974 if (localtime (&now)->tm_hour == hour_GMT0)
+ − 3975 exit (1);
+ − 3976 unset_TZ ();
+ − 3977 if (localtime (&now)->tm_hour != hour_unset)
+ − 3978 exit (1);
+ − 3979 exit (0);
+ − 3980 }], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes,
+ − 3981 [# If we have tzset, assume the worst when cross-compiling.
+ − 3982 emacs_cv_localtime_cache=yes])
149
+ − 3983 else
+ − 3984 # If we lack tzset, report that localtime does not cache TZ,
+ − 3985 # since we can't invalidate the cache if we don't have tzset.
+ − 3986 emacs_cv_localtime_cache=no
+ − 3987 fi],[:])dnl
+ − 3988 AC_MSG_RESULT($emacs_cv_localtime_cache)
+ − 3989 if test $emacs_cv_localtime_cache = yes; then
0
+ − 3990 AC_DEFINE(LOCALTIME_CACHE)
+ − 3991 fi
+ − 3992
149
+ − 3993 if test "$HAVE_TIMEVAL" = "yes"; then
272
+ − 3994 AC_MSG_CHECKING(whether gettimeofday accepts one or two arguments)
149
+ − 3995 AC_TRY_LINK([
0
+ − 3996 #ifdef TIME_WITH_SYS_TIME
+ − 3997 #include <sys/time.h>
+ − 3998 #include <time.h>
+ − 3999 #else
+ − 4000 #ifdef HAVE_SYS_TIME_H
+ − 4001 #include <sys/time.h>
+ − 4002 #else
+ − 4003 #include <time.h>
+ − 4004 #endif
+ − 4005 #endif
+ − 4006 ],
+ − 4007 [
+ − 4008 struct timeval time;
442
+ − 4009 gettimeofday (&time, 0);
0
+ − 4010 ],
272
+ − 4011 [AC_MSG_RESULT(two)],
+ − 4012 [AC_MSG_RESULT(one)
0
+ − 4013 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)])
+ − 4014 fi
+ − 4015
149
+ − 4016
+ − 4017 AC_C_INLINE
442
+ − 4018 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && XE_ADD_OBJS(inline.o)
149
+ − 4019
175
+ − 4020 dnl HP-UX has a working alloca in libPW.
177
+ − 4021 dnl case "${GCC}${opsys}" in hpux* )
+ − 4022 dnl AC_CHECK_FUNC(alloca, [:], [AC_CHECK_LIB(PW, alloca)])
+ − 4023 dnl esac
149
+ − 4024
444
+ − 4025 dnl AC_FUNC_ALLOCA doesn't know about DEC C's #pragma intrinsic(alloca)
+ − 4026 if test "$__DECC" != "yes"; then
+ − 4027 AC_FUNC_ALLOCA
+ − 4028 test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA)
+ − 4029 fi
149
+ − 4030
1318
+ − 4031 AC_MSG_CHECKING(for working alloca in function calls)
+ − 4032 AC_TRY_RUN([
+ − 4033 #if defined (__CYGWIN__)
+ − 4034 #include <alloca.h>
+ − 4035 #elif defined (__GNUC__)
+ − 4036 #define alloca __builtin_alloca
+ − 4037 #elif defined (__DECC)
+ − 4038 #include <alloca.h>
+ − 4039 #pragma intrinsic(alloca)
+ − 4040 #elif defined (HAVE_ALLOCA_H)
+ − 4041 #include <alloca.h>
+ − 4042 #elif defined (_AIX)
+ − 4043 #pragma alloca
+ − 4044 #elif ! defined (alloca)
+ − 4045 #ifdef C_ALLOCA
+ − 4046 #define alloca xemacs_c_alloca
+ − 4047 #else
+ − 4048 void *alloca ();
+ − 4049 #endif /* C_ALLOCA */
+ − 4050 #endif /* !defined (alloca) */
+ − 4051
+ − 4052 void
+ − 4053 f1 (double a, void *ptr, int b)
+ − 4054 {
+ − 4055 unsigned char *ptr2 = (unsigned char *) ptr;
+ − 4056 if (ptr2[0] != 0xBF || ptr2[1] != 0xBF || ptr2[3000] != 0xBF)
+ − 4057 exit (1);
+ − 4058 if (a != 3.1415 || b != -5490)
+ − 4059 exit (1);
+ − 4060 }
+ − 4061
+ − 4062 int
+ − 4063 f2 (short c, void *ptr, long e)
+ − 4064 {
+ − 4065 unsigned char *ptr2 = (unsigned char *) ptr;
+ − 4066 if (ptr2[0] != 0xFB || ptr2[1] != 0xFB || ptr2[1000] != 0xFB)
+ − 4067 exit (1);
+ − 4068 if (c != 665 || e != 776776776)
+ − 4069 exit (1);
+ − 4070 f1 (3.1415, memset (alloca (3001), 0xBF, 3001), -5490);
+ − 4071 return 42;
+ − 4072 }
+ − 4073
+ − 4074 int
+ − 4075 main (int argc, char *argv[])
+ − 4076 {
+ − 4077 if (f2 (665, memset (alloca (1001), 0xFB, 1001), 776776776) != 42)
+ − 4078 return 1;
+ − 4079 return 0;
+ − 4080 }
+ − 4081 ], working_alloca_in_function_calls=yes, working_alloca_in_function_calls=no)
+ − 4082 AC_MSG_RESULT($working_alloca_in_function_calls)
+ − 4083 test "$working_alloca_in_function_calls" != "yes" && \
+ − 4084 AC_DEFINE(BROKEN_ALLOCA_IN_FUNCTION_CALLS)
+ − 4085
149
+ − 4086 dnl Check whether strcoll exists and works correctly. (This does more
+ − 4087 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL.
+ − 4088 AC_FUNC_STRCOLL
+ − 4089
163
+ − 4090 dnl If `getpgrp' takes no argument (the POSIX.1 version), define
+ − 4091 dnl `GETPGRP_VOID'. Otherwise, it is the BSD version, which takes a
+ − 4092 dnl process ID as an argument.
+ − 4093 AC_CHECK_FUNCS(getpgrp)
+ − 4094 AC_FUNC_GETPGRP
+ − 4095
153
+ − 4096 dnl We used to call AC_FUNC_MMAP here
+ − 4097 dnl Instead we now use following, suggested by Neal Becker
+ − 4098 AC_MSG_CHECKING(for working mmap)
155
+ − 4099 case "$opsys" in ultrix* ) have_mmap=no ;; *)
153
+ − 4100 AC_TRY_RUN([#include <stdio.h>
+ − 4101 #include <unistd.h>
+ − 4102 #include <fcntl.h>
+ − 4103 #include <sys/mman.h>
+ − 4104
+ − 4105 #ifndef MAP_VARIABLE
+ − 4106 #define MAP_VARIABLE 0
+ − 4107 #endif
+ − 4108
+ − 4109 #ifndef MAP_FAILED
+ − 4110 #define MAP_FAILED -1
+ − 4111 #endif
+ − 4112
+ − 4113 int main (int argc, char *argv[])
+ − 4114 {
+ − 4115 int fd = -1;
+ − 4116 caddr_t p;
+ − 4117 #ifndef MAP_ANONYMOUS
+ − 4118 fd = open ("/dev/zero", O_RDWR);
+ − 4119 if (fd < 0)
+ − 4120 return 1;
+ − 4121 #define MAP_ANONYMOUS 0
+ − 4122 #endif
+ − 4123 if (mmap(0, 1024, PROT_READ | PROT_WRITE,
+ − 4124 MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
+ − 4125 fd, 0) != (void *) MAP_FAILED)
+ − 4126 return 0;
+ − 4127 perror ("conftest: mmap failed");
+ − 4128 return 1;
155
+ − 4129 }], have_mmap=yes, have_mmap=no) ;;
+ − 4130 esac
153
+ − 4131 AC_MSG_RESULT($have_mmap)
+ − 4132 test "$have_mmap" = "yes" && AC_DEFINE(HAVE_MMAP)
149
+ − 4133
462
+ − 4134 dnl By default we switch off rel-alloc on cygwin as it generally causes us grief
535
+ − 4135 case "$opsys" in cygwin*)
462
+ − 4136 test "$rel_alloc" = "default" && rel_alloc=no ;;
+ − 4137 esac
149
+ − 4138 dnl rel_alloc requires either GNU malloc or system malloc with mmap
+ − 4139 dnl We only turn rel_alloc on by default if mmap is available.
442
+ − 4140 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
+ − 4141 if test "$rel_alloc $have_mmap" = "default yes"; then
+ − 4142 if test "$doug_lea_malloc" = "yes"; then
+ − 4143 dnl Check if malloc() calls mmap(), making rel_alloc pointless.
+ − 4144 AC_MSG_CHECKING(for M_MMAP_THRESHOLD)
+ − 4145 AC_TRY_COMPILE([#include <malloc.h>],[
+ − 4146 #ifndef M_MMAP_THRESHOLD
+ − 4147 #error No M_MMAP_THRESHOLD :-(
+ − 4148 !@+$%^&*_)(_ - unlikely to compile...
+ − 4149 #endif
+ − 4150 ], [rel_alloc=no; AC_MSG_RESULT(yes);], [rel_alloc=yes; AC_MSG_RESULT(no);])
+ − 4151 else
+ − 4152 rel_alloc=yes
+ − 4153 fi
+ − 4154 fi
149
+ − 4155 test "$rel_alloc" = "yes" && AC_DEFINE(REL_ALLOC)
+ − 4156
175
+ − 4157 dnl Check for terminal I/O variants
+ − 4158 dnl TERMIOS systems may have termio.h, but not vice-versa, I think.
187
+ − 4159 AC_CHECK_HEADER(termios.h,
175
+ − 4160 AC_DEFINE(HAVE_TERMIOS)
+ − 4161 AC_DEFINE(SIGNALS_VIA_CHARACTERS)
+ − 4162 AC_DEFINE(NO_TERMIO),
+ − 4163 [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])])
+ − 4164
+ − 4165
149
+ − 4166 dnl Check for Internet sockets.
+ − 4167 AC_CHECK_FUNC(socket,
+ − 4168 [AC_CHECK_HEADER(netinet/in.h,
+ − 4169 [AC_CHECK_HEADER(arpa/inet.h, [
0
+ − 4170 AC_DEFINE(HAVE_SOCKETS)
149
+ − 4171 AC_MSG_CHECKING("for sun_len member in struct sockaddr_un")
+ − 4172 AC_TRY_LINK([
+ − 4173 #include <sys/types.h>
+ − 4174 #include <sys/socket.h>
+ − 4175 #include <sys/un.h>
+ − 4176 ],
+ − 4177 [static struct sockaddr_un x; x.sun_len = 1;],
+ − 4178 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)],
259
+ − 4179 [AC_MSG_RESULT(no)])
+ − 4180 AC_MSG_CHECKING("for ip_mreq struct in netinet/in.h")
+ − 4181 AC_TRY_LINK([
284
+ − 4182 #include <sys/types.h>
259
+ − 4183 #include <netinet/in.h>
+ − 4184 ],
+ − 4185 [static struct ip_mreq x;],
+ − 4186 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MULTICAST)],
149
+ − 4187 [AC_MSG_RESULT(no)])])])])
+ − 4188
+ − 4189 dnl Check for SYS V IPC. (Inferior to sockets.)
+ − 4190 AC_CHECK_FUNC(msgget,
+ − 4191 [AC_CHECK_HEADER(sys/ipc.h,
+ − 4192 [AC_CHECK_HEADER(sys/msg.h,
+ − 4193 [AC_DEFINE(HAVE_SYSVIPC)])])])
+ − 4194
+ − 4195 dnl Check for directory variants
+ − 4196 AC_CHECK_HEADER(dirent.h, [AC_DEFINE(SYSV_SYSTEM_DIR)],
+ − 4197 [AC_CHECK_HEADER(sys/dir.h, , [AC_DEFINE(NONSYSTEM_DIR_LIBRARY)])])
+ − 4198
+ − 4199 dnl Check for nlist.h
+ − 4200 AC_CHECK_HEADER(nlist.h, AC_DEFINE(NLIST_STRUCT), )
+ − 4201
+ − 4202 dnl Check for sound of various sorts.
+ − 4203
+ − 4204 dnl Autodetect native sound
+ − 4205 AC_CHECKING("for sound support")
155
+ − 4206 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
+ − 4207
149
+ − 4208 if test "$with_native_sound" != "no"; then
155
+ − 4209 dnl Maybe sound is already on include path...
+ − 4210 if test -n "$native_sound_lib"; then
+ − 4211 AC_CHECK_HEADER(multimedia/audio_device.h,
+ − 4212 [sound_found=yes sound_cflags=""
+ − 4213 XE_ADD_OBJS(sunplay.o)])
+ − 4214 fi
+ − 4215
149
+ − 4216 dnl Autodetect Sun native sound from SUNWaudmo package
155
+ − 4217 if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
+ − 4218 sound_found=yes
151
+ − 4219 XE_ADD_OBJS(sunplay.o)
149
+ − 4220 if test -d "/usr/demo/SOUND/include"
+ − 4221 then sound_cflags="-I/usr/demo/SOUND/include"
+ − 4222 else sound_cflags="-I/usr/demo/SOUND"
+ − 4223 fi
+ − 4224 if test -z "$native_sound_lib" ; then
+ − 4225 if test -r "/usr/demo/SOUND/lib/libaudio.a"
+ − 4226 then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
+ − 4227 else native_sound_lib="/usr/demo/SOUND/libaudio.a"
+ − 4228 fi
+ − 4229 fi
155
+ − 4230 fi
+ − 4231
+ − 4232 dnl Check for SGI and HP native sound libs
+ − 4233 if test -z "$sound_found"; then
+ − 4234 case "$canonical" in
149
+ − 4235 *-sgi-* )
155
+ − 4236 if test -z "$native_sound_lib"; then
+ − 4237 AC_CHECK_LIB(audio, ALopenport, native_sound_lib="-laudio")
+ − 4238 fi
+ − 4239 if test -n "$native_sound_lib"; then
+ − 4240 sound_found=yes sound_cflags=""
151
+ − 4241 XE_ADD_OBJS(sgiplay.o)
149
+ − 4242 fi ;;
+ − 4243 hppa*-hp-hpux* )
155
+ − 4244 if test -z "$native_sound_lib"; then
+ − 4245 AC_CHECK_LIB(Alib, AOpenAudio, native_sound_lib="-lAlib")
+ − 4246 fi
+ − 4247 if test -n "$native_sound_lib"; then
+ − 4248 sound_found=yes
151
+ − 4249 XE_ADD_OBJS(hpplay.o)
169
+ − 4250 if test "$GCC" = "yes" # Kludge city
149
+ − 4251 then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
+ − 4252 else sound_cflags="+e -I/usr/audio/examples"
+ − 4253 fi
+ − 4254 fi ;;
0
+ − 4255 esac
+ − 4256 fi
149
+ − 4257
553
+ − 4258 dnl Win32 Native uses native sound
+ − 4259 if test -z "$sound_found"; then
+ − 4260 if test "$with_msw" = "yes"; then
594
+ − 4261 sound_found=yes
+ − 4262 native_sound_lib=
+ − 4263 XE_ADD_OBJS(ntplay.o)
553
+ − 4264 fi
+ − 4265 fi
+ − 4266
594
+ − 4267 dnl Check for Linux/BSD native sound (also on recent Cygwins)
149
+ − 4268 if test -z "$sound_found"; then
+ − 4269 for dir in "machine" "sys" "linux"; do
+ − 4270 AC_CHECK_HEADER(${dir}/soundcard.h,
+ − 4271 sound_found=yes
426
+ − 4272 need_miscplay=yes
151
+ − 4273 XE_ADD_OBJS(linuxplay.o)
442
+ − 4274 [AC_DEFINE_UNQUOTED(SOUNDCARD_H_FILE, "${dir}/soundcard.h")]
149
+ − 4275 break)
+ − 4276 done
+ − 4277 fi
+ − 4278
412
+ − 4279 test "$sound_found" = "yes" && with_native_sound=yes
+ − 4280 fi
+ − 4281
149
+ − 4282 if test "$with_native_sound" = "yes"; then
+ − 4283 AC_DEFINE(HAVE_NATIVE_SOUND)
151
+ − 4284 test -n "$native_sound_lib" && XE_PREPEND($native_sound_lib, LIBS)
0
+ − 4285 fi
+ − 4286
432
+ − 4287 dnl NAS Sound support
+ − 4288 if test "$with_nas_sound" != "no"; then
+ − 4289 AC_CHECK_HEADER(audio/audiolib.h, [
+ − 4290 AC_CHECK_LIB(audio, AuOpenServer, have_nas_sound=yes)])
+ − 4291 if test "$have_nas_sound" = "yes"; then
+ − 4292 with_nas_sound=yes
+ − 4293 AC_DEFINE(HAVE_NAS_SOUND)
+ − 4294 XE_ADD_OBJS(nas.o)
+ − 4295 XE_PREPEND(-laudio, libs_x)
+ − 4296 dnl If the nas library does not contain the error jump point,
+ − 4297 dnl then we force safer behavior.
+ − 4298 AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[old_nas=yes; AC_DEFINE(NAS_NO_ERROR_JUMP)])
+ − 4299 else
+ − 4300 test "$with_nas_sound" = "yes" && \
+ − 4301 XE_DIE("Required NAS sound support cannot be provided.")
+ − 4302 with_nas_sound=no
+ − 4303 fi
426
+ − 4304 fi
+ − 4305
432
+ − 4306 dnl ESD Sound support
+ − 4307 if test "$with_esd_sound" != "no"; then
+ − 4308 AC_CHECK_PROG(have_esd_config, esd-config, yes, no)
+ − 4309 if test "$have_esd_config" = "yes"; then
+ − 4310 save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
+ − 4311 XE_APPEND(`esd-config --cflags`, c_switch_site)
+ − 4312 XE_PREPEND(`esd-config --libs`, LIBS)
+ − 4313 AC_CHECK_FUNC(esd_play_stream,
+ − 4314 have_esd_sound=yes,
+ − 4315 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS")
+ − 4316 fi
+ − 4317
+ − 4318 if test "$have_esd_sound" = "yes"; then
+ − 4319 with_esd_sound=yes
426
+ − 4320 need_miscplay=yes
+ − 4321 XE_ADD_OBJS(esd.o)
432
+ − 4322 AC_DEFINE(HAVE_ESD_SOUND)
+ − 4323 else
+ − 4324 test "$with_esd_sound" = "yes" && \
+ − 4325 XE_DIE("Required ESD sound support cannot be provided.")
+ − 4326 with_esd_sound=no
426
+ − 4327 fi
+ − 4328 fi
+ − 4329
432
+ − 4330 test "$need_miscplay" = "yes" && XE_ADD_OBJS(miscplay.o)
149
+ − 4331
151
+ − 4332 dnl ---------------------
149
+ − 4333 dnl TTY-dependent options
151
+ − 4334 dnl ---------------------
149
+ − 4335
+ − 4336 test -z "$with_tty" && with_tty=yes
+ − 4337
+ − 4338 if test "$with_tty" = "yes" ; then
151
+ − 4339 AC_CHECKING(for TTY-related features)
149
+ − 4340 AC_DEFINE(HAVE_TTY)
+ − 4341
+ − 4342 dnl Autodetect ncurses.
+ − 4343 if test -z "$with_ncurses"; then
151
+ − 4344 AC_CHECK_LIB(ncurses, tgetent, with_ncurses=yes, with_ncurses=no)
149
+ − 4345 fi
+ − 4346 if test "$with_ncurses" = "yes"; then
70
+ − 4347 AC_DEFINE(HAVE_NCURSES)
442
+ − 4348 AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h)
+ − 4349 AC_CHECK_HEADER(ncurses/term.h, term_h_file=ncurses/term.h)
151
+ − 4350 XE_ADD_OBJS(terminfo.o)
+ − 4351 XE_PREPEND(-lncurses, LIBS)
149
+ − 4352
153
+ − 4353 if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
70
+ − 4354 dnl Try again, and check for the bogus ncurses/ include bug.
+ − 4355 dnl (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of
+ − 4356 dnl <ncurses/unctrl.h>)
149
+ − 4357 save_c_switch_site="$c_switch_site"
+ − 4358 c_switch_site="$c_switch_site -I/usr/include/ncurses"
442
+ − 4359 AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h)
153
+ − 4360 if test "$ac_cv_header_ncurses_curses_h" = "yes"
559
+ − 4361 then AC_MSG_WARN([Your system has the bogus ncurses include bug.])
149
+ − 4362 else c_switch_site="$save_c_switch_site"
0
+ − 4363 fi
+ − 4364 fi
149
+ − 4365 else dnl "$with_ncurses" = "no"
151
+ − 4366 dnl Autodetect terminfo/-lcurses/-ltermlib/-ltermcap
149
+ − 4367 if test "$have_terminfo" = "yes"; then
151
+ − 4368 XE_ADD_OBJS(terminfo.o)
+ − 4369 if test -n "$libs_termcap"; then
+ − 4370 XE_PREPEND($libs_termcap, LIBS)
+ − 4371 else
+ − 4372 for lib in curses termlib termcap; do
153
+ − 4373 AC_CHECK_LIB($lib, tgetent, XE_PREPEND(-l${lib}, LIBS); break)
151
+ − 4374 done
+ − 4375 fi
149
+ − 4376 else dnl "$have_terminfo" = "no" && "with_ncurses" = "no"
151
+ − 4377 XE_ADD_OBJS(tparam.o)
+ − 4378 dnl The HP-UX curses library seems to have a badly broken version of select(2)
+ − 4379 dnl that makes "poll: interrupted system call" messages to appear and
561
+ − 4380 dnl Emacs subprocesses to hang (e.g. TeX compilation w/ AUCTeX) */
151
+ − 4381 case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
+ − 4382 if test -n "$libs_termcap"; then
+ − 4383 XE_PREPEND($libs_termcap, LIBS)
+ − 4384 else
153
+ − 4385 AC_CHECK_LIB(curses, tgetent, XE_PREPEND(-lcurses, LIBS),
+ − 4386 AC_CHECK_LIB(termcap, tgetent, XE_PREPEND(-ltermcap, LIBS),
+ − 4387 XE_ADD_OBJS(termcap.o)))
149
+ − 4388 fi
+ − 4389 fi
0
+ − 4390 fi
442
+ − 4391 AC_DEFINE_UNQUOTED(CURSES_H_FILE, "${curses_h_file-curses.h}")
+ − 4392 AC_DEFINE_UNQUOTED(TERM_H_FILE, "${term_h_file-term.h}")
155
+ − 4393
+ − 4394 dnl Autodetect gpm
+ − 4395 test -z "$with_gpm" && { AC_CHECK_HEADER(gpm.h, , with_gpm=no) }
+ − 4396 test -z "$with_gpm" && { AC_CHECK_LIB(gpm, Gpm_Open, with_gpm=yes, with_gpm=no) }
+ − 4397 if test "$with_gpm" = "yes"; then
+ − 4398 AC_DEFINE(HAVE_GPM)
+ − 4399 XE_PREPEND(-lgpm, LIBS)
+ − 4400 fi
+ − 4401
151
+ − 4402 else dnl "$with_tty" = "no"
149
+ − 4403 for feature in ncurses gpm; do
+ − 4404 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
559
+ − 4405 AC_MSG_WARN([--with-${feature} ignored: Not valid without TTY support])
149
+ − 4406 fi
+ − 4407 eval "with_${feature}=no"
+ − 4408 done
151
+ − 4409 fi dnl with_tty
0
+ − 4410
149
+ − 4411 dnl Database support
+ − 4412 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support.
0
+ − 4413 dnl On FreeBSD, both DB and DBM are part of libc.
384
+ − 4414 dnl By default, we check for DBM support in libgdbm, then libc, then libdbm.
+ − 4415
426
+ − 4416 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
384
+ − 4417 != "no no no" && AC_CHECKING(for database support)
+ − 4418
+ − 4419 dnl Check for ndbm.h, required for either kind of DBM support.
426
+ − 4420 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
384
+ − 4421 AC_CHECK_HEADER(ndbm.h, [:], [
426
+ − 4422 test "$with_database_gdbm" = "yes" -o \
+ − 4423 "$with_database_dbm" = "yes" && \
384
+ − 4424 XE_DIE("Required DBM support cannot be provided.")
426
+ − 4425 with_database_gdbm=no with_database_dbm=no])
384
+ − 4426 fi
+ − 4427
+ − 4428 dnl Check for DBM support in libgdbm.
426
+ − 4429 if test "$with_database_gdbm" != "no"; then
384
+ − 4430 AC_CHECK_LIB(gdbm, dbm_open, [
426
+ − 4431 with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm], [
+ − 4432 if test "$with_database_gdbm" = "yes"; then
384
+ − 4433 XE_DIE("Required GNU DBM support cannot be provided.")
+ − 4434 fi
426
+ − 4435 with_database_gdbm=no])
149
+ − 4436 fi
+ − 4437
384
+ − 4438 dnl Check for DBM support in libc and libdbm.
151
+ − 4439 if test "$with_database_dbm" != "no"; then
384
+ − 4440 AC_CHECK_FUNC(dbm_open, [with_database_dbm=yes libdbm=], [
+ − 4441 AC_CHECK_LIB(dbm, dbm_open, [with_database_dbm=yes libdbm=-ldbm], [
+ − 4442 test "$with_database_dbm" = "yes" && \
+ − 4443 XE_DIE("Required DBM support cannot be provided.")
+ − 4444 with_database_dbm=no])])
149
+ − 4445 fi
+ − 4446
384
+ − 4447 dnl Tell make about the DBM support we detected.
+ − 4448 test -n "$libdbm" && XE_PREPEND("$libdbm", LIBS)
426
+ − 4449 test "$with_database_gdbm" = "yes" -o \
+ − 4450 "$with_database_dbm" = "yes" && \
384
+ − 4451 AC_DEFINE(HAVE_DBM)
+ − 4452
+ − 4453 dnl Check for Berkeley DB.
149
+ − 4454 if test "$with_database_berkdb" != "no"; then
298
+ − 4455 AC_MSG_CHECKING(for Berkeley db.h)
442
+ − 4456 for header in "db/db.h" "db.h"; do
+ − 4457 AC_TRY_COMPILE([
+ − 4458 #include <stdlib.h>
+ − 4459 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
+ − 4460 #ifdef HAVE_INTTYPES_H
149
+ − 4461 #define __BIT_TYPES_DEFINED__
+ − 4462 #include <inttypes.h>
+ − 4463 typedef uint8_t u_int8_t;
+ − 4464 typedef uint16_t u_int16_t;
+ − 4465 typedef uint32_t u_int32_t;
+ − 4466 #ifdef WE_DONT_NEED_QUADS
+ − 4467 typedef uint64_t u_int64_t;
+ − 4468 #endif
+ − 4469 #endif
442
+ − 4470 #endif
+ − 4471 #include <$header>
+ − 4472 ],[], db_h_file="$header"; break)
298
+ − 4473 done
442
+ − 4474 if test -z "$db_h_file"
298
+ − 4475 then AC_MSG_RESULT(no); with_database_berkdb=no
442
+ − 4476 else AC_MSG_RESULT($db_h_file)
149
+ − 4477 fi
298
+ − 4478
+ − 4479 if test "$with_database_berkdb" != "no"; then
+ − 4480 AC_MSG_CHECKING(for Berkeley DB version)
+ − 4481 AC_EGREP_CPP(yes,
442
+ − 4482 [#include <$db_h_file>
298
+ − 4483 #if DB_VERSION_MAJOR > 1
+ − 4484 yes
+ − 4485 #endif
448
+ − 4486 ], [AC_EGREP_CPP(yes,
+ − 4487 [#include <$db_h_file>
+ − 4488 #if DB_VERSION_MAJOR > 2
+ − 4489 yes
+ − 4490 #endif
1442
+ − 4491 ], [AC_EGREP_CPP(yes,
+ − 4492 [#include <$db_h_file>
+ − 4493 #if DB_VERSION_MAJOR > 3
+ − 4494 yes
+ − 4495 #endif
+ − 4496 ], [AC_MSG_RESULT(4); dbfunc=db_create; dbver=4],[
+ − 4497 AC_MSG_RESULT(3); dbfunc=db_create; dbver=3])],[
+ − 4498 AC_MSG_RESULT(2); dbfunc=db_open; dbver=2])],[
+ − 4499 AC_MSG_RESULT(1); dbfunc=dbopen; dbver=1])
298
+ − 4500 AC_CHECK_FUNC($dbfunc, with_database_berkdb=yes need_libdb=no, [
+ − 4501 AC_CHECK_LIB(db, $dbfunc, with_database_berkdb=yes need_libdb=yes)])
+ − 4502 fi
+ − 4503
1442
+ − 4504 dnl Berk db 4.1 decorates public functions with version information
+ − 4505 if test "$with_database_berkdb" != "yes" -a "$dbver" = "4"; then
+ − 4506 rm -f $tempcname
+ − 4507 echo "#include <$db_h_file>" > $tempcname
+ − 4508 echo "configure___ dbfunc=db_create" >> $tempcname
+ − 4509 define(TAB, [ ])dnl
+ − 4510 changequote(, )dnl
+ − 4511 eval `$CPP -Isrc $tempcname \
+ − 4512 | sed -n -e "s/[ TAB]*=[ TAB\"]*/='/" -e "s/[ TAB\"]*\$/'/" -e "s/^configure___//p"`
+ − 4513 changequote([, ])dnl
+ − 4514 rm -f $tempcname
+ − 4515 AC_MSG_WARN("db_create is really $dbfunc")
+ − 4516 AC_CHECK_LIB(db, $dbfunc, with_database_berkdb=yes need_libdb=yes)
+ − 4517 fi
+ − 4518
149
+ − 4519 if test "$with_database_berkdb" = "yes"; then
442
+ − 4520 AC_DEFINE_UNQUOTED(DB_H_FILE, "$db_h_file")
149
+ − 4521 AC_DEFINE(HAVE_BERKELEY_DB)
151
+ − 4522 test "$need_libdb" = "yes" && XE_PREPEND(-ldb, LIBS)
149
+ − 4523 else with_database_berkdb=no
0
+ − 4524 fi
+ − 4525 fi
149
+ − 4526
426
+ − 4527 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
272
+ − 4528 != "no no no"; then
149
+ − 4529 AC_DEFINE(HAVE_DATABASE)
+ − 4530 fi
+ − 4531
+ − 4532 dnl Socks support
+ − 4533 if test "$with_socks" = "yes"; then
+ − 4534 AC_CHECK_LIB(socks, SOCKSinit)
+ − 4535 test -n "$ac_cv_lib_socks_SOCKSinit" && AC_DEFINE(HAVE_SOCKS)
+ − 4536 fi
+ − 4537
+ − 4538 dnl Usage tracking (undocumented and likely unused option)
+ − 4539 if test "$usage_tracking" = "yes"; then
+ − 4540 AC_DEFINE(USAGE_TRACKING)
151
+ − 4541 XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS)
149
+ − 4542 fi
+ − 4543
272
+ − 4544 dnl Unfortunately, just because we can link doesn't mean we can run.
+ − 4545 dnl One of the above link tests may have succeeded but caused resulting
+ − 4546 dnl executables to fail to run. Also any tests using AC_TRY_RUN will
+ − 4547 dnl have reported incorrect results.
+ − 4548 AC_TRY_RUN([int main(int c,char *v[]){return 0;}],[:],[
+ − 4549 echo ""
+ − 4550 echo "*** PANIC *** The C compiler can no longer build working executables."
+ − 4551 echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
+ − 4552 echo "*** PANIC *** The most likely reason for this problem is that configure"
+ − 4553 echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
+ − 4554 echo "*** PANIC *** found at run time."
+ − 4555 echo "*** PANIC ***"
+ − 4556 echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
+ − 4557 echo "*** PANIC *** On other systems, try telling configure where to find the"
+ − 4558 echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
+ − 4559 echo "*** PANIC ***"
+ − 4560 echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
+ − 4561 echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
+ − 4562 echo "*** PANIC *** on your system. Don't do that."
+ − 4563 exit 1])
+ − 4564
398
+ − 4565 dnl Process support
771
+ − 4566 if test "$win32_processes" != "yes"; then
398
+ − 4567 AC_DEFINE(HAVE_UNIX_PROCESSES)
+ − 4568 fi
261
+ − 4569
149
+ − 4570 dnl --------------------------------
+ − 4571 dnl Compute SUBST-itutable variables
+ − 4572 dnl --------------------------------
155
+ − 4573
149
+ − 4574 dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM)
155
+ − 4575 dnl Use XE_SPACE instead of plain assignment statements to remove extraneous blanks
997
+ − 4576 if test "$with_modules" = "yes"; then
+ − 4577 ld_libs_module=
+ − 4578 else
+ − 4579 XE_SPACE(ld_libs_module, $ldap_libs $postgresql_libs)
+ − 4580 fi
+ − 4581
175
+ − 4582 XE_SPACE(CFLAGS, $CFLAGS)
155
+ − 4583 XE_SPACE(extra_objs, $extra_objs)
+ − 4584 XE_SPACE(c_switch_general, -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system)
462
+ − 4585 XE_SPACE(c_switch_window_system, $c_switch_x_site $c_switch_gtk $X_CFLAGS)
155
+ − 4586 XE_SPACE(c_switch_all, $c_switch_general $c_switch_window_system)
+ − 4587 XE_SPACE(ld_switch_general, $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run)
+ − 4588 XE_SPACE(ld_switch_window_system, $ld_switch_x_site)
+ − 4589 XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system)
+ − 4590 XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard)
462
+ − 4591 XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS)
997
+ − 4592 XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general $ld_libs_module)
149
+ − 4593
1452
+ − 4594
151
+ − 4595 dnl Compute lists of Makefiles and subdirs
+ − 4596 AC_SUBST(SRC_SUBDIR_DEPS)
+ − 4597 XE_APPEND(src, MAKE_SUBDIR)
1452
+ − 4598
+ − 4599 dnl Autodetect dll support
+ − 4600 dnl This must come before the detection code for anything that is in a module
+ − 4601 if test "$with_modules" != "no"; then
+ − 4602 AC_CHECKING(for module support)
+ − 4603
+ − 4604 dnl Check for MS-Windows
+ − 4605 if test "$with_msw" = "yes"; then
+ − 4606 have_dl=yes;
+ − 4607 else
+ − 4608 case "$opsys" in
+ − 4609 darwin ) have_dl=yes; AC_DEFINE(HAVE_DYLD) ;;
+ − 4610 * )
+ − 4611 dnl Find headers and libraries
+ − 4612 AC_CHECK_HEADER(dlfcn.h, [
+ − 4613 AC_MSG_CHECKING([for dlopen in -lc])
+ − 4614 AC_TRY_LINK([#include <dlfcn.h>],dnl
+ − 4615 [dlopen ("", 0);], [ have_dl=yes ], [
+ − 4616 AC_MSG_CHECKING([for dlopen in -ldl])
+ − 4617 ac_save_LIBS="$LIBS"
+ − 4618 LIBS="-ldl $LIBS"
+ − 4619 AC_TRY_LINK([#include <dlfcn.h>],dnl
+ − 4620 [dlopen ("", 0);], [ have_dl=yes ],
+ − 4621 [LIBS="$ac_save_LIBS"])
+ − 4622 ac_save_LIBS=])])
+ − 4623 if test -n "$have_dl"; then
+ − 4624 AC_DEFINE(HAVE_DLOPEN)
+ − 4625 else
+ − 4626 AC_CHECK_LIB(dld, shl_load, [
+ − 4627 libdl=dld have_dl=yes;
+ − 4628 AC_DEFINE(HAVE_SHL_LOAD)], [
+ − 4629 AC_CHECK_LIB(dld, dld_init, [
+ − 4630 libdl=dld have_dl=yes;
+ − 4631 AC_DEFINE(HAVE_DLD_INIT)])])
+ − 4632 fi
+ − 4633 esac dnl end !darwin
+ − 4634 fi dnl end !MS-Windows
+ − 4635
+ − 4636 if test -n "$have_dl"; then
+ − 4637 dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared
+ − 4638 XE_SHLIB_STUFF
+ − 4639 fi
+ − 4640
+ − 4641 if test "$can_build_shared" = "yes"; then
+ − 4642 AC_DEFINE(HAVE_SHLIB)
+ − 4643 XE_APPEND(src, INSTALL_ARCH_DEP_SUBDIR)
+ − 4644 test -n "$libdl" && XE_PREPEND(-l${libdl}, LIBS)
+ − 4645 AC_CHECK_FUNCS(dlerror _dlerror)
+ − 4646 with_modules=yes
+ − 4647 MOD_CC="../../lib-src/ellcc"
+ − 4648 MODCFLAGS="\$(CFLAGS) --mode=compile --mod-output=\$@ -I../../src -I\$(srcdir)/../../src"
+ − 4649 INSTALLPATH="\$(moduledir)"
+ − 4650 MOD_INSTALL_PROGRAM=${INSTALL_PROGRAM}
+ − 4651 OBJECT_TO_BUILD="\$(MODNAME).ell"
+ − 4652 else
+ − 4653 if test "$with_modules" = "yes"; then
+ − 4654 XE_DIE("Required module support cannot be provided.")
+ − 4655 else
+ − 4656 echo " No module support."
+ − 4657 fi
+ − 4658 with_modules=no
+ − 4659 MOD_CC="$XEMACS_CC"
+ − 4660 MODCFLAGS="\$(CFLAGS) -I../../src -I\$(srcdir)/../../src"
+ − 4661 INSTALLPATH=""
+ − 4662 MOD_INSTALL_PROGRAM="true"
+ − 4663 OBJECT_TO_BUILD="\$(MODNAME).o"
+ − 4664 fi
+ − 4665 fi
+ − 4666 MODARCHDIR=
+ − 4667 MAKE_DOCFILE="../../lib-src/make-docfile"
+ − 4668 AC_SUBST(with_modules)
+ − 4669 AC_SUBST(MOD_CC)
+ − 4670 AC_SUBST(MODARCHDIR)
+ − 4671 AC_SUBST(MAKE_DOCFILE)
+ − 4672 AC_SUBST(MODCFLAGS)
+ − 4673 AC_SUBST(INSTALLPATH)
+ − 4674 AC_SUBST(MOD_INSTALL_PROGRAM)
+ − 4675 AC_SUBST(OBJECT_TO_BUILD)
+ − 4676
+ − 4677
+ − 4678 dnl Autodetect LDAP
+ − 4679 AC_CHECKING(for LDAP)
+ − 4680 ldap_libs=
+ − 4681 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) }
+ − 4682 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) }
+ − 4683 if test "$with_ldap" != "no"; then
+ − 4684 AC_CHECK_LIB(ldap, ldap_search, with_ldap_nolber=yes, with_ldap_nolber=no)
+ − 4685 test "$with_ldap_nolber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_lber=yes, with_ldap_lber=no, -llber) }
+ − 4686 test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krb=yes, with_ldap_krb=no, -llber -lkrb) }
+ − 4687 test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krbdes=yes, with_ldap_krbdes=no, -llber -lkrb -ldes) }
+ − 4688 test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
+ − 4689 fi
+ − 4690 if test "$with_ldap" = "yes"; then
+ − 4691 AC_DEFINE(HAVE_LDAP)
+ − 4692 if test "$with_ldap_nolber" = "yes" ; then
+ − 4693 XE_PREPEND(-lldap, ldap_libs)
+ − 4694 else
+ − 4695 if test "$with_ldap_krb" = "yes" ; then
+ − 4696 XE_PREPEND(-lkrb, ldap_libs)
+ − 4697 fi
+ − 4698 if test "$with_ldap_krbdes" = "yes" ; then
+ − 4699 XE_PREPEND(-ldes, ldap_libs)
+ − 4700 XE_PREPEND(-lkrb, ldap_libs)
+ − 4701 fi
+ − 4702 XE_PREPEND(-llber, ldap_libs)
+ − 4703 XE_PREPEND(-lldap, ldap_libs)
+ − 4704 fi
+ − 4705 save_LIBS="$LIBS" LIBS="$LIBS $ldap_libs"
+ − 4706 AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result)
+ − 4707 LIBS="$save_LIBS"
+ − 4708 XE_APPEND(modules/ldap, MAKE_SUBDIR)
+ − 4709 need_modules_common=yes
+ − 4710 if test "$with_modules" = "yes"; then
+ − 4711 XE_APPEND(modules/ldap, INSTALL_ARCH_DEP_SUBDIR)
+ − 4712 fi
+ − 4713 fi
+ − 4714 AC_SUBST(ldap_libs)
+ − 4715
+ − 4716 dnl Autodetect PostgreSQL
+ − 4717 dnl On many Linux systems, PostgreSQL is packaged to be installed in /usr;
+ − 4718 dnl in this case, configure will easily detect it there.
+ − 4719 dnl
+ − 4720 dnl If PostgreSQL is installed into a different prefix,
+ − 4721 dnl (such as the default /usr/local/pgsql when building from source),
+ − 4722 dnl that prefix must be specified using the --site-prefixes flag.
+ − 4723 postgresql_libs=
+ − 4724 if test "$with_postgresql" != "no"; then
+ − 4725 AC_CHECKING(for PostgreSQL)
+ − 4726
+ − 4727 dnl Look for these standard header file locations, known to be used on Linux
+ − 4728 for header_dir in "" "pgsql/" "postgresql/"; do
+ − 4729 AC_CHECK_HEADER(${header_dir}libpq-fe.h,
+ − 4730 libpq_fe_h_file=${header_dir}libpq-fe.h; break)
+ − 4731 done
+ − 4732
+ − 4733 test -n "$libpq_fe_h_file" && { AC_CHECK_LIB(pq,PQconnectdb,have_libpq=yes) }
+ − 4734
+ − 4735 if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
+ − 4736 with_postgresql=yes
+ − 4737 AC_DEFINE(HAVE_POSTGRESQL)
+ − 4738 AC_CHECK_LIB(pq,PQconnectStart, [
+ − 4739 with_postgresqlv7=yes;
+ − 4740 AC_DEFINE(HAVE_POSTGRESQLV7)])
+ − 4741 AC_DEFINE_UNQUOTED(LIBPQ_FE_H_FILE, "$libpq_fe_h_file")
+ − 4742 XE_PREPEND(-lpq, postgresql_libs)
+ − 4743 XE_APPEND(modules/postgresql, MAKE_SUBDIR)
+ − 4744 need_modules_common=yes
+ − 4745 if test "$with_modules" = "yes"; then
+ − 4746 XE_APPEND(modules/postgresql, INSTALL_ARCH_DEP_SUBDIR)
+ − 4747 fi
+ − 4748 elif test "$with_postgresql" = "yes"; then
+ − 4749 XE_DIE("Required PostgreSQL support cannot be provided. Check --site-prefixes.")
+ − 4750 fi
+ − 4751 fi
+ − 4752 AC_SUBST(postgresql_libs)
+ − 4753
380
+ − 4754 internal_makefile_list="Makefile.in"
149
+ − 4755 SUBDIR_MAKEFILES=''
151
+ − 4756 test -d lock || mkdir lock
149
+ − 4757 for dir in $MAKE_SUBDIR; do
167
+ − 4758 case "$dir" in */* ) dnl Implement mkdir -p
+ − 4759 ( for d in `echo $dir | sed 's:/: :g'` ; do
+ − 4760 test -d "$d" || mkdir "$d"; cd "$d"
+ − 4761 done ) ;;
+ − 4762 * ) test -d "$dir" || mkdir "$dir" ;;
+ − 4763 esac
382
+ − 4764 XE_SPACE(SUBDIR_MAKEFILES, $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile)
155
+ − 4765 XE_SPACE(internal_makefile_list, $internal_makefile_list $dir/Makefile.in)
149
+ − 4766 done
167
+ − 4767 AC_SUBST(INSTALL_ARCH_DEP_SUBDIR)
149
+ − 4768 AC_SUBST(MAKE_SUBDIR)
+ − 4769 AC_SUBST(SUBDIR_MAKEFILES)
+ − 4770
1111
+ − 4771 dnl Make s&m symlinks in the src directory, for config.h.
157
+ − 4772 for dir in src/s src/m; do
+ − 4773 if test ! -d "$dir" ; then
+ − 4774 echo Making symbolic link to "$srcdir/$dir"
+ − 4775 ${LN_S} "$srcdir/$dir" "$dir"
+ − 4776 fi
+ − 4777 done
+ − 4778
1111
+ − 4779 dnl Also make modules/common link if needed for the module Makefiles.
+ − 4780 if test "$need_modules_common" = "yes"; then
+ − 4781 for dir in modules/common; do
+ − 4782 if test ! -d "$dir" ; then
+ − 4783 echo Making symbolic link to "$srcdir/$dir"
+ − 4784 ${LN_S} "$srcdir/$dir" "$dir"
+ − 4785 fi
+ − 4786 done
+ − 4787 fi
+ − 4788
149
+ − 4789 if test "$extra_verbose" = "yes"; then
151
+ − 4790 echo ""
163
+ − 4791 PRINT_VAR(extra_objs
+ − 4792 c_switch_general c_switch_window_system c_switch_all
+ − 4793 ld_switch_general ld_switch_window_system ld_switch_all
+ − 4794 ld_libs_general ld_libs_window_system ld_libs_all)
149
+ − 4795 echo ""
+ − 4796 fi
+ − 4797
438
+ − 4798 dnl ----------------------------------------------
+ − 4799 dnl Create some auxiliary files for developers.
+ − 4800 dnl ----------------------------------------------
+ − 4801
+ − 4802 dnl Create a .gdbinit useful for debugging XEmacs
+ − 4803 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
+ − 4804 test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
+ − 4805 echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
+ − 4806 fi
+ − 4807
+ − 4808 dnl Create a .dbxrc useful for debugging XEmacs
+ − 4809 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
+ − 4810 test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
+ − 4811 echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
+ − 4812 fi
+ − 4813
+ − 4814 dnl Create a useful TAGS file
+ − 4815 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
+ − 4816 test "$extra_verbose" = "yes" && echo "creating TAGS"
+ − 4817 echo "
+ − 4818 $srcdir/TAGS,include" > "TAGS"
151
+ − 4819 fi
+ − 4820
+ − 4821 dnl Create top level .sbinit for Sun compilers
373
+ − 4822 if test "$__SUNPRO_C" = "yes"; then
438
+ − 4823 test "$extra_verbose" = "yes" && echo "creating .sbinit"
157
+ − 4824 ( echo "# For use with Sun WorkShop's Source browser."
+ − 4825 echo "# See sbquery(1) and sbinit(4) for more information"
+ − 4826 for dir in $MAKE_SUBDIR; do echo "import $dir"; done
+ − 4827 ) > .sbinit
+ − 4828 fi
151
+ − 4829
+ − 4830 dnl There are no more compile tests; remove the core they created.
+ − 4831 rm -f core
+ − 4832
274
+ − 4833 dnl ----------------------------------------------
+ − 4834 dnl Substitute into Makefile, config.h and paths.h
+ − 4835 dnl ----------------------------------------------
+ − 4836
+ − 4837 dnl what sort of things to edit into Makefile, config.h and paths.h
70
+ − 4838 dnl configuration here uncanonicalized to avoid exceeding size limits.
+ − 4839
280
+ − 4840 AC_SUBST(PROGNAME)
0
+ − 4841 AC_SUBST(version)
+ − 4842 AC_SUBST(configuration)
+ − 4843 AC_SUBST(canonical)
422
+ − 4844 AC_SUBST(inststaticdir)
+ − 4845 AC_SUBST(instvardir)
0
+ − 4846 AC_SUBST(srcdir)
+ − 4847 AC_SUBST(bindir)
+ − 4848 AC_SUBST(datadir)
+ − 4849 AC_SUBST(statedir)
+ − 4850 AC_SUBST(libdir)
+ − 4851 AC_SUBST(mandir)
452
+ − 4852 AC_SUBST(extra_includes)
274
+ − 4853
278
+ − 4854 AC_SUBST(prefix)
420
+ − 4855 AC_SUBST(PREFIX_USER_DEFINED)
278
+ − 4856 dnl Yo, Stephen Bourne! I want to marry you!
+ − 4857 PREFIX=$prefix
+ − 4858 while true; do
+ − 4859 case "$PREFIX" in
+ − 4860 *\$* ) eval "PREFIX=$PREFIX" ;;
+ − 4861 *) break ;;
+ − 4862 esac
+ − 4863 done
+ − 4864 AC_SUBST(PREFIX)
+ − 4865
+ − 4866 AC_SUBST(exec_prefix)
420
+ − 4867 AC_SUBST(EXEC_PREFIX_USER_DEFINED)
278
+ − 4868 EXEC_PREFIX=$exec_prefix
+ − 4869 while true; do
+ − 4870 case "$EXEC_PREFIX" in
+ − 4871 *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
+ − 4872 *) break ;;
+ − 4873 esac
+ − 4874 done
+ − 4875 AC_SUBST(EXEC_PREFIX)
+ − 4876
0
+ − 4877 AC_SUBST(infodir)
274
+ − 4878 AC_SUBST(INFODIR_USER_DEFINED)
+ − 4879 INFODIR=$infodir
+ − 4880 while true; do
+ − 4881 case "$INFODIR" in
+ − 4882 *\$* ) eval "INFODIR=$INFODIR" ;;
+ − 4883 *) break ;;
+ − 4884 esac
+ − 4885 done
+ − 4886 AC_SUBST(INFODIR)
+ − 4887
203
+ − 4888 AC_SUBST(infopath)
274
+ − 4889 AC_SUBST(INFOPATH_USER_DEFINED)
+ − 4890 INFOPATH=$infopath
+ − 4891 while true; do
+ − 4892 case "$INFOPATH" in
+ − 4893 *\$* ) eval "INFOPATH=$INFOPATH" ;;
+ − 4894 *) break ;;
+ − 4895 esac
+ − 4896 done
+ − 4897 AC_SUBST(INFOPATH)
+ − 4898
269
+ − 4899 AC_SUBST(package_path)
274
+ − 4900 AC_SUBST(PACKAGE_PATH_USER_DEFINED)
+ − 4901 PACKAGE_PATH=$package_path
+ − 4902 while true; do
+ − 4903 case "$PACKAGE_PATH" in
+ − 4904 *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
+ − 4905 *) break ;;
+ − 4906 esac
+ − 4907 done
+ − 4908 AC_SUBST(PACKAGE_PATH)
+ − 4909
0
+ − 4910 AC_SUBST(lispdir)
274
+ − 4911 AC_SUBST(LISPDIR_USER_DEFINED)
+ − 4912 LISPDIR=$lispdir
+ − 4913 while true; do
+ − 4914 case "$LISPDIR" in
+ − 4915 *\$* ) eval "LISPDIR=$LISPDIR" ;;
+ − 4916 *) break ;;
+ − 4917 esac
+ − 4918 done
+ − 4919 AC_SUBST(LISPDIR)
+ − 4920
388
+ − 4921 AC_SUBST(moduledir)
+ − 4922 AC_SUBST(MODULEDIR_USER_DEFINED)
+ − 4923 MODULEDIR=$moduledir
+ − 4924 while true; do
+ − 4925 case "$MODULEDIR" in
+ − 4926 *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
+ − 4927 *) break ;;
+ − 4928 esac
+ − 4929 done
+ − 4930 AC_SUBST(MODULEDIR)
+ − 4931
+ − 4932 AC_SUBST(sitelispdir)
+ − 4933 AC_SUBST(SITELISPDIR_USER_DEFINED)
+ − 4934 SITELISPDIR=$sitelispdir
+ − 4935 while true; do
+ − 4936 case "$SITELISPDIR" in
+ − 4937 *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
+ − 4938 *) break ;;
+ − 4939 esac
+ − 4940 done
+ − 4941 AC_SUBST(SITELISPDIR)
+ − 4942
+ − 4943 AC_SUBST(sitemoduledir)
+ − 4944 AC_SUBST(SITEMODULEDIR_USER_DEFINED)
+ − 4945 SITEMODULEDIR=$sitemoduledir
+ − 4946 while true; do
+ − 4947 case "$SITEMODULEDIR" in
+ − 4948 *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
+ − 4949 *) break ;;
+ − 4950 esac
+ − 4951 done
+ − 4952 AC_SUBST(SITEMODULEDIR)
274
+ − 4953
0
+ − 4954 AC_SUBST(etcdir)
274
+ − 4955 AC_SUBST(ETCDIR_USER_DEFINED)
+ − 4956 ETCDIR=$etcdir
+ − 4957 while true; do
+ − 4958 case "$ETCDIR" in
+ − 4959 *\$* ) eval "ETCDIR=$ETCDIR" ;;
+ − 4960 *) break ;;
+ − 4961 esac
+ − 4962 done
+ − 4963 AC_SUBST(ETCDIR)
+ − 4964
420
+ − 4965 AC_SUBST(docdir)
+ − 4966 AC_SUBST(DOCDIR_USER_DEFINED)
+ − 4967 DOCDIR=$docdir
+ − 4968 while true; do
+ − 4969 case "$DOCDIR" in
+ − 4970 *\$* ) eval "DOCDIR=$DOCDIR" ;;
+ − 4971 *) break ;;
+ − 4972 esac
+ − 4973 done
+ − 4974 AC_SUBST(DOCDIR)
+ − 4975
0
+ − 4976 AC_SUBST(archlibdir)
274
+ − 4977 AC_SUBST(ARCHLIBDIR_USER_DEFINED)
+ − 4978 ARCHLIBDIR=$archlibdir
+ − 4979 while true; do
+ − 4980 case "$ARCHLIBDIR" in
+ − 4981 *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
+ − 4982 *) break ;;
+ − 4983 esac
+ − 4984 done
+ − 4985 AC_SUBST(ARCHLIBDIR)
+ − 4986
0
+ − 4987 AC_SUBST(docdir)
+ − 4988 AC_SUBST(bitmapdir)
149
+ − 4989 AC_SUBST(extra_objs)
+ − 4990
+ − 4991 dnl The following flags combine all the information from:
+ − 4992 dnl - command line options (user always gets priority)
+ − 4993 dnl - user environment variables
+ − 4994 dnl - determined by configure
388
+ − 4995 dnl - the s&m header files (required for ellcc)
0
+ − 4996 AC_SUBST(machfile)
+ − 4997 AC_SUBST(opsysfile)
149
+ − 4998 AC_SUBST(c_switch_general)
+ − 4999 AC_SUBST(c_switch_window_system)
+ − 5000 AC_SUBST(c_switch_all)
+ − 5001 AC_SUBST(ld_switch_general)
+ − 5002 AC_SUBST(ld_switch_window_system)
+ − 5003 AC_SUBST(ld_switch_all)
+ − 5004 AC_SUBST(ld_libs_general)
+ − 5005 AC_SUBST(ld_libs_window_system)
+ − 5006 AC_SUBST(ld_libs_all)
+ − 5007 AC_SUBST(CFLAGS)
+ − 5008 AC_SUBST(CPPFLAGS)
+ − 5009 AC_SUBST(LDFLAGS)
173
+ − 5010 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
+ − 5011 AC_SUBST(RECURSIVE_MAKE)
149
+ − 5012
+ − 5013 AC_SUBST(native_sound_lib)
+ − 5014 AC_SUBST(sound_cflags)
0
+ − 5015 AC_SUBST(RANLIB)
+ − 5016 AC_SUBST(dynodump_arch)
+ − 5017
380
+ − 5018 AC_SUBST(XEMACS_CC)
+ − 5019
420
+ − 5020 dnl The default is yes
+ − 5021 if test "$with_prefix" = "yes"; then
+ − 5022 AC_DEFINE(PREFIX_USER_DEFINED)
+ − 5023 fi
380
+ − 5024
388
+ − 5025 dnl The default is no
267
+ − 5026 if test "$with_site_lisp" = "no"; then
+ − 5027 AC_DEFINE(INHIBIT_SITE_LISP)
185
+ − 5028 fi
388
+ − 5029 dnl The default is yes
+ − 5030 if test "$with_site_modules" = "no"; then
+ − 5031 AC_DEFINE(INHIBIT_SITE_MODULES)
+ − 5032 fi
173
+ − 5033
207
+ − 5034 XE_SPACE(ac_configure_args, $ac_configure_args)
424
+ − 5035 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$configuration")
207
+ − 5036 AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "$ac_configure_args")
149
+ − 5037
+ − 5038 dnl Following are deprecated
+ − 5039
+ − 5040 null_string=""
+ − 5041 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, $null_string)
+ − 5042 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, $null_string)
+ − 5043 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, $null_string)
+ − 5044 AC_DEFINE_UNQUOTED(LD_SWITCH_SITE, $null_string)
+ − 5045 AC_DEFINE_UNQUOTED(C_SWITCH_SITE, $null_string)
0
+ − 5046
70
+ − 5047 dnl Note: as a general rule, *only* define things here that are not
+ − 5048 dnl autodetected. For things that are autodetected, define them
+ − 5049 dnl at the point where the autodetection occurs or would occur,
+ − 5050 dnl so that the user gets immediate feedback on the results of the
+ − 5051 dnl autodetection.
+ − 5052
181
+ − 5053 if test "$GNU_MALLOC" = "yes"; then AC_DEFINE(GNU_MALLOC)
+ − 5054 elif test "$with_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC)
+ − 5055 elif test "$with_debug_malloc" = "yes"; then AC_DEFINE(USE_DEBUG_MALLOC)
+ − 5056 AC_DEFINE(USE_SYSTEM_MALLOC)
0
+ − 5057 fi
169
+ − 5058 test "$GCC" = "yes" && AC_DEFINE(USE_GCC)
149
+ − 5059 test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET)
925
+ − 5060 test "$use_kkcc" = "yes" && AC_DEFINE(USE_KKCC)
442
+ − 5061 test "$quick_build" = "yes" && AC_DEFINE(QUICK_BUILD)
380
+ − 5062 test "$with_purify" = "yes" && AC_DEFINE(PURIFY)
149
+ − 5063 test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY)
+ − 5064 test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP)
+ − 5065 test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS)
+ − 5066 test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD)
272
+ − 5067 test "$use_union_type" = "yes" && AC_DEFINE(USE_UNION_TYPE)
424
+ − 5068 test "$pdump" = "yes" && AC_DEFINE(PDUMP)
724
+ − 5069 test "$with_ipv6_cname" = "yes" && AC_DEFINE(IPV6_CANONICALIZE)
149
+ − 5070
+ − 5071 dnl -------------------------------
+ − 5072 dnl Report on what we decided to do
+ − 5073 dnl -------------------------------
0
+ − 5074
118
+ − 5075 (
149
+ − 5076 dnl /etc/osversion is on SONY NEWS-OS
+ − 5077 if test -f /etc/osversion; then dnl SONY NEWS-OS
+ − 5078 echo "osversion: `cat /etc/osversion`"
+ − 5079 else
+ − 5080 echo "uname -a: `uname -a`"
134
+ − 5081 fi
149
+ − 5082 echo ""
+ − 5083 echo "$0 $quoted_arguments"
261
+ − 5084 ) > Installation
+ − 5085
414
+ − 5086 if test ! -z ${emacs_beta_version} ; then
+ − 5087 if test -z "${emacs_is_beta}" ; then
+ − 5088 xemacs_betaname=".${emacs_beta_version}"
+ − 5089 else
+ − 5090 xemacs_betaname="-b${emacs_beta_version}"
+ − 5091 fi
+ − 5092 else
430
+ − 5093 xemacs_betaname=""
414
+ − 5094 fi
149
+ − 5095
+ − 5096 dnl Start stdout redirection to '| tee -a Installation'
116
+ − 5097 (
0
+ − 5098 echo "
+ − 5099
975
+ − 5100 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" $xemacs_extra_name configured for \`$canonical'.
442
+ − 5101 "
+ − 5102 echo "
+ − 5103 Compilation / Installation:"
+ − 5104 echo " Source code location: $srcdir"
+ − 5105 echo " Installation prefix: $prefix"
149
+ − 5106 if test -n "$site_includes"; then
442
+ − 5107 echo " Additional header files: $site_includes"
149
+ − 5108 fi
+ − 5109 if test -n "$site_libraries"; then
442
+ − 5110 echo " Additional libraries: $site_libraries"
149
+ − 5111 fi
209
+ − 5112 if test -n "$site_prefixes"; then
442
+ − 5113 echo " Additional prefixes: $site_prefixes"
209
+ − 5114 fi
149
+ − 5115 if test -n "$runpath"; then
442
+ − 5116 echo " Runtime library search path: $runpath"
+ − 5117 fi
+ − 5118
+ − 5119 if test -n "$opsysfile"
+ − 5120 then echo " Operating system description file: \`$opsysfile'"
+ − 5121 else echo " Not using any operating system description file"
+ − 5122 fi
+ − 5123 if test -n "$machfile"
+ − 5124 then echo " Machine description file: \`$machfile'"
+ − 5125 else echo " Not using any machine description file"
398
+ − 5126 fi
442
+ − 5127
1111
+ − 5128 echo " Compiler: $XEMACS_CC $CFLAGS"
442
+ − 5129 echo " Relocating allocator for buffers: $rel_alloc"
+ − 5130 echo " GNU version of malloc: ${GNU_MALLOC}${GNU_MALLOC_reason}"
708
+ − 5131 case "$ld_switch_site" in
+ − 5132 *nocombreloc*) echo " Linking with \`-z nocombreloc'.
+ − 5133 - Consider configuring with --pdump." ;;
+ − 5134 esac
442
+ − 5135
+ − 5136 echo "
+ − 5137 Window System:"
+ − 5138 if test "$with_msw" = "yes"; then
+ − 5139 echo " Compiling in support for the Microsoft window system."
+ − 5140 fi
+ − 5141 if test "$with_x11" = "yes"; then
+ − 5142 echo " Compiling in support for the X window system:"
+ − 5143 echo " - X Windows headers location: $x_includes"
+ − 5144 echo " - X Windows libraries location: $x_libraries"
+ − 5145 if test "$with_xauth" != yes; then
+ − 5146 echo " - Xau (X authority) not available."
+ − 5147 fi
+ − 5148 if test "$with_xmu" != yes; then
+ − 5149 echo " - Xmu library not available; substituting equivalent routines."
+ − 5150 fi
+ − 5151 if test "$with_wmcommand" != no; then
+ − 5152 echo " - Handling WM_COMMAND properly."
+ − 5153 fi
+ − 5154 fi
+ − 5155 if test "$need_athena" = "yes"; then
+ − 5156 echo " Compiling in support for the Athena widget set:"
+ − 5157 echo " - Athena headers location: $athena_h_path"
+ − 5158 echo " - Athena library to link: $athena_lib"
438
+ − 5159 fi
442
+ − 5160 case "$with_menubars" in
462
+ − 5161 gtk ) echo " Using GTK menubars." ;;
442
+ − 5162 lucid ) echo " Using Lucid menubars." ;;
+ − 5163 motif ) echo " Using Motif menubars."
+ − 5164 echo " *WARNING* The Motif menubar implementation is currently buggy."
+ − 5165 echo " We recommend using the Lucid menubar instead."
+ − 5166 echo " Re-run configure with --with-menubars='lucid'." ;;
+ − 5167 msw ) echo " Using MS-Windows menubars." ;;
+ − 5168 esac
+ − 5169 case "$with_scrollbars" in
462
+ − 5170 gtk ) echo " Using GTK scrollbars." ;;
442
+ − 5171 lucid ) echo " Using Lucid scrollbars." ;;
+ − 5172 motif ) echo " Using Motif scrollbars." ;;
+ − 5173 athena ) echo " Using Athena scrollbars." ;;
+ − 5174 msw ) echo " Using MS-Windows scrollbars." ;;
+ − 5175 esac
+ − 5176 case "$with_dialogs" in
462
+ − 5177 gtk ) echo " Using GTK dialog boxes." ;;
442
+ − 5178 motif ) echo " Using Motif dialog boxes."
+ − 5179 if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
+ − 5180 echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3 and higher."
+ − 5181 echo " We recommend using the Athena dialog boxes instead."
+ − 5182 echo " Install libXaw and re-run configure with --with-dialogs='athena'."
+ − 5183 echo " Read the PROBLEMS file for more information."
+ − 5184 fi; fi ;;
+ − 5185 athena ) echo " Using Athena dialog boxes." ;;
+ − 5186 msw ) echo " Using MS-Windows dialog boxes." ;;
+ − 5187 esac
+ − 5188 case "$with_widgets" in
462
+ − 5189 gtk ) echo " Using GTK native widgets." ;;
442
+ − 5190 motif ) echo " Using Motif native widgets." ;;
+ − 5191 athena ) echo " Using Athena native widgets." ;;
+ − 5192 msw ) echo " Using MS-Windows native widgets." ;;
+ − 5193 esac
+ − 5194 if test "$with_dragndrop" = yes; then
+ − 5195 echo " Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
+ − 5196 echo " - Drag'n'Drop prototype: $dragndrop_proto."
0
+ − 5197 fi
149
+ − 5198
442
+ − 5199 echo "
+ − 5200 TTY:"
+ − 5201 test "$with_ncurses" = yes && echo " Compiling in support for ncurses."
+ − 5202 test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)."
+ − 5203
+ − 5204 echo "
+ − 5205 Images:"
+ − 5206 test "$with_gif" = yes && echo " Compiling in support for GIF images (builtin)."
153
+ − 5207 if test "$with_xpm" = yes; then
442
+ − 5208 echo " Compiling in support for XPM images."
175
+ − 5209 elif test "$with_x11" = yes; then
442
+ − 5210 echo " WARNING: -----------------------------------------------------------"
+ − 5211 echo " WARNING: Compiling without XPM image support."
373
+ − 5212 if test "$xpm_problem" != ""; then
+ − 5213 echo " Reason: $xpm_problem"
+ − 5214 fi
+ − 5215 echo " WARNING: You should strongly consider installing XPM."
151
+ − 5216 echo " WARNING: Otherwise toolbars and other graphics will look suboptimal."
373
+ − 5217 echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
442
+ − 5218 echo " WARNING: -----------------------------------------------------------"
308
+ − 5219 fi
373
+ − 5220 if test "$with_png" = yes; then
442
+ − 5221 echo " Compiling in support for PNG images."
373
+ − 5222 elif test "$window_system" != "none"; then
442
+ − 5223 echo " WARNING: -----------------------------------------------------------"
373
+ − 5224 echo " WARNING: Compiling without PNG image support."
+ − 5225 if test "$png_problem" != ""; then
+ − 5226 echo " Reason: $png_problem"
+ − 5227 fi
+ − 5228 echo " WARNING: You should strongly consider installing the PNG libraries."
+ − 5229 echo " WARNING: Otherwise certain images and glyphs may not display."
+ − 5230 echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
442
+ − 5231 echo " WARNING: -----------------------------------------------------------"
373
+ − 5232 fi
442
+ − 5233 test "$with_jpeg" = yes && echo " Compiling in support for JPEG images."
+ − 5234 test "$with_tiff" = yes && echo " Compiling in support for TIFF images."
310
+ − 5235 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers."
432
+ − 5236
442
+ − 5237 echo "
+ − 5238 Sound:"
+ − 5239 test "$with_native_sound" = yes && echo " Compiling in support for sound (native)."
+ − 5240 test "$with_nas_sound" = yes && echo " Compiling in support for NAS (network audio system)."
+ − 5241 test "$old_nas" = yes && echo " - NAS library lacks error trapping; will play synchronously."
+ − 5242 test "$with_esd_sound" = yes && echo " Compiling in support for ESD (Enlightened Sound Daemon)."
+ − 5243
+ − 5244 echo "
+ − 5245 Databases:"
+ − 5246 test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley database."
116
+ − 5247 test "$with_database_dbm" = yes && echo " Compiling in support for DBM."
426
+ − 5248 test "$with_database_gdbm" = yes && echo " Compiling in support for GNU DBM."
442
+ − 5249 test "$with_ldap" = yes && echo " Compiling in support for LDAP."
+ − 5250 if test "$with_postgresql" = yes; then
+ − 5251 echo " Compiling in support for PostgreSQL."
+ − 5252 echo " - Using PostgreSQL header file: $libpq_fe_h_file"
+ − 5253 test "$with_postgresqlv7" = yes && echo " - Using PostgreSQL V7 bindings."
+ − 5254 fi
+ − 5255
+ − 5256 echo "
+ − 5257 Internationalization:"
+ − 5258 test "$with_mule" = yes && echo " Compiling in support for Mule (multi-lingual Emacs)."
+ − 5259 test "$with_xim" != no && echo " Compiling in support for XIM (X11R5+ I18N input method)."
+ − 5260 test "$with_xim" = motif && echo " - Using Motif to provide XIM support."
+ − 5261 test "$with_xim" = xlib && echo " - Using raw Xlib to provide XIM support."
+ − 5262 test "$with_xfs" = yes && echo " - Using XFontSet to provide bilingual menubar."
+ − 5263 test "$with_canna" = yes && echo " Compiling in support for Canna on Mule."
120
+ − 5264 if test "$with_wnn" = yes; then
+ − 5265 echo " Compiling in support for the WNN input method on Mule."
442
+ − 5266 test "$with_wnn6" = yes && echo " - Using WNN version 6."
120
+ − 5267 fi
442
+ − 5268
+ − 5269 echo "
+ − 5270 Mail:"
+ − 5271 test "$with_pop" = yes && echo " Compiling in support for POP mail retrieval."
+ − 5272 test "$with_kerberos" = yes && echo " Compiling in support for Kerberos POP authentication."
+ − 5273 test "$with_hesiod" = yes && echo " Compiling in support for Hesiod POP server access."
+ − 5274 test -n "$mail_locking" && echo " Compiling in support for \"$mail_locking\" mail spool file locking method."
+ − 5275
+ − 5276 echo "
+ − 5277 Other Features:"
708
+ − 5278 test "$with_ipv6_cname" = no && echo " Inhibiting IPv6 canonicalization at startup."
116
+ − 5279 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk."
149
+ − 5280 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop."
442
+ − 5281 test "$with_socks" = yes && echo " Compiling in support for SOCKS."
+ − 5282 test "$with_dnet" = yes && echo " Compiling in support for DNET."
+ − 5283 test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules."
1202
+ − 5284 if test "$use_union_type" = yes ; then
+ − 5285 echo " Using the union type for Lisp_Objects."
+ − 5286 echo " WARNING: ---------------------------------------------------------"
+ − 5287 echo " WARNING: This tends to trigger compiler bugs, especially when"
+ − 5288 echo " WARNING: combined with MULE and ERROR_CHECKING. Crashes have"
+ − 5289 echo " WARNING: been seen with various versions of GCC, and recently"
+ − 5290 echo " WARNING: with Visual C++ as well."
+ − 5291 echo " WARNING: ---------------------------------------------------------"
+ − 5292 fi
+ − 5293 test "$use_union_type" = yes && echo " WARNING: Use of the union type may cause crashes due to compiler bugs."
925
+ − 5294 test "$use_kkcc" = yes && echo " Using the new GC algorithms."
442
+ − 5295 test "$pdump" = yes && echo " Using the new portable dumper."
+ − 5296 test "$debug" = yes && echo " Compiling in support for extra debugging code."
+ − 5297 test "$usage_tracking" = yes && echo " Compiling in support for active usage tracking (Sun internal)."
800
+ − 5298 if test "$error_check_extents $error_check_types $error_check_text $error_check_gc $error_check_malloc $error_check_glyphs $error_check_byte_code $error_check_display $error_check_structures" \
828
+ − 5299 != "no no no no no no no no no"; then
151
+ − 5300 echo " WARNING: ---------------------------------------------------------"
+ − 5301 echo " WARNING: Compiling in support for runtime error checking."
+ − 5302 echo " WARNING: XEmacs will run noticeably more slowly as a result."
+ − 5303 echo " WARNING: Error checking is on by default for XEmacs beta releases."
+ − 5304 echo " WARNING: ---------------------------------------------------------"
+ − 5305 fi
118
+ − 5306 echo ""
116
+ − 5307 ) | tee -a Installation
261
+ − 5308 dnl echo "The above configure report is appended to \"Installation\" file."
118
+ − 5309 echo ""
+ − 5310
149
+ − 5311 dnl -----------------------------------
+ − 5312 dnl Now generate config.h and Makefiles
+ − 5313 dnl -----------------------------------
70
+ − 5314 dnl This has to be called in order for this variable to get into config.status
120
+ − 5315 AC_SUBST(internal_makefile_list)
0
+ − 5316 # Remove any trailing slashes in these variables.
149
+ − 5317 test -n "$prefix" &&
159
+ − 5318 prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'`
149
+ − 5319 test -n "$exec_prefix" &&
159
+ − 5320 exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'`
149
+ − 5321
+ − 5322 dnl Build Makefile.in's from Makefile.in.in's
+ − 5323 dnl except ./Makefile from $srcdir/Makefile.in
1111
+ − 5324 dnl src/Makefile.in will have src/depend appended to it;
+ − 5325 dnl module Makefiles will have the common text in
+ − 5326 dnl modules/common/Makefile.common appended.
149
+ − 5327
272
+ − 5328 for file in $internal_makefile_list; do
1111
+ − 5329 case $file in
+ − 5330 src/Makefile.in ) file="src/Makefile.in:src/Makefile.in.in:src/depend" ;;
+ − 5331 modules/* ) file="${file}:${file}.in:modules/common/Makefile.common" ;;
+ − 5332 esac
430
+ − 5333 XE_APPEND($file, ac_output_files)
272
+ − 5334 done
276
+ − 5335 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
430
+ − 5336 test "$with_modules" = "yes" && XE_APPEND(lib-src/ellcc.h, ac_output_files)
272
+ − 5337
+ − 5338 AC_OUTPUT($ac_output_files,
380
+ − 5339 [for dir in . $MAKE_SUBDIR; do
165
+ − 5340 (
149
+ − 5341 cd $dir
+ − 5342 rm -f junk.c
163
+ − 5343 < Makefile.in \
165
+ − 5344 sed -e '/^# Generated/d' \
163
+ − 5345 -e 's%/\*\*/#.*%%' \
165
+ − 5346 -e 's/^ *# */#/' \
380
+ − 5347 dnl Delete Makefile.in.in comment lines
163
+ − 5348 -e '/^##/d' \
380
+ − 5349 dnl Pass through CPP directives unchanged
163
+ − 5350 -e '/^#/ {
+ − 5351 p
+ − 5352 d
380
+ − 5353 }' \
+ − 5354 dnl Quote other lines to protect from CPP substitution
+ − 5355 -e '/./ {
+ − 5356 s/\([[\"]]\)/\\\1/g
163
+ − 5357 s/^/"/
+ − 5358 s/$/"/
+ − 5359 }' > junk.c;
380
+ − 5360
+ − 5361 dnl Create a GNUmakefile and Makefile from Makefile.in.
+ − 5362
+ − 5363 changequote(<<,>>)dnl
+ − 5364 dnl CPP_MAKEFILE(CPPFLAGS,filename)
+ − 5365 define(<<CPP_MAKEFILE>>,
+ − 5366 echo creating $dir/<<$2>>
+ − 5367 $CPP -I. -I${top_srcdir}/src <<$1>> junk.c \
+ − 5368 dnl Delete line directives inserted by $CPP
+ − 5369 | sed -e 's/^\#.*//' \
+ − 5370 dnl Delete spurious blanks inserted by $CPP
+ − 5371 -e 's/^[ TAB][ TAB]*$//'\
+ − 5372 -e 's/^ /TAB/' \
+ − 5373 dnl Delete blank lines
442
+ − 5374 -e '/^[ ]*$/d' \
380
+ − 5375 dnl Restore lines quoted above to original contents.
442
+ − 5376 -e '/^\"/ {
380
+ − 5377 s/\\\([\"]\)/\1/g
+ − 5378 s/^[ TAB]*\"//
+ − 5379 s/\"[ TAB]*$//
+ − 5380 }' > Makefile.new
149
+ − 5381 chmod 444 Makefile.new
380
+ − 5382 mv -f Makefile.new <<$2>>
+ − 5383 )dnl CPP_MAKEFILE
+ − 5384
+ − 5385 CPP_MAKEFILE(,Makefile)
+ − 5386 CPP_MAKEFILE(-DUSE_GNU_MAKE,GNUmakefile)
+ − 5387 changequote([,])dnl
+ − 5388 rm -f junk.c
+ − 5389 )
149
+ − 5390 done
175
+ − 5391
181
+ − 5392 dnl Append AC_DEFINE information to lib-src/config.values
+ − 5393 dnl (AC_SUBST information is already there (see config.values.sh).
+ − 5394 sed < config.status >> lib-src/config.values \
+ − 5395 -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
+ − 5396 -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
+ − 5397 -e 's/^\([[^ ]]*\) $/\1 ""/' \
+ − 5398 -e 's/ 1$/ t/'
175
+ − 5399
149
+ − 5400 ],
+ − 5401 [CPP="$CPP"
+ − 5402 top_srcdir="$srcdir"
+ − 5403 MAKE_SUBDIR="$MAKE_SUBDIR"
380
+ − 5404 ])dnl