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 [
|
|
6 #### Copyright (C) 1992, 93, 94, 95, 96 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.
|
0
|
9 #### Copyright (C) 1995, 1996 Ben Wing.
|
|
10
|
|
11 ### Don't edit this script!
|
|
12 ### This script was automatically generated by the `autoconf' program
|
|
13 ### from the file `./configure.in'.
|
|
14 ### To rebuild it, execute the command
|
|
15 ### autoconf
|
149
|
16 ### in the this directory. You must have autoconf version 2.12 or later.
|
0
|
17
|
|
18 ### This file is part of XEmacs.
|
|
19
|
|
20 ### XEmacs is free software; you can redistribute it and/or modify it
|
|
21 ### under the terms of the GNU General Public License as published by
|
|
22 ### the Free Software Foundation; either version 2, or (at your
|
|
23 ### option) any later version.
|
|
24
|
|
25 ### XEmacs is distributed in the hope that it will be useful, but
|
|
26 ### WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
28 ### General Public License for more details.
|
|
29
|
|
30 ### You should have received a copy of the GNU General Public License
|
|
31 ### along with XEmacs; see the file COPYING. If not, write to the Free
|
|
32 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
33 ### 02111-1307, USA.
|
|
34
|
149
|
35 ### For usage, run `./configure --help'
|
|
36 ### For more detailed information on building and installing XEmacs,
|
|
37 ### read the file `INSTALL'.
|
0
|
38 ###
|
|
39 ### If configure succeeds, it leaves its status in config.status.
|
149
|
40 ### A log of configuration tests can be found in config.log.
|
0
|
41 ### If configure fails after disturbing the status quo,
|
|
42 ### config.status is removed.
|
149
|
43 ])
|
|
44
|
|
45 dnl Since XEmacs has configuration requirements that autoconf cannot
|
|
46 dnl meet, this file is an unholy marriage of custom-baked
|
|
47 dnl configuration code and autoconf macros.
|
|
48
|
|
49 dnl We use the m4 quoting characters [ ] (as established by the
|
|
50 dnl autoconf system), so quote them like this: [[foo]]
|
|
51
|
|
52 AC_PREREQ(2.12)dnl
|
|
53 dnl Redefine some standard autoconf macros
|
|
54 dnl here is how XEmacs is different:
|
|
55 dnl - no cache file
|
|
56 dnl - non-standard options
|
|
57 dnl - suport for extra-verbosity
|
|
58 dnl - ordinary libs are handled separately from X libs (might be a mistake)
|
|
59 dnl - various random kludges (e.g. -with-dnet=no
|
|
60
|
163
|
61 dnl PRINT_VAR(var var ...) prints values of shell variables
|
|
62 define([PRINT_VAR],[for var in patsubst([$1],[[
|
|
63 ]+],[ ]); do eval "echo \"$var = '\$$var'\""; done])
|
153
|
64
|
149
|
65 dnl Disable cache files:
|
|
66 dnl This is controversial, but I am convinced this is the right way to go,
|
|
67 dnl at least by default. Otherwise there are too many surprises.
|
|
68 define([AC_CACHE_LOAD], )dnl
|
|
69 define([AC_CACHE_SAVE], )dnl
|
|
70 define([AC_CACHE_VAL], [
|
|
71 $2
|
|
72 ])dnl
|
|
73
|
151
|
74 dnl Redefine AC_TRY_RUN_NATIVE to not throw away stderr while running
|
|
75 dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
|
|
76 define([AC_TRY_RUN_NATIVE],
|
|
77 [cat > conftest.$ac_ext <<EOF
|
|
78 [#]line __oline__ "configure"
|
|
79 #include "confdefs.h"
|
|
80 [$1]
|
|
81 EOF
|
306
|
82 if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit $?) 2>&AC_FD_CC
|
151
|
83 then
|
|
84 dnl Do not remove the temporary files here, so they can be examined.
|
|
85 ifelse([$2], , :, [$2])
|
|
86 else
|
306
|
87 conftest_rc="$?"
|
151
|
88 echo "configure: failed program was:" >&AC_FD_CC
|
|
89 cat conftest.$ac_ext >&AC_FD_CC
|
|
90 ifelse([$3], , , [ rm -fr conftest*
|
|
91 $3
|
|
92 ])dnl
|
|
93 fi
|
284
|
94 rm -fr conftest*])dnl AC_TRY_RUN_NATIVE
|
151
|
95
|
|
96
|
149
|
97 dnl Avoid spurious cross-compiling warnings from AC_TRY_RUN
|
|
98 dnl XEmacs is unlikely to ever cross-compile
|
|
99 define([AC_TRY_RUN],[AC_TRY_RUN_NATIVE([$1], [$2], [$3])])dnl
|
|
100
|
|
101 dnl Redefine AC_DEFINE* to provide more output if extra_verbose
|
|
102 dnl Set VARIABLE to VALUE, verbatim, or 1.
|
|
103 dnl AC_DEFINE(VARIABLE [, VALUE])
|
|
104 define([AC_DEFINE],
|
|
105 [{ test "$extra_verbose" = "yes" && cat << \EOF
|
|
106 Defining $1[]ifelse($#, 2, [ = $2],)
|
|
107 EOF
|
|
108 cat >> confdefs.h <<\EOF
|
|
109 [#define] $1 ifelse($#, 2, [$2], 1)
|
|
110 EOF
|
|
111 }
|
284
|
112 ])dnl AC_DEFINE
|
149
|
113
|
|
114 define([AC_DEFINE_UNQUOTED],
|
|
115 [{ test "$extra_verbose" = "yes" && cat << EOF
|
|
116 Defining $1[]ifelse($#, 2, [ = $2],)
|
|
117 EOF
|
|
118 cat >> confdefs.h <<EOF
|
|
119 [#define] $1 ifelse($#, 2, [$2], 1)
|
|
120 EOF
|
|
121 }
|
284
|
122 ])dnl AC_DEFINE_UNQUOTED
|
149
|
123
|
|
124 dnl redefine AC_CHECK_LIB in accordance with our own value of ac_link
|
|
125 dnl Add in extra kludgy check to support with_dnet=no
|
|
126 dnl Add in extra LDFLAGS arg, which PRECEDE libs
|
|
127 dnl Support --with-dnet=no
|
|
128
|
|
129 dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
|
|
130 dnl [, OTHER-LIBRARIES] [, LDFLAGS]]]])
|
|
131 define([AC_CHECK_LIB],
|
151
|
132 [ifelse([$1],dnet, [if test "$with_dnet" = "no" ; then
|
149
|
133 ac_cv_lib_dnet_dnet_ntoa=no
|
|
134 ifelse([$4], , , [$4]
|
|
135 )dnl
|
|
136 else
|
|
137 ])]
|
|
138 AC_CHECK_LIB_ORIG_HACKED([$1],[$2],[$3],[$4],[$5], [$6])
|
|
139 [ifelse([$1],dnet,[fi
|
|
140 ])]dnl
|
284
|
141 )dnl AC_CHECK_LIB
|
149
|
142
|
|
143 define([AC_CHECK_LIB_ORIG_HACKED],
|
|
144 [ifelse([$5],,AC_MSG_CHECKING([for $2 in -l$1]),
|
|
145 xe_msg_checking="for [$2] in -l[$1]"
|
|
146 test -n "[$5]" && xe_msg_checking="$xe_msg_checking using extra libs [$5]"
|
|
147 AC_MSG_CHECKING("$xe_msg_checking"))
|
|
148 dnl Use a cache variable name containing both the library and function name,
|
|
149 dnl because the test really is for library $1 defining function $2, not
|
|
150 dnl just for library $1. Separate tests with the same $1 and different $2s
|
|
151 dnl may have different results.
|
|
152 ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
|
|
153 AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
|
|
154 [xe_check_libs="$6 -l$1 $5"
|
|
155 AC_TRY_LINK(dnl
|
|
156 ifelse([$2], [main], , dnl Avoid conflicting decl of main.
|
|
157 [/* Override any gcc2 internal prototype to avoid an error. */
|
|
158 ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
|
|
159 extern "C"
|
|
160 #endif
|
|
161 ])dnl
|
|
162 [/* We use char because int might match the return type of a gcc2
|
|
163 builtin and then its argument prototype would still apply. */
|
|
164 char $2();
|
|
165 ]),
|
|
166 [$2()],
|
|
167 eval "ac_cv_lib_$ac_lib_var=yes",
|
|
168 eval "ac_cv_lib_$ac_lib_var=no")
|
|
169 xe_check_libs=""
|
|
170 ])dnl
|
151
|
171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
|
149
|
172 AC_MSG_RESULT(yes)
|
|
173 ifelse([$3], ,
|
|
174 [changequote(, )dnl
|
|
175 ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
|
|
176 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
|
|
177 changequote([, ])dnl
|
|
178 AC_DEFINE_UNQUOTED($ac_tr_lib)
|
151
|
179 XE_PREPEND([-l$1], LIBS)
|
149
|
180 ], [$3])
|
|
181 else
|
|
182 AC_MSG_RESULT(no)
|
|
183 ifelse([$4], , , [$4
|
|
184 ])dnl
|
|
185 fi
|
284
|
186 ])dnl AC_CHECK_LIB_ORIG_HACKED
|
149
|
187
|
|
188
|
|
189 dnl AC_LANG_C()
|
|
190 define([AC_LANG_C],
|
|
191 [define([AC_LANG], [C])dnl
|
|
192 ac_ext=c
|
|
193 dnl CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
194 dnl ac_cpp='$CPP $CPPFLAGS'
|
|
195 dnl ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
|
|
196 dnl ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
|
151
|
197 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
|
|
198 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
|
173
|
199 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
|
149
|
200 ac_cpp='$CPP '"$xe_cppflags"
|
151
|
201 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&AC_FD_CC'
|
|
202 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC'
|
149
|
203 cross_compiling=no
|
284
|
204 ]) dnl AC_LANG_C
|
149
|
205
|
155
|
206 dnl The construct foo=`echo $w1 $w2 $w3` fails on some systems if $w1 = -e or -n
|
|
207 dnl So we use the following instead.
|
|
208 dnl XE_SPACE(var, words)
|
|
209 define([XE_SPACE],[
|
|
210 T=""
|
|
211 for W in $2; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
|
|
212 $1="$T"
|
284
|
213 ])dnl XE_SPACE
|
151
|
214
|
|
215 dnl XE_ADD_OBJS(foo.o ...)
|
|
216 define([XE_ADD_OBJS],
|
|
217 [extra_objs="$extra_objs [$1]" && dnl
|
|
218 if test "$extra_verbose" = "yes"; then
|
|
219 echo " xemacs will be linked with \"[$1]\""
|
284
|
220 fi])dnl XE_ADD_OBJS
|
151
|
221
|
|
222 dnl XE_APPEND(value, varname)
|
|
223 define([XE_APPEND],
|
|
224 [[$2]="$[$2] [$1]" && dnl
|
|
225 if test "$extra_verbose" = "yes"; then echo " Appending \"[$1]\" to \$[$2]"; fi])
|
|
226
|
|
227 dnl XE_PREPEND(value, varname)
|
|
228 define([XE_PREPEND],
|
|
229 [[$2]="[$1] $[$2]" && dnl
|
|
230 if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi])
|
|
231
|
327
|
232 dnl XE_DIE(message)
|
|
233 define([XE_DIE], [{ echo "Error:" $1 >&2; exit 1; }])
|
|
234
|
151
|
235
|
|
236 dnl Initialize some variables set by options.
|
|
237 dnl The variables have the same names as the options, with
|
|
238 dnl dashes changed to underlines.
|
|
239
|
149
|
240 define([AC_INIT_PARSE_ARGS],[
|
284
|
241
|
|
242 dnl Get sane consistent behavior from various shells
|
|
243 dnl Avoid losing with weird user CDPATHs
|
|
244
|
|
245 if test -n "$ZSH_VERSION"; then
|
|
246 dnl zsh's Bourne shell emulation options
|
|
247 setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
|
|
248 setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
|
|
249 setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
|
|
250 setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
|
|
251 dnl zsh-3.1-beta drops core on the following
|
|
252 dnl unset CDPATH
|
|
253 if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
|
|
254 elif test -n "$BASH_VERSION"; then
|
|
255 dnl Use Posix mode with bash
|
|
256 set -o posix
|
|
257 unset CDPATH
|
|
258 else
|
|
259 if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
|
|
260 fi
|
|
261
|
149
|
262 dnl Initialize some variables set by options.
|
|
263 dnl The variables have the same names as the options, with
|
|
264 dnl dashes changed to underlines.
|
|
265 exec_prefix=NONE
|
|
266 host=NONE
|
|
267 no_create=
|
|
268 nonopt=NONE
|
|
269 no_recursion=
|
|
270 prefix=NONE
|
|
271 program_prefix=NONE
|
|
272 program_suffix=NONE
|
|
273 program_transform_name=s,x,x,
|
|
274 silent=
|
|
275 site=
|
|
276 srcdir=
|
|
277 target=NONE
|
|
278 verbose=
|
|
279 x_includes=NONE
|
|
280 x_libraries=NONE
|
153
|
281
|
149
|
282 dnl Installation directory options.
|
|
283 dnl These are left unexpanded so users can "make install exec_prefix=/foo"
|
|
284 dnl and all the variables that are supposed to be based on exec_prefix
|
|
285 dnl by default will actually change.
|
|
286 dnl Use braces instead of parens because sh, perl, etc. also accept them.
|
278
|
287 dnl If you change these, you need to synchronize with the settings of the
|
|
288 dnl various ..._USER_DEFINED variables further down.
|
149
|
289 bindir='${exec_prefix}/bin'
|
|
290 sbindir='${exec_prefix}/sbin'
|
|
291 libexecdir='${exec_prefix}/libexec'
|
|
292 datadir='${prefix}/share'
|
|
293 sysconfdir='${prefix}/etc'
|
|
294 sharedstatedir='${prefix}/com'
|
|
295 localstatedir='${prefix}/var'
|
|
296 libdir='${{exec_prefix}}/lib'
|
|
297 includedir='${prefix}/include'
|
|
298 oldincludedir='/usr/include'
|
|
299 infodir='${prefix}/info'
|
|
300 mandir='${prefix}/man'
|
|
301
|
|
302 dnl Initialize some other variables.
|
|
303 subdirs=
|
|
304 MFLAGS= MAKEFLAGS=
|
|
305 dnl Maximum number of lines to put in a shell here document.
|
|
306 ac_max_here_lines=12
|
284
|
307 ])dnl AC_INIT_PARSE_ARGS
|
|
308
|
149
|
309 AC_INIT(src/lisp.h)dnl
|
276
|
310 AC_CONFIG_HEADER(src/config.h lwlib/config.h)
|
149
|
311 dnl Remove any more than one leading "." element from the path name.
|
|
312 dnl If we do not remove them, then another "./" will be prepended to
|
|
313 dnl the file name each time we use config.status, and the program name
|
|
314 dnl will get larger and larger. This would not be a problem, except
|
|
315 dnl that since progname gets recorded in all the Makefiles this script
|
|
316 dnl produces, move-if-change thinks they're different when they're
|
|
317 dnl not.
|
|
318 dnl
|
|
319 dnl It would be nice if we could put the ./ in a \( \) group and then
|
|
320 dnl apply the * operator to that, so we remove as many leading './././'s
|
|
321 dnl as are present, but some seds (like Ultrix's sed) don't allow you to
|
|
322 dnl apply * to a \( \) group. Bleah.
|
0
|
323 progname="`echo $0 | sed 's:^\./\./:\./:'`"
|
|
324
|
149
|
325 dnl -----------------------------
|
|
326 dnl Establish some default values
|
|
327 dnl -----------------------------
|
|
328
|
151
|
329 XE_APPEND(lib-src, MAKE_SUBDIR)
|
167
|
330 XE_APPEND(lib-src, INSTALL_ARCH_DEP_SUBDIR)
|
149
|
331
|
|
332 dnl run_in_place='no'
|
0
|
333 prefix='/usr/local'
|
|
334 exec_prefix='${prefix}'
|
|
335 bindir='${exec_prefix}/bin'
|
149
|
336 dnl FSF 19.29 changes to:
|
|
337 dnl datadir='${prefix}/share'
|
|
338 dnl sharedstatedir='${prefix}/com'
|
|
339 dnl libexecdir='${exec_prefix}/libexec'
|
0
|
340 datadir='${prefix}/lib'
|
|
341 statedir='${prefix}/lib'
|
|
342 libdir='${exec_prefix}/lib'
|
|
343 mandir='${prefix}/man/man1'
|
280
|
344 infodir='${datadir}/${PROGNAME}-${version}/info'
|
274
|
345 infopath=''
|
276
|
346 install_pp=''
|
355
|
347 exe_suffix=''
|
280
|
348 lispdir='${datadir}/${PROGNAME}-${version}/lisp'
|
278
|
349 dnl sitelispdir='${datadir}/xemacs/site-lisp'
|
280
|
350 pkgdir='${datadir}/${PROGNAME}-${version}/lisp'
|
274
|
351 package_path=''
|
280
|
352 etcdir='${datadir}/${PROGNAME}-${version}/etc'
|
|
353 lockdir='${statedir}/${PROGNAME}/lock'
|
|
354 archlibdir='${libdir}/${PROGNAME}-${version}/${configuration}'
|
349
|
355 docdir='${archlibdir}'
|
269
|
356 with_site_lisp='no'
|
0
|
357 with_menubars=''
|
|
358 with_scrollbars=''
|
|
359 with_dialogs=''
|
259
|
360 with_file_coding=''
|
272
|
361 dnl const_is_losing is removed - we rely on AC_C_CONST instead.
|
|
362 dnl We accept (and ignore) the --const-is-losing option for compatibility.
|
|
363 dnl const_is_losing='yes'
|
0
|
364 puresize=''
|
272
|
365 cpp='' cppflags='' libs='' ldflags=''
|
0
|
366 dynamic=''
|
|
367 with_x11=''
|
263
|
368 with_msw=''
|
0
|
369 rel_alloc='default'
|
181
|
370 with_system_malloc='default'
|
261
|
371 with_dlmalloc='default'
|
0
|
372 native_sound_lib=''
|
272
|
373 dnl use_assertions should be 'yes' by default. Too many people in this
|
149
|
374 dnl world have core dumps turned off by default or \"cannot find where the
|
|
375 dnl core file went\". At least we should get some useful output ...
|
153
|
376 use_assertions="yes"
|
149
|
377 dnl the following is set to yes or no later.
|
153
|
378 with_toolbars=""
|
157
|
379 with_tty=""
|
153
|
380 use_union_type="no"
|
|
381 with_dnet=""
|
359
|
382 dnl dragndrop is still experimental. When it is stable, comment out the following line:
|
|
383 with_dragndrop="no"
|
0
|
384
|
149
|
385 dnl ------------------
|
|
386 dnl Options Processing
|
|
387 dnl ------------------
|
0
|
388
|
120
|
389 define([USAGE_ERROR],
|
149
|
390 [(echo "$progname: Usage error:"
|
120
|
391 echo " " $1
|
149
|
392 echo " Use \`$progname --help' to show usage.") >&2 && exit 1])
|
|
393
|
|
394 dnl Record all the arguments, so we can save them in config.status.
|
0
|
395 arguments="$@"
|
|
396
|
149
|
397 dnl Shell Magic: Quote the quoted arguments in ARGUMENTS. At a later date,
|
|
398 dnl in order to get the arguments back in $@, we have to do an
|
|
399 dnl 'eval set x "$quoted_arguments"; shift'
|
|
400 dnl # We use sed to turn embedded ' into '"'"'. I truly hate sh quoting.
|
120
|
401 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
|
0
|
402 quoted_arguments=
|
|
403 for i in "$@"; do
|
120
|
404 case "$i" in
|
|
405 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
|
|
406 | --no-cr | --no-c) ;;
|
153
|
407 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
|
|
408 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
|
120
|
409 *)
|
159
|
410 quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
|
120
|
411 quoted_arguments="$quoted_arguments '$quoted_i'" ;;
|
|
412 esac
|
0
|
413 done
|
|
414
|
149
|
415 dnl Do not use shift -- that destroys the argument list, which autoconf needs
|
|
416 dnl to produce config.status. It turns out that "set - $arguments" does not
|
|
417 dnl work portably.
|
|
418 dnl However, it also turns out that many shells cannot expand ${10} at all.
|
|
419 dnl So using an index variable does not work either. It is possible to use
|
|
420 dnl some shell magic to make 'set x "$arguments"; shift' work portably.
|
70
|
421 while test $# != 0; do
|
0
|
422 arg="$1"; shift
|
149
|
423 case "$arg" in
|
157
|
424 --no-create|--no-recursion) ;;
|
149
|
425 dnl Anything starting with a hyphen we assume is an option.
|
0
|
426 -* )
|
149
|
427 dnl Separate the switch name from the value it is being given.
|
|
428 case "$arg" in
|
0
|
429 -*=*)
|
149
|
430 opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([[^=]]*\)=.*$:\1:'`
|
|
431 val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[[^=]]*=\(.*\)$:\1:'`
|
0
|
432 valomitted=no
|
|
433 ;;
|
149
|
434 dnl special case these strings since echo may silently eat them:
|
|
435 dnl --help ) opt=help val=yes valomitted=yes ;;
|
|
436 dnl --version ) opt=version val=yes valomitted=yes ;;
|
|
437 dnl -e ) opt=e val=yes valomitted=yes ;;
|
|
438 dnl -E ) opt=E val=yes valomitted=yes ;;
|
|
439 dnl -n ) opt=n val=yes valomitted=yes ;;
|
0
|
440 -*)
|
149
|
441 dnl If FOO is a boolean argument, --FOO is equivalent to
|
|
442 dnl --FOO=yes. Otherwise, the value comes from the next
|
|
443 dnl argument - see below.
|
|
444 opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
|
243
|
445 val="yes" valomitted=yes
|
0
|
446 ;;
|
|
447 esac
|
|
448
|
274
|
449 dnl translate "-" in option string to "_"
|
|
450 optname="$opt"
|
|
451 opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
|
|
452
|
243
|
453 dnl Support --without-FOO as a synonym for --with-FOO=no
|
|
454 case "${valomitted}-${opt}" in yes-without_* )
|
|
455 opt=`echo $opt | sed 's/without/with/'`
|
|
456 valomitted="no" val="no" ;;
|
|
457 esac
|
|
458
|
149
|
459 dnl Process the option.
|
|
460 case "$opt" in
|
|
461
|
|
462 dnl Process (many) boolean options
|
70
|
463 run_in_place | \
|
269
|
464 with_site_lisp | \
|
70
|
465 with_x | \
|
|
466 with_x11 | \
|
263
|
467 with_msw | \
|
70
|
468 with_gcc | \
|
|
469 with_gnu_make | \
|
|
470 dynamic | \
|
149
|
471 with_ncurses | \
|
|
472 with_dnet | \
|
|
473 with_socks | \
|
282
|
474 with_dragndrop | \
|
70
|
475 with_cde | \
|
|
476 with_offix | \
|
149
|
477 with_gpm | \
|
|
478 with_xpm | \
|
|
479 with_xface | \
|
251
|
480 with_gif | \
|
|
481 with_jpeg | \
|
|
482 with_png | \
|
|
483 with_tiff | \
|
179
|
484 with_session | \
|
70
|
485 with_xmu | \
|
149
|
486 with_quantify | \
|
70
|
487 with_toolbars | \
|
|
488 with_tty | \
|
215
|
489 with_xfs | \
|
70
|
490 with_i18n3 | \
|
|
491 with_mule | \
|
259
|
492 with_file_coding | \
|
70
|
493 with_canna | \
|
|
494 with_wnn | \
|
98
|
495 with_wnn6 | \
|
149
|
496 with_workshop | \
|
70
|
497 with_sparcworks | \
|
|
498 with_tooltalk | \
|
259
|
499 with_ldap | \
|
118
|
500 with_pop | \
|
|
501 with_kerberos | \
|
|
502 with_hesiod | \
|
136
|
503 with_dnet | \
|
280
|
504 with_infodock | \
|
70
|
505 external_widget | \
|
120
|
506 verbose | \
|
|
507 extra_verbose | \
|
70
|
508 const_is_losing | \
|
|
509 usage_tracking | \
|
|
510 use_union_type | \
|
|
511 debug | \
|
|
512 use_assertions | \
|
272
|
513 use_minimal_tagbits | \
|
|
514 use_indexed_lrecord_implementation | \
|
|
515 gung_ho | \
|
|
516 use_assertions | \
|
70
|
517 memory_usage_stats | \
|
173
|
518 with_clash_detection | \
|
245
|
519 with_shlib | \
|
149
|
520 no_doc_file )
|
|
521 dnl Make sure the value given was either "yes" or "no".
|
|
522 case "$val" in
|
0
|
523 y | ye | yes ) val=yes ;;
|
|
524 n | no ) val=no ;;
|
149
|
525 * ) USAGE_ERROR("The \`--$optname' option requires a boolean value: \`yes' or \`no'.") ;;
|
0
|
526 esac
|
149
|
527 eval "$opt=\"$val\"" ;;
|
|
528
|
|
529
|
|
530 dnl Options that take a user-supplied value, as in --puresize=8000000
|
153
|
531 dnl The cache-file option is ignored (for compatibility with other configures)
|
70
|
532 srcdir | \
|
|
533 compiler | \
|
157
|
534 cflags | \
|
272
|
535 cpp | \
|
|
536 cppflags | \
|
|
537 libs | \
|
|
538 ldflags | \
|
70
|
539 puresize | \
|
153
|
540 cache_file | \
|
120
|
541 native_sound_lib | \
|
267
|
542 site_lisp | \
|
70
|
543 x_includes | \
|
|
544 x_libraries | \
|
|
545 site_includes | \
|
|
546 site_libraries | \
|
209
|
547 site_prefixes | \
|
149
|
548 site_runtime_libraries )
|
|
549 dnl If the value was omitted, get it from the next argument.
|
|
550 if test "$valomitted" = "yes" ; then
|
|
551 dnl Get the next argument from the argument list, if there is one.
|
|
552 if test "$#" = 0 ; then
|
|
553 USAGE_ERROR("The \`--$optname' option requires a value.");
|
0
|
554 fi
|
|
555 val="$1"; shift
|
|
556 fi
|
149
|
557 eval "$opt=\"$val\""
|
0
|
558 ;;
|
|
559
|
149
|
560 dnl Options that take "yes", "no", or "default" values
|
70
|
561 rel_alloc | \
|
261
|
562 with_dlmalloc | \
|
181
|
563 with_debug_malloc | use_debug_malloc | \
|
|
564 with_system_malloc | use_system_malloc )
|
149
|
565 case "$val" in
|
0
|
566 y | ye | yes ) val=yes ;;
|
|
567 n | no ) val=no ;;
|
181
|
568 d | de | def | defa | defau | defaul | default ) val=default ;;
|
149
|
569 * ) USAGE_ERROR(["The \`--$optname' option requires one of these values:
|
120
|
570 \`yes', \`no', or \`default'."]) ;;
|
0
|
571 esac
|
265
|
572 case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
|
149
|
573 eval "$opt=\"$val\""
|
0
|
574 ;;
|
|
575
|
149
|
576 dnl Has the user requested database support?
|
70
|
577 "with_database" )
|
120
|
578 with_database_berkdb=no
|
|
579 with_database_dbm=no
|
|
580 with_database_gnudbm=no
|
300
|
581 for x in `echo "$val" | sed -e 's/,/ /g'` ; do
|
149
|
582 case "$x" in
|
151
|
583 no ) ;;
|
120
|
584 b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;;
|
|
585 d | db | dbm ) with_database_dbm=yes ;;
|
70
|
586 g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;;
|
149
|
587 * ) USAGE_ERROR(["The \`--$optname' option value
|
120
|
588 must be either \`no' or a comma-separated list
|
|
589 of one or more of \`berkdb', \`dbm', or \`gnudbm'."]) ;;
|
|
590 esac
|
|
591 done
|
149
|
592 if test "$with_database_dbm" = "yes" -a \
|
151
|
593 "$with_database_gnudbm" = "yes"; then
|
120
|
594 USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified
|
149
|
595 with the \`--$optname' option.")
|
0
|
596 fi
|
70
|
597 ;;
|
0
|
598
|
149
|
599 dnl Has the user requested sound support?
|
0
|
600 "with_sound" )
|
149
|
601 dnl value can be native, nas or both. yes is allowed
|
|
602 dnl as a backwards compatible synonym for native
|
|
603 case "$val" in
|
0
|
604 y | ye | yes ) val=native ;;
|
|
605 n | no | non | none ) val=no;;
|
|
606 na | nat | nati | nativ | native ) val=native ;;
|
149
|
607 ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas ;;
|
0
|
608 b | bo | bot | both ) val=both;;
|
149
|
609 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
|
120
|
610 \`native', \`nas', \`both', or \`none'."]) ;;
|
2
|
611 esac
|
149
|
612 eval "$opt=\"$val\""
|
2
|
613 ;;
|
|
614
|
149
|
615 dnl Has the user requested XIM support?
|
70
|
616 "with_xim" )
|
149
|
617 case "$val" in
|
|
618 y | ye | yes ) val=yes ;;
|
|
619 n | no | non | none ) val=no ;;
|
|
620 x | xl | xli | xlib ) val=xlib ;;
|
|
621 m | mo | mot | moti | motif ) val=motif ;;
|
|
622 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
|
120
|
623 \`motif', \`xlib', \`yes', or \`no'."]) ;;
|
0
|
624 esac
|
149
|
625 eval "$opt=\"$val\""
|
0
|
626 ;;
|
|
627
|
149
|
628 dnl Mail locking specification
|
|
629 "mail_locking" )
|
|
630 case "$val" in
|
|
631 lockf ) val=lockf ;;
|
|
632 flock ) val=flock ;;
|
151
|
633 file ) val=file ;;
|
149
|
634 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
|
|
635 \`lockf', \`flock', or \`file'."]) ;;
|
0
|
636 esac
|
149
|
637 eval "$opt=\"$val\""
|
0
|
638 ;;
|
|
639
|
149
|
640 dnl Has the user requested error-checking?
|
0
|
641 "error_checking" )
|
149
|
642 dnl value can be all, none, and/or a list of categories to check.
|
|
643 dnl Example: --error-checking=all,noextents,nobufpos
|
|
644 dnl Example: --error-checking=none,malloc,gc
|
|
645
|
267
|
646 for x in `echo "$val" | sed -e 's/,/ /g'` ; do
|
149
|
647 case "$x" in
|
|
648 dnl all and none are only permitted as the first in the list.
|
0
|
649 n | no | non | none ) new_default=no ;;
|
|
650 a | al | all ) new_default=yes ;;
|
|
651
|
|
652 extents ) error_check_extents=yes ;;
|
|
653 noextents ) error_check_extents=no ;;
|
|
654
|
|
655 typecheck ) error_check_typecheck=yes ;;
|
|
656 notypecheck ) error_check_typecheck=no ;;
|
|
657
|
|
658 bufpos ) error_check_bufpos=yes ;;
|
|
659 nobufpos ) error_check_bufpos=no ;;
|
|
660
|
|
661 gc ) error_check_gc=yes ;;
|
|
662 nogc ) error_check_gc=no ;;
|
|
663
|
|
664 malloc ) error_check_malloc=yes ;;
|
|
665 nomalloc ) error_check_malloc=no ;;
|
149
|
666
|
0
|
667 * ) bogus_error_check=yes ;;
|
|
668 esac
|
70
|
669 if test "$bogus_error_check" -o \
|
|
670 \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
|
267
|
671 if test "$error_check_default" = yes ; then
|
120
|
672 types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'."
|
0
|
673 else
|
120
|
674 types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'."
|
0
|
675 fi
|
149
|
676 USAGE_ERROR(["Valid types for the \`--$optname' option are:
|
120
|
677 $types."])
|
151
|
678 elif test -n "$new_default" ; then
|
0
|
679 error_check_extents=$new_default
|
|
680 error_check_typecheck=$new_default
|
|
681 error_check_bufpos=$new_default
|
|
682 error_check_gc=$new_default
|
|
683 error_check_malloc=$new_default
|
|
684 new_default= # reset this
|
|
685 fi
|
|
686 echeck_notfirst=true
|
|
687 done
|
|
688 ;;
|
|
689
|
149
|
690 dnl Has the user tried to tell us where the X files are?
|
|
691 dnl I think these are dopey, but no less than three alpha
|
|
692 dnl testers, at large sites, have said they have their X files
|
|
693 dnl installed in odd places.
|
|
694
|
|
695 dnl Has the user specified one of the path options?
|
0
|
696 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
|
203
|
697 mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
|
333
|
698 archlibdir | docdir | package_path )
|
149
|
699 dnl If the value was omitted, get it from the next argument.
|
151
|
700 if test "$valomitted" = "yes"; then
|
|
701 if test "$#" = 0; then
|
149
|
702 USAGE_ERROR("The \`--$optname' option requires a value.");
|
120
|
703 fi
|
|
704 val="$1"; shift
|
0
|
705 fi
|
149
|
706 eval "$opt=\"$val\""
|
|
707
|
278
|
708 dnl You need to synchronize this with the way the
|
|
709 dnl default values are built.
|
|
710 case "$opt" in
|
274
|
711 lispdir ) AC_DEFINE(LISPDIR_USER_DEFINED) ;;
|
278
|
712 dnl sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;;
|
274
|
713 etcdir ) AC_DEFINE(ETCDIR_USER_DEFINED) ;;
|
|
714 infodir ) AC_DEFINE(INFODIR_USER_DEFINED) ;;
|
|
715 infopath ) AC_DEFINE(INFOPATH_USER_DEFINED) ;;
|
|
716 package_path ) AC_DEFINE(PACKAGE_PATH_USER_DEFINED) ;;
|
278
|
717 datadir )
|
|
718 AC_DEFINE(INFODIR_USER_DEFINED)
|
|
719 AC_DEFINE(LISPDIR_USER_DEFINED)
|
|
720 AC_DEFINE(ETCDIR_USER_DEFINED) ;;
|
274
|
721 statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;;
|
349
|
722 docdir ) AC_DEFINE(DOCDIR_USER_DEFINED) ;;
|
274
|
723 exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;;
|
149
|
724 esac
|
0
|
725 ;;
|
|
726
|
149
|
727 dnl --no-create added by autoconf for use by config.status
|
|
728 "no_create" ) ;;
|
|
729
|
|
730 dnl Has the user asked for some help?
|
215
|
731 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
|
149
|
732
|
|
733 dnl Has the user specified what toolkit to use for the menubars,
|
|
734 dnl scrollbar or dialogs?
|
0
|
735 "with_menubars" | "with_scrollbars" | "with_dialogs" )
|
149
|
736 case "$val" in
|
0
|
737 l | lu | luc | luci | lucid ) val=lucid ;;
|
|
738 m | mo | mot | moti | motif ) val=motif ;;
|
82
|
739 athena3d | athena-3d ) val=athena3d ;;
|
0
|
740 a | at | ath | athe | athen | athena ) val=athena ;;
|
|
741 n | no | non | none ) val=no ;;
|
149
|
742 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
|
|
743 \`lucid', \`motif', \`athena', \`athena3d', or \`no'."]) ;;
|
0
|
744 esac
|
149
|
745 eval "$opt=\"$val\""
|
0
|
746 ;;
|
|
747
|
149
|
748 dnl Fail on unrecognized arguments.
|
|
749 * ) USAGE_ERROR("Unrecognized option: $arg") ;;
|
0
|
750
|
|
751 esac
|
|
752 ;;
|
|
753
|
243
|
754 dnl Assume anything with multiple hyphens is a configuration name.
|
|
755 *-*-*) configuration="$arg" ;;
|
|
756
|
|
757 dnl Anything else is an error
|
|
758 *) USAGE_ERROR("Unrecognized argument: $arg") ;;
|
0
|
759
|
|
760 esac
|
|
761 done
|
|
762
|
149
|
763 dnl -------------------------
|
|
764 dnl Finish options processing
|
|
765 dnl -------------------------
|
|
766
|
272
|
767 dnl Several options are equivalent to, and override, environment variables.
|
|
768 test -n "$cpp" && CPP="$cpp"
|
|
769 test -n "$cppflags" && CPPFLAGS="$cppflags"
|
|
770 test -n "$libs" && LIBS="$libs"
|
|
771 test -n "$ldflags" && LDFLAGS="$ldflags"
|
|
772
|
149
|
773 dnl Get the arguments back. See the diatribe on Shell Magic above.
|
0
|
774 eval set x "$quoted_arguments"; shift
|
|
775
|
149
|
776 dnl --extra-verbose implies --verbose
|
|
777 test "$extra_verbose" = "yes" && verbose=yes
|
|
778
|
|
779 dnl Allow use of either ":" or spaces for lists of directories
|
|
780 define(COLON_TO_SPACE,
|
187
|
781 [case "$[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's/^ //' -e 's/:/ /g'`";; esac])dnl
|
149
|
782 COLON_TO_SPACE(site_includes)
|
|
783 COLON_TO_SPACE(site_libraries)
|
209
|
784 COLON_TO_SPACE(site_prefixes)
|
149
|
785 COLON_TO_SPACE(site_runtime_libraries)
|
|
786
|
187
|
787 dnl with_x is an obsolete synonym for with_x11
|
149
|
788 test -n "$with_x" && with_x11="$with_x"
|
|
789
|
272
|
790 dnl --gung-ho=val is a synonym for
|
|
791 dnl --use-minimal-tagbits=val --use-indexed-lrecord-implementation=val
|
|
792
|
|
793 if test -n "$gung_ho"; then
|
|
794 test -z "$use_minimal_tagbits" && use_minimal_tagbits="$gung_ho"
|
|
795 test -z "$use_indexed_lrecord_implementation" && \
|
|
796 use_indexed_lrecord_implementation="$gung_ho"
|
|
797 fi
|
|
798 if test "$use_minimal_tagbits" = "no"; then
|
|
799 test "$with_dlmalloc" = "yes" && \
|
284
|
800 USAGE_ERROR("--with-dlmalloc requires --use-minimal-tagbits")
|
272
|
801 with_dlmalloc=no
|
|
802 fi
|
|
803
|
284
|
804 dnl XE_CHECK_FEATURE_DEPENDENCY(feature1, feature2)
|
|
805 define([XE_CHECK_FEATURE_DEPENDENCY],
|
|
806 [if test "$with_$1 $with_$2" = "yes no"; then
|
|
807 USAGE_ERROR("--with-$1 requires --with-$2")
|
|
808 elif test "$with_$2" = "no" ; then with_$1=no
|
|
809 elif test "$with_$1" = "yes"; then with_$2=yes
|
|
810 fi
|
|
811 ])
|
|
812
|
|
813 dnl CDE requires tooltalk
|
|
814 XE_CHECK_FEATURE_DEPENDENCY(cde, tooltalk)
|
|
815
|
|
816 dnl Ignore useless run-in-place flag
|
149
|
817 if test "$run_in_place" = "yes"; then
|
|
818 AC_MSG_WARN("The --run-in-place option is ignored because it is unnecessary.")
|
70
|
819 fi
|
|
820
|
149
|
821 dnl Find the source directory.
|
|
822 case "$srcdir" in
|
|
823
|
|
824 dnl If srcdir is not specified, see if "." or ".." might work.
|
0
|
825 "" )
|
120
|
826 for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[[^/]]*$||'`" "." ".." ; do
|
|
827 if test -f "$dir/src/lisp.h" -a \
|
|
828 -f "$dir/lisp/version.el" ; then
|
149
|
829 srcdir="$dir"
|
70
|
830 break
|
|
831 fi
|
|
832 done
|
149
|
833 if test -z "$srcdir" ; then
|
120
|
834 USAGE_ERROR(["Neither the current directory nor its parent seem to
|
|
835 contain the XEmacs sources. If you do not want to build XEmacs in its
|
149
|
836 source tree, you should run \`$progname' in the directory in which
|
120
|
837 you wish to build XEmacs, using the \`--srcdir' option to say where the
|
|
838 sources may be found."])
|
|
839 fi
|
0
|
840 ;;
|
|
841
|
149
|
842 dnl Otherwise, check if the directory they specified is okay.
|
0
|
843 * )
|
243
|
844 if test ! -f "$srcdir/src/lisp.h" -o \
|
149
|
845 ! -f "$srcdir/lisp/version.el" ; then
|
120
|
846 USAGE_ERROR(["The directory specified with the \`--srcdir' option,
|
149
|
847 \`$srcdir', doesn't seem to contain the XEmacs sources. You should
|
|
848 either run the \`$progname' script at the top of the XEmacs source
|
120
|
849 tree, or use the \`--srcdir' option to specify the XEmacs source directory."])
|
0
|
850 fi
|
|
851 ;;
|
|
852 esac
|
|
853
|
243
|
854 dnl ###########################################################################
|
|
855 if test -z "$configuration"; then
|
|
856 AC_MSG_CHECKING("host system type")
|
|
857 dnl Guess the configuration and remove 4th name component, if present.
|
|
858 if configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess | \
|
|
859 sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'` ; then
|
|
860 AC_MSG_RESULT($configuration)
|
|
861 else
|
|
862 AC_MSG_RESULT(unknown)
|
|
863 USAGE_ERROR(["XEmacs has not been ported to this host type.
|
|
864 Try explicitly specifying the CONFIGURATION when rerunning configure."])
|
|
865 fi
|
|
866 fi
|
|
867
|
149
|
868 AC_PROG_LN_S
|
|
869
|
|
870 dnl Make symlinks for etc, lisp, and info directories while the path
|
|
871 dnl is still relative. We do not symlink lock because someone may
|
|
872 dnl have stuck the source on a read-only partition. Instead we
|
|
873 dnl create it as an actual directory later on if it does not already
|
|
874 dnl exist.
|
207
|
875 for dir in lisp etc man info; do
|
149
|
876 if test ! -d "$dir" ; then
|
|
877 echo Making symbolic link to "$srcdir/$dir"
|
157
|
878 ${LN_S} "$srcdir/$dir" "$dir"
|
0
|
879 fi
|
|
880 done
|
104
|
881
|
333
|
882 dnl Do our best to deal with automounter brokenness
|
|
883 dnl CANONICALIZE_PATH(varname)
|
|
884 define([CANONICALIZE_PATH],
|
|
885 [if test -d "/net"; then
|
|
886 if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
|
|
887 $1=`echo "[$]$1" | \
|
|
888 sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
|
|
889 fi])dnl
|
|
890
|
181
|
891 dnl Calculate canonical name for blddir (i.e. current directory).
|
|
892 dnl PWD may already be the preferable absolute name for ".",
|
|
893 dnl but we can't trust it - it is sometimes inaccurate.
|
|
894 absolute_pwd="`pwd`";
|
187
|
895 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
|
181
|
896 then blddir="$PWD"
|
333
|
897 else blddir="$absolute_pwd"; CANONICALIZE_PATH(blddir)
|
181
|
898 fi
|
|
899 AC_SUBST(blddir)
|
|
900
|
149
|
901 dnl Make srcdir absolute, if not already. It is important to
|
|
902 dnl avoid running the path through pwd unnecessary, since pwd can
|
|
903 dnl give you automounter prefixes, which can go away.
|
|
904 case "$srcdir" in
|
0
|
905 /* ) ;;
|
181
|
906 . ) srcdir="$blddir" ;;
|
333
|
907 * ) srcdir="`cd $srcdir && pwd`"; CANONICALIZE_PATH(srcdir) ;;
|
0
|
908 esac
|
|
909
|
149
|
910 dnl Check if the source directory already has a configured system in it.
|
|
911 if test `pwd` != `sh -c cd $srcdir && pwd` \
|
|
912 && test -f "$srcdir/src/config.h"; then
|
|
913 (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
|
0
|
914 echo " as a build directory right now; it has been configured in its own"
|
|
915 echo " right. To configure in another directory as well, you MUST"
|
|
916 echo " use GNU make. If you do not have GNU make, then you must"
|
149
|
917 echo " now do \`make distclean' in $srcdir,"
|
|
918 echo " and then run $progname again.") >&2
|
120
|
919 extrasub='/^VPATH[[ ]]*=/c\
|
0
|
920 vpath %.c $(srcdir)\
|
|
921 vpath %.h $(srcdir)\
|
|
922 vpath %.y $(srcdir)\
|
|
923 vpath %.l $(srcdir)\
|
|
924 vpath %.s $(srcdir)\
|
|
925 vpath %.in $(srcdir)'
|
|
926 fi
|
|
927
|
171
|
928 dnl ----------------------------------------
|
|
929 dnl Find out which version of XEmacs this is
|
|
930 dnl ----------------------------------------
|
|
931 . "$srcdir/version.sh" || exit 1;
|
173
|
932 dnl Must do the following first to determine verbosity for AC_DEFINE
|
343
|
933 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
|
173
|
934 : "${extra_verbose=$beta}"
|
171
|
935 version="${emacs_major_version}.${emacs_minor_version}"
|
|
936 AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version)
|
|
937 AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version)
|
343
|
938 if test -n "$emacs_beta_version" ; then
|
|
939 if test "$beta" = "yes"; then
|
|
940 version="${version}-b${emacs_beta_version}"
|
|
941 AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version)
|
|
942 else
|
347
|
943 version="${version}.${emacs_beta_version}"
|
343
|
944 AC_DEFINE_UNQUOTED(EMACS_PATCH_LEVEL, $emacs_beta_version)
|
|
945 fi
|
171
|
946 fi
|
|
947 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
|
|
948 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
|
|
949
|
280
|
950 if test "$with_infodock" = "yes"; then
|
306
|
951 if test ! -f ../../ID-INSTALL; then
|
280
|
952 echo "Cannot build InfoDock without InfoDock sources"
|
|
953 with_infodock=no
|
|
954 fi
|
|
955 fi
|
|
956
|
|
957 if test "$with_infodock" = "yes"; then
|
|
958 dnl InfoDock version numbers. XEmacs will use the same style of numbering
|
|
959 dnl after the release of XEmacs 21.0.
|
|
960 AC_DEFINE_UNQUOTED(INFODOCK_MAJOR_VERSION, $infodock_major_version)
|
|
961 AC_DEFINE_UNQUOTED(INFODOCK_MINOR_VERSION, $infodock_minor_version)
|
|
962 AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version)
|
|
963 version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
|
|
964 PROGNAME=infodock
|
|
965 CPPFLAGS="$CPPFLAGS -DINFODOCK"
|
|
966 else
|
|
967 PROGNAME=xemacs
|
|
968 fi
|
278
|
969
|
171
|
970 dnl ----------------------------------
|
|
971 dnl Error checking and debugging flags
|
|
972 dnl ----------------------------------
|
|
973 dnl Error checking default to "yes" in beta versions, to "no" in releases.
|
|
974 dnl Same goes for --debug and --extra-verbosity.
|
343
|
975 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
|
171
|
976 test "${error_check_extents=$beta}" = yes && AC_DEFINE(ERROR_CHECK_EXTENTS)
|
|
977 test "${error_check_typecheck=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TYPECHECK)
|
|
978 test "${error_check_bufpos=$beta}" = yes && AC_DEFINE(ERROR_CHECK_BUFPOS)
|
|
979 test "${error_check_gc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GC)
|
|
980 test "${error_check_malloc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_MALLOC)
|
|
981 dnl debug=yes must be set when error checking is present. This should be
|
|
982 dnl fixed up.
|
|
983 dnl debug implies other options
|
272
|
984 if test "${debug:=$beta}" = "yes"; then
|
171
|
985 use_assertions=yes memory_usage_stats=yes
|
|
986 XE_ADD_OBJS(debug.o)
|
|
987 AC_DEFINE(DEBUG_XEMACS)
|
|
988 fi
|
|
989 test "$use_assertions" = "yes" && AC_DEFINE(USE_ASSERTIONS)
|
|
990 test "$memory_usage_stats" = "yes" && AC_DEFINE(MEMORY_USAGE_STATS)
|
|
991
|
149
|
992 dnl ------------------------------
|
|
993 dnl Determine the s&m files to use
|
|
994 dnl ------------------------------
|
|
995 dnl Given the configuration name, set machfile and opsysfile to the
|
|
996 dnl names of the m/*.h and s/*.h files we should use.
|
|
997
|
|
998 dnl Canonicalize the configuration name.
|
|
999 AC_CHECKING("the configuration name")
|
217
|
1000 dnl allow -workshop suffix on configuration name
|
|
1001 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
|
149
|
1002 if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else
|
0
|
1003 exit $?
|
|
1004 fi
|
|
1005
|
149
|
1006 dnl If you add support for a new configuration, add code to this
|
|
1007 dnl switch statement to recognize your configuration name and select
|
|
1008 dnl the appropriate operating system and machine description files.
|
|
1009
|
|
1010 dnl You would hope that you could choose an m/*.h file pretty much
|
|
1011 dnl based on the machine portion of the configuration name, and an s-
|
|
1012 dnl file based on the operating system portion. However, it turns out
|
|
1013 dnl that each m/*.h file is pretty manufacturer-specific - for
|
|
1014 dnl example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
|
|
1015 dnl all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
|
|
1016 dnl machines. So we basically have to have a special case for each
|
|
1017 dnl configuration name.
|
|
1018
|
|
1019 dnl As far as handling version numbers on operating systems is
|
|
1020 dnl concerned, make sure things will fail in a fixable way. If
|
|
1021 dnl /etc/MACHINES says nothing about version numbers, be
|
|
1022 dnl prepared to handle anything reasonably. If version numbers
|
|
1023 dnl matter, be sure /etc/MACHINES says something about it.
|
|
1024
|
|
1025 dnl Eric Raymond says we should accept strings like "sysvr4" to mean
|
|
1026 dnl "System V Release 4"; he writes, "The old convention encouraged"
|
|
1027 dnl "confusion between `system' and `release' levels'."
|
|
1028
|
151
|
1029 machine='' opsys=''
|
149
|
1030
|
|
1031 dnl Straightforward machine determination
|
|
1032 case "$canonical" in
|
|
1033 sparc-*-* ) machine=sparc ;;
|
306
|
1034 alpha*-*-* ) machine=alpha ;;
|
149
|
1035 vax-*-* ) machine=vax ;;
|
|
1036 mips-dec-* ) machine=pmax ;;
|
359
|
1037 mips-sgi-irix6* ) machine=iris6d ;;
|
149
|
1038 mips-sgi-* ) machine=iris4d ;;
|
355
|
1039 mips*-linux ) machine=mips ;;
|
149
|
1040 romp-ibm-* ) machine=ibmrt ;;
|
|
1041 rs6000-ibm-aix* ) machine=ibmrs6000 ;;
|
|
1042 powerpc-ibm-aix* ) machine=ibmrs6000 ;;
|
163
|
1043 powerpc*-* ) machine=powerpc ;;
|
149
|
1044 hppa-*-* ) machine=hp800 ;;
|
|
1045 m88k-dg-* ) machine=aviion ;;
|
|
1046 m68*-sony-* ) machine=news ;;
|
|
1047 mips-sony-* ) machine=news-risc ;;
|
|
1048 clipper-* ) machine=clipper ;;
|
|
1049 esac
|
|
1050
|
|
1051 dnl Straightforward OS determination
|
|
1052 case "$canonical" in
|
|
1053 *-*-linux* ) opsys=linux ;;
|
|
1054 *-*-netbsd* ) opsys=netbsd ;;
|
286
|
1055 *-*-openbsd* ) opsys=openbsd ;;
|
149
|
1056 *-*-nextstep* ) opsys=nextstep ;;
|
|
1057 *-*-vms ) opsys=vms ;;
|
|
1058
|
|
1059 dnl DEC OSF
|
|
1060 *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
|
|
1061 *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
|
|
1062 *-dec-osf3.[[2-9]] ) opsys=decosf3-2 ;;
|
|
1063 *-dec-osf3* ) opsys=decosf3-1 ;;
|
|
1064 *-dec-osf4* ) opsys=decosf4-0 ;;
|
|
1065
|
|
1066 dnl DEC Ultrix
|
|
1067 *-*-ultrix[[0-3]].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
|
|
1068 *-*-ultrix4.[[12]]* ) opsys=bsd4-3 ;;
|
|
1069 *-*-ultrix* ) opsys=ultrix4-3 ;;
|
|
1070
|
|
1071 dnl AIX
|
|
1072 *-*-aix3.1* ) opsys=aix3-1 ;;
|
|
1073 *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
|
|
1074 *-*-aix3* ) opsys=aix3-2 ;;
|
316
|
1075 *-*-aix4.0* ) opsys=aix4 ;;
|
149
|
1076 *-*-aix4.1* ) opsys=aix4-1 ;;
|
316
|
1077 *-*-aix4* ) opsys=aix4-2 ;;
|
149
|
1078
|
|
1079 dnl Other generic OSes
|
|
1080 *-gnu* ) opsys=gnu ;;
|
|
1081 *-*-bsd4.[[01]] ) opsys=bsd4-1 ;;
|
|
1082 *-*-bsd4.2 ) opsys=bsd4-2 ;;
|
|
1083 *-*-bsd4.3 ) opsys=bsd4-3 ;;
|
|
1084 *-*-aos4.2 ) opsys=bsd4-2 ;;
|
|
1085 *-*-aos* ) opsys=bsd4-3 ;;
|
|
1086 *-*-sysv0 | *-*-sysvr0 ) opsys=usg5-0 ;;
|
|
1087 *-*-sysv2 | *-*-sysvr2 ) opsys=usg5-2 ;;
|
|
1088 *-*-sysv2.2 | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
|
|
1089 *-*-sysv3* | *-*-sysvr3* ) opsys=usg5-3 ;;
|
|
1090 *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
|
|
1091 *-*-sysv4.[[2-9]]* | *-sysvr4.[[2-9]]* )
|
|
1092 if test -z "$NON_GNU_CPP" ; then
|
151
|
1093 for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
|
|
1094 if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
|
|
1095 done
|
149
|
1096 fi
|
|
1097 opsys=usg5-4-2 ;;
|
|
1098 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
|
|
1099 *-*-mach_bsd4.3* ) opsys=mach-bsd4-3 ;;
|
|
1100 esac
|
|
1101
|
|
1102 case "$canonical" in
|
|
1103
|
|
1104 dnl NetBSD ports
|
0
|
1105 *-*-netbsd* )
|
149
|
1106 case "$canonical" in
|
120
|
1107 i[[3-9]]86-*-netbsd*) machine=intel386 ;;
|
0
|
1108 hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
|
149
|
1109 dnl Yes, this is somewhat bogus.
|
0
|
1110 machine=hp9000s300 ;;
|
70
|
1111 pc532-*-netbsd* | ns32k-*-netbsd* ) machine=ns32000 ;;
|
|
1112 pmax-*-netbsd* | mips-*-netbsd* ) machine=pmax ;;
|
0
|
1113 esac
|
|
1114 ;;
|
|
1115
|
286
|
1116 dnl OpenBSD ports
|
|
1117 *-*-openbsd* )
|
|
1118 case "${canonical}" in
|
|
1119 alpha*-*-openbsd*) machine=alpha ;;
|
|
1120 i386-*-openbsd*) machine=intel386 ;;
|
|
1121 m68k-*-openbsd*) machine=hp9000s300 ;;
|
|
1122 mipsel-*-openbsd*) machine=pmax ;;
|
|
1123 ns32k-*-openbsd*) machine=ns32000 ;;
|
|
1124 sparc-*-openbsd*) machine=sparc ;;
|
|
1125 vax-*-openbsd*) machine=vax ;;
|
|
1126 esac
|
|
1127 ;;
|
|
1128
|
149
|
1129 dnl Acorn RISCiX:
|
70
|
1130 arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
|
|
1131 arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
|
0
|
1132
|
149
|
1133 dnl Alliant machines
|
70
|
1134 fx80-alliant-* ) machine=alliant4 opsys=bsd4-2 ;;
|
|
1135 i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
|
0
|
1136
|
149
|
1137 dnl Altos 3068
|
70
|
1138 m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
|
0
|
1139
|
149
|
1140 dnl Amdahl UTS
|
70
|
1141 580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
|
0
|
1142
|
149
|
1143 dnl Apollo, Domain/OS
|
70
|
1144 m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
|
149
|
1145
|
|
1146 dnl AT&T 3b2, 3b5, 3b15, 3b20
|
70
|
1147 we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
|
0
|
1148
|
149
|
1149 dnl AT&T 3b1 - The Mighty Unix PC!
|
70
|
1150 m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
|
0
|
1151
|
149
|
1152 dnl Bull machines
|
74
|
1153 rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
|
|
1154 m68*-bull-sysv3* ) machine=dpx2 opsys=usg5-3 ;; # dpx2
|
|
1155 m68*-bull-sysv2* ) machine=sps7 opsys=usg5-2 ;; # sps7
|
0
|
1156
|
149
|
1157 dnl CCI 5/32, 6/32 -- see "Tahoe".
|
|
1158
|
|
1159 dnl Celerity
|
70
|
1160 celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
|
0
|
1161
|
149
|
1162 dnl Convex
|
0
|
1163 *-convex-bsd* | *-convex-convexos* )
|
|
1164 machine=convex opsys=bsd4-3
|
|
1165 NON_GNU_CPP="cc -E -P"
|
|
1166 ;;
|
|
1167
|
149
|
1168 dnl Cubix QBx/386
|
120
|
1169 i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
|
0
|
1170
|
149
|
1171 dnl Data General AViiON Machines
|
120
|
1172 i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
|
149
|
1173 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
|
|
1174 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
|
|
1175 m88k-dg-dgux* ) opsys=dgux ;;
|
|
1176
|
|
1177 dnl Motorola Delta machines
|
|
1178 m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
|
0
|
1179 m88k-motorola-sysv4* )
|
149
|
1180 dnl jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
|
|
1181 dnl needs POSIX_SIGNALS and therefore needs usg5-4-2.
|
|
1182 dnl I hope there are not other 4.0 versions for this machine
|
|
1183 dnl which really need usg5-4 instead.
|
0
|
1184 machine=delta88k opsys=usg5-4-2
|
|
1185 ;;
|
70
|
1186 m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
|
0
|
1187
|
149
|
1188 dnl Dual machines
|
70
|
1189 m68*-dual-sysv* ) machine=dual opsys=usg5-2 ;;
|
|
1190 m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
|
0
|
1191
|
149
|
1192 dnl Encore machines
|
70
|
1193 ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
|
0
|
1194
|
149
|
1195 dnl Gould Power Node and NP1
|
70
|
1196 pn-gould-bsd4.2* ) machine=gould opsys=bsd4-2 ;;
|
|
1197 pn-gould-bsd4.3* ) machine=gould opsys=bsd4-3 ;;
|
|
1198 np1-gould-bsd* ) machine=gould-np1 opsys=bsd4-3 ;;
|
0
|
1199
|
149
|
1200 dnl Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
|
|
1201 dnl as far as XEmacs is concerned).
|
0
|
1202 m88k-harris-cxux* )
|
149
|
1203 dnl Build needs to be different on 7.0 and later releases
|
0
|
1204 case "`uname -r`" in
|
120
|
1205 [[56]].[[0-9]] ) machine=nh4000 opsys=cxux ;;
|
|
1206 [[7]].[[0-9]] ) machine=nh4000 opsys=cxux7 ;;
|
0
|
1207 esac
|
|
1208 NON_GNU_CPP="/lib/cpp"
|
|
1209 ;;
|
149
|
1210 dnl Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
|
70
|
1211 m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
|
149
|
1212 dnl Harris power pc NightHawk running Power UNIX (Series 6000)
|
|
1213 powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
|
|
1214
|
|
1215 dnl Honeywell XPS100
|
70
|
1216 xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
|
0
|
1217
|
149
|
1218 dnl HP 9000 series 200 or 300
|
70
|
1219 m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
|
|
1220
|
149
|
1221 dnl HP-UX
|
70
|
1222 *-hp-hpux* )
|
149
|
1223 dnl Figure out machine and opsys orthogonally
|
|
1224 case "$canonical" in
|
70
|
1225 m68* ) machine=hp9000s300 ;;
|
|
1226 hppa* ) machine=hp800 ;;
|
|
1227 esac
|
|
1228
|
149
|
1229 case "$canonical" in
|
|
1230 *-hp-hpux7* ) opsys=hpux ;;
|
|
1231 *-hp-hpux8* ) opsys=hpux8 ;;
|
|
1232 *-hp-hpux9* ) opsys=hpux9 ;;
|
|
1233 *-hp-hpux10* ) opsys=hpux10 ;;
|
269
|
1234 *-hp-hpux11* ) opsys=hpux11 ;;
|
151
|
1235 * ) opsys=hpux ;;
|
0
|
1236 esac
|
74
|
1237
|
149
|
1238 dnl HP has a broken "strcat"
|
151
|
1239 case "$opsys" in hpux9 | hpux10 ) XE_ADD_OBJS(strcat.o) ;; esac
|
149
|
1240
|
269
|
1241 if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
|
|
1242 ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
|
149
|
1243 NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
|
|
1244
|
|
1245 case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
|
0
|
1246 ;;
|
|
1247
|
149
|
1248 dnl Orion machines
|
70
|
1249 orion-orion-bsd* ) machine=orion opsys=bsd4-2 ;;
|
|
1250 clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
|
0
|
1251
|
149
|
1252 dnl IBM machines
|
120
|
1253 i[[3-9]]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
|
|
1254 i[[3-9]]86-ibm-aix1.[[23]]* | i[[3-9]]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
|
70
|
1255 i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
|
149
|
1256 romp-ibm-aos* ) opsys=bsd4-3 ;;
|
|
1257 romp-ibm-bsd* ) opsys=bsd4-3 ;;
|
|
1258 romp-ibm-mach* ) opsys=mach-bsd4-3 ;;
|
|
1259
|
|
1260 dnl Integrated Solutions "Optimum V"
|
70
|
1261 m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
|
|
1262 m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
|
0
|
1263
|
149
|
1264 dnl Intel 386 machines where we do care about the manufacturer
|
120
|
1265 i[[3-9]]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
|
0
|
1266
|
149
|
1267 dnl Prime EXL
|
120
|
1268 i[[3-9]]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
|
0
|
1269
|
149
|
1270 dnl Sequent Symmetry running Dynix
|
120
|
1271 i[[3-9]]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
|
0
|
1272
|
149
|
1273 dnl Sequent Symmetry running DYNIX/ptx
|
|
1274 i[[3-9]]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
|
|
1275
|
|
1276 dnl Unspecified sysv on an ncr machine defaults to svr4.2.
|
|
1277 dnl (Plain usg5-4 does not turn on POSIX signals, which we need.)
|
120
|
1278 i[[3-9]]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
|
0
|
1279
|
149
|
1280 dnl Intel Paragon OSF/1
|
70
|
1281 i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
|
0
|
1282
|
149
|
1283 dnl Intel 860
|
|
1284 i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
|
|
1285
|
|
1286 dnl Masscomp machines
|
70
|
1287 m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
|
0
|
1288
|
149
|
1289 dnl Megatest machines
|
70
|
1290 m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
|
0
|
1291
|
149
|
1292 dnl Workstations sold by MIPS
|
|
1293 dnl This is not necessarily all workstations using the MIPS processor -
|
|
1294 dnl Irises are produced by SGI, and DECstations by DEC.
|
|
1295 mips-mips-usg* ) machine=mips4 ;;
|
70
|
1296 mips-mips-riscos4 )
|
|
1297 machine=mips4
|
0
|
1298 NON_GNU_CC="cc -systype bsd43"
|
|
1299 NON_GNU_CPP="cc -systype bsd43 -E"
|
149
|
1300 case "$canonical" in
|
70
|
1301 mips-mips-riscos4* ) opsys=bsd4-3 ;;
|
|
1302 mips-mips-riscos5* ) opsys=riscos5 ;;
|
|
1303 esac
|
0
|
1304 ;;
|
70
|
1305 mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
|
|
1306 mips-mips-* ) machine=mips opsys=usg5-2-2 ;;
|
0
|
1307
|
149
|
1308 dnl NeXT
|
70
|
1309 m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
|
0
|
1310
|
149
|
1311 dnl The complete machine from National Semiconductor
|
70
|
1312 ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
|
0
|
1313
|
149
|
1314 dnl NCR machines
|
70
|
1315 m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32 opsys=usg5-2-2 ;;
|
|
1316 m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
|
0
|
1317
|
149
|
1318 dnl Nixdorf Targon 31
|
70
|
1319 m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
|
0
|
1320
|
149
|
1321 dnl Nu (TI or LMI)
|
70
|
1322 m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
|
0
|
1323
|
149
|
1324 dnl Plexus
|
70
|
1325 m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
|
0
|
1326
|
149
|
1327 dnl Pyramid machines
|
70
|
1328 pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
|
0
|
1329
|
149
|
1330 dnl Sequent Balance
|
70
|
1331 ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
|
|
1332 ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
|
0
|
1333
|
149
|
1334 dnl Siemens Nixdorf
|
0
|
1335 mips-siemens-sysv* | mips-sni-sysv*)
|
|
1336 machine=mips-siemens opsys=usg5-4
|
|
1337 NON_GNU_CC=/usr/ccs/bin/cc
|
|
1338 NON_GNU_CPP=/usr/ccs/lib/cpp
|
|
1339 ;;
|
|
1340
|
321
|
1341 dnl NEC
|
|
1342 mips-nec-sysv*)
|
|
1343 machine=mips-nec
|
|
1344 NON_GNU_CC=/usr/ccs/bin/cc
|
|
1345 NON_GNU_CPP=/usr/ccs/lib/cpp
|
|
1346 ;;
|
|
1347
|
149
|
1348 dnl Silicon Graphics machines
|
|
1349 dnl Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
|
70
|
1350 m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
|
|
1351 m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
|
149
|
1352 dnl Iris 4D
|
|
1353 mips-sgi-irix3.* ) opsys=irix3-3 ;;
|
|
1354 mips-sgi-irix4.* ) opsys=irix4-0 ;;
|
207
|
1355 mips-sgi-irix6* ) opsys=irix6-0 ;;
|
149
|
1356 mips-sgi-irix5.1* ) opsys=irix5-1 ;;
|
|
1357 mips-sgi-irix5.2* ) opsys=irix5-2 ;;
|
|
1358 mips-sgi-irix5.* ) opsys=irix5-3 ;;
|
|
1359 mips-sgi-irix* ) opsys=irix5-0 ;;
|
|
1360
|
|
1361 dnl SONY machines
|
|
1362 *-sony-newsos[[34]]* | *-sony-news[[34]]* ) opsys=bsd4-3 ;;
|
|
1363 *-sony-news* ) opsys=newsos5 ;;
|
|
1364
|
|
1365 dnl Stride
|
70
|
1366 m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
|
0
|
1367
|
149
|
1368 dnl Suns
|
0
|
1369 *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
|
149
|
1370 dnl Hardware type
|
|
1371 case "$canonical" in
|
0
|
1372 m68*-sunos1* ) machine=sun1 ;;
|
|
1373 m68*-sunos2* ) machine=sun2 ;;
|
|
1374 m68* ) machine=sun3 ;;
|
163
|
1375 i*86*-sun-sunos[[34]]* ) machine=sun386 ;;
|
|
1376 i*86-*-* ) machine=intel386 ;;
|
0
|
1377 rs6000* ) machine=rs6000 ;;
|
149
|
1378 esac
|
|
1379
|
|
1380 dnl Make $canonical even more so.
|
|
1381 case "$canonical" in *-sunos5*)
|
163
|
1382 canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
|
0
|
1383 esac
|
149
|
1384
|
157
|
1385 dnl On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib
|
|
1386 dnl On SunOS 5, use cc -E, need dynodump, RANLIB not needed
|
149
|
1387 dnl But, SunOS 5.6 no longer needs dynodump because it has a similar
|
|
1388 dnl function integrated.
|
|
1389 case "$canonical" in
|
0
|
1390 *-sunos4* )
|
157
|
1391 #test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;;
|
|
1392 : ;;
|
70
|
1393 *-solaris2* )
|
157
|
1394 #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
|
|
1395 RANLIB=':' ;;
|
151
|
1396 esac
|
149
|
1397
|
|
1398 case "$canonical" in
|
163
|
1399 *-solaris* )
|
|
1400 opsys=sol2
|
|
1401 os_release=`uname -r | sed -e 's/^\([[0-9]]\)\.\([[0-9]]\).*/\1\2/'`
|
|
1402 AC_DEFINE_UNQUOTED(OS_RELEASE, $os_release) ;;
|
|
1403
|
149
|
1404 dnl The last Sun386 ran 4.0.
|
163
|
1405 i*86-*-sunos4* ) opsys=sunos4-0 ;;
|
74
|
1406 *-sunos4.0* ) opsys=sunos4-0 ;;
|
|
1407 *-sunos4.1.2* ) opsys=sunos4-1-2 ;;
|
110
|
1408 *-sunos4.1.3* ) opsys=sunos4-1-3 ;;
|
120
|
1409 *-sunos4.1.[[4-9]]* ) opsys=sunos4-1-4 ;;
|
74
|
1410 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
|
|
1411 *-mach* ) opsys=mach-bsd4-3 ;;
|
|
1412 * ) opsys=bsd4-2 ;;
|
0
|
1413 esac
|
70
|
1414
|
149
|
1415 case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
|
|
1416
|
|
1417 dnl Watch out for a compiler guaranteed not to work.
|
163
|
1418 test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
|
0
|
1419 ;;
|
70
|
1420
|
149
|
1421 dnl Tadpole 68k
|
70
|
1422 m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
|
0
|
1423
|
149
|
1424 dnl Tahoe machines
|
70
|
1425 tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
|
|
1426 tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
|
0
|
1427
|
149
|
1428 dnl Tandem Integrity S2
|
70
|
1429 mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
|
0
|
1430
|
149
|
1431 dnl Tektronix XD88
|
70
|
1432 m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
|
0
|
1433
|
149
|
1434 dnl Tektronix 16000 box (6130?)
|
70
|
1435 ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
|
149
|
1436 dnl Tektronix 4300
|
|
1437 dnl src/m/tek4300.h hints that this is a m68k machine.
|
70
|
1438 m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
|
0
|
1439
|
149
|
1440 dnl Titan P2 or P3
|
70
|
1441 titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
|
0
|
1442
|
149
|
1443 dnl Ustation E30 (SS5E)
|
70
|
1444 m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
|
0
|
1445
|
149
|
1446 dnl Vaxen.
|
0
|
1447 vax-dec-* )
|
149
|
1448 case "$canonical" in
|
|
1449 *-sysv[[01]]* | *-sysvr[[01]]* ) opsys=usg5-0 ;;
|
|
1450 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
|
|
1451 *-mach* ) opsys=mach-bsd4-3 ;;
|
0
|
1452 esac
|
|
1453 ;;
|
|
1454
|
149
|
1455 dnl Whitechapel MG1
|
70
|
1456 ns16k-whitechapel-* ) machine=mg1 ;;
|
0
|
1457
|
149
|
1458 dnl Wicat
|
70
|
1459 m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
|
0
|
1460
|
149
|
1461 dnl Intel 386 machines where we do not care about the manufacturer
|
120
|
1462 i[[3-9]]86-*-* )
|
0
|
1463 machine=intel386
|
149
|
1464 case "$canonical" in
|
120
|
1465 *-isc1.* | *-isc2.[[01]]* ) opsys=386-ix ;;
|
0
|
1466 *-isc2.2* ) opsys=isc2-2 ;;
|
|
1467 *-isc4.0* ) opsys=isc4-0 ;;
|
|
1468 *-isc4.* ) opsys=isc4-1
|
|
1469 GCC_TEST_OPTIONS=-posix
|
|
1470 NON_GCC_TEST_OPTIONS=-Xp
|
|
1471 ;;
|
|
1472 *-isc* ) opsys=isc3-0 ;;
|
149
|
1473 *-esix5* ) opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
|
0
|
1474 *-esix* ) opsys=esix ;;
|
|
1475 *-mach* ) opsys=mach-bsd4-3 ;;
|
|
1476 *-xenix* ) opsys=xenix ;;
|
149
|
1477 *-sco3.2v4* ) opsys=sco4 NON_GNU_CPP=/lib/cpp ;;
|
0
|
1478 *-bsd386* | *-bsdi1* ) opsys=bsd386 ;;
|
333
|
1479 *-bsdi4* ) opsys=bsdos4 ;;
|
110
|
1480 *-bsdi3* ) opsys=bsdos3 ;;
|
0
|
1481 *-bsdi2.1* ) opsys=bsdos2-1 ;;
|
|
1482 *-bsdi2* ) opsys=bsdos2 ;;
|
149
|
1483 *-sco3.2v5* ) opsys=sco5 ;
|
|
1484 dnl This is a pain. Like the current USL cc, SCO cc -E
|
|
1485 dnl tokenizes as it preprocesses, making configure very
|
|
1486 dnl unhappy. Unfortunately, /lib/cpp does not understand
|
|
1487 dnl flags like "-b elf", so we have to cheat in order to
|
|
1488 dnl pick up the right defines for UNEXEC from the s-file.
|
|
1489 dnl 01/05/95 robertl@dgii.com
|
|
1490 if test "$dynamic" = "yes" ; then
|
70
|
1491 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF" ;
|
|
1492 else
|
|
1493 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE" ;
|
|
1494 fi ;;
|
353
|
1495 *-sysv5* ) opsys=sco7 ;;
|
70
|
1496 *-386bsd* ) opsys=386bsd ;;
|
|
1497 *-freebsd* ) opsys=freebsd ;;
|
0
|
1498 *-nextstep* ) opsys=nextstep ;;
|
231
|
1499 *-pc-cygwin32 ) opsys=cygwin32 ;;
|
149
|
1500 dnl Otherwise, we fall through to the generic opsys code at the bottom.
|
0
|
1501 esac
|
|
1502 ;;
|
|
1503
|
149
|
1504 dnl Linux/68k
|
70
|
1505 m68k-*-linux* ) machine=m68k opsys=linux ;;
|
|
1506
|
321
|
1507 dnl Linux/arm
|
|
1508 arm-*-linux* ) machine=arm opsys=linux ;;
|
|
1509
|
0
|
1510 esac
|
|
1511
|
149
|
1512 if test -z "$machine" -o -z "$opsys"; then
|
|
1513 (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
|
|
1514 echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
|
0
|
1515 ) >&2
|
|
1516 exit 1
|
|
1517 fi
|
|
1518
|
173
|
1519 if test -z "$dynamic"; then
|
|
1520 case "$opsys" in
|
|
1521 hpux* | sunos4* | sco5 ) dynamic=no ;;
|
|
1522 *) dynamic=yes ;;
|
|
1523 esac
|
|
1524 fi
|
|
1525 if test "$dynamic" = "yes"; then
|
149
|
1526 case "$opsys" in
|
74
|
1527 hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
|
173
|
1528 decosf* ) ld_call_shared="-call_shared" ;;
|
0
|
1529 esac
|
173
|
1530 else dnl "$dynamic" = "no"
|
149
|
1531 case "$opsys" in
|
187
|
1532 sol2 )
|
173
|
1533 echo "Static linking is not supported on Solaris 2."
|
|
1534 echo "Rerun configure without specifying --dynamic=no."
|
|
1535 exit 1 ;;
|
|
1536 linux ) ld_call_shared="-Bstatic" ;;
|
|
1537 decosf* ) ld_call_shared="-non_shared" ;;
|
0
|
1538 esac
|
|
1539 fi
|
|
1540
|
207
|
1541 dnl Use xlc by default on AIX
|
|
1542 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
|
|
1543
|
280
|
1544 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
|
177
|
1545 AC_DEFINE_UNQUOTED(STACK_TRACE_EYE_CATCHER, $stack_trace_eye_catcher)
|
173
|
1546
|
0
|
1547 machfile="m/${machine}.h"
|
|
1548 opsysfile="s/${opsys}.h"
|
|
1549
|
149
|
1550 dnl --------------------------------------------------
|
|
1551 dnl Determine the compiler, set up for feature testing
|
|
1552 dnl --------------------------------------------------
|
|
1553
|
151
|
1554 dnl Sun Development environment support
|
|
1555 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
|
284
|
1556 XE_CHECK_FEATURE_DEPENDENCY(workshop, tooltalk)
|
151
|
1557 if test "$with_workshop" = "yes"; then
|
|
1558 AC_DEFINE(SUNPRO)
|
|
1559 XE_ADD_OBJS(sunpro.o)
|
|
1560 fi
|
|
1561
|
175
|
1562 if test "$with_clash_detection" = "yes"; then
|
|
1563 AC_DEFINE(CLASH_DETECTION)
|
|
1564 XE_ADD_OBJS(filelock.o)
|
|
1565 fi
|
|
1566
|
169
|
1567 dnl Choose a compiler from (in order)
|
|
1568 dnl --compiler, env var CC, with_gcc=no && ${NON_GNU_CC:-cc}, AC_PROG_CC
|
|
1569 test -n "$compiler" && CC="$compiler"
|
|
1570 if test "$with_gcc" = "no"; then dnl Try to find a non-gcc compiler
|
|
1571 case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
|
|
1572 fi
|
149
|
1573
|
157
|
1574 dnl If we don't set CFLAGS here, AC_PROG_CC will set it.
|
|
1575 dnl But we know better what's good for us, so we do our own
|
|
1576 dnl computation of real CFLAGS later.
|
272
|
1577 dnl --cflags overrides environment variable CFLAGS
|
|
1578 test "${cflags-unset}" != unset && CFLAGS="$cflags"
|
|
1579 if test "${CFLAGS-unset}" != unset
|
|
1580 then cflags_specified=yes;
|
|
1581 else cflags_specified=no;
|
|
1582 fi
|
|
1583
|
157
|
1584 xe_save_CFLAGS="$CFLAGS"
|
|
1585
|
169
|
1586 AC_PROG_CC dnl Autoconf has its own magic for compiler autodetection
|
|
1587
|
|
1588 dnl Retry using random guesswork if AC_PROG_CC got it wrong...
|
|
1589 if test "$with_gcc" = "no" -a "$GCC" = "yes"; then
|
149
|
1590 CC=${NON_GNU_CC-cc}
|
|
1591 AC_PROG_CC
|
169
|
1592 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
|
149
|
1593 CC=gcc
|
|
1594 AC_PROG_CC
|
0
|
1595 fi
|
157
|
1596 CFLAGS="$xe_save_CFLAGS"
|
149
|
1597
|
171
|
1598 dnl Figure out what C preprocessor to use.
|
|
1599
|
|
1600 dnl On Sun systems, people sometimes set up the variable CPP
|
|
1601 dnl with a value that is a directory, not an executable at all.
|
|
1602 dnl Detect that case, and ignore that value.
|
|
1603 test -n "$CPP" -a -d "$CPP" && CPP=
|
|
1604
|
169
|
1605 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
|
149
|
1606
|
|
1607 AC_PROG_CPP
|
|
1608
|
157
|
1609 AC_AIX
|
|
1610
|
243
|
1611 AC_MSG_CHECKING(for GNU libc)
|
|
1612 AC_TRY_COMPILE([#include <features.h>],[
|
|
1613 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
|
|
1614 #error Not a GNU libc system :-(
|
|
1615 ******* ======= ******** &&&&&&&&
|
|
1616 #endif
|
|
1617 ], have_glibc=yes, have_glibc=no)
|
|
1618 AC_MSG_RESULT($have_glibc)
|
265
|
1619 dnl I'm tired of pop being broken with GLIBC -slb
|
272
|
1620 dnl Well. then why not fix fucking pop?
|
|
1621 test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE)
|
243
|
1622
|
306
|
1623
|
|
1624 dnl Identify compilers to enable compiler-specific hacks.
|
|
1625 dnl Add support for other compilers HERE!
|
|
1626 dnl GCC is already identified elsewhere.
|
|
1627 AC_TRY_RUN([int main () {
|
|
1628 #if defined __SUNPRO_C
|
|
1629 return 11;
|
|
1630 #elif defined __DECC
|
|
1631 return 12;
|
|
1632 #else
|
|
1633 return 0;
|
157
|
1634 #endif
|
306
|
1635 }], [],
|
|
1636 [case "$conftest_rc" in
|
|
1637 11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
|
|
1638 12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;;
|
|
1639 esac])
|
|
1640
|
157
|
1641
|
|
1642 dnl case "$canonical" in
|
|
1643 dnl *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;;
|
|
1644 dnl esac
|
149
|
1645
|
|
1646 dnl --------------------------------------------------------------------
|
|
1647 dnl Extract some information from the operating system and machine files
|
|
1648 dnl --------------------------------------------------------------------
|
|
1649
|
|
1650 echo "Extracting information from the machine- and system-dependent headers..."
|
|
1651
|
|
1652 dnl It is not important that this name contain the PID; you cannot run
|
|
1653 dnl two configures in the same directory and have anything work
|
|
1654 dnl anyway.
|
|
1655 tempcname="conftest.c"
|
|
1656
|
|
1657 dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE)
|
|
1658 define([CPP_to_sh],
|
|
1659 [[#]ifndef [$1]
|
157
|
1660 [#]define [$1]ifelse([$3],,, [ "$3"])
|
149
|
1661 [#]endif
|
|
1662 configure___ [$2]=[$1]
|
284
|
1663 ])dnl CPP_to_sh
|
149
|
1664
|
|
1665 dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR)
|
|
1666 define([CPP_boolean_to_sh],
|
|
1667 [[#]ifdef [$1]
|
|
1668 configure___ [$2]=yes
|
|
1669 [#]else
|
|
1670 configure___ [$2]=no
|
|
1671 [#]endif
|
284
|
1672 ])dnl CPP_boolean_to_sh
|
|
1673
|
|
1674 cat > $tempcname <<EOF
|
149
|
1675 #define NOT_C_CODE
|
|
1676 #define C_SWITCH_SITE
|
|
1677 #define C_SWITCH_X_SITE
|
|
1678 #define LD_SWITCH_SITE
|
|
1679 #define LD_SWITCH_X_SITE
|
|
1680 #define LD_SWITCH_X_SITE_AUX
|
284
|
1681 #define OS_RELEASE $os_release
|
|
1682 #include "$srcdir/src/$opsysfile"
|
|
1683 #include "$srcdir/src/$machfile"
|
149
|
1684
|
|
1685 CPP_to_sh(LIBS_MACHINE, libs_machine)
|
|
1686 CPP_to_sh(LIBS_SYSTEM, libs_system)
|
|
1687 CPP_to_sh(LIBS_TERMCAP, libs_termcap)
|
|
1688 CPP_to_sh(LIB_STANDARD, libs_standard)
|
157
|
1689
|
163
|
1690 CPP_to_sh(OBJECTS_MACHINE, objects_machine)
|
|
1691 CPP_to_sh(OBJECTS_SYSTEM, objects_system)
|
|
1692
|
149
|
1693 CPP_to_sh(C_SWITCH_MACHINE, c_switch_machine)
|
157
|
1694 CPP_to_sh(C_SWITCH_SYSTEM, c_switch_system)
|
|
1695
|
|
1696 CPP_to_sh(LD_SWITCH_MACHINE, ld_switch_machine)
|
|
1697 CPP_to_sh(LD_SWITCH_SYSTEM, ld_switch_system)
|
|
1698
|
149
|
1699 CPP_to_sh(UNEXEC, unexec, unexec.o)
|
|
1700
|
163
|
1701 CPP_to_sh(LD_SWITCH_SHARED, ld_switch_shared, -c)
|
|
1702
|
|
1703 #ifdef ORDINARY_LINK
|
284
|
1704 #define LD "\$(CC) \$(CFLAGS)"
|
163
|
1705 #else /* no ORDINARY LINK */
|
|
1706 #ifdef COFF_ENCAPSULATE
|
284
|
1707 #define LD "\$(CC) -nostdlib"
|
163
|
1708 #else /* not COFF_ENCAPSULATE */
|
|
1709 #ifdef LINKER
|
|
1710 #define LD LINKER
|
|
1711 #else /* ! defined (LINKER) */
|
|
1712 #define LD "ld"
|
|
1713 #endif /* ! defined (LINKER) */
|
|
1714 #endif /* ! defined (COFF_ENCAPSULATE) */
|
|
1715 #endif /* not ORDINARY_LINK */
|
|
1716 configure___ ld=LD
|
|
1717
|
|
1718 CPP_to_sh(LIB_GCC, lib_gcc)
|
|
1719 CPP_to_sh(LD_TEXT_START_ADDR, ld_text_start_addr)
|
|
1720
|
|
1721 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
|
|
1722 #ifdef NO_REMAP
|
|
1723 #ifdef COFF_ENCAPSULATE
|
|
1724 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
|
|
1725 #else /* ! defined (COFF_ENCAPSULATE) */
|
|
1726 #define START_FILES "pre-crt0.o /lib/crt0.o"
|
|
1727 #endif /* ! defined (COFF_ENCAPSULATE) */
|
|
1728 #else /* ! defined (NO_REMAP) */
|
|
1729 #define START_FILES "ecrt0.o"
|
|
1730 #endif /* ! defined (NO_REMAP) */
|
|
1731 #endif /* no ORDINARY_LINK */
|
|
1732 #ifndef START_FILES
|
|
1733 #define START_FILES
|
|
1734 #endif
|
|
1735 configure___ start_files=START_FILES
|
|
1736
|
153
|
1737 CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link)
|
149
|
1738 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc)
|
|
1739 CPP_boolean_to_sh(TERMINFO, have_terminfo)
|
|
1740 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock)
|
|
1741 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf)
|
284
|
1742 EOF
|
|
1743
|
149
|
1744 dnl The value of CPP is a quoted variable reference, so we need to do this
|
|
1745 dnl to get its actual value...
|
|
1746 CPP=`eval "echo $CPP"`
|
165
|
1747 define(TAB, [ ])dnl
|
|
1748 changequote(, )dnl
|
149
|
1749 eval `$CPP -Isrc $tempcname \
|
165
|
1750 | sed -n -e "s/[ TAB]*=[ TAB\"]*/='/" -e "s/[ TAB\"]*\$/'/" -e "s/^configure___//p"`
|
|
1751 changequote([, ])dnl
|
153
|
1752
|
149
|
1753 rm $tempcname
|
|
1754
|
163
|
1755 dnl For debugging...
|
|
1756 test "$extra_verbose" = "yes" && \
|
|
1757 PRINT_VAR(libs_machine libs_system libs_termcap libs_standard
|
|
1758 objects_machine objects_system c_switch_machine c_switch_system
|
201
|
1759 ld_switch_machine ld_switch_system unexec ld_switch_shared
|
163
|
1760 ld lib_gcc ld_text_start_addr start_files ordinary_link
|
|
1761 have_terminfo mail_use_flock mail_use_lockf) && echo ""
|
|
1762
|
153
|
1763 dnl Non-ordinary link usually requires -lc
|
|
1764 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
|
|
1765
|
306
|
1766 dnl Compiler-specific hacks
|
|
1767 dnl DEC C requires -std
|
|
1768 test "$__DECC" = "yes" && XE_APPEND(-std, c_switch_site)
|
|
1769
|
157
|
1770 dnl Calculalate value of CFLAGS:
|
|
1771 dnl Use either command line flag, environment var, or autodetection
|
272
|
1772 if test "$cflags_specified" = "no"; then
|
157
|
1773 dnl Following values of CFLAGS are known to work well.
|
|
1774 dnl Should we take debugging options into consideration?
|
|
1775 if test "$GCC" = "yes"; then
|
286
|
1776 CFLAGS="-g -O3 -Wall -Wno-switch"
|
223
|
1777 dnl I'm not convinced this is a good idea any more. -sb
|
|
1778 dnl test "$opsys $machine" = "linux intel386" && \
|
288
|
1779 dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
|
|
1780 dnl cygwin can't cope with -O3
|
|
1781 test "$opsys $machine" = "cygwin32 intel386" && \
|
|
1782 CFLAGS="-g -O2 -Wall -Wno-switch"
|
306
|
1783 elif test "$__SUNPRO_C" = "yes"; then
|
157
|
1784 case "$opsys" in
|
163
|
1785 sol2 ) CFLAGS="-v -xO4" ;;
|
|
1786 sunos4* ) CFLAGS="-xO2";;
|
157
|
1787 esac
|
306
|
1788 elif test "$__DECC" = "yes"; then
|
|
1789 CFLAGS="-O3"
|
207
|
1790 elif test "$CC" = "xlc"; then
|
316
|
1791 CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
|
306
|
1792 dnl ### Add optimal CFLAGS support for other compilers HERE!
|
157
|
1793 else
|
207
|
1794 CFLAGS="-O" ;dnl The only POSIX-approved flag
|
157
|
1795 fi
|
|
1796 fi
|
151
|
1797
|
272
|
1798 dnl Inform compiler that certain flags are meant for the linker
|
|
1799 dnl XE_PROTECT_LINKER_FLAGS(shell_var)
|
|
1800 define([XE_PROTECT_LINKER_FLAGS], [
|
163
|
1801 if test "$GCC" = "yes"; then
|
272
|
1802 set x $[$1]; shift; [$1]=""
|
|
1803 while test -n "[$]1"; do
|
|
1804 case [$]1 in
|
|
1805 -L | -l | -u ) [$1]="$[$1] [$]1 [$]2"; shift ;;
|
|
1806 -L* | -l* | -u* | -Wl* ) [$1]="$[$1] [$]1" ;;
|
163
|
1807 -Xlinker* ) ;;
|
272
|
1808 * ) [$1]="$[$1] -Xlinker [$]1" ;;
|
163
|
1809 esac
|
272
|
1810 shift
|
|
1811 done
|
|
1812 fi])dnl
|
|
1813 XE_PROTECT_LINKER_FLAGS(ld_switch_system)
|
|
1814 XE_PROTECT_LINKER_FLAGS(ld_switch_machine)
|
|
1815 XE_PROTECT_LINKER_FLAGS(LDFLAGS)
|
|
1816 XE_PROTECT_LINKER_FLAGS(ld_call_shared)
|
163
|
1817
|
|
1818 dnl Add s&m-determined objects (including unexec) to link line
|
|
1819 test -n "$objects_machine" && XE_ADD_OBJS($objects_machine)
|
|
1820 test -n "$objects_system" && XE_ADD_OBJS($objects_system)
|
|
1821 test -n "$unexec" && XE_ADD_OBJS($unexec)
|
|
1822
|
|
1823 dnl Dynodump (Solaris 2.x, x<6)
|
|
1824 AC_MSG_CHECKING(for dynodump)
|
|
1825 if test "$unexec" != "unexsol2.o"; then
|
|
1826 AC_MSG_RESULT(no)
|
|
1827 else
|
|
1828 AC_MSG_RESULT(yes)
|
|
1829 AC_DEFINE(DYNODUMP)
|
|
1830 XE_APPEND(dynodump, MAKE_SUBDIR)
|
175
|
1831 XE_APPEND(dynodump, SRC_SUBDIR_DEPS)
|
163
|
1832 case "$machine" in
|
|
1833 sparc ) dynodump_arch=sparc ;;
|
|
1834 *86* ) dynodump_arch=i386 ;;
|
|
1835 powerpc ) dynodump_arch=ppc ;;
|
|
1836 esac
|
|
1837 dnl Dynodump requires the system linker
|
|
1838 test "$GCC" = "yes" && XE_APPEND(-fno-gnu-linker, ld_switch_site)
|
|
1839 fi
|
|
1840
|
|
1841 dnl Feed s&m crud to src/Makefile
|
207
|
1842
|
272
|
1843 dnl Linux/powerpc needs the following magic for some reason
|
274
|
1844 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
|
272
|
1845
|
207
|
1846 if test "$unexec" = "unexaix.o"; then
|
|
1847 dnl AIX needs various hacks to make static linking work.
|
219
|
1848 if test "$dynamic" = "no"; then
|
207
|
1849 start_flags="-Wl,-bnso,-bnodelcsect"
|
209
|
1850 test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
|
272
|
1851 for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
|
207
|
1852 if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
|
|
1853 done
|
|
1854 for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
|
|
1855 if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
|
|
1856 done
|
294
|
1857 AC_CHECK_LIB(C, terminateAndUnload, XE_APPEND(-lC, libs_system))
|
219
|
1858 fi
|
207
|
1859 elif test -n "$ld_text_start_addr"; then
|
|
1860 start_flags="-T $ld_text_start_addr -e __start"
|
|
1861 fi
|
|
1862 AC_SUBST(start_flags)
|
|
1863
|
163
|
1864 AC_SUBST(ld_switch_shared)
|
|
1865 AC_SUBST(start_files)
|
|
1866 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
|
|
1867 test -z "$linker" && linker='$(CC) -nostdlib'
|
175
|
1868 test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
|
163
|
1869 fi
|
|
1870 test "$GCC" != "yes" && lib_gcc=
|
|
1871 AC_SUBST(ld)
|
|
1872 AC_SUBST(lib_gcc)
|
151
|
1873
|
|
1874 dnl ---------------------------------------------------------------
|
|
1875 dnl Add site and system specific flags to compile and link commands
|
|
1876 dnl ---------------------------------------------------------------
|
|
1877
|
209
|
1878 dnl All dirs present in site-prefixes will be searched for include/ and lib/
|
|
1879 dnl subdirs. This can avoid specifying both site-includes and site-libraries.
|
|
1880 dnl Those dirs will take precedence over the standard places, but not over
|
|
1881 dnl site-includes and site-libraries.
|
|
1882
|
|
1883 dnl --site-prefixes (multiple dirs)
|
|
1884 if test -n "$site_prefixes"; then
|
|
1885 for arg in $site_prefixes; do
|
272
|
1886 case "$arg" in
|
|
1887 -* ) ;;
|
|
1888 * ) argi="-I${arg}/include" ; argl="-L${arg}/lib" ;;
|
209
|
1889 esac
|
|
1890 XE_APPEND($argi, c_switch_site)
|
|
1891 XE_APPEND($argl, ld_switch_site)
|
|
1892 done
|
|
1893 fi
|
|
1894
|
151
|
1895 dnl --site-libraries (multiple dirs)
|
|
1896 if test -n "$site_libraries"; then
|
|
1897 for arg in $site_libraries; do
|
|
1898 case "$arg" in -* ) ;; * ) arg="-L${arg}" ;; esac
|
|
1899 XE_APPEND($arg, ld_switch_site)
|
|
1900 done
|
|
1901 fi
|
|
1902
|
|
1903 dnl --site-includes (multiple dirs)
|
272
|
1904 if test -n "$site_includes"; then
|
151
|
1905 for arg in $site_includes; do
|
|
1906 case "$arg" in -* ) ;; * ) arg="-I${arg}" ;; esac
|
|
1907 XE_APPEND($arg, c_switch_site)
|
|
1908 done
|
|
1909 fi
|
|
1910
|
157
|
1911 dnl GNU software installs by default into /usr/local/{include,lib}
|
163
|
1912 dnl if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
|
|
1913 dnl XE_APPEND("-L/usr/local/lib", ld_switch_site)
|
|
1914 dnl XE_APPEND("-I/usr/local/include", c_switch_site)
|
|
1915 dnl fi
|
157
|
1916
|
151
|
1917 dnl Extra system-specific library directories - please add to list
|
|
1918 for dir in "/usr/ccs/lib"; do
|
|
1919 test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site)
|
|
1920 done
|
|
1921
|
|
1922 dnl --site-runtime-libraries (multiple dirs)
|
272
|
1923 if test -n "$site_runtime_libraries"; then
|
165
|
1924 LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/ */:/g'`"
|
151
|
1925 export LD_RUN_PATH
|
|
1926 fi
|
|
1927
|
|
1928 dnl -------------------------------------
|
|
1929 dnl Compute runtime library path
|
|
1930 dnl -------------------------------------
|
|
1931
|
|
1932 if test "$dynamic" = "no"; then add_runtime_path=no
|
|
1933 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
|
163
|
1934 else case "$opsys" in
|
306
|
1935 sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
|
151
|
1936 * ) add_runtime_path=no ;;
|
|
1937 esac
|
0
|
1938 fi
|
|
1939
|
151
|
1940 if test "$add_runtime_path" = "yes"; then
|
|
1941 dnl Try to autodetect runtime library flag (usually -R),
|
|
1942 dnl and whether it works (or at least does no harm)
|
|
1943 AC_MSG_CHECKING("for runtime libraries flag")
|
306
|
1944 case "$opsys" in
|
|
1945 sol2 ) dash_r="-R" ;;
|
333
|
1946 decosf* | linux* | irix*) dash_r="-rpath " ;;
|
306
|
1947 *)
|
|
1948 dash_r=""
|
|
1949 for try_dash_r in "-R" "-R " "-rpath "; do
|
|
1950 xe_check_libs="${try_dash_r}/no/such/file-or-directory"
|
|
1951 XE_PROTECT_LINKER_FLAGS(xe_check_libs)
|
|
1952 AC_TRY_LINK(, , dash_r="$try_dash_r")
|
|
1953 xe_check_libs=""
|
|
1954 test -n "$dash_r" && break
|
|
1955 done ;;
|
|
1956 esac
|
151
|
1957 if test -n "$dash_r";
|
|
1958 then AC_MSG_RESULT("\"${dash_r}\"")
|
|
1959 else AC_MSG_RESULT(NONE)
|
|
1960 fi
|
|
1961 fi
|
|
1962
|
163
|
1963 xe_add_unique_runpath_dir='
|
|
1964 xe_add_p=yes
|
|
1965 for xe_dir in $runpath_dirs; do dnl Uniquify
|
|
1966 test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
|
|
1967 done
|
|
1968 if test "$xe_add_p" = "yes"; then
|
|
1969 test -n "$runpath" && runpath="${runpath}:"
|
|
1970 runpath="${runpath}${xe_runpath_dir}"
|
|
1971 runpath_dirs="$runpath_dirs $xe_runpath_dir"
|
|
1972 fi'
|
|
1973
|
|
1974
|
155
|
1975 dnl XE_ADD_RUNPATH_DIR(directory)
|
163
|
1976 define([XE_ADD_RUNPATH_DIR],[{
|
155
|
1977 xe_runpath_dir=$1
|
163
|
1978 dnl PRINT_VAR(ld_switch_site ld_switch_x_site runpath xe_runpath_dir LD_RUN_PATH xe_ldflags)
|
333
|
1979 dnl Many systems have *.so, HP-UX has *.sl, Freebsd 2.2.5 only has *.so.nn
|
163
|
1980 test "$xe_runpath_dir" != "/lib" -a \
|
155
|
1981 "$xe_runpath_dir" != "/usr/lib" -a \
|
333
|
1982 -n "`ls ${xe_runpath_dir}/*.s[[ol]] ${xe_runpath_dir}/*.so.* 2>/dev/null`" && \
|
163
|
1983 eval "$xe_add_unique_runpath_dir"
|
|
1984 }])dnl
|
155
|
1985
|
|
1986 dnl XE_COMPUTE_RUNPATH()
|
151
|
1987 define([XE_COMPUTE_RUNPATH],[
|
|
1988 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
|
|
1989 dnl Remove runtime paths from current ld switches
|
165
|
1990 ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"`
|
|
1991 ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"`
|
163
|
1992 dnl PRINT_VAR(ld_switch_site ld_switch_x_site)
|
151
|
1993
|
|
1994 dnl Fix up Runtime path
|
|
1995 dnl If LD_RUN_PATH is set in environment, use that.
|
|
1996 dnl In this case, assume user has set the right value.
|
163
|
1997 runpath="" runpath_dirs=""
|
151
|
1998 if test -n "$LD_RUN_PATH"; then
|
|
1999 runpath="$LD_RUN_PATH"
|
155
|
2000 elif test "$GCC" = "yes"; then
|
|
2001 dnl Compute runpath from gcc's -v output
|
163
|
2002 ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
|
155
|
2003 echo "int main(int argc, char *argv[[]]) {return 0;}" > conftest.c
|
|
2004 xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
|
|
2005 for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
|
|
2006 case "$arg" in P,* | -L* | -R* )
|
159
|
2007 for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
|
155
|
2008 XE_ADD_RUNPATH_DIR("$dir")
|
|
2009 done ;;
|
|
2010 esac
|
|
2011 done
|
163
|
2012 ld_switch_run="$ld_switch_run_save"
|
155
|
2013 rm -f conftest*
|
151
|
2014 else
|
|
2015 dnl Add all directories with .so files to runpath
|
|
2016 for arg in $ld_switch_site $ld_switch_x_site; do
|
159
|
2017 case "$arg" in -L*) XE_ADD_RUNPATH_DIR(`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`);; esac
|
151
|
2018 done
|
|
2019 dnl Sometimes /opt/SUNWdt/lib is the only installed Motif available
|
163
|
2020 if test "$opsys $need_motif" = "sol2 yes"; then
|
|
2021 xe_runpath_dir="/opt/SUNWdt/lib";
|
|
2022 eval "$xe_add_unique_runpath_dir";
|
|
2023 fi
|
155
|
2024 fi dnl Compute $runpath
|
151
|
2025
|
|
2026 if test -n "$runpath"; then
|
|
2027 ld_switch_run="${dash_r}${runpath}"
|
272
|
2028 XE_PROTECT_LINKER_FLAGS(ld_switch_run)
|
151
|
2029 test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
|
|
2030 fi
|
|
2031 fi
|
|
2032 ])dnl
|
|
2033 XE_COMPUTE_RUNPATH()
|
|
2034
|
|
2035 dnl -----------------------------------
|
|
2036 dnl Do some misc autoconf-special tests
|
|
2037 dnl -----------------------------------
|
149
|
2038
|
|
2039 dnl Do the opsystem or machine files prohibit the use of the GNU malloc?
|
|
2040 dnl Assume not, until told otherwise.
|
|
2041 GNU_MALLOC=yes
|
261
|
2042 if test "$with_dlmalloc" != "no"; then
|
|
2043 doug_lea_malloc=yes
|
|
2044 else
|
|
2045 doug_lea_malloc=no
|
|
2046 fi
|
259
|
2047 after_morecore_hook_exists=yes
|
255
|
2048 AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no)
|
|
2049 AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
|
|
2050 AC_MSG_CHECKING(whether __after_morecore_hook exists)
|
|
2051 AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0],
|
|
2052 [AC_MSG_RESULT(yes)],
|
|
2053 [AC_MSG_RESULT(no)
|
259
|
2054 after_morecore_hook_exists=no])
|
149
|
2055 if test "$system_malloc" = "yes" ; then
|
|
2056 GNU_MALLOC=no
|
|
2057 GNU_MALLOC_reason="
|
177
|
2058 (The GNU allocators don't work with this system configuration)."
|
181
|
2059 elif test "$with_system_malloc" = "yes" ; then
|
149
|
2060 GNU_MALLOC=no
|
|
2061 GNU_MALLOC_reason="
|
177
|
2062 (User chose not to use GNU allocators)."
|
181
|
2063 elif test "$with_debug_malloc" = "yes" ; then
|
177
|
2064 GNU_MALLOC=no
|
|
2065 GNU_MALLOC_reason="
|
|
2066 (User chose to use Debugging Malloc)."
|
149
|
2067 fi
|
|
2068
|
255
|
2069 if test "$doug_lea_malloc" = "yes" ; then
|
|
2070 if test "$GNU_MALLOC" = yes ; then
|
|
2071 GNU_MALLOC_reason="
|
259
|
2072 (Using Doug Lea's new malloc from the GNU C Library.)"
|
255
|
2073 fi
|
|
2074 AC_DEFINE(DOUG_LEA_MALLOC)
|
259
|
2075 if test "$after_morecore_hook_exists" = "no" ; then
|
|
2076 GNU_MALLOC_reason="
|
|
2077 (Using Doug Lea's new malloc from the Linux C Library.)"
|
|
2078 AC_DEFINE(_NO_MALLOC_WARNING_)
|
|
2079 fi
|
272
|
2080 use_minimal_tagbits=yes
|
255
|
2081 fi
|
|
2082
|
267
|
2083 dnl #### mcheck is broken in all versions of Linux libc and glibc.
|
|
2084 dnl Try this again when 2.1 hits the streets.
|
|
2085 dnl Avoid using free-hook.c if support exists for malloc debugging in libc
|
|
2086 dnl have_libmcheck=no
|
|
2087 dnl if test "$error_check_malloc" = "yes" -a \
|
|
2088 dnl "$have_glibc" = "yes" -a \
|
|
2089 dnl "$doug_lea_malloc" = "yes"; then
|
|
2090 dnl AC_CHECK_HEADERS(mcheck.h)
|
|
2091 dnl AC_CHECK_LIB(mcheck, mcheck, have_libmcheck=yes, have_libmcheck=no)
|
|
2092 dnl fi
|
|
2093
|
|
2094 dnl if test "$have_libmcheck" = "yes"; then
|
|
2095 dnl AC_DEFINE(HAVE_LIBMCHECK)
|
|
2096 dnl libmcheck=-lmcheck
|
|
2097 dnl AC_SUBST(libmcheck)
|
|
2098 dnl fi
|
|
2099
|
149
|
2100 dnl Some other nice autoconf tests. If you add a test here which
|
|
2101 dnl should make an entry in src/config.h, do not forget to add an
|
|
2102 dnl #undef clause to src/config.h.in for autoconf to modify.
|
120
|
2103
|
0
|
2104 AC_PROG_RANLIB
|
|
2105 AC_PROG_INSTALL
|
|
2106 AC_PROG_YACC
|
|
2107
|
|
2108 dnl checks for header files
|
149
|
2109 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h)
|
321
|
2110 AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h)
|
251
|
2111 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h)
|
155
|
2112 AC_HEADER_SYS_WAIT
|
149
|
2113 AC_HEADER_STDC
|
|
2114 AC_HEADER_TIME
|
|
2115 AC_DECL_SYS_SIGLIST
|
|
2116
|
|
2117 dnl Some systems have utime.h but do not declare the struct anyplace.
|
|
2118 AC_MSG_CHECKING(for struct utimbuf)
|
|
2119 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
|
0
|
2120 #include <sys/time.h>
|
|
2121 #include <time.h>
|
|
2122 #else
|
|
2123 #ifdef HAVE_SYS_TIME_H
|
|
2124 #include <sys/time.h>
|
|
2125 #else
|
|
2126 #include <time.h>
|
|
2127 #endif
|
|
2128 #endif
|
|
2129 #ifdef HAVE_UTIME_H
|
|
2130 #include <utime.h>
|
|
2131 #endif], [static struct utimbuf x; x.actime = x.modtime;],
|
149
|
2132 [AC_MSG_RESULT(yes)
|
|
2133 AC_DEFINE(HAVE_STRUCT_UTIMBUF)],
|
|
2134 AC_MSG_RESULT(no))
|
0
|
2135
|
|
2136 dnl checks for typedefs
|
149
|
2137 AC_TYPE_SIGNAL
|
163
|
2138 AC_TYPE_SIZE_T
|
|
2139 AC_TYPE_PID_T
|
|
2140 AC_TYPE_UID_T
|
|
2141 AC_TYPE_MODE_T
|
|
2142 AC_TYPE_OFF_T
|
149
|
2143
|
|
2144 AC_MSG_CHECKING(for struct timeval)
|
|
2145 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
|
0
|
2146 #include <sys/time.h>
|
|
2147 #include <time.h>
|
|
2148 #else
|
|
2149 #ifdef HAVE_SYS_TIME_H
|
|
2150 #include <sys/time.h>
|
|
2151 #else
|
|
2152 #include <time.h>
|
|
2153 #endif
|
149
|
2154 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;],
|
|
2155 [AC_MSG_RESULT(yes)
|
0
|
2156 HAVE_TIMEVAL=yes
|
|
2157 AC_DEFINE(HAVE_TIMEVAL)],
|
149
|
2158 [AC_MSG_RESULT(no)
|
|
2159 HAVE_TIMEVAL=no])
|
0
|
2160
|
|
2161 dnl checks for structure members
|
|
2162 AC_STRUCT_TM
|
149
|
2163 AC_STRUCT_TIMEZONE
|
0
|
2164
|
|
2165 dnl checks for compiler characteristics
|
149
|
2166 AC_C_CONST
|
0
|
2167
|
|
2168 dnl check for Make feature
|
149
|
2169 AC_PROG_MAKE_SET
|
0
|
2170
|
|
2171 dnl check byte order
|
149
|
2172 AC_C_BIGENDIAN
|
0
|
2173
|
151
|
2174 dnl define SIZEOF_TYPE
|
|
2175 AC_CHECK_SIZEOF(short)
|
163
|
2176 if test "$ac_cv_sizeof_short" = 0; then
|
159
|
2177 echo ""
|
|
2178 echo "*** PANIC *** Configure tests are not working - compiler is broken."
|
|
2179 echo "*** PANIC *** Please examine config.log for compilation errors."
|
|
2180 exit 1
|
|
2181 fi
|
163
|
2182 AC_CHECK_SIZEOF(int)
|
|
2183 AC_CHECK_SIZEOF(long)
|
|
2184 AC_CHECK_SIZEOF(long long)
|
|
2185 AC_CHECK_SIZEOF(void *)
|
151
|
2186
|
0
|
2187 dnl check for long file names
|
149
|
2188 AC_SYS_LONG_FILE_NAMES
|
0
|
2189
|
159
|
2190 dnl -lm is required by LISP_FLOAT_TYPE, among other things
|
207
|
2191 AC_CHECK_LIB(m, sin)
|
149
|
2192
|
151
|
2193 dnl Floating operation support is now unconditional
|
|
2194 AC_DEFINE(LISP_FLOAT_TYPE)
|
|
2195
|
243
|
2196 AC_TRY_LINK([#include <math.h>],
|
|
2197 [return atanh(1.0) + asinh(1.0) + acosh(1.0); ],
|
|
2198 AC_DEFINE(HAVE_INVERSE_HYPERBOLIC))
|
|
2199
|
149
|
2200 dnl Determine type of mail locking from configure args and s&m headers
|
|
2201 AC_CHECKING(type of mail spool file locking)
|
|
2202 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
|
|
2203 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
|
|
2204 if test "$mail_locking" = "lockf"; then AC_DEFINE(REAL_MAIL_USE_LOCKF)
|
|
2205 elif test "$mail_locking" = "flock"; then AC_DEFINE(REAL_MAIL_USE_FLOCK)
|
157
|
2206 else mail_locking="dot-locking"
|
149
|
2207 fi
|
|
2208
|
151
|
2209 dnl Used by getloadavg() - does not require root priveleges
|
|
2210 AC_CHECK_LIB(kstat, kstat_open)
|
|
2211
|
|
2212 dnl Another way to get the load average
|
|
2213 AC_CHECK_LIB(kvm, kvm_read)
|
|
2214
|
278
|
2215 case "$opsys" in decosf*)
|
|
2216 AC_CHECK_LIB(pthreads, cma_open)
|
|
2217 test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
|
|
2218 c_switch_site="$c_switch_site -threads" ;;
|
|
2219 esac
|
151
|
2220
|
|
2221 AC_MSG_CHECKING(whether the -xildoff compiler flag is required)
|
|
2222 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
|
|
2223 if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
|
|
2224 then AC_MSG_RESULT(no);
|
|
2225 else AC_MSG_RESULT(yes); XE_APPEND(-xildoff, ld_switch_site)
|
|
2226 fi
|
|
2227 else AC_MSG_RESULT(no)
|
|
2228 fi
|
|
2229
|
155
|
2230 dnl Link with "-z ignore" on Solaris if supported
|
165
|
2231 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
|
155
|
2232 AC_MSG_CHECKING(for \"-z ignore\" linker flag)
|
|
2233 case "`ld -h 2>&1`" in
|
|
2234 *-z\ ignore\|record* ) AC_MSG_RESULT(yes)
|
|
2235 XE_PREPEND(-z ignore, ld_switch_site) ;;
|
|
2236 *) AC_MSG_RESULT(no) ;;
|
163
|
2237 esac
|
|
2238 fi
|
155
|
2239
|
149
|
2240 dnl ----------------------
|
|
2241 dnl Choose a window system
|
|
2242 dnl ----------------------
|
|
2243
|
|
2244 AC_CHECKING("for specified window system")
|
|
2245
|
187
|
2246 if test "$with_x11" != "no"; then
|
|
2247 dnl User-specified --x-includes or --x-libraries implies --with-x11.
|
|
2248 test "$x_includes $x_libraries" != "NONE NONE" && \
|
|
2249 window_system=x11 with_x11=yes
|
|
2250
|
272
|
2251 dnl Autodetection of X11 libraries and includes
|
|
2252 dnl -------------------------------------------
|
|
2253 dnl AC_PATH_XTRA thinks it can find our X headers and includes, but
|
|
2254 dnl it often gets it wrong, so we only use it as a last resort.
|
|
2255
|
187
|
2256 dnl $OPENWINHOME implies --x-includes and --x-libraries
|
|
2257 dnl Not (yet) handled by autoconf2
|
272
|
2258 if test "$x_includes $x_libraries" = "NONE NONE" \
|
|
2259 -a -n "$OPENWINHOME" \
|
|
2260 -a "$OPENWINHOME" != "/usr/openwin" \
|
|
2261 -a -d "$OPENWINHOME"; then
|
187
|
2262 test -d "$OPENWINHOME/lib" && x_libraries="$OPENWINHOME/lib"
|
|
2263 test -d "$OPENWINHOME/include" && x_includes="$OPENWINHOME/include"
|
|
2264 test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
|
272
|
2265 fi
|
|
2266
|
|
2267 if test "$x_includes" = "NONE"; then
|
|
2268 dnl AC_PATH_XTRA often guesses /usr/include, when some other
|
|
2269 dnl include directory is a MUCH better guess (Linux, HP-UX 10.20).
|
|
2270 dnl This is a workaround for idiot (esp. HP) system vendors, who
|
|
2271 dnl provide a /usr/include/X11, but DON'T FULLY POPULATE IT.
|
|
2272 for dir in "/usr/X11" "/usr/X11R6"; do
|
|
2273 if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
|
|
2274 done
|
|
2275 fi
|
|
2276
|
|
2277 if test "$x_libraries" = "NONE"; then
|
|
2278 for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
|
|
2279 if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
|
|
2280 done
|
149
|
2281 fi
|
187
|
2282
|
149
|
2283 AC_PATH_XTRA # Autoconf claims to find X library and include dirs for us.
|
|
2284 if test "$no_x" = "yes"
|
|
2285 then with_x11=no window_system=none HAVE_X_WINDOWS=no
|
|
2286 else with_x11=yes window_system=x11 HAVE_X_WINDOWS=yes
|
|
2287 fi
|
|
2288 fi
|
|
2289
|
|
2290 case "$with_x11" in
|
|
2291 yes ) window_system=x11 HAVE_X_WINDOWS=yes ;;
|
|
2292 no ) window_system=none HAVE_X_WINDOWS=no ;;
|
0
|
2293 esac
|
|
2294
|
149
|
2295 if test "$with_x11" = "yes"; then
|
|
2296 AC_DEFINE(HAVE_X_WINDOWS)
|
151
|
2297 XE_APPEND(lwlib, MAKE_SUBDIR)
|
175
|
2298 XE_APPEND(lwlib, SRC_SUBDIR_DEPS)
|
149
|
2299
|
|
2300 dnl Try to find Motif/CDE/Tooltalk dirs
|
|
2301 dnl These take precedence over other X libs/includes, so PRE-pend
|
278
|
2302 for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
|
159
|
2303 inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
|
149
|
2304 if test -d "$lib_dir" -a -d "$inc_dir"; then
|
151
|
2305 case "$x_libraries" in *"$lib_dir"* ) ;; *)
|
|
2306 x_libraries="$lib_dir $x_libraries"
|
|
2307 XE_PREPEND(-L${lib_dir}, X_LIBS) ;;
|
149
|
2308 esac
|
151
|
2309 case "$x_includes" in "$inc_dir"* ) ;; *)
|
|
2310 x_includes="$inc_dir $x_includes"
|
|
2311 XE_PREPEND(-I${inc_dir}, X_CFLAGS) ;;
|
149
|
2312 esac
|
|
2313 break; dnl only need ONE Motif implementation!
|
0
|
2314 fi
|
149
|
2315 done
|
|
2316
|
|
2317 dnl Contrib X libs/includes do NOT take precedence, so AP-pend
|
|
2318 for rel in "X11R6" "X11R5" "X11R4"; do
|
|
2319 lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
|
|
2320 if test -d "$lib_dir" -a -d "$inc_dir"; then
|
151
|
2321 case "$x_libraries" in *"$lib_dir"* ) ;; *)
|
|
2322 x_libraries="$x_libraries $lib_dir"
|
|
2323 XE_APPEND(-L${lib_dir}, X_LIBS)
|
149
|
2324 esac
|
151
|
2325 case "$x_includes" in "$inc_dir"* ) ;; *)
|
|
2326 x_includes="$x_includes $inc_dir"
|
|
2327 XE_APPEND(-I${inc_dir}, X_CFLAGS)
|
149
|
2328 esac
|
|
2329 break; dnl Only need ONE X11 implementation !
|
0
|
2330 fi
|
149
|
2331 done
|
|
2332
|
306
|
2333 dnl Avoid version mismatch for shared library libXm.so on osf4
|
|
2334 if test "$GCC" = yes -a -d /usr/shlib; then XE_APPEND(-L/usr/shlib, X_LIBS); fi
|
|
2335
|
149
|
2336 ld_switch_x_site="$X_LIBS"
|
|
2337
|
151
|
2338 XE_COMPUTE_RUNPATH()
|
|
2339
|
149
|
2340 if test "$extra_verbose" = "yes"; then
|
|
2341 echo; echo "X11 compilation variables:"
|
163
|
2342 PRINT_VAR(x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS)
|
149
|
2343 echo
|
|
2344 fi
|
|
2345
|
265
|
2346 dnl Set up bitmaps search path.
|
|
2347 dnl The original suggestion was to unconditionally to append X11/bitmaps
|
|
2348 dnl to each element of $x_includes, I'm pretty sure this is the wrong
|
|
2349 dnl thing to do. We test for bitmaps and X11/bitmaps directories on each
|
|
2350 dnl element and add them to BITMAPDIR if they exist.
|
|
2351 bitmapdirs=
|
|
2352 if test "$x_includes" != NONE; then
|
|
2353 for i in $x_includes; do
|
|
2354 if test -d "$i/bitmaps"; then
|
|
2355 bitmapdirs="$i/bitmaps:$bitmapdirs"
|
|
2356 fi
|
|
2357 if test -d "$i/X11/bitmaps"; then
|
|
2358 bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
|
|
2359 fi
|
|
2360 done
|
|
2361 bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
|
|
2362 fi
|
|
2363 test ! -z "$bitmapdirs" && AC_DEFINE_UNQUOTED(BITMAPDIR, "$bitmapdirs")
|
|
2364
|
163
|
2365 dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO
|
|
2366 AC_CHECKING(for X defines extracted by xmkmf)
|
|
2367 rm -fr conftestdir
|
|
2368 if mkdir conftestdir; then
|
|
2369 cd conftestdir
|
|
2370 cat > Imakefile <<'EOF'
|
|
2371 xetest:
|
|
2372 @echo ${PROTO_DEFINES} ${STD_DEFINES}
|
|
2373 EOF
|
|
2374 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
|
|
2375 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
|
|
2376 xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
|
|
2377 fi
|
|
2378 cd ..
|
|
2379 rm -fr conftestdir
|
|
2380 for word in $xmkmf_defines; do
|
|
2381 case "$word" in
|
|
2382 -D*=* ) ;;
|
|
2383 -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
|
|
2384 AC_DEFINE_UNQUOTED($word) ;;
|
|
2385 esac
|
|
2386 done
|
|
2387 fi
|
|
2388
|
149
|
2389 dnl make sure we can find Intrinsic.h
|
|
2390 AC_CHECK_HEADER(X11/Intrinsic.h, ,
|
|
2391 [AC_MSG_ERROR("Unable to find X11 header files.")])
|
|
2392
|
153
|
2393 dnl -lXt and -lX11 are required
|
149
|
2394 dnl Some broken systems require the magic "-b i486-linuxaout" flag
|
|
2395 AC_CHECK_LIB(X11, XOpenDisplay, have_lib_x11=yes)
|
|
2396 if test "$have_lib_x11" != "yes"; then
|
|
2397 AC_CHECK_LIB(X11, XGetFontProperty,
|
|
2398 ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site",
|
|
2399 [AC_MSG_ERROR("Unable to find X11 libraries.")],
|
|
2400 -b i486-linuxaout)
|
|
2401 fi
|
|
2402 libs_x="-lX11"
|
151
|
2403 test "$extra_verbose" = "yes" && echo " Setting libs_x to \"-lX11\""
|
149
|
2404
|
153
|
2405 dnl Autodetect -lXext
|
|
2406 AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x))
|
|
2407
|
|
2408 dnl Require -lXt
|
169
|
2409 AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x),
|
|
2410 AC_MSG_ERROR("Unable to find X11 libraries."))
|
149
|
2411
|
|
2412 AC_MSG_CHECKING(the version of X11 being used)
|
|
2413 AC_TRY_RUN([#include <X11/Intrinsic.h>
|
272
|
2414 int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }],
|
151
|
2415 [./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4])
|
|
2416 AC_MSG_RESULT(R${x11_release})
|
|
2417 AC_DEFINE_UNQUOTED(THIS_IS_X11R${x11_release})
|
149
|
2418
|
|
2419 AC_CHECK_HEADERS(X11/Xlocale.h)
|
|
2420
|
|
2421 dnl remove this - we should avoid checking for specific OS
|
|
2422 AC_MSG_CHECKING(for XFree86)
|
|
2423 if test -d "/usr/X386/include" -o \
|
169
|
2424 -f "/etc/XF86Config" -o \
|
149
|
2425 -f "/etc/X11/XF86Config" -o \
|
|
2426 -f "/usr/X11R6/lib/X11/XF86Config"; then
|
|
2427 AC_MSG_RESULT(yes)
|
|
2428 AC_DEFINE(HAVE_XFREE386)
|
|
2429 else
|
|
2430 AC_MSG_RESULT(no)
|
|
2431 fi
|
|
2432
|
|
2433 dnl autodetect -lXmu
|
169
|
2434 test -z "$with_xmu" && { AC_CHECK_LIB(Xmu, XmuReadBitmapDataFromFile,
|
|
2435 with_xmu=yes, with_xmu=no) }
|
185
|
2436 if test "$with_xmu" = "no"; then
|
|
2437 XE_ADD_OBJS(xmu.o)
|
187
|
2438 else
|
185
|
2439 XE_PREPEND(-lXmu, libs_x)
|
|
2440 AC_DEFINE(HAVE_XMU)
|
169
|
2441 fi
|
149
|
2442
|
|
2443 dnl Autodetect -lXbsd
|
|
2444 dnl #### Someone, please add a better function than main
|
151
|
2445 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x))
|
149
|
2446
|
243
|
2447 dnl Problem with the MIT distribution of X on AIX
|
|
2448 if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
|
272
|
2449 dnl X11R6 requires thread-safe code on AIX for some reason
|
274
|
2450 if test "$GCC" = "yes"; then
|
|
2451 XE_PREPEND(-mthreads, X_CFLAGS)
|
|
2452 XE_PREPEND(-mthreads, libs_x)
|
|
2453 else
|
|
2454 case "$CC" in
|
|
2455 "xlc" ) CC="xlc_r" ;;
|
|
2456 "xlC" ) CC="xlC_r" ;;
|
|
2457 "cc" ) CC="cc_r" ;;
|
|
2458 esac
|
|
2459 fi
|
243
|
2460 fi
|
|
2461
|
149
|
2462 fi dnl $with_x11 = yes
|
|
2463
|
265
|
2464 if test "$with_msw" != "no"; then
|
|
2465 AC_CHECKING(for MS-Windows)
|
|
2466 AC_CHECK_LIB(gdi32,main,with_msw=yes)
|
|
2467 if test "$with_msw" = "yes"; then
|
|
2468 AC_DEFINE(HAVE_MS_WINDOWS)
|
276
|
2469 install_pp="$blddir/lib-src/installexe.sh"
|
355
|
2470 exe_suffix=".exe"
|
276
|
2471 XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomctl32, libs_system)
|
321
|
2472 test "$with_dragndrop" != no && XE_APPEND(msw, dragndrop_proto)
|
265
|
2473 if test "$window_system" != x11; then
|
|
2474 window_system=msw
|
|
2475 test "$with_scrollbars" != "no" && with_scrollbars=msw \
|
|
2476 && XE_ADD_OBJS(scrollbar-msw.o)
|
|
2477 test "$with_menubars" != "no" && with_menubars=msw \
|
|
2478 && XE_ADD_OBJS(menubar-msw.o)
|
276
|
2479 test "$with_toolbars" != "no" && with_toolbars=msw \
|
|
2480 && XE_ADD_OBJS(toolbar-msw.o)
|
288
|
2481 test "$with_dialogs" != "no" && with_dialogs=msw \
|
|
2482 && XE_ADD_OBJS(dialog-msw.o)
|
265
|
2483 else
|
|
2484 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o)
|
|
2485 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o)
|
276
|
2486 test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-msw.o)
|
288
|
2487 test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-msw.o)
|
265
|
2488 fi
|
333
|
2489 dnl check for our special version of select
|
278
|
2490 AC_TRY_RUN([#include <fcntl.h>
|
|
2491 int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }],
|
|
2492 [AC_DEFINE(HAVE_MSG_SELECT)])
|
265
|
2493 const_is_losing=no
|
|
2494 with_file_coding=yes
|
278
|
2495 use_minimal_tagbits=yes
|
|
2496 use_indexed_lrecord_implementation=yes
|
267
|
2497 XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o)
|
265
|
2498 fi
|
|
2499 fi
|
|
2500
|
276
|
2501 AC_SUBST(install_pp)
|
355
|
2502 AC_SUBST(exe_suffix)
|
276
|
2503
|
149
|
2504 test -z "$window_system" && window_system="none"
|
|
2505
|
272
|
2506 dnl Test for features that require a window system - ANY window system
|
|
2507 if test "$window_system" = "none"; then
|
282
|
2508 for feature in menubars scrollbars toolbars dialogs dragndrop
|
272
|
2509 do
|
|
2510 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
|
2511 AC_MSG_WARN([--with-$feature ignored: Not valid without window system support])
|
|
2512 fi
|
|
2513 eval "with_${feature}=no"
|
|
2514 done
|
|
2515 else
|
|
2516 test -z "$with_toolbars" && with_toolbars=yes
|
|
2517 fi
|
|
2518
|
|
2519 dnl ### Test for features that require mswindows support - currently none
|
|
2520 dnl ### MS-Windows folks: add code here..... (martin)
|
|
2521 if test "$with_msw" != "yes"; then
|
|
2522 for feature in MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
|
|
2523 do
|
|
2524 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
|
2525 AC_MSG_WARN([--with-$feature ignored: Not valid without MS-Windows support])
|
|
2526 fi
|
|
2527 eval "with_${feature}=no"
|
|
2528 done
|
|
2529 else
|
|
2530 :
|
|
2531 fi
|
|
2532
|
|
2533 dnl Test for features that require X11 support
|
|
2534 if test "$with_x11" != "yes"; then
|
|
2535 dnl It ought to be reasonable to have no output device at all, and only use
|
|
2536 dnl XEmacs in --batch mode.
|
|
2537 dnl if test "$with_tty" = "no" ; then
|
|
2538 dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.])
|
|
2539 dnl fi
|
|
2540 for feature in tooltalk cde offix session xim xmu \
|
278
|
2541 xface
|
149
|
2542 do
|
|
2543 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
|
2544 AC_MSG_WARN([--with-$feature ignored: Not valid without X support])
|
0
|
2545 fi
|
149
|
2546 eval "with_${feature}=no"
|
70
|
2547 done
|
0
|
2548 fi
|
120
|
2549
|
149
|
2550 dnl FSF 19.29 has some bitmapdir stuff here.
|
0
|
2551 bitmapdir=
|
|
2552
|
149
|
2553 case "$window_system" in
|
70
|
2554 x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;;
|
272
|
2555 msw ) HAVE_X_WINDOWS=no ; echo " Using MS-Windows." ;;
|
70
|
2556 none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;;
|
0
|
2557 esac
|
|
2558
|
149
|
2559 case "$x_libraries" in *X11R4* )
|
|
2560 test "$opsys" = "hpux9" && opsysfile="s/hpux9-x11r4.h"
|
|
2561 test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
|
|
2562 esac
|
|
2563
|
179
|
2564 dnl Enable or disable proper session-management
|
|
2565 AC_CHECKING(for session-management option);
|
227
|
2566 dnl if test "$with_session" = "yes"; then
|
|
2567 if test "$with_session" != "no"; then
|
179
|
2568 AC_DEFINE(HAVE_SESSION)
|
177
|
2569 fi
|
|
2570
|
149
|
2571 dnl Autodetect Xauth
|
159
|
2572 dnl -lXau is only used by gnuclient, so use a special variable for Xauth X libs
|
149
|
2573 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
|
|
2574 test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h, ,with_xauth=no) }
|
|
2575 test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no) }
|
|
2576 test -z "$with_xauth" && with_xauth=yes
|
|
2577 if test "$with_xauth" = "yes"; then
|
|
2578 AC_DEFINE(HAVE_XAUTH)
|
159
|
2579 XE_SPACE(libs_xauth, $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS)
|
100
|
2580 fi
|
159
|
2581 AC_SUBST(libs_xauth)
|
100
|
2582
|
282
|
2583 dnl This one is for the static initializeds variables in
|
|
2584 dnl offix.c, so that the thing is dumped after lastfile.o
|
274
|
2585 AC_SUBST(dnd_objs)
|
|
2586
|
149
|
2587 dnl Autodetect tooltalk
|
|
2588 if test "$with_tooltalk" != "no" ; then
|
|
2589 dnl autodetect the location of tt_c.h
|
|
2590 dnl tt_c.h might be in Tt or desktop include directories
|
|
2591 for dir in "" "Tt/" "desktop/" ; do
|
284
|
2592 AC_CHECK_HEADER(${dir}tt_c.h, tt_c_h_path="${dir}tt_c.h"; break)
|
149
|
2593 done
|
284
|
2594 if test -z "$tt_c_h_path"; then
|
|
2595 if test "$with_tooltalk" = "yes"; then
|
|
2596 USAGE_ERROR("Unable to find required tooltalk header files.")
|
|
2597 fi
|
|
2598 with_tooltalk=no
|
|
2599 fi
|
0
|
2600 fi
|
149
|
2601 if test "$with_tooltalk" != "no" ; then
|
|
2602 for extra_libs in "" "-lI18N -lce" "-lcxx"; do
|
|
2603 AC_CHECK_LIB(tt, tt_message_create,
|
284
|
2604 tt_libs="-ltt $extra_libs"; break, [:],$extra_libs)
|
0
|
2605 done
|
284
|
2606 if test -z "$tt_libs"; then
|
|
2607 if test "$with_tooltalk" = "yes"; then
|
|
2608 USAGE_ERROR("Unable to find required tooltalk libraries.")
|
|
2609 fi
|
|
2610 with_tooltalk=no
|
|
2611 fi
|
149
|
2612 fi
|
284
|
2613 test -z "$with_tooltalk" && with_tooltalk=yes
|
149
|
2614 if test "$with_tooltalk" = "yes"; then
|
|
2615 AC_DEFINE(TOOLTALK)
|
|
2616 AC_DEFINE_UNQUOTED(TT_C_H_PATH, "$tt_c_h_path")
|
151
|
2617 XE_PREPEND($tt_libs, libs_x)
|
|
2618 XE_ADD_OBJS(tooltalk.o)
|
0
|
2619 fi
|
|
2620
|
149
|
2621 dnl Autodetect CDE
|
|
2622 test -z "$with_cde" && { AC_CHECK_HEADER(Dt/Dt.h, , with_cde=no) }
|
|
2623 test -z "$with_cde" && { AC_CHECK_LIB(DtSvc, DtDndDragStart, [:], with_cde=no) }
|
|
2624 test -z "$with_cde" && with_cde=yes
|
282
|
2625 if test "$with_dragndrop" = no; then
|
|
2626 AC_MSG_WARN([No CDE without generic Drag'n'Drop support])
|
|
2627 with_cde=no
|
|
2628 fi
|
149
|
2629 if test "$with_cde" = "yes" ; then
|
|
2630 AC_DEFINE(HAVE_CDE)
|
151
|
2631 XE_PREPEND(-lDtSvc, libs_x)
|
282
|
2632 XE_APPEND(CDE, dragndrop_proto)
|
149
|
2633 with_tooltalk=yes # CDE requires Tooltalk
|
167
|
2634 need_motif=yes # CDE requires Motif
|
149
|
2635 fi
|
|
2636
|
288
|
2637 dnl Always compile OffiX unless --without-offix is given, no
|
|
2638 dnl X11 support is compiled in, no standard Xmu is avaiable,
|
|
2639 dnl or dragndrop support is disabled
|
300
|
2640 dnl Because OffiX support currently loses when more than one display
|
|
2641 dnl is in use, we now disable it by default -slb 07/10/1998.
|
288
|
2642 test "$window_system" != "x11" && with_offix=no
|
|
2643 if test "$with_xmu" != yes -a "$with_x11" = yes; then
|
|
2644 AC_MSG_WARN([No OffiX without real Xmu support])
|
|
2645 with_offix=no
|
|
2646 fi
|
|
2647 if test "$with_dragndrop" = no; then
|
|
2648 AC_MSG_WARN([No OffiX without generic Drag'n'Drop support])
|
|
2649 with_offix=no
|
|
2650 fi
|
|
2651 if test "$with_cde" = yes; then
|
|
2652 AC_MSG_WARN([CDE already found, disabling OffiX support])
|
|
2653 with_offix=no
|
|
2654 fi
|
300
|
2655 test -z "$with_offix" && with_offix=no
|
288
|
2656 if test "$with_offix" = "yes"; then
|
|
2657 AC_DEFINE(HAVE_OFFIX_DND)
|
|
2658 XE_APPEND(offix.o, dnd_objs)
|
|
2659 XE_APPEND(OffiX, dragndrop_proto)
|
|
2660 fi
|
|
2661
|
282
|
2662 dnl Autodetect Drag'n'Drop support
|
|
2663 dnl always included if CDE, Offix, or MSWindows are defined
|
|
2664 AC_MSG_CHECKING(if drag and drop API is needed)
|
|
2665 if test "$with_dragndrop" != "no" ; then
|
|
2666 if test -n "$dragndrop_proto" ; then
|
|
2667 with_dragndrop=yes
|
|
2668 AC_MSG_RESULT([yes (${dragndrop_proto} )])
|
|
2669 AC_DEFINE(HAVE_DRAGNDROP)
|
|
2670 XE_APPEND(dragdrop.o, extra_objs)
|
|
2671 else
|
|
2672 with_dragndrop=no
|
|
2673 AC_MSG_RESULT(no)
|
|
2674 fi
|
|
2675 fi
|
|
2676
|
259
|
2677 dnl Autodetect LDAP
|
|
2678 AC_CHECKING(for LDAP)
|
272
|
2679 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) }
|
|
2680 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) }
|
|
2681 if test "$with_ldap" != "no"; then
|
|
2682 test -z "$with_umich_ldap" && { AC_CHECK_LIB(ldap, ldap_open, with_umich_ldap=yes, with_umich_ldap=no, -llber) }
|
|
2683 test "$with_umich_ldap" = "no" && { AC_CHECK_LIB(ldap10, ldap_set_option, with_ns_ldap=yes, with_ns_ldap=no) }
|
|
2684 test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
|
|
2685 fi
|
|
2686 if test "$with_ldap" = "yes"; then
|
259
|
2687 AC_DEFINE(HAVE_LDAP)
|
|
2688 XE_ADD_OBJS(eldap.o)
|
272
|
2689 if test "$with_umich_ldap" = "yes" ; then
|
|
2690 AC_DEFINE(HAVE_UMICH_LDAP)
|
|
2691 XE_PREPEND(-llber, LIBS)
|
|
2692 XE_PREPEND(-lldap, LIBS)
|
|
2693 elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
|
|
2694 AC_DEFINE(HAVE_NS_LDAP)
|
|
2695 XE_PREPEND(-lldap10, LIBS)
|
|
2696 elif test "$with_ldap" = "yes" ; then
|
|
2697 XE_PREPEND(-lldap, LIBS)
|
|
2698 fi
|
259
|
2699 fi
|
|
2700
|
193
|
2701 dnl ----------------------
|
278
|
2702 dnl Graphics libraries
|
193
|
2703 dnl ----------------------
|
|
2704
|
278
|
2705 if test "$window_system" != "none"; then
|
|
2706 AC_CHECKING(for graphics libraries)
|
272
|
2707
|
357
|
2708 dnl On IRIX 6, most graphics libraries depend on libCsup
|
|
2709 AC_CHECK_LIB(Csup,__T_9__nothrow,[LIBS="-lCsup $LIBS"])
|
|
2710
|
193
|
2711 dnl Autodetect Xpm
|
310
|
2712 xpm_problem=""
|
272
|
2713 if test -z "$with_xpm"; then
|
|
2714 AC_MSG_CHECKING(for Xpm - no older than 3.4f)
|
|
2715 xe_check_libs=-lXpm
|
|
2716 AC_TRY_RUN([#include <X11/xpm.h>
|
|
2717 int main(int c, char **v) {
|
|
2718 return c == 1 ? 0 :
|
|
2719 XpmIncludeVersion != XpmLibraryVersion() ? 1 :
|
|
2720 XpmIncludeVersion < 30406 ? 2 : 0 ;}],
|
|
2721 [./conftest dummy_arg; xpm_status=$?;
|
310
|
2722 if test "$xpm_status" = "0"; then
|
272
|
2723 with_xpm=yes;
|
|
2724 else
|
|
2725 with_xpm=no;
|
310
|
2726 if test "$xpm_status" = "1"; then
|
272
|
2727 xpm_problem="Xpm library version and header file version don't match!"
|
310
|
2728 elif test "$xpm_status" = "2"; then
|
272
|
2729 xpm_problem="Xpm library version is too old!"
|
|
2730 else
|
|
2731 xpm_problem="Internal xpm detection logic error!"
|
|
2732 fi
|
|
2733 echo "
|
310
|
2734 *** WARNING *** $xpm_problem
|
278
|
2735 I'm not touching that with a 10-foot pole!
|
|
2736 If you really want to use the installed version of Xpm, rerun
|
310
|
2737 configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
|
278
|
2738 fi],
|
272
|
2739 [with_xpm=no])
|
|
2740 xe_check_libs=
|
|
2741 AC_MSG_RESULT($with_xpm)
|
193
|
2742 fi
|
|
2743 if test "$with_xpm" = "yes"; then
|
|
2744 AC_DEFINE(HAVE_XPM)
|
|
2745 XE_PREPEND(-lXpm, libs_x)
|
278
|
2746 AC_MSG_CHECKING(for \"FOR_MSW\" xpm)
|
|
2747 xe_check_libs=-lXpm
|
|
2748 AC_TRY_LINK(, [XpmCreatePixmapFromData()],
|
|
2749 [xpm_for_msw=no],
|
|
2750 [xpm_for_msw=yes])
|
|
2751 xe_check_libs=
|
|
2752 AC_MSG_RESULT($xpm_for_msw)
|
|
2753 if test "$xpm_for_msw" = "yes"; then
|
|
2754 AC_DEFINE(FOR_MSW)
|
|
2755 fi
|
193
|
2756 fi
|
|
2757
|
308
|
2758 dnl For a brief period we had the GIF code split out into a separate library,
|
|
2759 dnl but patent problems, etc. sort of squashed that idea.
|
|
2760 dnl We default to building with builtin GIF decoding
|
|
2761 if test "$with_gif" != "no"; then
|
|
2762 with_gif="yes"
|
|
2763 AC_DEFINE(HAVE_GIF)
|
|
2764 XE_ADD_OBJS(dgif_lib.o gif_io.o)
|
|
2765 fi
|
|
2766
|
278
|
2767 dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime
|
|
2768 dnl So we always search for libz compression support.
|
|
2769 if test "$with_png $with_tiff" != "no no"; then
|
|
2770 AC_CHECK_LIB(c, inflate, [:], [
|
|
2771 AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[
|
|
2772 AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])])
|
193
|
2773 fi
|
|
2774
|
251
|
2775 dnl autodetect JPEG
|
|
2776 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) }
|
|
2777 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) }
|
|
2778 test -z "$with_jpeg" && with_jpeg=yes
|
|
2779 if test "$with_jpeg" = "yes"; then
|
|
2780 AC_DEFINE(HAVE_JPEG)
|
|
2781 XE_PREPEND(-ljpeg, libs_x)
|
193
|
2782 fi
|
|
2783
|
251
|
2784 dnl autodetect PNG
|
310
|
2785 png_problem=""
|
|
2786 test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) }
|
|
2787 test -z "$with_png" && { AC_CHECK_HEADER(png.h, ,with_png=no) }
|
|
2788 test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) }
|
272
|
2789 if test -z "$with_png"; then
|
310
|
2790 AC_MSG_CHECKING(for workable png version information)
|
|
2791 xe_check_libs="-lpng -lz"
|
|
2792 AC_TRY_RUN([#include <png.h>
|
|
2793 int main(int c, char **v) {
|
|
2794 if (c == 1) return 0;
|
|
2795 if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
|
|
2796 return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}],
|
|
2797 [./conftest dummy_arg; png_status=$?;
|
|
2798 if test "$png_status" = "0"; then
|
|
2799 with_png=yes;
|
|
2800 else
|
|
2801 with_png=no;
|
|
2802 if test "$png_status" = "1"; then
|
|
2803 png_problem="PNG library version and header file don't match!"
|
|
2804 elif test "$png_status" = "2"; then
|
|
2805 png_problem="PNG library version too old (pre 1.0.2)!"
|
|
2806 fi
|
|
2807 echo "
|
|
2808 *** WARNING *** $png_problem
|
|
2809 I'm not touching that with a 10-foot pole!
|
|
2810 If you really want to use the installed version of libPNG, rerun
|
|
2811 configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
|
|
2812 fi],
|
|
2813 [with_png=no])
|
|
2814 xe_check_libs=
|
|
2815 AC_MSG_RESULT($with_png)
|
251
|
2816 fi
|
|
2817 if test "$with_png" = "yes"; then
|
|
2818 AC_DEFINE(HAVE_PNG)
|
272
|
2819 XE_PREPEND(-lpng, libs_x)
|
251
|
2820 fi
|
|
2821
|
|
2822 dnl autodetect TIFF
|
286
|
2823 test -z "$with_tiff" && { AC_CHECK_HEADER(tiffio.h, ,with_tiff=no) }
|
|
2824 test -z "$with_tiff" && { AC_CHECK_LIB(tiff, TIFFClientOpen,[:],with_tiff=no) }
|
272
|
2825 test -z "$with_tiff" && with_tiff=yes
|
251
|
2826 if test "$with_tiff" = "yes"; then
|
|
2827 AC_DEFINE(HAVE_TIFF)
|
272
|
2828 XE_PREPEND(-ltiff, libs_x)
|
251
|
2829 fi
|
278
|
2830 fi
|
|
2831
|
|
2832 dnl ----------------------
|
308
|
2833 dnl X-Specific Graphics libraries
|
278
|
2834 dnl ----------------------
|
|
2835
|
|
2836 if test "$with_x11" = "yes"; then
|
|
2837
|
|
2838 AC_CHECKING(for X11 graphics libraries)
|
|
2839
|
|
2840 dnl Autodetect XFACE
|
|
2841 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) }
|
|
2842 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) }
|
|
2843 test -z "$with_xface" && with_xface=yes
|
|
2844 if test "$with_xface" = "yes"; then
|
|
2845 AC_DEFINE(HAVE_XFACE)
|
|
2846 XE_PREPEND(-lcompface, libs_x)
|
|
2847 fi
|
272
|
2848
|
193
|
2849 dnl Autodetect -lXaw
|
|
2850 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no)
|
219
|
2851 dnl if test "$have_xaw" = "yes"; then
|
|
2852 dnl AC_CHECK_HEADER(X11/Xaw/Reports.h, [
|
|
2853 dnl XE_APPEND(pkg-src/tree-x, MAKE_SUBDIR)
|
|
2854 dnl XE_APPEND(pkg-src/tree-x, INSTALL_ARCH_DEP_SUBDIR)])
|
|
2855 dnl fi
|
193
|
2856
|
|
2857 dnl autodetect Motif - but only add to libs_x later (if necessary)
|
151
|
2858 AC_CHECK_HEADER(Xm/Xm.h,
|
|
2859 [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)],
|
|
2860 have_motif=no)
|
|
2861
|
272
|
2862 if test "$have_motif" = "yes"; then
|
|
2863 dnl autodetect lesstif
|
|
2864 AC_MSG_CHECKING(for Lesstif)
|
|
2865 AC_EGREP_CPP(yes,
|
|
2866 [#include <Xm/Xm.h>
|
|
2867 #ifdef LESSTIF_VERSION
|
|
2868 yes
|
|
2869 #endif
|
|
2870 ], have_lesstif=yes, have_lesstif=no)
|
|
2871 AC_MSG_RESULT($have_lesstif)
|
|
2872 fi
|
|
2873
|
193
|
2874 fi dnl "$with_x11" = "yes"
|
|
2875
|
149
|
2876 dnl Finish ensuring that we have values for the various toolkit items.
|
|
2877 dnl Not all toolkits support all widgets
|
|
2878 dnl if Motif is available we use it for the dialog boxes.
|
|
2879
|
243
|
2880 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
|
149
|
2881 with_menubars="lucid" ;;
|
|
2882 esac
|
243
|
2883 case "$with_dialogs" in "" | "yes" | "lucid" )
|
149
|
2884 if test "$have_motif" = "yes"; then with_dialogs="motif"
|
|
2885 elif test "$have_xaw" = "yes"; then with_dialogs="athena"
|
|
2886 else with_dialogs=no
|
|
2887 fi ;;
|
|
2888 esac
|
|
2889 case "$with_scrollbars" in "" | "yes" )
|
|
2890 with_scrollbars="lucid" ;;
|
|
2891 esac
|
|
2892
|
|
2893 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars"
|
|
2894
|
|
2895 case "$all_widgets" in *athena* )
|
|
2896 AC_DEFINE(LWLIB_USES_ATHENA)
|
157
|
2897 AC_DEFINE(NEED_ATHENA)
|
|
2898 XE_APPEND(lwlib-Xaw.o, lwlib_objs)
|
151
|
2899 XE_PREPEND(-lXaw, libs_x) ;;
|
70
|
2900 esac
|
|
2901
|
149
|
2902 case "$all_widgets" in *motif* )
|
|
2903 AC_DEFINE(LWLIB_USES_MOTIF)
|
157
|
2904 AC_DEFINE(NEED_MOTIF)
|
|
2905 XE_APPEND(lwlib-Xm.o, lwlib_objs)
|
149
|
2906 need_motif=yes ;;
|
|
2907 esac
|
|
2908
|
157
|
2909 test "$with_menubars" = "lucid" && XE_APPEND(xlwmenu.o, lwlib_objs)
|
219
|
2910 test "$with_menubars" = "motif" && XE_APPEND(xlwmenu.o, lwlib_objs)
|
157
|
2911 test "$with_scrollbars" = "lucid" && XE_APPEND(xlwscrollbar.o, lwlib_objs)
|
|
2912 case "$all_widgets" in *lucid* )
|
|
2913 AC_DEFINE(NEED_LUCID)
|
|
2914 XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;;
|
|
2915 esac
|
|
2916
|
|
2917 AC_SUBST(lwlib_objs)
|
|
2918
|
149
|
2919 case "$with_scrollbars" in athena* ) AC_DEFINE(LWLIB_SCROLLBARS_ATHENA);; esac
|
|
2920 case "$with_dialogs" in athena* ) AC_DEFINE(LWLIB_DIALOGS_ATHENA) ;; esac
|
|
2921 test "$with_scrollbars" = "athena3d" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D)
|
|
2922 test "$with_dialogs" = "athena3d" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D)
|
|
2923
|
|
2924 test "$with_menubars" != "no" && AC_DEFINE(HAVE_MENUBARS)
|
|
2925 test "$with_scrollbars" != "no" && AC_DEFINE(HAVE_SCROLLBARS)
|
|
2926 test "$with_dialogs" != "no" && AC_DEFINE(HAVE_DIALOGS)
|
|
2927 test "$with_toolbars" != "no" && AC_DEFINE(HAVE_TOOLBARS)
|
|
2928
|
|
2929 test "$with_menubars" = "lucid" && AC_DEFINE(LWLIB_MENUBARS_LUCID)
|
|
2930 test "$with_scrollbars" = "lucid" && AC_DEFINE(LWLIB_SCROLLBARS_LUCID)
|
|
2931
|
|
2932 test "$with_menubars" = "motif" && AC_DEFINE(LWLIB_MENUBARS_MOTIF)
|
|
2933 test "$with_scrollbars" = "motif" && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF)
|
|
2934 test "$with_dialogs" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF)
|
|
2935
|
151
|
2936 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar.o)
|
|
2937 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar.o)
|
|
2938 test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog.o)
|
|
2939 test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar.o)
|
|
2940 test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui.o)
|
149
|
2941
|
|
2942 if test "$with_x11" = "yes"; then
|
151
|
2943 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-x.o)
|
|
2944 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-x.o)
|
|
2945 test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-x.o)
|
|
2946 test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-x.o)
|
|
2947 test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui-x.o)
|
211
|
2948 else
|
|
2949 if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
|
|
2950 echo "Attempt to Build NAS sound without X"
|
|
2951 echo "Please remove NAS configuration or build with X"
|
|
2952 exit 1
|
|
2953 fi
|
0
|
2954 fi
|
149
|
2955
|
272
|
2956 test "$use_minimal_tagbits" = "yes" && AC_DEFINE(USE_MINIMAL_TAGBITS)
|
|
2957 test "$use_indexed_lrecord_implementation" = "yes" && \
|
|
2958 AC_DEFINE(USE_INDEXED_LRECORD_IMPLEMENTATION)
|
257
|
2959
|
151
|
2960 dnl ----------------------
|
|
2961 dnl Mule-dependent options
|
|
2962 dnl ----------------------
|
|
2963
|
272
|
2964 test -z "$with_mule" && with_mule=no
|
259
|
2965 test -z "$with_file_coding" && with_file_coding=no
|
149
|
2966
|
227
|
2967 dnl if test "$with_mule" = "yes" && test ! -d "$srcdir/lisp/mule"; then
|
|
2968 dnl echo "Attempt to Build with Mule without Mule/Lisp"
|
|
2969 dnl echo "Please install the XEmacs/Mule tarball or"
|
|
2970 dnl echo "rerun configure with --with-mule=no"
|
|
2971 dnl exit 1
|
|
2972 dnl fi
|
207
|
2973
|
259
|
2974 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
|
|
2975 AC_DEFINE(FILE_CODING)
|
|
2976 XE_ADD_OBJS(file-coding.o)
|
251
|
2977 fi
|
|
2978
|
70
|
2979 if test "$with_mule" = "yes" ; then
|
151
|
2980 AC_CHECKING(for Mule-related features)
|
149
|
2981 AC_DEFINE(MULE)
|
259
|
2982 AC_DEFINE(FILE_CODING)
|
|
2983 XE_ADD_OBJS(mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o)
|
149
|
2984
|
|
2985 dnl Use -lintl to get internationalized strerror for Mule
|
155
|
2986 AC_CHECK_HEADERS(libintl.h)
|
149
|
2987 AC_CHECK_LIB(intl, strerror)
|
|
2988
|
|
2989 AC_CHECKING(for Mule input methods)
|
|
2990 dnl Do we have the XmIm* routines? And if so, do we want to use them?
|
151
|
2991 dnl XIM seems to be flaky except on Solaris...
|
272
|
2992 dnl test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no
|
149
|
2993 case "$with_xim" in "" | "yes" )
|
|
2994 AC_CHECKING(for XIM)
|
333
|
2995 AC_CHECK_LIB(X11, XOpenIM, with_xim=xlib, with_xim=no)
|
272
|
2996 dnl XIM + Lesstif is not (yet?) usable
|
333
|
2997 if test "$have_motif $have_lesstif" = "yes no"; then
|
|
2998 AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif)
|
|
2999 fi ;;
|
149
|
3000 esac
|
272
|
3001 if test "$with_xim" != "no"; then
|
70
|
3002 AC_DEFINE(HAVE_XIM)
|
149
|
3003 if test "$with_xim" = "xlib"; then
|
|
3004 AC_DEFINE(XIM_XLIB)
|
151
|
3005 XE_ADD_OBJS(input-method-xlib.o)
|
|
3006 fi
|
149
|
3007 if test "$with_xim" = "motif"; then
|
|
3008 AC_DEFINE(XIM_MOTIF)
|
|
3009 need_motif=yes
|
151
|
3010 XE_ADD_OBJS(input-method-motif.o)
|
70
|
3011 fi
|
215
|
3012 if test "$with_xim" = "motif"; then
|
177
|
3013 with_xfs=no
|
|
3014 fi
|
215
|
3015 fi
|
|
3016
|
333
|
3017 dnl "with_xfs" = "yes"
|
215
|
3018 if test "$with_xfs" = "yes" ; then
|
|
3019 AC_CHECKING(for XFontSet)
|
|
3020 AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no)
|
177
|
3021 if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
|
|
3022 AC_DEFINE(USE_XFONTSET)
|
215
|
3023 if test "$with_xim" = "no" ; then
|
|
3024 XE_ADD_OBJS(input-method-xfs.o)
|
|
3025 fi
|
177
|
3026 fi
|
333
|
3027 fi dnl with_xfs
|
149
|
3028
|
|
3029 dnl Autodetect WNN
|
|
3030 test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
|
167
|
3031 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) }
|
|
3032 dnl Detour to find crypt
|
|
3033 if test "$with_wnn" != "no"; then
|
|
3034 AC_CHECK_FUNCS(crypt)
|
|
3035 test "$ac_cv_func_crypt" != "yes" && { AC_CHECK_LIB(crypt, crypt) }
|
|
3036 fi
|
|
3037 dnl Back to our regularly scheduled wnn hunting
|
321
|
3038 if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
|
|
3039 AC_CHECK_LIB(wnn,jl_dic_list_e,libwnn=wnn,
|
|
3040 AC_CHECK_LIB(wnn4,jl_dic_list_e,libwnn=wnn4,
|
|
3041 AC_CHECK_LIB(wnn6,jl_dic_list_e,libwnn=wnn6,
|
|
3042 AC_CHECK_LIB(wnn6_fromsrc,dic_list_e,libwnn=wnn6_fromsrc,with_wnn=no))))
|
|
3043 fi
|
149
|
3044 test -z "$with_wnn" && with_wnn=yes
|
|
3045 if test "$with_wnn" = "yes"; then
|
|
3046 AC_DEFINE(HAVE_WNN)
|
321
|
3047 XE_PREPEND(-l$libwnn, libs_x)
|
151
|
3048 XE_ADD_OBJS(mule-wnnfns.o)
|
284
|
3049 if test "$with_wnn6" != "no"; then
|
321
|
3050 AC_CHECK_LIB($libwnn, jl_fi_dic_list, with_wnn6=yes)
|
284
|
3051 test "$with_wnn6" = "yes" && AC_DEFINE(WNN6)
|
|
3052 fi
|
151
|
3053 fi
|
149
|
3054
|
|
3055 dnl Autodetect canna
|
267
|
3056 canna_includes_found=no
|
|
3057 if test "$with_canna" != "no"; then
|
|
3058 AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes)
|
|
3059 fi
|
|
3060 if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
|
|
3061 -d "/usr/local/canna/include"; then
|
|
3062 save_c_switch_site="$c_switch_site"
|
|
3063 c_switch_site="$c_switch_site -I/usr/local/canna/include"
|
|
3064 AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes)
|
|
3065 if test "$canna_includes_found" != "yes"; then
|
|
3066 c_switch_site="$save_c_switch_site"
|
|
3067 with_canna="no"
|
|
3068 fi
|
|
3069 fi
|
|
3070
|
149
|
3071 test -z "$with_canna" && { AC_CHECK_HEADER(canna/RK.h, , with_canna=no) }
|
|
3072 test -z "$with_canna" && { AC_CHECK_LIB(RKC, RkBgnBun, [:],with_canna=no) }
|
|
3073 test -z "$with_canna" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],with_canna=no) }
|
|
3074 test -z "$with_canna" && with_canna=yes
|
|
3075 if test "$with_canna" = "yes"; then
|
|
3076 AC_DEFINE(HAVE_CANNA)
|
151
|
3077 XE_PREPEND(-lcanna -lRKC, libs_x)
|
|
3078 XE_ADD_OBJS(mule-canna.o)
|
|
3079 fi
|
155
|
3080
|
151
|
3081 else dnl "$with_mule" = "no"
|
149
|
3082 for feature in xim canna wnn; do
|
|
3083 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
|
3084 AC_MSG_WARN("--with-${feature} ignored: Not valid without Mule support")
|
|
3085 fi
|
|
3086 eval "with_${feature}=no"
|
100
|
3087 done
|
151
|
3088 fi dnl with_mule
|
100
|
3089
|
149
|
3090
|
|
3091 dnl At this point, we know whether we need the motif lib or not.
|
151
|
3092 if test "$need_motif" = "yes" ; then
|
|
3093 XE_PREPEND(-lXm, libs_x)
|
207
|
3094 dnl AIX needs the following library for use with Motif
|
|
3095 AC_CHECK_LIB(i18n, layout_object_getvalue, [XE_PREPEND(-li18n, libs_x)])
|
151
|
3096 XE_COMPUTE_RUNPATH()
|
|
3097 fi
|
|
3098
|
265
|
3099 AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf)
|
151
|
3100
|
|
3101 dnl realpath is buggy on linux, decosf and aix4
|
|
3102
|
|
3103 dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP.
|
209
|
3104 dnl The realpath in ELF linux libc's is O.K.
|
151
|
3105 dnl For example, call realpath on a file thirty-five or so directories deep
|
|
3106 dnl and you get ELOOP even if no symlinks at all are involved.
|
209
|
3107 dnl Reports as of 11/1997 indicate BSDi has problems too.
|
321
|
3108 dnl The realpath() in UnixWare2.1.3 could not get any pathname fragment in error condition.
|
151
|
3109 case "$opsys" in
|
209
|
3110 linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) XE_ADD_OBJS(realpath.o) ;;
|
151
|
3111 * )
|
321
|
3112 case "$canonical" in
|
|
3113 *-*-sysv4.2uw2* ) XE_ADD_OBJS(realpath.o) ;;
|
|
3114 * ) AC_CHECK_FUNCS(realpath)
|
|
3115 test "$ac_cv_func_realpath" != "yes" && XE_ADD_OBJS(realpath.o) ;;
|
|
3116 esac ;;
|
151
|
3117 esac
|
|
3118
|
149
|
3119 dnl If netdb.h does not declare h_errno, we must declare it by hand.
|
|
3120 AC_MSG_CHECKING(whether netdb declares h_errno)
|
|
3121 AC_TRY_LINK([#include <netdb.h>],
|
|
3122 [return h_errno;],
|
|
3123 [AC_MSG_RESULT(yes)
|
|
3124 AC_DEFINE(HAVE_H_ERRNO)],
|
|
3125 [AC_MSG_RESULT(no)])
|
|
3126
|
|
3127 AC_MSG_CHECKING(for sigsetjmp)
|
|
3128 AC_TRY_COMPILE([#include <setjmp.h>],
|
70
|
3129 [sigjmp_buf bar; sigsetjmp (bar, 0);],
|
149
|
3130 [AC_MSG_RESULT(yes)
|
|
3131 AC_DEFINE(HAVE_SIGSETJMP)],
|
|
3132 [AC_MSG_RESULT(no)])
|
|
3133
|
|
3134 AC_MSG_CHECKING(whether localtime caches TZ)
|
|
3135 AC_CACHE_VAL(emacs_cv_localtime_cache,
|
|
3136 [if test "$ac_cv_func_tzset" = "yes"; then
|
|
3137 AC_TRY_RUN([#include <time.h>
|
|
3138 #if STDC_HEADERS
|
0
|
3139 # include <stdlib.h>
|
|
3140 #endif
|
|
3141 extern char **environ;
|
|
3142 unset_TZ ()
|
|
3143 {
|
|
3144 char **from, **to;
|
|
3145 for (to = from = environ; (*to = *from); from++)
|
|
3146 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
|
|
3147 to++;
|
|
3148 }
|
149
|
3149 char TZ_GMT0[] = "TZ=GMT0";
|
|
3150 char TZ_PST8[] = "TZ=PST8";
|
0
|
3151 main()
|
|
3152 {
|
|
3153 time_t now = time ((time_t *) 0);
|
|
3154 int hour_GMT0, hour_unset;
|
149
|
3155 if (putenv (TZ_GMT0) != 0)
|
0
|
3156 exit (1);
|
|
3157 hour_GMT0 = localtime (&now)->tm_hour;
|
|
3158 unset_TZ ();
|
|
3159 hour_unset = localtime (&now)->tm_hour;
|
149
|
3160 if (putenv (TZ_PST8) != 0)
|
0
|
3161 exit (1);
|
|
3162 if (localtime (&now)->tm_hour == hour_GMT0)
|
|
3163 exit (1);
|
|
3164 unset_TZ ();
|
|
3165 if (localtime (&now)->tm_hour != hour_unset)
|
|
3166 exit (1);
|
|
3167 exit (0);
|
|
3168 }], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes,
|
|
3169 [# If we have tzset, assume the worst when cross-compiling.
|
|
3170 emacs_cv_localtime_cache=yes])
|
149
|
3171 else
|
|
3172 # If we lack tzset, report that localtime does not cache TZ,
|
|
3173 # since we can't invalidate the cache if we don't have tzset.
|
|
3174 emacs_cv_localtime_cache=no
|
|
3175 fi],[:])dnl
|
|
3176 AC_MSG_RESULT($emacs_cv_localtime_cache)
|
|
3177 if test $emacs_cv_localtime_cache = yes; then
|
0
|
3178 AC_DEFINE(LOCALTIME_CACHE)
|
|
3179 fi
|
|
3180
|
149
|
3181 if test "$HAVE_TIMEVAL" = "yes"; then
|
272
|
3182 AC_MSG_CHECKING(whether gettimeofday accepts one or two arguments)
|
149
|
3183 AC_TRY_LINK([
|
0
|
3184 #ifdef TIME_WITH_SYS_TIME
|
|
3185 #include <sys/time.h>
|
|
3186 #include <time.h>
|
|
3187 #else
|
|
3188 #ifdef HAVE_SYS_TIME_H
|
|
3189 #include <sys/time.h>
|
|
3190 #else
|
|
3191 #include <time.h>
|
|
3192 #endif
|
|
3193 #endif
|
|
3194 ],
|
|
3195 [
|
|
3196 struct timeval time;
|
|
3197 struct timezone dummy;
|
|
3198 gettimeofday (&time, &dummy);
|
|
3199 ],
|
272
|
3200 [AC_MSG_RESULT(two)],
|
|
3201 [AC_MSG_RESULT(one)
|
0
|
3202 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)])
|
|
3203 fi
|
|
3204
|
149
|
3205
|
|
3206 AC_C_INLINE
|
155
|
3207 if test "$ac_cv_c_inline" != "no"; then
|
|
3208 AC_DEFINE(HAVE_INLINE)
|
|
3209 test "$GCC" = "yes" && XE_ADD_OBJS(inline.o)
|
|
3210 fi
|
149
|
3211
|
175
|
3212 dnl HP-UX has a working alloca in libPW.
|
177
|
3213 dnl case "${GCC}${opsys}" in hpux* )
|
|
3214 dnl AC_CHECK_FUNC(alloca, [:], [AC_CHECK_LIB(PW, alloca)])
|
|
3215 dnl esac
|
149
|
3216
|
|
3217 AC_FUNC_ALLOCA
|
151
|
3218 test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA)
|
149
|
3219
|
|
3220 dnl Check whether vfork exists and works correctly. (This does more
|
|
3221 dnl than just check for its existence.) If so, it defines HAVE_VFORK_H.
|
|
3222 dnl If not, it defines vfork to be fork.
|
|
3223 AC_FUNC_VFORK
|
|
3224
|
|
3225 dnl Check whether strcoll exists and works correctly. (This does more
|
|
3226 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL.
|
|
3227 AC_FUNC_STRCOLL
|
|
3228
|
163
|
3229 dnl If `getpgrp' takes no argument (the POSIX.1 version), define
|
|
3230 dnl `GETPGRP_VOID'. Otherwise, it is the BSD version, which takes a
|
|
3231 dnl process ID as an argument.
|
|
3232 AC_CHECK_FUNCS(getpgrp)
|
|
3233 AC_FUNC_GETPGRP
|
|
3234
|
153
|
3235 dnl We used to call AC_FUNC_MMAP here
|
|
3236 dnl Instead we now use following, suggested by Neal Becker
|
|
3237 AC_MSG_CHECKING(for working mmap)
|
155
|
3238 case "$opsys" in ultrix* ) have_mmap=no ;; *)
|
153
|
3239 AC_TRY_RUN([#include <stdio.h>
|
|
3240 #include <unistd.h>
|
|
3241 #include <fcntl.h>
|
|
3242 #include <sys/mman.h>
|
|
3243
|
|
3244 #ifndef MAP_VARIABLE
|
|
3245 #define MAP_VARIABLE 0
|
|
3246 #endif
|
|
3247
|
|
3248 #ifndef MAP_FAILED
|
|
3249 #define MAP_FAILED -1
|
|
3250 #endif
|
|
3251
|
|
3252 int main (int argc, char *argv[])
|
|
3253 {
|
|
3254 int fd = -1;
|
|
3255 caddr_t p;
|
|
3256 #ifndef MAP_ANONYMOUS
|
|
3257 fd = open ("/dev/zero", O_RDWR);
|
|
3258 if (fd < 0)
|
|
3259 return 1;
|
|
3260 #define MAP_ANONYMOUS 0
|
|
3261 #endif
|
|
3262 if (mmap(0, 1024, PROT_READ | PROT_WRITE,
|
|
3263 MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
|
|
3264 fd, 0) != (void *) MAP_FAILED)
|
|
3265 return 0;
|
|
3266 perror ("conftest: mmap failed");
|
|
3267 return 1;
|
155
|
3268 }], have_mmap=yes, have_mmap=no) ;;
|
|
3269 esac
|
153
|
3270 AC_MSG_RESULT($have_mmap)
|
|
3271 test "$have_mmap" = "yes" && AC_DEFINE(HAVE_MMAP)
|
149
|
3272
|
|
3273 dnl rel_alloc requires either GNU malloc or system malloc with mmap
|
|
3274 dnl We only turn rel_alloc on by default if mmap is available.
|
153
|
3275 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
|
|
3276 test "$rel_alloc" = "default" -a "$have_mmap" = "yes" && rel_alloc=yes
|
149
|
3277 test "$rel_alloc" = "yes" && AC_DEFINE(REL_ALLOC)
|
|
3278
|
175
|
3279 dnl Check for terminal I/O variants
|
|
3280 dnl TERMIOS systems may have termio.h, but not vice-versa, I think.
|
187
|
3281 AC_CHECK_HEADER(termios.h,
|
175
|
3282 AC_DEFINE(HAVE_TERMIOS)
|
|
3283 AC_DEFINE(SIGNALS_VIA_CHARACTERS)
|
|
3284 AC_DEFINE(NO_TERMIO),
|
|
3285 [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])])
|
|
3286
|
|
3287
|
149
|
3288 dnl Check for Internet sockets.
|
|
3289 AC_CHECK_FUNC(socket,
|
|
3290 [AC_CHECK_HEADER(netinet/in.h,
|
|
3291 [AC_CHECK_HEADER(arpa/inet.h, [
|
0
|
3292 AC_DEFINE(HAVE_SOCKETS)
|
149
|
3293 AC_MSG_CHECKING("for sun_len member in struct sockaddr_un")
|
|
3294 AC_TRY_LINK([
|
|
3295 #include <sys/types.h>
|
|
3296 #include <sys/socket.h>
|
|
3297 #include <sys/un.h>
|
|
3298 ],
|
|
3299 [static struct sockaddr_un x; x.sun_len = 1;],
|
|
3300 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)],
|
259
|
3301 [AC_MSG_RESULT(no)])
|
|
3302 AC_MSG_CHECKING("for ip_mreq struct in netinet/in.h")
|
|
3303 AC_TRY_LINK([
|
284
|
3304 #include <sys/types.h>
|
259
|
3305 #include <netinet/in.h>
|
|
3306 ],
|
|
3307 [static struct ip_mreq x;],
|
|
3308 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MULTICAST)],
|
149
|
3309 [AC_MSG_RESULT(no)])])])])
|
|
3310
|
|
3311 dnl Check for SYS V IPC. (Inferior to sockets.)
|
|
3312 AC_CHECK_FUNC(msgget,
|
|
3313 [AC_CHECK_HEADER(sys/ipc.h,
|
|
3314 [AC_CHECK_HEADER(sys/msg.h,
|
|
3315 [AC_DEFINE(HAVE_SYSVIPC)])])])
|
|
3316
|
|
3317 dnl Check for directory variants
|
|
3318 AC_CHECK_HEADER(dirent.h, [AC_DEFINE(SYSV_SYSTEM_DIR)],
|
|
3319 [AC_CHECK_HEADER(sys/dir.h, , [AC_DEFINE(NONSYSTEM_DIR_LIBRARY)])])
|
|
3320
|
|
3321 dnl Check for nlist.h
|
|
3322 AC_CHECK_HEADER(nlist.h, AC_DEFINE(NLIST_STRUCT), )
|
|
3323
|
|
3324 dnl Check for sound of various sorts.
|
|
3325
|
|
3326 dnl Autodetect native sound
|
|
3327 AC_CHECKING("for sound support")
|
|
3328 case "$with_sound" in
|
|
3329 native | both ) with_native_sound=yes;;
|
|
3330 nas | no ) with_native_sound=no;;
|
|
3331 esac
|
155
|
3332 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
|
|
3333
|
149
|
3334 if test "$with_native_sound" != "no"; then
|
155
|
3335 dnl Maybe sound is already on include path...
|
|
3336 if test -n "$native_sound_lib"; then
|
|
3337 AC_CHECK_HEADER(multimedia/audio_device.h,
|
|
3338 [sound_found=yes sound_cflags=""
|
|
3339 XE_ADD_OBJS(sunplay.o)])
|
|
3340 fi
|
|
3341
|
149
|
3342 dnl Autodetect Sun native sound from SUNWaudmo package
|
155
|
3343 if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
|
|
3344 sound_found=yes
|
151
|
3345 XE_ADD_OBJS(sunplay.o)
|
149
|
3346 if test -d "/usr/demo/SOUND/include"
|
|
3347 then sound_cflags="-I/usr/demo/SOUND/include"
|
|
3348 else sound_cflags="-I/usr/demo/SOUND"
|
|
3349 fi
|
|
3350 if test -z "$native_sound_lib" ; then
|
|
3351 if test -r "/usr/demo/SOUND/lib/libaudio.a"
|
|
3352 then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
|
|
3353 else native_sound_lib="/usr/demo/SOUND/libaudio.a"
|
|
3354 fi
|
|
3355 fi
|
155
|
3356 fi
|
|
3357
|
|
3358 dnl Check for SGI and HP native sound libs
|
|
3359 if test -z "$sound_found"; then
|
|
3360 case "$canonical" in
|
149
|
3361 *-sgi-* )
|
155
|
3362 if test -z "$native_sound_lib"; then
|
357
|
3363 AC_CHECK_HEADER(audio.h, [
|
155
|
3364 AC_CHECK_LIB(audio, ALopenport, native_sound_lib="-laudio")
|
357
|
3365 ])
|
155
|
3366 fi
|
|
3367 if test -n "$native_sound_lib"; then
|
|
3368 sound_found=yes sound_cflags=""
|
151
|
3369 XE_ADD_OBJS(sgiplay.o)
|
149
|
3370 fi ;;
|
|
3371 hppa*-hp-hpux* )
|
155
|
3372 if test -z "$native_sound_lib"; then
|
|
3373 AC_CHECK_LIB(Alib, AOpenAudio, native_sound_lib="-lAlib")
|
|
3374 fi
|
|
3375 if test -n "$native_sound_lib"; then
|
|
3376 sound_found=yes
|
151
|
3377 XE_ADD_OBJS(hpplay.o)
|
169
|
3378 if test "$GCC" = "yes" # Kludge city
|
149
|
3379 then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
|
|
3380 else sound_cflags="+e -I/usr/audio/examples"
|
|
3381 fi
|
|
3382 fi ;;
|
0
|
3383 esac
|
|
3384 fi
|
149
|
3385
|
155
|
3386 dnl Check for Linux/BSD native sound
|
149
|
3387 if test -z "$sound_found"; then
|
|
3388 for dir in "machine" "sys" "linux"; do
|
|
3389 AC_CHECK_HEADER(${dir}/soundcard.h,
|
|
3390 sound_found=yes
|
151
|
3391 XE_ADD_OBJS(linuxplay.o)
|
149
|
3392 [AC_DEFINE_UNQUOTED(SOUNDCARD_H_PATH, "${dir}/soundcard.h")]
|
|
3393 break)
|
|
3394 done
|
|
3395 fi
|
|
3396
|
|
3397 test "$sound_found" = "yes" && with_native_sound=yes
|
0
|
3398 fi
|
149
|
3399
|
|
3400 if test -z "$with_sound"; then
|
|
3401 if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then
|
|
3402 with_sound=native
|
100
|
3403 fi
|
|
3404 fi
|
|
3405
|
149
|
3406 if test "$with_native_sound" = "yes"; then
|
|
3407 AC_DEFINE(HAVE_NATIVE_SOUND)
|
151
|
3408 test -n "$native_sound_lib" && XE_PREPEND($native_sound_lib, LIBS)
|
0
|
3409 fi
|
|
3410
|
149
|
3411 case "$with_sound" in both | nas )
|
|
3412 AC_DEFINE(HAVE_NAS_SOUND)
|
151
|
3413 XE_ADD_OBJS(nas.o)
|
201
|
3414 XE_PREPEND(-laudio, libs_x)
|
149
|
3415 dnl If the nas library does not contain the error jump point,
|
|
3416 dnl then we force safer behaviour.
|
|
3417 AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)])
|
|
3418 esac
|
|
3419
|
151
|
3420 dnl ---------------------
|
149
|
3421 dnl TTY-dependent options
|
151
|
3422 dnl ---------------------
|
149
|
3423
|
|
3424 test -z "$with_tty" && with_tty=yes
|
|
3425
|
|
3426 if test "$with_tty" = "yes" ; then
|
151
|
3427 AC_CHECKING(for TTY-related features)
|
149
|
3428 AC_DEFINE(HAVE_TTY)
|
151
|
3429 XE_ADD_OBJS(console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o)
|
149
|
3430
|
|
3431 dnl Autodetect ncurses.
|
|
3432 if test -z "$with_ncurses"; then
|
151
|
3433 AC_CHECK_LIB(ncurses, tgetent, with_ncurses=yes, with_ncurses=no)
|
149
|
3434 fi
|
|
3435 if test "$with_ncurses" = "yes"; then
|
70
|
3436 AC_DEFINE(HAVE_NCURSES)
|
149
|
3437 AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h)
|
|
3438 AC_CHECK_HEADER(ncurses/term.h, term_h_path=ncurses/term.h)
|
151
|
3439 XE_ADD_OBJS(terminfo.o)
|
|
3440 XE_PREPEND(-lncurses, LIBS)
|
149
|
3441
|
153
|
3442 if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
|
70
|
3443 dnl Try again, and check for the bogus ncurses/ include bug.
|
|
3444 dnl (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of
|
|
3445 dnl <ncurses/unctrl.h>)
|
149
|
3446 save_c_switch_site="$c_switch_site"
|
|
3447 c_switch_site="$c_switch_site -I/usr/include/ncurses"
|
|
3448 AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h)
|
153
|
3449 if test "$ac_cv_header_ncurses_curses_h" = "yes"
|
149
|
3450 then AC_MSG_WARN("Your system has the bogus ncurses include bug.")
|
|
3451 else c_switch_site="$save_c_switch_site"
|
0
|
3452 fi
|
|
3453 fi
|
149
|
3454 else dnl "$with_ncurses" = "no"
|
151
|
3455 dnl Autodetect terminfo/-lcurses/-ltermlib/-ltermcap
|
149
|
3456 if test "$have_terminfo" = "yes"; then
|
151
|
3457 XE_ADD_OBJS(terminfo.o)
|
|
3458 if test -n "$libs_termcap"; then
|
|
3459 XE_PREPEND($libs_termcap, LIBS)
|
|
3460 else
|
|
3461 for lib in curses termlib termcap; do
|
153
|
3462 AC_CHECK_LIB($lib, tgetent, XE_PREPEND(-l${lib}, LIBS); break)
|
151
|
3463 done
|
|
3464 fi
|
149
|
3465 else dnl "$have_terminfo" = "no" && "with_ncurses" = "no"
|
151
|
3466 XE_ADD_OBJS(tparam.o)
|
|
3467 dnl The HP-UX curses library seems to have a badly broken version of select(2)
|
|
3468 dnl that makes "poll: interrupted system call" messages to appear and
|
|
3469 dnl Emacs suprocesses to hang (e.g. TeX compilation w/ AUCTeX) */
|
|
3470 case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
|
|
3471 if test -n "$libs_termcap"; then
|
|
3472 XE_PREPEND($libs_termcap, LIBS)
|
|
3473 else
|
153
|
3474 AC_CHECK_LIB(curses, tgetent, XE_PREPEND(-lcurses, LIBS),
|
|
3475 AC_CHECK_LIB(termcap, tgetent, XE_PREPEND(-ltermcap, LIBS),
|
|
3476 XE_ADD_OBJS(termcap.o)))
|
149
|
3477 fi
|
|
3478 fi
|
0
|
3479 fi
|
149
|
3480 AC_DEFINE_UNQUOTED(CURSES_H_PATH, "${curses_h_path-curses.h}")
|
|
3481 AC_DEFINE_UNQUOTED(TERM_H_PATH, "${term_h_path-term.h}")
|
155
|
3482
|
|
3483 dnl Autodetect gpm
|
|
3484 test -z "$with_gpm" && { AC_CHECK_HEADER(gpm.h, , with_gpm=no) }
|
|
3485 test -z "$with_gpm" && { AC_CHECK_LIB(gpm, Gpm_Open, with_gpm=yes, with_gpm=no) }
|
|
3486 if test "$with_gpm" = "yes"; then
|
|
3487 AC_DEFINE(HAVE_GPM)
|
|
3488 XE_ADD_OBJS(gpmevent.o)
|
|
3489 XE_PREPEND(-lgpm, LIBS)
|
|
3490 fi
|
|
3491
|
151
|
3492 else dnl "$with_tty" = "no"
|
149
|
3493 for feature in ncurses gpm; do
|
|
3494 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
|
3495 AC_MSG_WARN("--with-${feature} ignored: Not valid without TTY support")
|
|
3496 fi
|
|
3497 eval "with_${feature}=no"
|
|
3498 done
|
151
|
3499 fi dnl with_tty
|
0
|
3500
|
163
|
3501 dnl Do we need event-unixoid.o ?
|
|
3502 test "$with_x11" = "yes" -o "$with_tty" = "yes" && XE_ADD_OBJS(event-unixoid.o)
|
|
3503
|
149
|
3504 dnl Database support
|
|
3505 dnl <mdiers@logware.de>
|
|
3506 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support.
|
0
|
3507 dnl On FreeBSD, both DB and DBM are part of libc.
|
|
3508 dnl Note that unless support for DB/(G)DBM is explicitly disabled, we always
|
149
|
3509 dnl want to check for libdb/lib(g)dbm. Also note that libc will not be
|
0
|
3510 dnl checked if we have the libraries.
|
70
|
3511
|
149
|
3512 AC_CHECKING(for database support)
|
|
3513
|
327
|
3514 dnl Check for ndbm.h, required for either kind of DBM support.
|
|
3515 if test "$with_database_gnudbm $with_database_dbm" != "no no"; then
|
|
3516 AC_CHECK_HEADER(ndbm.h, [:], [
|
|
3517 test "$with_database_gnudbm" = "yes" -o \
|
|
3518 "$with_database_dbm" = "yes" && \
|
|
3519 XE_DIE("Required DBM support cannot be provided.")
|
|
3520 with_database_gnudbm=no with_database_dbm=no])
|
|
3521 fi
|
|
3522
|
|
3523 dnl Check for DBM support in libgdbm.
|
151
|
3524 if test "$with_database_gnudbm" != "no"; then
|
327
|
3525 AC_CHECK_LIB(gdbm, dbm_open, [
|
|
3526 with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm], [
|
|
3527 if test "$with_database_gnudbm" = "yes"; then
|
|
3528 XE_DIE("Required GNU DBM support cannot be provided.")
|
|
3529 fi
|
|
3530 with_database_gnudbm=no])
|
149
|
3531 fi
|
|
3532
|
327
|
3533 dnl Check for DBM support in libc and libdbm.
|
151
|
3534 if test "$with_database_dbm" != "no"; then
|
327
|
3535 AC_CHECK_FUNC(dbm_open, [with_database_dbm=yes libdbm=], [
|
|
3536 AC_CHECK_LIB(dbm, dbm_open, [with_database_dbm=yes libdbm=-ldbm], [
|
|
3537 test "$with_database_dbm" = "yes" && \
|
|
3538 XE_DIE("Required DBM support cannot be provided.")
|
|
3539 with_database_dbm=no])])
|
149
|
3540 fi
|
|
3541
|
327
|
3542 dnl Tell make about the DBM support we detected.
|
|
3543 if test -n "$libdbm"; then XE_PREPEND("$libdbm", LIBS); fi
|
|
3544 if test "$with_database_gnudbm" = "yes" -o \
|
|
3545 "$with_database_dbm" = "yes"; then
|
|
3546 AC_DEFINE(HAVE_DBM)
|
|
3547 fi
|
|
3548
|
|
3549 dnl Check for Berkeley DB.
|
149
|
3550 if test "$with_database_berkdb" != "no"; then
|
298
|
3551 AC_MSG_CHECKING(for Berkeley db.h)
|
|
3552 for path in "db/db.h" "db.h"; do
|
359
|
3553 AC_TRY_COMPILE([
|
|
3554 #include <stdlib.h>
|
|
3555 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
|
|
3556 #ifdef HAVE_INTTYPES_H
|
149
|
3557 #define __BIT_TYPES_DEFINED__
|
|
3558 #include <inttypes.h>
|
|
3559 typedef uint8_t u_int8_t;
|
|
3560 typedef uint16_t u_int16_t;
|
|
3561 typedef uint32_t u_int32_t;
|
|
3562 #ifdef WE_DONT_NEED_QUADS
|
|
3563 typedef uint64_t u_int64_t;
|
|
3564 #endif
|
|
3565 #endif
|
359
|
3566 #endif
|
149
|
3567 #include <$path>
|
|
3568 ],[], db_h_path="$path"; break)
|
298
|
3569 done
|
306
|
3570 if test -z "$db_h_path"
|
298
|
3571 then AC_MSG_RESULT(no); with_database_berkdb=no
|
|
3572 else AC_MSG_RESULT($db_h_path)
|
149
|
3573 fi
|
298
|
3574
|
|
3575 if test "$with_database_berkdb" != "no"; then
|
|
3576 AC_MSG_CHECKING(for Berkeley DB version)
|
|
3577 AC_EGREP_CPP(yes,
|
|
3578 [#include <$db_h_path>
|
|
3579 #if DB_VERSION_MAJOR > 1
|
|
3580 yes
|
|
3581 #endif
|
|
3582 ], [AC_MSG_RESULT(2); dbfunc=db_open], [AC_MSG_RESULT(1); dbfunc=dbopen])
|
|
3583 AC_CHECK_FUNC($dbfunc, with_database_berkdb=yes need_libdb=no, [
|
|
3584 AC_CHECK_LIB(db, $dbfunc, with_database_berkdb=yes need_libdb=yes)])
|
|
3585 fi
|
|
3586
|
149
|
3587 if test "$with_database_berkdb" = "yes"; then
|
|
3588 AC_DEFINE_UNQUOTED(DB_H_PATH, "$db_h_path")
|
|
3589 AC_DEFINE(HAVE_BERKELEY_DB)
|
151
|
3590 test "$need_libdb" = "yes" && XE_PREPEND(-ldb, LIBS)
|
149
|
3591 else with_database_berkdb=no
|
0
|
3592 fi
|
|
3593 fi
|
149
|
3594
|
272
|
3595 if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
|
|
3596 != "no no no"; then
|
149
|
3597 AC_DEFINE(HAVE_DATABASE)
|
151
|
3598 XE_ADD_OBJS(database.o)
|
149
|
3599 fi
|
|
3600
|
|
3601 dnl Socks support
|
|
3602 if test "$with_socks" = "yes"; then
|
|
3603 AC_CHECK_LIB(socks, SOCKSinit)
|
|
3604 test -n "$ac_cv_lib_socks_SOCKSinit" && AC_DEFINE(HAVE_SOCKS)
|
|
3605 fi
|
|
3606
|
|
3607 dnl Usage tracking (undocumented and likely unused option)
|
|
3608 if test "$usage_tracking" = "yes"; then
|
|
3609 AC_DEFINE(USAGE_TRACKING)
|
151
|
3610 XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS)
|
149
|
3611 fi
|
|
3612
|
321
|
3613 dnl cygwin can't cope with dlfcn at the moment
|
|
3614 test -z "$with_shlib" && test "$opsys $machine" = "cygwin32 intel386" && with_shlib=no
|
|
3615
|
261
|
3616 dnl autodetect dll support
|
265
|
3617 AC_CHECK_HEADERS(dlfcn.h, have_dlfcn=yes)
|
|
3618 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(dl, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=dl; with_shlib=yes]) }
|
|
3619 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, _dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) }
|
|
3620 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c, dlopen, [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=; with_shlib=yes]) }
|
|
3621 test -z "$with_shlib" && { AC_CHECK_LIB(dld, shl_load, [ AC_DEFINE(HAVE_SHL_LOAD) DLL_LIB=dld; with_shlib=yes]) }
|
|
3622 test -z "$with_shlib" && { AC_CHECK_LIB(dld, dld_init, [ AC_DEFINE(HAVE_DLD_INIT) DLL_LIB=dld; with_shlib=yes]) }
|
261
|
3623 if test "$with_shlib" = "yes"; then
|
|
3624 AC_DEFINE(HAVE_SHLIB)
|
265
|
3625 XE_ADD_OBJS(sysdll.o)
|
|
3626 XE_ADD_OBJS(dll.o)
|
|
3627 test ! -z "$DLL_LIB" && XE_PREPEND(-l${DLL_LIB}, LIBS)
|
|
3628 XE_MAKE_SHAREDLIB
|
276
|
3629 AC_CHECK_FUNCS(dlerror)
|
263
|
3630 ld_dynamic_link_flags=
|
|
3631 dnl Fill this in with other values as this gets more testing
|
|
3632 case "$opsys" in
|
267
|
3633 hpux*) ld_dynamic_link_flags="-Wl,-E" ;;
|
263
|
3634 linux*) ld_dynamic_link_flags="-rdynamic" ;;
|
|
3635 *) ;;
|
|
3636 esac
|
261
|
3637 fi
|
|
3638
|
272
|
3639 dnl Unfortunately, just because we can link doesn't mean we can run.
|
|
3640 dnl One of the above link tests may have succeeded but caused resulting
|
|
3641 dnl executables to fail to run. Also any tests using AC_TRY_RUN will
|
|
3642 dnl have reported incorrect results.
|
|
3643 AC_TRY_RUN([int main(int c,char *v[]){return 0;}],[:],[
|
|
3644 echo ""
|
|
3645 echo "*** PANIC *** The C compiler can no longer build working executables."
|
|
3646 echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
|
|
3647 echo "*** PANIC *** The most likely reason for this problem is that configure"
|
|
3648 echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
|
|
3649 echo "*** PANIC *** found at run time."
|
|
3650 echo "*** PANIC ***"
|
|
3651 echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
|
|
3652 echo "*** PANIC *** On other systems, try telling configure where to find the"
|
|
3653 echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
|
|
3654 echo "*** PANIC ***"
|
|
3655 echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
|
|
3656 echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
|
|
3657 echo "*** PANIC *** on your system. Don't do that."
|
|
3658 exit 1])
|
|
3659
|
261
|
3660 dnl Process support (hardcoded)
|
|
3661 dnl every system that supports this runs configure, the others don't
|
|
3662
|
|
3663 dnl We're not ready for this yet.
|
263
|
3664 AC_DEFINE(HAVE_UNIX_PROCESSES)
|
|
3665 XE_ADD_OBJS(process-unix.o)
|
261
|
3666
|
149
|
3667 dnl --------------------------------
|
|
3668 dnl Compute SUBST-itutable variables
|
|
3669 dnl --------------------------------
|
155
|
3670
|
149
|
3671 dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM)
|
155
|
3672 dnl Use XE_SPACE instead of plain assignment statements to remove extraneous blanks
|
175
|
3673 XE_SPACE(CFLAGS, $CFLAGS)
|
155
|
3674 XE_SPACE(extra_objs, $extra_objs)
|
|
3675 XE_SPACE(c_switch_general, -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system)
|
|
3676 XE_SPACE(c_switch_window_system, $c_switch_x_site $X_CFLAGS)
|
|
3677 XE_SPACE(c_switch_all, $c_switch_general $c_switch_window_system)
|
|
3678 XE_SPACE(ld_switch_general, $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run)
|
|
3679 XE_SPACE(ld_switch_window_system, $ld_switch_x_site)
|
|
3680 XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system)
|
|
3681 XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard)
|
|
3682 XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $X_PRE_LIBS)
|
|
3683 XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general)
|
149
|
3684
|
151
|
3685 dnl Compute lists of Makefiles and subdirs
|
|
3686 AC_SUBST(SRC_SUBDIR_DEPS)
|
|
3687 XE_APPEND(src, MAKE_SUBDIR)
|
149
|
3688 internal_makefile_list="Makefile"
|
|
3689 SUBDIR_MAKEFILES=''
|
151
|
3690 test -d lock || mkdir lock
|
149
|
3691 for dir in $MAKE_SUBDIR; do
|
167
|
3692 case "$dir" in */* ) dnl Implement mkdir -p
|
|
3693 ( for d in `echo $dir | sed 's:/: :g'` ; do
|
|
3694 test -d "$d" || mkdir "$d"; cd "$d"
|
|
3695 done ) ;;
|
|
3696 * ) test -d "$dir" || mkdir "$dir" ;;
|
|
3697 esac
|
155
|
3698 XE_SPACE(SUBDIR_MAKEFILES, $SUBDIR_MAKEFILES $dir/Makefile)
|
|
3699 XE_SPACE(internal_makefile_list, $internal_makefile_list $dir/Makefile.in)
|
149
|
3700 done
|
167
|
3701 AC_SUBST(INSTALL_ARCH_DEP_SUBDIR)
|
149
|
3702 AC_SUBST(MAKE_SUBDIR)
|
|
3703 AC_SUBST(SUBDIR_MAKEFILES)
|
|
3704
|
157
|
3705 dnl Make s&m symlinks in the src directory, for config.h
|
|
3706 for dir in src/s src/m; do
|
|
3707 if test ! -d "$dir" ; then
|
|
3708 echo Making symbolic link to "$srcdir/$dir"
|
|
3709 ${LN_S} "$srcdir/$dir" "$dir"
|
|
3710 fi
|
|
3711 done
|
|
3712
|
149
|
3713 if test "$extra_verbose" = "yes"; then
|
151
|
3714 echo ""
|
163
|
3715 PRINT_VAR(extra_objs
|
|
3716 c_switch_general c_switch_window_system c_switch_all
|
|
3717 ld_switch_general ld_switch_window_system ld_switch_all
|
|
3718 ld_libs_general ld_libs_window_system ld_libs_all)
|
149
|
3719 echo ""
|
|
3720 fi
|
|
3721
|
151
|
3722 dnl Create some auxiliary files
|
|
3723 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
|
153
|
3724 echo "creating src/gdbinit"; echo ""
|
151
|
3725 echo "source $srcdir/src/gdbinit" > src/gdbinit
|
|
3726 fi
|
|
3727
|
|
3728 dnl Create top level .sbinit for Sun compilers
|
306
|
3729 if test "$__SUNPRO_C" = "yes"; then
|
157
|
3730 echo "creating .sbinit"; echo ""
|
|
3731 ( echo "# For use with Sun WorkShop's Source browser."
|
|
3732 echo "# See sbquery(1) and sbinit(4) for more information"
|
|
3733 for dir in $MAKE_SUBDIR; do echo "import $dir"; done
|
|
3734 ) > .sbinit
|
|
3735 fi
|
151
|
3736
|
|
3737 dnl There are no more compile tests; remove the core they created.
|
|
3738 rm -f core
|
|
3739
|
274
|
3740 dnl ----------------------------------------------
|
|
3741 dnl Substitute into Makefile, config.h and paths.h
|
|
3742 dnl ----------------------------------------------
|
|
3743
|
|
3744 dnl what sort of things to edit into Makefile, config.h and paths.h
|
70
|
3745 dnl configuration here uncanonicalized to avoid exceeding size limits.
|
|
3746
|
280
|
3747 AC_SUBST(PROGNAME)
|
0
|
3748 AC_SUBST(version)
|
|
3749 AC_SUBST(configuration)
|
|
3750 AC_SUBST(canonical)
|
|
3751 AC_SUBST(srcdir)
|
|
3752 AC_SUBST(bindir)
|
|
3753 AC_SUBST(datadir)
|
155
|
3754 AC_SUBST(pkgdir)
|
0
|
3755 AC_SUBST(statedir)
|
|
3756 AC_SUBST(libdir)
|
|
3757 AC_SUBST(mandir)
|
274
|
3758
|
278
|
3759 AC_SUBST(prefix)
|
|
3760 dnl Yo, Stephen Bourne! I want to marry you!
|
|
3761 PREFIX=$prefix
|
|
3762 while true; do
|
|
3763 case "$PREFIX" in
|
|
3764 *\$* ) eval "PREFIX=$PREFIX" ;;
|
|
3765 *) break ;;
|
|
3766 esac
|
|
3767 done
|
|
3768 AC_SUBST(PREFIX)
|
|
3769
|
|
3770 AC_SUBST(exec_prefix)
|
|
3771 EXEC_PREFIX=$exec_prefix
|
|
3772 while true; do
|
|
3773 case "$EXEC_PREFIX" in
|
|
3774 *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
|
|
3775 *) break ;;
|
|
3776 esac
|
|
3777 done
|
|
3778 AC_SUBST(EXEC_PREFIX)
|
|
3779
|
0
|
3780 AC_SUBST(infodir)
|
274
|
3781 AC_SUBST(INFODIR_USER_DEFINED)
|
|
3782 INFODIR=$infodir
|
|
3783 while true; do
|
|
3784 case "$INFODIR" in
|
|
3785 *\$* ) eval "INFODIR=$INFODIR" ;;
|
|
3786 *) break ;;
|
|
3787 esac
|
|
3788 done
|
|
3789 AC_SUBST(INFODIR)
|
|
3790
|
203
|
3791 AC_SUBST(infopath)
|
274
|
3792 AC_SUBST(INFOPATH_USER_DEFINED)
|
|
3793 INFOPATH=$infopath
|
|
3794 while true; do
|
|
3795 case "$INFOPATH" in
|
|
3796 *\$* ) eval "INFOPATH=$INFOPATH" ;;
|
|
3797 *) break ;;
|
|
3798 esac
|
|
3799 done
|
|
3800 AC_SUBST(INFOPATH)
|
|
3801
|
269
|
3802 AC_SUBST(package_path)
|
274
|
3803 AC_SUBST(PACKAGE_PATH_USER_DEFINED)
|
|
3804 PACKAGE_PATH=$package_path
|
|
3805 while true; do
|
|
3806 case "$PACKAGE_PATH" in
|
|
3807 *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
|
|
3808 *) break ;;
|
|
3809 esac
|
|
3810 done
|
|
3811 AC_SUBST(PACKAGE_PATH)
|
|
3812
|
0
|
3813 AC_SUBST(lispdir)
|
274
|
3814 AC_SUBST(LISPDIR_USER_DEFINED)
|
|
3815 LISPDIR=$lispdir
|
|
3816 while true; do
|
|
3817 case "$LISPDIR" in
|
|
3818 *\$* ) eval "LISPDIR=$LISPDIR" ;;
|
|
3819 *) break ;;
|
|
3820 esac
|
|
3821 done
|
|
3822 AC_SUBST(LISPDIR)
|
|
3823
|
278
|
3824 dnl AC_SUBST(sitelispdir)
|
|
3825 dnl AC_SUBST(SITELISPDIR_USER_DEFINED)
|
|
3826 dnl SITELISPDIR=$sitelispdir
|
|
3827 dnl while true; do
|
|
3828 dnl case "$SITELISPDIR" in
|
|
3829 dnl *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
|
|
3830 dnl *) break ;;
|
|
3831 dnl esac
|
|
3832 dnl done
|
|
3833 dnl AC_SUBST(SITELISPDIR)
|
274
|
3834
|
0
|
3835 AC_SUBST(etcdir)
|
274
|
3836 AC_SUBST(ETCDIR_USER_DEFINED)
|
|
3837 ETCDIR=$etcdir
|
|
3838 while true; do
|
|
3839 case "$ETCDIR" in
|
|
3840 *\$* ) eval "ETCDIR=$ETCDIR" ;;
|
|
3841 *) break ;;
|
|
3842 esac
|
|
3843 done
|
|
3844 AC_SUBST(ETCDIR)
|
|
3845
|
0
|
3846 AC_SUBST(lockdir)
|
274
|
3847 AC_SUBST(LOCKDIR_USER_DEFINED)
|
|
3848 LOCKDIR=$lockdir
|
|
3849 while true; do
|
|
3850 case "$LOCKDIR" in
|
|
3851 *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
|
|
3852 *) break ;;
|
|
3853 esac
|
|
3854 done
|
|
3855 AC_SUBST(LOCKDIR)
|
|
3856
|
349
|
3857 AC_SUBST(docdir)
|
|
3858 AC_SUBST(DOCDIR_USER_DEFINED)
|
|
3859 DOCDIR=$docdir
|
|
3860 while true; do
|
|
3861 case "$DOCDIR" in
|
|
3862 *\$* ) eval "DOCDIR=$DOCDIR" ;;
|
|
3863 *) break ;;
|
|
3864 esac
|
|
3865 done
|
|
3866 AC_SUBST(DOCDIR)
|
|
3867
|
0
|
3868 AC_SUBST(archlibdir)
|
274
|
3869 AC_SUBST(ARCHLIBDIR_USER_DEFINED)
|
|
3870 ARCHLIBDIR=$archlibdir
|
|
3871 while true; do
|
|
3872 case "$ARCHLIBDIR" in
|
|
3873 *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
|
|
3874 *) break ;;
|
|
3875 esac
|
|
3876 done
|
|
3877 AC_SUBST(ARCHLIBDIR)
|
|
3878
|
0
|
3879 AC_SUBST(docdir)
|
|
3880 AC_SUBST(bitmapdir)
|
149
|
3881 AC_SUBST(extra_objs)
|
263
|
3882 AC_SUBST(ld_dynamic_link_flags)
|
149
|
3883
|
|
3884 dnl The following flags combine all the information from:
|
|
3885 dnl - command line options (user always gets priority)
|
|
3886 dnl - user environment variables
|
|
3887 dnl - determined by configure
|
|
3888 dnl - the s&m header files (deprecated)
|
0
|
3889 AC_SUBST(machfile)
|
|
3890 AC_SUBST(opsysfile)
|
149
|
3891 AC_SUBST(c_switch_general)
|
|
3892 AC_SUBST(c_switch_window_system)
|
|
3893 AC_SUBST(c_switch_all)
|
|
3894 AC_SUBST(ld_switch_general)
|
|
3895 AC_SUBST(ld_switch_window_system)
|
|
3896 AC_SUBST(ld_switch_all)
|
|
3897 AC_SUBST(ld_libs_general)
|
|
3898 AC_SUBST(ld_libs_window_system)
|
|
3899 AC_SUBST(ld_libs_all)
|
|
3900 AC_SUBST(CFLAGS)
|
|
3901 AC_SUBST(CPPFLAGS)
|
|
3902 AC_SUBST(LDFLAGS)
|
173
|
3903 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
|
|
3904 AC_SUBST(RECURSIVE_MAKE)
|
149
|
3905
|
|
3906 AC_SUBST(native_sound_lib)
|
|
3907 AC_SUBST(sound_cflags)
|
0
|
3908 AC_SUBST(RANLIB)
|
|
3909 AC_SUBST(dynodump_arch)
|
|
3910
|
267
|
3911 # The default is yes
|
|
3912 if test "$with_site_lisp" = "no"; then
|
|
3913 AC_DEFINE(INHIBIT_SITE_LISP)
|
185
|
3914 fi
|
173
|
3915
|
207
|
3916 XE_SPACE(ac_configure_args, $ac_configure_args)
|
355
|
3917 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$configuration")
|
207
|
3918 AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "$ac_configure_args")
|
149
|
3919 AC_DEFINE_UNQUOTED(config_machfile, "$machfile")
|
|
3920 AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile")
|
|
3921
|
|
3922 dnl Following are deprecated
|
|
3923
|
|
3924 null_string=""
|
|
3925 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, $null_string)
|
|
3926 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, $null_string)
|
|
3927 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, $null_string)
|
|
3928 AC_DEFINE_UNQUOTED(LD_SWITCH_SITE, $null_string)
|
|
3929 AC_DEFINE_UNQUOTED(C_SWITCH_SITE, $null_string)
|
0
|
3930
|
70
|
3931 dnl Note: as a general rule, *only* define things here that are not
|
|
3932 dnl autodetected. For things that are autodetected, define them
|
|
3933 dnl at the point where the autodetection occurs or would occur,
|
|
3934 dnl so that the user gets immediate feedback on the results of the
|
|
3935 dnl autodetection.
|
|
3936
|
149
|
3937 test -n "$puresize" && AC_DEFINE_UNQUOTED(RAW_PURESIZE, $puresize)
|
|
3938
|
181
|
3939 if test "$GNU_MALLOC" = "yes"; then AC_DEFINE(GNU_MALLOC)
|
|
3940 elif test "$with_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC)
|
|
3941 elif test "$with_debug_malloc" = "yes"; then AC_DEFINE(USE_DEBUG_MALLOC)
|
|
3942 AC_DEFINE(USE_SYSTEM_MALLOC)
|
0
|
3943 fi
|
149
|
3944 test "$with_i18n3" = "yes" && AC_DEFINE(I18N3)
|
169
|
3945 test "$GCC" = "yes" && AC_DEFINE(USE_GCC)
|
149
|
3946 test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET)
|
|
3947 test "$with_gnu_make" = "yes" && AC_DEFINE(USE_GNU_MAKE)
|
|
3948 test "$no_doc_file" = "yes" && AC_DEFINE(NO_DOC_FILE)
|
272
|
3949 dnl test "$const_is_losing" = "yes" && AC_DEFINE(CONST_IS_LOSING)
|
149
|
3950 test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY)
|
|
3951 test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP)
|
|
3952 test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS)
|
|
3953 test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD)
|
272
|
3954 test "$use_union_type" = "yes" && AC_DEFINE(USE_UNION_TYPE)
|
149
|
3955
|
|
3956 dnl -------------------------------
|
|
3957 dnl Report on what we decided to do
|
|
3958 dnl -------------------------------
|
0
|
3959
|
118
|
3960 (
|
149
|
3961 dnl /etc/osversion is on SONY NEWS-OS
|
|
3962 if test -f /etc/osversion; then dnl SONY NEWS-OS
|
|
3963 echo "osversion: `cat /etc/osversion`"
|
|
3964 else
|
|
3965 echo "uname -a: `uname -a`"
|
134
|
3966 fi
|
149
|
3967 echo ""
|
|
3968 echo "$0 $quoted_arguments"
|
261
|
3969 ) > Installation
|
|
3970
|
343
|
3971 if test ! -z ${emacs_beta_version} ; then
|
|
3972 if test -z "${emacs_is_beta}" ; then
|
347
|
3973 xemacs_betaname=".${emacs_beta_version}"
|
343
|
3974 else
|
|
3975 xemacs_betaname="-b${emacs_beta_version}"
|
|
3976 fi
|
|
3977 else
|
|
3978 xemacs_betaname=""
|
|
3979 fi
|
149
|
3980
|
|
3981 dnl Start stdout redirection to '| tee -a Installation'
|
116
|
3982 (
|
0
|
3983 echo "
|
|
3984
|
261
|
3985 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
|
149
|
3986
|
|
3987 Where should the build process find the source code? $srcdir
|
|
3988 What installation prefix should install use? $prefix
|
0
|
3989 What operating system and machine description files should XEmacs use?
|
149
|
3990 \`$opsysfile' and \`$machfile'
|
|
3991 What compiler should XEmacs be built with? $CC $CFLAGS
|
0
|
3992 Should XEmacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
|
149
|
3993 Should XEmacs use the relocating allocator for buffers? $rel_alloc
|
|
3994 What window system should XEmacs use? ${window_system}"
|
|
3995 if test "$with_x11" = "yes"; then
|
|
3996 echo " Where do we find X Windows header files? $x_includes"
|
|
3997 echo " Where do we find X Windows libraries? $x_libraries"
|
0
|
3998 fi
|
149
|
3999 if test -n "$site_includes"; then
|
|
4000 echo " Additional header files: $site_includes"
|
|
4001 fi
|
|
4002 if test -n "$site_libraries"; then
|
|
4003 echo " Additional libraries: $site_libraries"
|
|
4004 fi
|
209
|
4005 if test -n "$site_prefixes"; then
|
|
4006 echo " Additional prefixes: $site_prefixes"
|
|
4007 fi
|
149
|
4008 if test -n "$runpath"; then
|
|
4009 echo " Runtime library search path: $runpath"
|
0
|
4010 fi
|
136
|
4011 test "$with_dnet" = yes && echo " Compiling in support for DNET."
|
116
|
4012 test "$with_socks" = yes && echo " Compiling in support for SOCKS."
|
|
4013 test "$with_xauth" = yes && echo " Compiling in support for XAUTH."
|
149
|
4014 if test "$with_xmu" != yes -a "$with_x11" = yes; then
|
116
|
4015 echo " No Xmu; substituting equivalent routines."
|
0
|
4016 fi
|
149
|
4017
|
153
|
4018 if test "$with_xpm" = yes; then
|
151
|
4019 echo " Compiling in support for XPM images."
|
175
|
4020 elif test "$with_x11" = yes; then
|
151
|
4021 echo " --------------------------------------------------------------------"
|
|
4022 echo " WARNING: Compiling without XPM support."
|
310
|
4023 if test "$xpm_problem" != ""; then
|
|
4024 echo " Reason: $xpm_problem"
|
|
4025 fi
|
308
|
4026 echo " WARNING: You should strongly consider installing XPM."
|
151
|
4027 echo " WARNING: Otherwise toolbars and other graphics will look suboptimal."
|
310
|
4028 echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
|
308
|
4029 echo " --------------------------------------------------------------------"
|
|
4030 fi
|
|
4031 if test "$with_png" = yes; then
|
|
4032 echo " Compiling in support for PNG image handling."
|
310
|
4033 elif test "$window_system" != "none"; then
|
308
|
4034 echo " --------------------------------------------------------------------"
|
|
4035 echo " WARNING: Compiling without PNG image support."
|
310
|
4036 if test "$png_problem" != ""; then
|
|
4037 echo " Reason: $png_problem"
|
|
4038 fi
|
308
|
4039 echo " WARNING: You should strongly consider installing the PNG libraries."
|
|
4040 echo " WARNING: Otherwise certain images and glyphs may not display."
|
310
|
4041 echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
|
151
|
4042 echo " --------------------------------------------------------------------"
|
|
4043 fi
|
308
|
4044 test "$with_gif" = yes && echo " Compiling in support for (builtin) GIF image handling."
|
|
4045 test "$with_jpeg" = yes && echo " Compiling in support for JPEG image handling."
|
|
4046 test "$with_tiff" = yes && echo " Compiling in support for TIFF image handling."
|
310
|
4047 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers."
|
149
|
4048 case "$with_sound" in
|
|
4049 nas ) echo " Compiling in network sound (NAS) support." ;;
|
|
4050 native ) echo " Compiling in native sound support." ;;
|
|
4051 both ) echo " Compiling in both network and native sound support." ;;
|
|
4052 esac
|
|
4053 test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously"
|
116
|
4054
|
|
4055 test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB."
|
|
4056 test "$with_database_dbm" = yes && echo " Compiling in support for DBM."
|
259
|
4057 test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM."
|
|
4058
|
|
4059 test "$with_umich_ldap" = yes && echo " Compiling in support for LDAP (UMich libs)."
|
|
4060 test "$with_ns_ldap" = yes && echo " Compiling in support for LDAP (Netscape SDK)."
|
|
4061 test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo " Compiling in support for LDAP (Generic)."
|
116
|
4062
|
149
|
4063 test "$with_ncurses" = yes && echo " Compiling in support for ncurses."
|
|
4064 test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)."
|
116
|
4065
|
|
4066 test "$with_mule" = yes && echo " Compiling in Mule (multi-lingual) support."
|
259
|
4067 test "$with_file_coding" = yes && echo " Compiling in File coding support."
|
116
|
4068 test "$with_xim" != no && echo " Compiling in XIM (X11R5+ I18N input method) support."
|
|
4069 test "$with_xim" = motif && echo " Using Motif to provide XIM support."
|
|
4070 test "$with_xim" = xlib && echo " Using raw Xlib to provide XIM support."
|
177
|
4071 test "$with_xfs" = yes && echo " Using XFontSet to provide bilingual menubar."
|
116
|
4072 test "$with_canna" = yes && echo " Compiling in support for Canna on Mule."
|
120
|
4073 if test "$with_wnn" = yes; then
|
|
4074 echo " Compiling in support for the WNN input method on Mule."
|
151
|
4075 test "$with_wnn6" = yes && echo " Using WNN version 6."
|
120
|
4076 fi
|
116
|
4077 test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)."
|
|
4078
|
|
4079 test "$with_cde" = yes && echo " Compiling in support for CDE."
|
|
4080 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk."
|
|
4081 test "$with_offix" = yes && echo " Compiling in support for OffiX."
|
290
|
4082 test "$with_dragndrop" = yes && echo " Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
|
149
|
4083 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop."
|
259
|
4084 test "$with_session" != no && echo " Compiling in support for proper session-management."
|
203
|
4085 case "$with_menubars" in
|
157
|
4086 lucid ) echo " Using Lucid menubars." ;;
|
|
4087 motif ) echo " Using Motif menubars."
|
|
4088 echo " *WARNING* The Motif menubar implementation is currently buggy."
|
149
|
4089 echo " We recommend using the Lucid menubar instead."
|
|
4090 echo " Re-run configure with --with-menubars='lucid'." ;;
|
|
4091 esac
|
|
4092 case "$with_scrollbars" in
|
157
|
4093 lucid ) echo " Using Lucid scrollbars." ;;
|
|
4094 motif ) echo " Using Motif scrollbars." ;;
|
|
4095 athena ) echo " Using Athena scrollbars." ;;
|
|
4096 athena3d ) echo " Using Athena-3d scrollbars." ;;
|
149
|
4097 esac
|
|
4098 case "$with_dialogs" in
|
333
|
4099 motif )
|
|
4100 echo " Using Motif dialog boxes."
|
335
|
4101 if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
|
333
|
4102 echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3 and higher."
|
|
4103 echo " We recommend using the Athena dialog boxes instead."
|
|
4104 echo " Install libXaw and re-run configure with --with-dialogs='athena'."
|
|
4105 echo " Read the PROBLEMS file for more information."
|
335
|
4106 fi; fi
|
333
|
4107 ;;
|
157
|
4108 athena ) echo " Using Athena dialog boxes." ;;
|
|
4109 athena3d ) echo " Using Athena-3d dialog boxes." ;;
|
149
|
4110 esac
|
261
|
4111 test "$with_shlib" = "yes" && echo " Compiling in DLL support."
|
203
|
4112 test "$with_clash_detection" = yes && \
|
|
4113 echo " Clash detection will use \"$lockdir\" for locking files."
|
157
|
4114 echo " movemail will use \"$mail_locking\" for locking mail spool files."
|
126
|
4115 test "$with_pop" = yes && echo " Using POP for mail access"
|
|
4116 test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication"
|
|
4117 test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host"
|
272
|
4118 test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects."
|
|
4119 test "$use_minimal_tagbits" = yes && echo " Using Lisp_Objects with minimal tagbits."
|
|
4120 test "$use_indexed_lrecord_implementation" = yes && echo " Using indexed lrecord implementation."
|
149
|
4121 test "$debug" = yes && echo " Compiling in extra code for debugging."
|
|
4122 test "$memory_usage_stats" = yes && echo " Compiling in code for checking XEmacs memory usage."
|
|
4123 test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)."
|
151
|
4124 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
|
|
4125 != "no no no no no"; then
|
|
4126 echo " WARNING: ---------------------------------------------------------"
|
|
4127 echo " WARNING: Compiling in support for runtime error checking."
|
|
4128 echo " WARNING: XEmacs will run noticeably more slowly as a result."
|
|
4129 echo " WARNING: Error checking is on by default for XEmacs beta releases."
|
|
4130 echo " WARNING: ---------------------------------------------------------"
|
|
4131 fi
|
118
|
4132 echo ""
|
116
|
4133 ) | tee -a Installation
|
261
|
4134 dnl echo "The above configure report is appended to \"Installation\" file."
|
118
|
4135 echo ""
|
|
4136
|
261
|
4137 dnl Generate Installation.el
|
|
4138 echo '(setq Installation-string "' > Installation.el
|
|
4139 sed 's/"/\\"/g' Installation >> Installation.el
|
|
4140 echo '")' >> Installation.el
|
|
4141
|
149
|
4142 dnl -----------------------------------
|
|
4143 dnl Now generate config.h and Makefiles
|
|
4144 dnl -----------------------------------
|
70
|
4145
|
|
4146 dnl This has to be called in order for this variable to get into config.status
|
120
|
4147 AC_SUBST(internal_makefile_list)
|
0
|
4148 # Remove any trailing slashes in these variables.
|
149
|
4149 test -n "$prefix" &&
|
159
|
4150 prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'`
|
149
|
4151 test -n "$exec_prefix" &&
|
159
|
4152 exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'`
|
149
|
4153
|
|
4154 dnl Build Makefile.in's from Makefile.in.in's
|
|
4155 dnl except ./Makefile from $srcdir/Makefile.in
|
|
4156
|
272
|
4157 for file in $internal_makefile_list; do
|
|
4158 test "$file" = src/Makefile.in && \
|
|
4159 file="src/Makefile.in:src/Makefile.in.in:src/depend"
|
|
4160 ac_output_files="${ac_output_files+$ac_output_files }$file"
|
|
4161 done
|
276
|
4162 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
|
272
|
4163
|
|
4164 AC_OUTPUT($ac_output_files,
|
|
4165 [for dir in $MAKE_SUBDIR; do
|
149
|
4166 echo creating $dir/Makefile
|
165
|
4167 (
|
|
4168 changequote(<<, >>)dnl
|
149
|
4169 cd $dir
|
|
4170 rm -f junk.c
|
163
|
4171 < Makefile.in \
|
165
|
4172 sed -e '/^# Generated/d' \
|
163
|
4173 -e 's%/\*\*/#.*%%' \
|
165
|
4174 -e 's/^ *# */#/' \
|
163
|
4175 -e '/^##/d' \
|
|
4176 -e '/^#/ {
|
|
4177 p
|
|
4178 d
|
|
4179 }' -e '/./ {
|
|
4180 s/\([\"]\)/\\\1/g
|
|
4181 s/^/"/
|
|
4182 s/$/"/
|
|
4183 }' > junk.c;
|
149
|
4184 $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp;
|
|
4185 < junk.cpp \
|
|
4186 sed -e 's/^#.*//' \
|
165
|
4187 -e 's/^[ TAB][ TAB]*$//' \
|
|
4188 -e 's/^ /TAB/' \
|
149
|
4189 | sed -n -e '/^..*$/p' \
|
163
|
4190 | sed '/^"/ {
|
|
4191 s/\\\([\"]\)/\1/g
|
272
|
4192 s/^[ TAB]*"//
|
|
4193 s/"[ TAB]*$//
|
163
|
4194 }' > Makefile.new
|
149
|
4195 chmod 444 Makefile.new
|
|
4196 mv -f Makefile.new Makefile
|
|
4197 rm -f junk.c junk.cpp
|
165
|
4198 changequote([, ])dnl
|
|
4199 )
|
149
|
4200 done
|
175
|
4201
|
181
|
4202 dnl Append AC_DEFINE information to lib-src/config.values
|
|
4203 dnl (AC_SUBST information is already there (see config.values.sh).
|
|
4204 sed < config.status >> lib-src/config.values \
|
|
4205 -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
|
|
4206 -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
|
|
4207 -e 's/^\([[^ ]]*\) $/\1 ""/' \
|
|
4208 -e 's/ 1$/ t/'
|
175
|
4209
|
149
|
4210 ],
|
|
4211 [CPP="$CPP"
|
|
4212 CPPFLAGS="$CPPFLAGS"
|
|
4213 top_srcdir="$srcdir"
|
|
4214 MAKE_SUBDIR="$MAKE_SUBDIR"
|
|
4215 ])
|