1 |
# |
2 |
# configure.ac |
3 |
# |
4 |
# Copyright (C) 1997 Free Software Foundation, Inc. |
5 |
# |
6 |
# Author: Scott Christley <scottc@net-community.com> |
7 |
# Ovidiu Predescu <ovidiu@net-community.com> |
8 |
# Rewrite: Adam Fedor <fedor@gnu.org> |
9 |
# |
10 |
# This file is part of the GNUstep Makefile Package. |
11 |
# |
12 |
# This library is free software; you can redistribute it and/or |
13 |
# modify it under the terms of the GNU General Public License |
14 |
# as published by the Free Software Foundation; either version 2 |
15 |
# of the License, or (at your option) any later version. |
16 |
# |
17 |
# You should have received a copy of the GNU General Public |
18 |
# License along with this library; see the file COPYING.LIB. |
19 |
# If not, write to the Free Software Foundation, |
20 |
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 |
AC_INIT |
22 |
AC_CONFIG_SRCDIR([application.make]) |
23 |
AC_CONFIG_HEADER(config.h) |
24 |
|
25 |
#-------------------------------------------------------------------- |
26 |
# Setup the library combination |
27 |
#-------------------------------------------------------------------- |
28 |
targetArgument=${target} |
29 |
AC_PROG_CC |
30 |
AC_PROG_CPP |
31 |
AC_CANONICAL_TARGET([]) |
32 |
|
33 |
AC_MSG_CHECKING(for library combo) |
34 |
AC_ARG_WITH(library-combo,[ |
35 |
--with-library-combo Define the default library combination |
36 |
], |
37 |
ac_cv_library_combo=$withval, |
38 |
ac_cv_library_combo=$ac_cv_library_combo |
39 |
) |
40 |
|
41 |
if test "$ac_cv_library_combo" = ""; then |
42 |
case "$host_os" in |
43 |
darwin*) ac_cv_library_combo=apple-apple-apple ;; |
44 |
nextstep4) ac_cv_library_combo=nx-nx-nx ;; |
45 |
openstep4) ac_cv_library_combo=nx-nx-nx ;; |
46 |
*) ac_cv_library_combo=gnu-gnu-gnu ;; |
47 |
esac |
48 |
fi |
49 |
|
50 |
case "$ac_cv_library_combo" in |
51 |
apple) ac_cv_library_combo=apple-apple-apple ;; |
52 |
gnu) ac_cv_library_combo=gnu-gnu-gnu ;; |
53 |
nx) ac_cv_library_combo=nx-nx-nx ;; |
54 |
esac |
55 |
|
56 |
AC_SUBST(ac_cv_library_combo) |
57 |
AC_MSG_RESULT($ac_cv_library_combo) |
58 |
|
59 |
OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | awk -F- '{print $1}'` |
60 |
|
61 |
#-------------------------------------------------------------------- |
62 |
# specific target_os options |
63 |
#-------------------------------------------------------------------- |
64 |
INCLUDES= |
65 |
case "$target_os" in |
66 |
freebsd* | openbsd* ) |
67 |
INCLUDES="-I/usr/local/include" |
68 |
LDFLAGS="$LDFLAGS -L/usr/local/lib";; |
69 |
netbsd*) INCLUDES="-I/usr/pkg/include" |
70 |
LDFLAGS="$LDFLAGS -Wl,-R/usr/pkg/lib -L/usr/pkg/lib";; |
71 |
esac |
72 |
|
73 |
#-------------------------------------------------------------------- |
74 |
# Determine the host, build, and target systems |
75 |
#-------------------------------------------------------------------- |
76 |
case $host_os in |
77 |
*cygwin* ) CYGWIN=yes;; |
78 |
*mingw32* ) MINGW32=yes;; |
79 |
* ) MINGW32=no |
80 |
CYGWIN=no;; |
81 |
esac |
82 |
AC_SUBST(CYGWIN) |
83 |
|
84 |
AC_EXEEXT |
85 |
AC_OBJEXT |
86 |
if test "$MINGW32" = yes; then |
87 |
echo "hosted on mingw32 .." |
88 |
export INSTALL=install |
89 |
export SHELL=sh |
90 |
export CC=${CC:-gcc} |
91 |
export AR=${AR:-ar} |
92 |
export RANLIB=${RANLIB:-ranlib} |
93 |
export DLLTOOL=${DLLTOOL:-dlltool} |
94 |
elif test "$CYGWIN" = yes; then |
95 |
echo "hosted on cygwin .." |
96 |
export CC=${CC:-gcc} |
97 |
export AR=${AR:-ar} |
98 |
export RANLIB=${RANLIB:-ranlib} |
99 |
export DLLTOOL=${DLLTOOL:-dlltool} |
100 |
fi |
101 |
|
102 |
#-------------------------------------------------------------------- |
103 |
# Find the binary and compile tools |
104 |
#-------------------------------------------------------------------- |
105 |
if test "x$target" != "x$host"; then |
106 |
echo "cross compiling from $host to $target .." |
107 |
cross_compiling="yes" |
108 |
AC_CHECK_PROG(CC, "${targetArgument}-gcc", dnl |
109 |
"${targetArgument}-gcc", gcc) |
110 |
AC_CHECK_PROG(RANLIB, "${targetArgument}-ranlib", dnl |
111 |
"${targetArgument}-ranlib", ranlib) |
112 |
AC_CHECK_PROG(AR, "${targetArgument}-ar", dnl |
113 |
"${targetArgument}-ar", ar) |
114 |
AC_CHECK_PROG(DLLTOOL, "${targetArgument}-dlltool", dnl |
115 |
"${targetArgument}-dlltool", dlltool) |
116 |
else |
117 |
AC_CHECK_PROG(AR, ar, ar) |
118 |
AC_CHECK_PROG(DLLTOOL, dlltool, dlltool) |
119 |
AC_PROG_RANLIB |
120 |
fi |
121 |
|
122 |
AC_PROG_INSTALL |
123 |
AC_PROG_LN_S([]) |
124 |
|
125 |
AC_CHECK_PROGS(TAR, gnutar gtar, tar) |
126 |
AC_ARG_WITH(tar, |
127 |
[--with-tar Set the name of the tar program to use], |
128 |
TAR="$withval",) |
129 |
|
130 |
AC_CHECK_PROG(CHOWN, chown, chown, none) |
131 |
if test "$MINGW32" = no; then |
132 |
if test "$CHOWN" = "none"; then |
133 |
AC_MSG_ERROR("Could not find chown."); |
134 |
fi |
135 |
fi |
136 |
|
137 |
#------------------------------------------------------------------- |
138 |
# GNUstep specific options follow |
139 |
#------------------------------------------------------------------- |
140 |
|
141 |
#-------------------------------------------------------------------- |
142 |
# The GNUstep root directory. |
143 |
# The user should have the GNUSTEP_SYSTEM_ROOT environment variable |
144 |
# defined, but if not then we have a global default. |
145 |
# Also test for the C: directory, which means we're on Windows |
146 |
#-------------------------------------------------------------------- |
147 |
AC_MSG_CHECKING(for GNUSTEP_SYSTEM_ROOT to use) |
148 |
AC_PREFIX_DEFAULT(`if test "x$GNUSTEP_SYSTEM_ROOT" = "x"; then |
149 |
if test -d C: ; then |
150 |
echo C:/GNUstep; |
151 |
else |
152 |
echo /usr/GNUstep ; |
153 |
fi |
154 |
else |
155 |
echo "$GNUSTEP_SYSTEM_ROOT" ; |
156 |
fi`) |
157 |
if test "x$prefix" = "xNONE"; then |
158 |
prefix="$ac_default_prefix" ; |
159 |
fi |
160 |
AC_ARG_WITH(system-root, |
161 |
[--without-system-root Don't use separate system root directory], |
162 |
ac_cv_system_root="$withval", |
163 |
ac_cv_system_root=yes) |
164 |
|
165 |
GNUSTEP_ROOT="$prefix" |
166 |
root_prefix='${prefix}' |
167 |
if test $ac_cv_system_root = yes; then |
168 |
if test "x`basename $prefix`" = xSystem; then |
169 |
GNUSTEP_ROOT=`dirname $prefix` |
170 |
else |
171 |
if test "x$prefix" = "x/"; then |
172 |
prefix=/System |
173 |
else |
174 |
prefix="$prefix/System" |
175 |
fi |
176 |
fi |
177 |
root_prefix='${prefix}/..' |
178 |
fi |
179 |
AC_SUBST(GNUSTEP_ROOT) |
180 |
AC_SUBST(root_prefix) |
181 |
AC_MSG_RESULT($prefix) |
182 |
|
183 |
# Makefiles directory location is in a bit of flux now. To keep the |
184 |
# Makefiles dir in the previous location, reset this variable to |
185 |
# 'Makefiles' and regenerate configure. Note this doesn't change all |
186 |
# occurances. |
187 |
MAKEFILES_SUFFIX=Library/Makefiles |
188 |
AC_SUBST(MAKEFILES_SUFFIX) |
189 |
|
190 |
# HOST_INSTALL is the name of the install program in config.make so set it up |
191 |
# to point to the install-sh script in the GNUstep tree if no system install is |
192 |
# found. |
193 |
AC_SUBST(HOST_INSTALL) |
194 |
if test "$INSTALL" = "$ac_install_sh"; then |
195 |
HOST_INSTALL="$prefix/$MAKEFILES_SUFFIX/$INSTALL" |
196 |
else |
197 |
HOST_INSTALL="$INSTALL" |
198 |
fi |
199 |
|
200 |
#-------------------------------------------------------------------- |
201 |
# Process --with-defaults-root, --with-user-root, |
202 |
# --with-local-root and --with-network-root |
203 |
#-------------------------------------------------------------------- |
204 |
AC_MSG_CHECKING(for GNUSTEP_LOCAL_ROOT to use) |
205 |
AC_ARG_WITH(local-root, |
206 |
[--with-local-root |
207 |
Set the GNUSTEP_LOCAL_ROOT directory. Use this option if you want |
208 |
to have the GNUSTEP_LOCAL_ROOT directory in a non-standard place. Example: |
209 |
--with-local-root=/usr/local/GNUstep/Local |
210 |
], |
211 |
GNUSTEP_LOCAL_ROOT="$withval", |
212 |
GNUSTEP_LOCAL_ROOT="$GNUSTEP_ROOT/Local" |
213 |
) |
214 |
AC_MSG_RESULT($GNUSTEP_LOCAL_ROOT) |
215 |
|
216 |
AC_MSG_CHECKING(for GNUSTEP_NETWORK_ROOT to use) |
217 |
AC_ARG_WITH(network-root, |
218 |
[--with-network-root |
219 |
Set the GNUSTEP_NETWORK_ROOT directory. Use this option if you want |
220 |
to have the GNUSTEP_NETWORK_ROOT directory in a non-standard place. Example: |
221 |
--with-network-root=/usr/local/GNUstep/Network |
222 |
], |
223 |
GNUSTEP_NETWORK_ROOT="$withval", |
224 |
GNUSTEP_NETWORK_ROOT="$GNUSTEP_ROOT/Network" |
225 |
) |
226 |
AC_MSG_RESULT($GNUSTEP_NETWORK_ROOT) |
227 |
|
228 |
AC_SUBST(GNUSTEP_LOCAL_ROOT) |
229 |
AC_SUBST(GNUSTEP_NETWORK_ROOT) |
230 |
|
231 |
#-------------------------------------------------------------------- |
232 |
# Is the system flattened? |
233 |
#-------------------------------------------------------------------- |
234 |
AC_MSG_CHECKING(for flattened directory structure) |
235 |
AC_ARG_ENABLE(flattened, |
236 |
[--disable-flattened Disable flattened directory structure], |
237 |
ac_cv_flattened=$enableval, |
238 |
ac_cv_flattened="undefined") |
239 |
|
240 |
if test "$ac_cv_flattened" = "no"; then |
241 |
GNUSTEP_FLATTENED=; |
242 |
else |
243 |
GNUSTEP_FLATTENED=yes; |
244 |
fi |
245 |
AC_SUBST(GNUSTEP_FLATTENED) |
246 |
|
247 |
if test "$GNUSTEP_FLATTENED" = "yes"; then |
248 |
AC_MSG_RESULT(yes); |
249 |
else |
250 |
AC_MSG_RESULT(no); |
251 |
fi |
252 |
|
253 |
|
254 |
#-------------------------------------------------------------------- |
255 |
# Is the system multi-platform? |
256 |
#-------------------------------------------------------------------- |
257 |
# |
258 |
# Multi-platform means that GNUstep.sh will determine the host |
259 |
# platform (by running config.guess) each time that it is sourced. |
260 |
# This is good if you are sharing your GNUstep.sh across your network |
261 |
# (for example, mounting the makefiles via NFS), but it requires you |
262 |
# to be able to run config.guess on your machine(s), which usually |
263 |
# requires a development environment (compiler, libc etc). |
264 |
# |
265 |
# The default instead is not using multi-platform, which means the |
266 |
# local host os, cpu and version is hardcoded in GNUstep.sh. This |
267 |
# works nicely for a single machine using this gnustep-make |
268 |
# installation, and it works even if you don't have development |
269 |
# packages (gcc, binutils, libc-dev etc) installed. We had to make |
270 |
# this the default after end-users (with no development packages |
271 |
# installed) complained that binary packages wouldn't work (and the |
272 |
# reason turned out to be that GNUstep.sh was running config.guess |
273 |
# which was returning the wrong platform because the development |
274 |
# tools needed/used to determine the platform were not available). |
275 |
# |
276 |
# Unless you know what you are doing, stick with the default, which is |
277 |
# also much faster when sourcing GNUstep.sh. |
278 |
# |
279 |
AC_ARG_ENABLE(multi-platform, |
280 |
[--enable-multi-platform Use run time multi-platform support], |
281 |
ac_cv_multi_platform=$enableval, |
282 |
ac_cv_multi_platform="undefined") |
283 |
|
284 |
if test "$ac_cv_multi_platform" = "yes"; then |
285 |
GNUSTEP_MULTI_PLATFORM=yes; |
286 |
else |
287 |
GNUSTEP_MULTI_PLATFORM=; |
288 |
fi |
289 |
AC_SUBST(GNUSTEP_MULTI_PLATFORM) |
290 |
|
291 |
#-------------------------------------------------------------------- |
292 |
# Build backend bundles (on by default) |
293 |
#-------------------------------------------------------------------- |
294 |
AC_ARG_ENABLE(backend-bundle, [ |
295 |
--disable-backend-bundle Compile gui backend as a library], |
296 |
ac_cv_backend=$enableval, |
297 |
ac_cv_backend="yes") |
298 |
|
299 |
if test "$ac_cv_backend" = "yes"; then |
300 |
BACKEND_BUNDLE=yes; |
301 |
else |
302 |
BACKEND_BUNDLE=; |
303 |
fi |
304 |
AC_SUBST(BACKEND_BUNDLE) |
305 |
|
306 |
#-------------------------------------------------------------------- |
307 |
# Miscellaneous flags and setup |
308 |
#-------------------------------------------------------------------- |
309 |
# Strip '-g' off of CFLAGS, since debug=yes adds that anyway |
310 |
CFLAGS=`echo $CFLAGS | sed -e 's/-g //'` |
311 |
|
312 |
# Set location of GNUstep dirs for later use |
313 |
if test "$GNUSTEP_FLATTENED" = yes; then |
314 |
GNUSTEP_LDIR="$prefix/Library/Libraries" |
315 |
GNUSTEP_HDIR="$prefix/Library/Headers" |
316 |
else |
317 |
clean_target_os=`$srcdir/clean_os.sh $target_os` |
318 |
clean_target_cpu=`$srcdir/clean_cpu.sh $target_cpu` |
319 |
obj_dir="$clean_target_cpu/$clean_target_os" |
320 |
GNUSTEP_LDIR="$prefix/Library/Libraries/$obj_dir" |
321 |
GNUSTEP_HDIR="$prefix/Library/Headers/${ac_cv_library_combo}" |
322 |
fi |
323 |
|
324 |
# Check to see if the libobjc library is in our GNUSTEP_SYSTEM_ROOT. |
325 |
# If so, there are probably other libraries that we want there also, so |
326 |
# leave the proper includes in CPPFLAGS and LDFLAGS |
327 |
AC_MSG_CHECKING(for custom shared objc library) |
328 |
AC_CACHE_VAL(gs_cv_objc_libdir, |
329 |
[dnl |
330 |
gs_cv_objc_libdir=NONE |
331 |
if test -f "$GNUSTEP_HDIR/objc/objc.h"; then |
332 |
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so"; then |
333 |
gs_cv_objc_libdir="$GNUSTEP_LDIR" |
334 |
else |
335 |
gs_cv_objc_libdir=NONE |
336 |
fi |
337 |
fi |
338 |
#gcc_shared_libobjc=`gcc -print-file-name=libobjc.so` |
339 |
#if test -f "$gcc_shared_libobjc"; then |
340 |
# gs_cv_objc_libdir=`dirname $gcc_shared_libobjc` |
341 |
#fi |
342 |
]) |
343 |
AC_MSG_RESULT($gs_cv_objc_libdir) |
344 |
|
345 |
# The following are needed to compile the test programs |
346 |
if test "$gs_cv_objc_libdir" = "$GNUSTEP_LDIR"; then |
347 |
if test "$GNUSTEP_FLATTENED" = yes; then |
348 |
OBJC_CPPFLAGS="$CPPFLAGS $INCLUDES -I$prefix/Library/Headers" |
349 |
else |
350 |
OBJC_CPPFLAGS="$CPPFLAGS $INCLUDES -I$prefix/Library/Headers/${ac_cv_library_combo}" |
351 |
fi |
352 |
OBJC_LDFLAGS="$LDFLAGS -L$gs_cv_objc_libdir" |
353 |
fi |
354 |
|
355 |
# And the following to execute them |
356 |
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gs_cv_objc_libdir" |
357 |
export LD_LIBRARY_PATH |
358 |
|
359 |
#-------------------------------------------------------------------- |
360 |
# Miscellaneous headers (only used for compiling which_lib.c and user_home.c) |
361 |
#-------------------------------------------------------------------- |
362 |
AC_HEADER_DIRENT |
363 |
AC_CHECK_HEADERS(sys/param.h sys/file.h dir.h string.h stdlib.h sys/types.h dnl |
364 |
fcntl.h limits.h utime.h sys/stat.h pwd.h unistd.h) |
365 |
AC_CHECK_FUNCS(getpwnam getpwuid geteuid getlogin strchr) |
366 |
|
367 |
#-------------------------------------------------------------------- |
368 |
# Check if libobjc was compiled with thread support. |
369 |
#-------------------------------------------------------------------- |
370 |
OBJC_THREAD= |
371 |
AC_ARG_WITH(thread-lib, |
372 |
[--with-thread-lib Specify alternate thread library], |
373 |
OBJC_THREAD=$withval, |
374 |
OBJC_THREAD= |
375 |
) |
376 |
|
377 |
|
378 |
AC_MSG_CHECKING(whether objc has thread support) |
379 |
saved_CFLAGS="$CFLAGS" |
380 |
saved_LIBS="$LIBS" |
381 |
CFLAGS="$CFLAGS -x objective-c -I$srcdir $OBJC_CPPFLAGS $OBJC_LDFLAGS" |
382 |
if test "$OBJC_RUNTIME_LIB" = "gnu"; then |
383 |
CFLAGS="$CFLAGS -fgnu-runtime" |
384 |
fi |
385 |
if test "$OBJC_RUNTIME_LIB" = "nx"; then |
386 |
CFLAGS="$CFLAGS -DNeXT_RUNTIME" |
387 |
fi |
388 |
if test "$OBJC_RUNTIME_LIB" = "apple"; then |
389 |
CFLAGS="$CFLAGS -DNeXT_RUNTIME" |
390 |
fi |
391 |
if test "$OBJC_THREAD" != ""; then |
392 |
LIBS="-lobjc $LIBS $OBJC_THREAD" |
393 |
AC_TRY_RUN([#include "config_thread.m"], |
394 |
objc_threaded="$OBJC_THREAD", |
395 |
objc_threaded="", objc_threaded="") |
396 |
elif test "$host_os" = linux-gnu; then |
397 |
LIBS="-lobjc -lpthread" |
398 |
AC_TRY_RUN([#include "config_thread.m"], objc_threaded="-lpthread", |
399 |
objc_threaded="", objc_threaded="-lpthread") |
400 |
elif test "`echo $host_os|sed 's/[[0-9]].*//'|sed s/elf//`" = freebsd; then |
401 |
LIBS="-pthread -lobjc" |
402 |
AC_TRY_RUN([#include "config_thread.m"], objc_threaded="-pthread", |
403 |
objc_threaded="", objc_threaded="-pthread") |
404 |
if test x"$objc_threaded" = x""; then |
405 |
LIBS="-lpthread -lobjc" |
406 |
AC_TRY_RUN([#include "config_thread.m"], objc_threaded="-lpthread", |
407 |
objc_threaded="", objc_threaded="-lpthread") |
408 |
fi |
409 |
if test x"$objc_threaded" = x""; then |
410 |
LIBS="-lobjc -lpcthread" |
411 |
AC_TRY_RUN([#include "config_thread.m"], objc_threaded="-lpcthread", |
412 |
objc_threaded="", objc_threaded="-lpcthread") |
413 |
fi |
414 |
elif test "$MINGW32" = yes; then |
415 |
# Mingw doesn't need anything extra for threads |
416 |
LIBS="-lobjc $LIBS" |
417 |
AC_TRY_RUN([#include "config_thread.m"], |
418 |
objc_threaded="works", |
419 |
objc_threaded="", objc_threaded="works") |
420 |
else |
421 |
LIBS="-lobjc $LIBS" |
422 |
AC_TRY_RUN([#include "config_thread.m"], |
423 |
objc_threaded="works", |
424 |
objc_threaded="", objc_threaded="") |
425 |
if test x"$objc_threaded" = x""; then |
426 |
LIBS="-lobjc $saved_LIBS -lpthread " |
427 |
AC_TRY_RUN([#include "config_thread.m"], |
428 |
objc_threaded="-lpthread", |
429 |
objc_threaded="", objc_threaded="") |
430 |
fi |
431 |
if test x"$objc_threaded" = x""; then |
432 |
# Solaris, OpenBSD/sparc |
433 |
LIBS="-lobjc $saved_LIBS -lpthread -lposix4" |
434 |
AC_TRY_RUN([#include "config_thread.m"], |
435 |
objc_threaded="-lpthread -lposix4", |
436 |
objc_threaded="", objc_threaded="") |
437 |
fi |
438 |
if test x"$objc_threaded" = x""; then |
439 |
LIBS="-lobjc $saved_LIBS -lthread " |
440 |
AC_TRY_RUN([#include "config_thread.m"], |
441 |
objc_threaded="-lthread", |
442 |
objc_threaded="", objc_threaded="") |
443 |
fi |
444 |
fi |
445 |
LIBS="$saved_LIBS" |
446 |
CFLAGS="$saved_CFLAGS" |
447 |
if test x"$objc_threaded" = x""; then |
448 |
AC_MSG_RESULT(no) |
449 |
else |
450 |
if test x"$objc_threaded" = x"works"; then |
451 |
objc_threaded="" |
452 |
fi |
453 |
AC_MSG_RESULT(yes: $objc_threaded) |
454 |
fi |
455 |
ac_cv_objc_threaded="$objc_threaded" |
456 |
AC_SUBST(objc_threaded) |
457 |
AC_SUBST(ac_cv_objc_threaded) |
458 |
|
459 |
#-------------------------------------------------------------------- |
460 |
# Check if compiler supports -MMD -MP to generate %.d files ... |
461 |
#-------------------------------------------------------------------- |
462 |
|
463 |
AC_MSG_CHECKING(if the compiler supports autodependencies) |
464 |
|
465 |
# What we want to do: set AUTO_DEPENDENCIES to yes if gcc => 3.x |
466 |
|
467 |
if test ! ${GCC} = "yes" ; then |
468 |
AUTO_DEPENDENCIES="" |
469 |
AC_MSG_RESULT(no: it's not gcc) |
470 |
else |
471 |
# Running gcc -dumpversion we get something like 2.95.4 or |
472 |
# egcs-2.91.66 or 3.0.2 or 3.1 20011211 |
473 |
# We want to discard anything but the major number. |
474 |
# Explanation of the regexp - |
475 |
# \(^[^0-9]*\) matches beginning of line and following non numeric chars |
476 |
# \([0-9][0-9]*\) matches 1 or more numeric chars (this is the 2^nd |
477 |
# subpattern) |
478 |
# \([^0-9].*\) matches a non numeric char followed by anything |
479 |
# /\2/ replace the whole lot with the 2^nd subpattern |
480 |
gs_cv_gcc_major_version=`${CC} -dumpversion | sed "s/\([[^0-9]]*\)\([[0-9]][[0-9]]*\)\([[^0-9]].*\)/\2/"`; |
481 |
|
482 |
if test "${gs_cv_gcc_major_version}" -ge "3" ; then |
483 |
AUTO_DEPENDENCIES=yes |
484 |
AC_MSG_RESULT(yes: gcc major version is ${gs_cv_gcc_major_version}) |
485 |
else |
486 |
AUTO_DEPENDENCIES="" |
487 |
AC_MSG_RESULT(no: gcc major version is ${gs_cv_gcc_major_version}) |
488 |
fi |
489 |
fi |
490 |
|
491 |
AC_SUBST(AUTO_DEPENDENCIES) |
492 |
AC_SUBST(INCLUDES) |
493 |
|
494 |
#--------------------------------------------------------------------- |
495 |
# Enable/disable warnings for deprecated #import directive as required |
496 |
#--------------------------------------------------------------------- |
497 |
AC_MSG_CHECKING(whether to disable compiler warnings about deprecated import) |
498 |
|
499 |
# |
500 |
# GCC recommends that you use `--disable-import' here, since #import |
501 |
# is seriously deprecated. If you are unsure, please use --disable-import. |
502 |
# |
503 |
AC_ARG_ENABLE(import, |
504 |
[--enable-import Don't warn about usage of deprecated import directive], |
505 |
ac_cv_import=$enableval, |
506 |
ac_cv_import="no") |
507 |
|
508 |
AC_MSG_RESULT($ac_cv_import) |
509 |
|
510 |
if test "$ac_cv_import" = "yes"; then |
511 |
OBJC_NO_IMPORT_FLAGS=-Wno-import; |
512 |
fi |
513 |
AC_SUBST(OBJC_NO_IMPORT_FLAGS) |
514 |
|
515 |
#-------------------------------------------------------------------- |
516 |
# Disable updating the obsolete directory structure |
517 |
#-------------------------------------------------------------------- |
518 |
gs_move_obsolete=yes |
519 |
AC_ARG_ENABLE(move-obsolete, |
520 |
[--disable-move-obsolete Disable moving obsolete dir structure], |
521 |
gs_move_obsolete=$enableval, |
522 |
gs_move_obsolete=yes) |
523 |
|
524 |
if test "$gs_move_obsolete" = "yes"; then |
525 |
GNUSTEP_MOVE_OBSOLETE=move_obsolete; |
526 |
AC_MSG_NOTICE(*** WARNING any old GNUstep directories installed before gnustep-make 1.7.0 will be moved to the new locations unless disabled in configure) |
527 |
else |
528 |
GNUSTEP_MOVE_OBSOLETE= |
529 |
AC_MSG_NOTICE(Old GNUstep directories will not be moved) |
530 |
fi |
531 |
AC_SUBST(GNUSTEP_MOVE_OBSOLETE) |
532 |
|
533 |
#-------------------------------------------------------------------- |
534 |
# Record the version |
535 |
#-------------------------------------------------------------------- |
536 |
AC_MSG_CHECKING(for the version of gnustep-make we are compiling) |
537 |
. "$srcdir/Version" |
538 |
AC_MSG_RESULT($GNUSTEP_MAKE_VERSION) |
539 |
AC_SUBST(GNUSTEP_MAKE_VERSION) |
540 |
AC_SUBST(GNUSTEP_MAKE_MAJOR_VERSION) |
541 |
AC_SUBST(GNUSTEP_MAKE_MINOR_VERSION) |
542 |
AC_SUBST(GNUSTEP_MAKE_SUBMINOR_VERSION) |
543 |
|
544 |
#------------------------------------------------------------------- |
545 |
# Record the 'clean' target_os, target_cpu and target_vendor |
546 |
#------------------------------------------------------------------- |
547 |
# This is just for efficiency, so that core/make/GNUmakefile does not |
548 |
# have to compute clean_target_os from target_os (and similar) by |
549 |
# running shell scripts each time you 'make' something inside |
550 |
# gnustep-make. We basically compute them once now, and cache them |
551 |
# forever. It is also used by GNUstep.sh when multi-platform is |
552 |
# disabled. |
553 |
clean_target_os=`$srcdir/clean_os.sh $target_os` |
554 |
clean_target_cpu=`$srcdir/clean_cpu.sh $target_cpu` |
555 |
clean_target_vendor=`$srcdir/clean_cpu.sh $target_vendor` |
556 |
AC_SUBST(clean_target_os) |
557 |
AC_SUBST(clean_target_cpu) |
558 |
AC_SUBST(clean_target_vendor) |
559 |
AC_SUBST(target) |
560 |
|
561 |
#-------------------------------------------------------------------- |
562 |
# Produce the output files |
563 |
#-------------------------------------------------------------------- |
564 |
AC_CONFIG_FILES([config.make openapp debugapp opentool |
565 |
executable.template GNUmakefile GNUstep.sh GNUstep.csh fixpath.sh |
566 |
gnustep-make.spec Documentation/GNUmakefile]) |
567 |
AC_CONFIG_COMMANDS([default], |
568 |
[[chmod a+x openapp debugapp opentool fixpath.sh executable.template]], |
569 |
[[]]) |
570 |
AC_OUTPUT |