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