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