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