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