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