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