Imported Upstream version 0.10.0
Dariusz Dwornikowski
8 years ago
0 | 0.10.0 (23/03/2002) | |
1 | Sprite animation added. | |
2 | Fullscreen mode now available. | |
3 | Segmentation fault when starting level nine fixed. | |
4 | Complete new graphic theme drawn (celebrating PND first birthday). | |
5 | Spanish web page now available. | |
6 | ||
0 | 7 | 0.9.0 (10/12/2001) |
1 | 8 | Required pipes feature added. |
2 | 9 | Number of required pipes for each level defined. |
0 | SUBDIRS = src images levels | |
0 | SUBDIRS = src images levels man | |
1 | 1 | |
2 | 2 | EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README pipenightdreams.lsm autogen.sh |
3 | ||
4 |
0 | default: all | |
1 | ||
2 | dist: | |
3 | @echo "This file is to make it easier for you to create all you need" | |
4 | cat acinclude.m4.in libtool.m4.in >acinclude.m4 | |
5 | aclocal | |
6 | autoheader | |
7 | # use --include-deps, if you want to release the stuff. Don't use it for | |
8 | # yourself | |
9 | automake --include-deps | |
10 | autoconf | |
11 | touch stamp-h.in | |
12 | LIST=`find ./po -name "*.po"`; \ | |
13 | for i in $$LIST; do \ | |
14 | file2=`echo $$i | sed -e "s#\.po#\.gmo#"`; \ | |
15 | msgfmt -o $$file2 $$i; \ | |
16 | done | |
17 | rm -f Makefile.dist | |
18 | ||
19 | all: | |
20 | cat acinclude.m4.in libtool.m4.in >acinclude.m4 | |
21 | aclocal | |
22 | autoheader | |
23 | automake | |
24 | autoconf | |
25 |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
76 | 76 | SDL_LIBS = @SDL_LIBS@ |
77 | 77 | VERSION = @VERSION@ |
78 | 78 | |
79 | SUBDIRS = src images levels man | |
79 | SUBDIRS = src images levels man | |
80 | 80 | |
81 | 81 | EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README pipenightdreams.lsm autogen.sh |
82 | 82 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
84 | 84 | CONFIG_HEADER = ./src/config.h |
85 | 85 | CONFIG_CLEAN_FILES = |
86 | 86 | DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ |
87 | Makefile.in NEWS acinclude.m4 aclocal.m4 config.guess config.sub \ | |
88 | configure configure.in install-sh missing mkinstalldirs | |
87 | Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess config.sub \ | |
88 | configure configure.in install-sh ltconfig ltmain.sh missing \ | |
89 | mkinstalldirs | |
89 | 90 | |
90 | 91 | |
91 | 92 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
92 | 93 | |
93 | TAR = tar | |
94 | TAR = gtar | |
94 | 95 | GZIP_ENV = --best |
95 | 96 | all: all-redirect |
96 | 97 | .SUFFIXES: |
145 | 146 | dot_seen=no; \ |
146 | 147 | rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ |
147 | 148 | rev="$$subdir $$rev"; \ |
148 | test "$$subdir" = "." && dot_seen=yes; \ | |
149 | test "$$subdir" != "." || dot_seen=yes; \ | |
149 | 150 | done; \ |
150 | 151 | test "$$dot_seen" = "no" && rev=". $$rev"; \ |
151 | 152 | target=`echo $@ | sed s/-recursive//`; \ |
0 | ## -*- autoconf -*- | |
1 | ||
2 | dnl This file is part of the KDE libraries/packages | |
3 | dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu) | |
4 | dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org) | |
5 | ||
6 | dnl This file is free software; you can redistribute it and/or | |
7 | dnl modify it under the terms of the GNU Library General Public | |
8 | dnl License as published by the Free Software Foundation; either | |
9 | dnl version 2 of the License, or (at your option) any later version. | |
10 | ||
11 | dnl This library is distributed in the hope that it will be useful, | |
12 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | dnl Library General Public License for more details. | |
15 | ||
16 | dnl You should have received a copy of the GNU Library General Public License | |
17 | dnl along with this library; see the file COPYING.LIB. If not, write to | |
18 | dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
19 | dnl Boston, MA 02111-1307, USA. | |
20 | ||
21 | dnl IMPORTANT NOTE: | |
22 | dnl Please do not modify this file unless you expect your modifications to be | |
23 | dnl carried into every other module in the repository. If you decide that you | |
24 | dnl really want to modify it, contact coolo@kde.org mentioning that you have | |
25 | dnl and that the modified file should be committed to every module. | |
26 | dnl | |
27 | dnl Single-module modifications are best placed in configure.in for kdelibs | |
28 | dnl and kdebase or configure.in.in if present. | |
29 | ||
30 | ||
31 | dnl ------------------------------------------------------------------------ | |
32 | dnl Find a file (or one of more files in a list of dirs) | |
33 | dnl ------------------------------------------------------------------------ | |
34 | dnl | |
35 | AC_DEFUN(AC_FIND_FILE, | |
36 | [ | |
37 | $3=NO | |
38 | for i in $2; | |
39 | do | |
40 | for j in $1; | |
41 | do | |
42 | if test -r "$i/$j"; then | |
43 | $3=$i | |
44 | break 2 | |
45 | fi | |
46 | done | |
47 | done | |
48 | ]) | |
49 | ||
50 | dnl KDE_FIND_PATH(programm-name, variable-name, list of directories, | |
51 | dnl if-not-found, test-parameter) | |
52 | AC_DEFUN(KDE_FIND_PATH, | |
53 | [ | |
54 | AC_MSG_CHECKING([for $1]) | |
55 | kde_cache=`echo $1 | sed 'y%./+-%__p_%'` | |
56 | ||
57 | AC_CACHE_VAL(kde_cv_path_$kde_cache, | |
58 | [ | |
59 | kde_cv_path="NONE" | |
60 | if test -n "$$2"; then | |
61 | kde_cv_path="$$2"; | |
62 | else | |
63 | dirs="$3" | |
64 | kde_save_IFS=$IFS | |
65 | IFS=':' | |
66 | for dir in $PATH; do | |
67 | dirs="$dirs $dir" | |
68 | done | |
69 | IFS=$kde_save_IFS | |
70 | ||
71 | for dir in $dirs; do | |
72 | if test -x "$dir/$1"; then | |
73 | if test -n "$5" | |
74 | then | |
75 | evalstr="$dir/$1 $5 2>&1 " | |
76 | if eval $evalstr; then | |
77 | kde_cv_path="$dir/$1" | |
78 | break | |
79 | fi | |
80 | else | |
81 | kde_cv_path="$dir/$1" | |
82 | break | |
83 | fi | |
84 | fi | |
85 | done | |
86 | ||
87 | fi | |
88 | ||
89 | eval "kde_cv_path_$kde_cache=$kde_cv_path" | |
90 | ||
91 | ]) | |
92 | ||
93 | eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\"" | |
94 | if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then | |
95 | AC_MSG_RESULT(not found) | |
96 | $4 | |
97 | else | |
98 | AC_MSG_RESULT($kde_cv_path) | |
99 | $2=$kde_cv_path | |
100 | ||
101 | fi | |
102 | ]) | |
103 | ||
104 | AC_DEFUN(KDE_MOC_ERROR_MESSAGE, | |
105 | [ | |
106 | AC_MSG_ERROR([No Qt meta object compiler (moc) found! | |
107 | Please check whether you installed Qt correctly. | |
108 | You need to have a running moc binary. | |
109 | configure tried to run $ac_cv_path_moc and the test didn't | |
110 | succeed. If configure shouldn't have tried this one, set | |
111 | the environment variable MOC to the right one before running | |
112 | configure. | |
113 | ]) | |
114 | ]) | |
115 | ||
116 | dnl ------------------------------------------------------------------------ | |
117 | dnl Find the meta object compiler in the PATH, in $QTDIR/bin, and some | |
118 | dnl more usual places | |
119 | dnl ------------------------------------------------------------------------ | |
120 | dnl | |
121 | AC_DEFUN(AC_PATH_QT_MOC, | |
122 | [ | |
123 | KDE_FIND_PATH(moc, MOC, [$ac_qt_bindir $QTDIR/bin $QTDIR/src/moc \ | |
124 | /usr/bin /usr/X11R6/bin /usr/lib/qt/bin /usr/lib/qt2/bin \ | |
125 | /usr/local/qt/bin], [KDE_MOC_ERROR_MESSAGE]) | |
126 | ||
127 | if test -z "$MOC"; then | |
128 | if test -n "$ac_cv_path_moc"; then | |
129 | output=`eval "$ac_cv_path_moc --help 2>&1 | sed -e '1q' | grep Qt"` | |
130 | fi | |
131 | echo "configure:__oline__: tried to call $ac_cv_path_moc --help 2>&1 | sed -e '1q' | grep Qt" >&AC_FD_CC | |
132 | echo "configure:__oline__: moc output: $output" >&AC_FD_CC | |
133 | ||
134 | if test -z "$output"; then | |
135 | KDE_MOC_ERROR_MESSAGE | |
136 | fi | |
137 | fi | |
138 | ||
139 | AC_SUBST(MOC) | |
140 | ]) | |
141 | ||
142 | AC_DEFUN(KDE_1_CHECK_PATHS, | |
143 | [ | |
144 | KDE_1_CHECK_PATH_HEADERS | |
145 | ||
146 | KDE_TEST_RPATH= | |
147 | ||
148 | if test -n "$USE_RPATH"; then | |
149 | ||
150 | if test -n "$kde_libraries"; then | |
151 | KDE_TEST_RPATH="-rpath $kde_libraries" | |
152 | fi | |
153 | ||
154 | if test -n "$qt_libraries"; then | |
155 | KDE_TEST_RPATH="$KDE_TEST_RPATH -rpath $qt_libraries" | |
156 | fi | |
157 | ||
158 | if test -n "$x_libraries"; then | |
159 | KDE_TEST_RPATH="$KDE_TEST_RPATH -rpath $x_libraries" | |
160 | fi | |
161 | ||
162 | KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH" | |
163 | fi | |
164 | ||
165 | AC_MSG_CHECKING([for KDE libraries installed]) | |
166 | ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5' | |
167 | ||
168 | if AC_TRY_EVAL(ac_link) && test -s conftest; then | |
169 | AC_MSG_RESULT(yes) | |
170 | else | |
171 | AC_MSG_ERROR([your system fails at linking a small KDE application! | |
172 | Check, if your compiler is installed correctly and if you have used the | |
173 | same compiler to compile Qt and kdelibs as you did use now]) | |
174 | fi | |
175 | ||
176 | if eval `KDEDIR= ./conftest 2>&5`; then | |
177 | kde_result=done | |
178 | else | |
179 | kde_result=problems | |
180 | fi | |
181 | ||
182 | KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log | |
183 | kde_have_all_paths=yes | |
184 | AC_LANG_CPLUSPLUS | |
185 | ||
186 | KDE_SET_PATHS($kde_result) | |
187 | ||
188 | ]) | |
189 | ||
190 | AC_DEFUN(KDE_SET_PATHS, | |
191 | [ | |
192 | kde_cv_all_paths="kde_have_all_paths=\"yes\" \ | |
193 | kde_htmldir=\"$kde_htmldir\" \ | |
194 | kde_appsdir=\"$kde_appsdir\" \ | |
195 | kde_icondir=\"$kde_icondir\" \ | |
196 | kde_sounddir=\"$kde_sounddir\" \ | |
197 | kde_datadir=\"$kde_datadir\" \ | |
198 | kde_locale=\"$kde_locale\" \ | |
199 | kde_cgidir=\"$kde_cgidir\" \ | |
200 | kde_confdir=\"$kde_confdir\" \ | |
201 | kde_mimedir=\"$kde_mimedir\" \ | |
202 | kde_toolbardir=\"$kde_toolbardir\" \ | |
203 | kde_wallpaperdir=\"$kde_wallpaperdir\" \ | |
204 | kde_bindir=\"$kde_bindir\" \ | |
205 | kde_servicesdir=\"$kde_servicesdir\" \ | |
206 | kde_servicetypesdir=\"$kde_servicetypesdir\" \ | |
207 | kde_result=$1" | |
208 | ]) | |
209 | ||
210 | AC_DEFUN(AC_CREATE_KFSSTND, | |
211 | [ | |
212 | AC_REQUIRE([AC_CHECK_RPATH]) | |
213 | ||
214 | AC_MSG_CHECKING([for KDE paths]) | |
215 | kde_result="" | |
216 | ||
217 | AC_CACHE_VAL(kde_cv_all_paths, | |
218 | [ | |
219 | if test "$1" = "default"; then | |
220 | ||
221 | if test -z "$kde_htmldir"; then | |
222 | kde_htmldir='\$(prefix)/share/doc/HTML' | |
223 | fi | |
224 | if test -z "$kde_appsdir"; then | |
225 | kde_appsdir='\$(prefix)/share/applnk' | |
226 | fi | |
227 | if test -z "$kde_icondir"; then | |
228 | kde_icondir='\$(prefix)/share/icons' | |
229 | fi | |
230 | if test -z "$kde_sounddir"; then | |
231 | kde_sounddir='\$(prefix)/share/sounds' | |
232 | fi | |
233 | if test -z "$kde_datadir"; then | |
234 | kde_datadir='\$(prefix)/share/apps' | |
235 | fi | |
236 | if test -z "$kde_locale"; then | |
237 | kde_locale='\$(prefix)/share/locale' | |
238 | fi | |
239 | if test -z "$kde_cgidir"; then | |
240 | kde_cgidir='\$(exec_prefix)/cgi-bin' | |
241 | fi | |
242 | if test -z "$kde_confdir"; then | |
243 | kde_confdir='\$(prefix)/share/config' | |
244 | fi | |
245 | if test -z "$kde_mimedir"; then | |
246 | kde_mimedir='\$(prefix)/share/mimelnk' | |
247 | fi | |
248 | if test -z "$kde_toolbardir"; then | |
249 | kde_toolbardir='\$(prefix)/share/toolbar' | |
250 | fi | |
251 | if test -z "$kde_wallpaperdir"; then | |
252 | kde_wallpaperdir='\$(prefix)/share/wallpapers' | |
253 | fi | |
254 | if test -z "$kde_bindir"; then | |
255 | kde_bindir='\$(exec_prefix)/bin' | |
256 | fi | |
257 | if test -z "$kde_servicesdir"; then | |
258 | kde_servicesdir='\$(prefix)/share/services' | |
259 | fi | |
260 | if test -z "$kde_servicetypesdir"; then | |
261 | kde_servicetypesdir='\$(prefix)/share/servicetypes' | |
262 | fi | |
263 | ||
264 | KDE_SET_PATHS(defaults) | |
265 | ||
266 | else | |
267 | ||
268 | if test $kde_qtver = 1; then | |
269 | AC_MSG_RESULT([compiling]) | |
270 | KDE_1_CHECK_PATHS | |
271 | else | |
272 | AC_MSG_ERROR([path checking not yet supported for KDE 2]) | |
273 | fi | |
274 | ||
275 | fi | |
276 | ||
277 | ]) | |
278 | ||
279 | eval "$kde_cv_all_paths" | |
280 | ||
281 | if test -z "$kde_htmldir" || test -z "$kde_appsdir" || | |
282 | test -z "$kde_icondir" || test -z "$kde_sounddir" || | |
283 | test -z "$kde_datadir" || test -z "$kde_locale" || | |
284 | test -z "$kde_cgidir" || test -z "$kde_confdir" || | |
285 | test -z "$kde_mimedir" || test -z "$kde_toolbardir" || | |
286 | test -z "$kde_wallpaperdir" || test -z "$kde_bindir" || | |
287 | test -z "$kde_servicesdir" || | |
288 | test -z "$kde_servicetypesdir" || test "$kde_have_all_paths" != "yes"; then | |
289 | kde_have_all_paths=no | |
290 | AC_MSG_ERROR([configure could not run a little KDE program to test the environment. | |
291 | Since it had compiled and linked before, it must be a strange problem on your system. | |
292 | Look at config.log for details. If you are not able to fix this, look at | |
293 | http://www.kde.org/faq/installation.html or any www.kde.org mirror. | |
294 | (If you're using an egcs version on Linux, you may update binutils!) | |
295 | ]) | |
296 | else | |
297 | rm -f conftest* | |
298 | AC_MSG_RESULT($kde_result) | |
299 | fi | |
300 | ||
301 | bindir=$kde_bindir | |
302 | ||
303 | ]) | |
304 | ||
305 | AC_DEFUN(AC_SUBST_KFSSTND, | |
306 | [ | |
307 | AC_SUBST(kde_htmldir) | |
308 | AC_SUBST(kde_appsdir) | |
309 | AC_SUBST(kde_icondir) | |
310 | AC_SUBST(kde_sounddir) | |
311 | AC_SUBST(kde_datadir) | |
312 | AC_SUBST(kde_locale) | |
313 | AC_SUBST(kde_cgidir) | |
314 | AC_SUBST(kde_confdir) | |
315 | AC_SUBST(kde_mimedir) | |
316 | AC_SUBST(kde_toolbardir) | |
317 | AC_SUBST(kde_wallpaperdir) | |
318 | AC_SUBST(kde_bindir) | |
319 | dnl for KDE 2 | |
320 | AC_SUBST(kde_servicesdir) | |
321 | AC_SUBST(kde_servicetypesdir) | |
322 | if test "$kde_qtver" = 1; then | |
323 | kde_minidir="$kde_icondir/mini" | |
324 | else | |
325 | # for KDE 1 - this breaks KDE2 apps using minidir, but | |
326 | # that's the plan ;-/ | |
327 | kde_minidir="/dev/null" | |
328 | fi | |
329 | AC_SUBST(kde_minidir) | |
330 | ]) | |
331 | ||
332 | AC_DEFUN(KDE_MISC_TESTS, | |
333 | [ | |
334 | AC_LANG_C | |
335 | dnl Checks for libraries. | |
336 | AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for FreeBSD | |
337 | AC_SUBST(LIBCOMPAT) | |
338 | kde_have_crypt= | |
339 | AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes], | |
340 | AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [ | |
341 | AC_MSG_WARN([you have no crypt in either libcrypt or libc. | |
342 | You should install libcrypt from another source or configure with PAM | |
343 | support]) | |
344 | kde_have_crypt=no | |
345 | ])) | |
346 | AC_SUBST(LIBCRYPT) | |
347 | if test $kde_have_crypt = yes; then | |
348 | AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function]) | |
349 | fi | |
350 | AC_CHECK_KSIZE_T | |
351 | AC_LANG_C | |
352 | AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"]) | |
353 | if test $ac_cv_lib_dnet_dnet_ntoa = no; then | |
354 | AC_CHECK_LIB(dnet_stub, dnet_ntoa, | |
355 | [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) | |
356 | fi | |
357 | AC_CHECK_FUNC(inet_ntoa) | |
358 | if test $ac_cv_func_inet_ntoa = no; then | |
359 | AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl") | |
360 | fi | |
361 | AC_CHECK_FUNC(connect) | |
362 | if test $ac_cv_func_connect = no; then | |
363 | AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", , | |
364 | $X_EXTRA_LIBS) | |
365 | fi | |
366 | ||
367 | AC_CHECK_FUNC(remove) | |
368 | if test $ac_cv_func_remove = no; then | |
369 | AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix") | |
370 | fi | |
371 | ||
372 | # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. | |
373 | AC_CHECK_FUNC(shmat) | |
374 | if test $ac_cv_func_shmat = no; then | |
375 | AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc") | |
376 | fi | |
377 | ||
378 | LIBSOCKET="$X_EXTRA_LIBS" | |
379 | AC_SUBST(LIBSOCKET) | |
380 | AC_SUBST(X_EXTRA_LIBS) | |
381 | AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4 | |
382 | AC_SUBST(LIBUCB) | |
383 | ||
384 | case $host in dnl this *is* LynxOS specific | |
385 | *-*-lynxos* ) | |
386 | AC_MSG_CHECKING([LynxOS header file wrappers]) | |
387 | [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"] | |
388 | AC_MSG_RESULT(disabled) | |
389 | AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS | |
390 | ;; | |
391 | esac | |
392 | ||
393 | AC_REQUIRE([KDE_CHECK_LIBDL]) | |
394 | AC_CHECK_BOOL | |
395 | ]) | |
396 | ||
397 | dnl ------------------------------------------------------------------------ | |
398 | dnl Find the header files and libraries for X-Windows. Extended the | |
399 | dnl macro AC_PATH_X | |
400 | dnl ------------------------------------------------------------------------ | |
401 | dnl | |
402 | AC_DEFUN(K_PATH_X, | |
403 | [ | |
404 | AC_REQUIRE([AC_PROG_CPP]) | |
405 | AC_MSG_CHECKING(for X) | |
406 | AC_LANG_SAVE | |
407 | AC_LANG_C | |
408 | AC_CACHE_VAL(ac_cv_have_x, | |
409 | [# One or both of the vars are not set, and there is no cached value. | |
410 | if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then | |
411 | kde_x_includes=NO | |
412 | else | |
413 | kde_x_includes=$x_includes | |
414 | fi | |
415 | if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then | |
416 | kde_x_libraries=NO | |
417 | else | |
418 | kde_x_libraries=$x_libraries | |
419 | fi | |
420 | ||
421 | # below we use the standard autoconf calls | |
422 | ac_x_libraries=$kde_x_libraries | |
423 | ac_x_includes=$kde_x_includes | |
424 | ||
425 | AC_PATH_X_DIRECT | |
426 | AC_PATH_X_XMKMF | |
427 | if test -z "$ac_x_includes"; then | |
428 | ac_x_includes="." | |
429 | fi | |
430 | if test -z "$ac_x_libraries"; then | |
431 | ac_x_libraries="/usr/lib" | |
432 | fi | |
433 | #from now on we use our own again | |
434 | ||
435 | # when the user already gave --x-includes, we ignore | |
436 | # what the standard autoconf macros told us. | |
437 | if test "$kde_x_includes" = NO; then | |
438 | kde_x_includes=$ac_x_includes | |
439 | fi | |
440 | ||
441 | if test "$kde_x_includes" = NO; then | |
442 | AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!]) | |
443 | fi | |
444 | ||
445 | if test "$ac_x_libraries" = NO; then | |
446 | AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!]) | |
447 | fi | |
448 | ||
449 | # Record where we found X for the cache. | |
450 | ac_cv_have_x="have_x=yes \ | |
451 | kde_x_includes=$kde_x_includes ac_x_libraries=$ac_x_libraries" | |
452 | ])dnl | |
453 | eval "$ac_cv_have_x" | |
454 | ||
455 | if test "$have_x" != yes; then | |
456 | AC_MSG_RESULT($have_x) | |
457 | no_x=yes | |
458 | else | |
459 | AC_MSG_RESULT([libraries $ac_x_libraries, headers $kde_x_includes]) | |
460 | fi | |
461 | ||
462 | if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then | |
463 | X_INCLUDES="" | |
464 | x_includes="."; dnl better than nothing :- | |
465 | else | |
466 | x_includes=$kde_x_includes | |
467 | X_INCLUDES="-I$x_includes" | |
468 | fi | |
469 | ||
470 | if test -z "$ac_x_libraries" || test "x$ac_x_libraries" = xNONE; then | |
471 | X_LDFLAGS="" | |
472 | x_libraries="/usr/lib"; dnl better than nothing :- | |
473 | else | |
474 | x_libraries=$ac_x_libraries | |
475 | X_LDFLAGS="-L$x_libraries" | |
476 | fi | |
477 | all_includes="$X_INCLUDES" | |
478 | all_libraries="$X_LDFLAGS" | |
479 | ||
480 | AC_SUBST(X_INCLUDES) | |
481 | AC_SUBST(X_LDFLAGS) | |
482 | AC_SUBST(x_libraries) | |
483 | AC_SUBST(x_includes) | |
484 | ||
485 | # Check for libraries that X11R6 Xt/Xaw programs need. | |
486 | ac_save_LDFLAGS="$LDFLAGS" | |
487 | test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" | |
488 | # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to | |
489 | # check for ICE first), but we must link in the order -lSM -lICE or | |
490 | # we get undefined symbols. So assume we have SM if we have ICE. | |
491 | # These have to be linked with before -lX11, unlike the other | |
492 | # libraries we check for below, so use a different variable. | |
493 | # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. | |
494 | AC_CHECK_LIB(ICE, IceConnectionNumber, | |
495 | [LIBSM="$X_PRELIBS -lSM"], , $X_EXTRA_LIBS) | |
496 | AC_SUBST(LIBSM) | |
497 | LDFLAGS="$ac_save_LDFLAGS" | |
498 | ||
499 | AC_SUBST(X_PRE_LIBS) | |
500 | ||
501 | LIB_X11='-lX11 $(LIBSOCKET)' | |
502 | AC_SUBST(LIB_X11) | |
503 | ||
504 | AC_MSG_CHECKING(for libXext) | |
505 | AC_CACHE_VAL(kde_cv_have_libXext, | |
506 | [ | |
507 | kde_ldflags_safe="$LDFLAGS" | |
508 | kde_libs_safe="$LIBS" | |
509 | ||
510 | LDFLAGS="$X_LDFLAGS $USER_LDFLAGS" | |
511 | LIBS="-lXext -lX11 $LIBSOCKET" | |
512 | ||
513 | AC_TRY_LINK([ | |
514 | #include <stdio.h> | |
515 | ], | |
516 | [ | |
517 | printf("hello Xext\n"); | |
518 | ], | |
519 | kde_cv_have_libXext=yes, | |
520 | kde_cv_have_libXext=no | |
521 | ) | |
522 | ||
523 | LDFLAGS=$kde_ldflags_safe | |
524 | LIBS=$kde_libs_safe | |
525 | ]) | |
526 | ||
527 | AC_MSG_RESULT($kde_cv_have_libXext) | |
528 | ||
529 | if test "kde_cv_have_libXext" = "no"; then | |
530 | AC_MSG_ERROR([We need a working libXext to proceed. Since configure | |
531 | can't find it itself, we stop here assuming that make wouldn't find | |
532 | them either.]) | |
533 | fi | |
534 | ||
535 | ]) | |
536 | ||
537 | AC_LANG_RESTORE | |
538 | ]) | |
539 | ||
540 | AC_DEFUN(KDE_PRINT_QT_PROGRAM, | |
541 | [ | |
542 | AC_REQUIRE([KDE_USE_QT]) | |
543 | cat > conftest.$ac_ext <<EOF | |
544 | #include "confdefs.h" | |
545 | #include <qglobal.h> | |
546 | #include <qapplication.h> | |
547 | #include <qapp.h> | |
548 | #include <qobjcoll.h> | |
549 | EOF | |
550 | if test "$kde_qtver" = "2"; then | |
551 | cat >> conftest.$ac_ext <<EOF | |
552 | #include <qstring.h> | |
553 | #include <qstyle.h> | |
554 | EOF | |
555 | ||
556 | if test $kde_qtsubver -gt 0; then | |
557 | cat >> conftest.$ac_ext <<EOF | |
558 | #include <qiconview.h> | |
559 | EOF | |
560 | fi | |
561 | ||
562 | fi | |
563 | ||
564 | echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext | |
565 | cat >> conftest.$ac_ext <<EOF | |
566 | #error 1 | |
567 | #endif | |
568 | ||
569 | int main() { | |
570 | EOF | |
571 | if test "$kde_qtver" = "2"; then | |
572 | cat >> conftest.$ac_ext <<EOF | |
573 | QStringList *t = new QStringList(); | |
574 | EOF | |
575 | if test $kde_qtsubver -gt 0; then | |
576 | cat >> conftest.$ac_ext <<EOF | |
577 | QIconView iv(0); | |
578 | iv.setWordWrapIconText(false); | |
579 | QString s; | |
580 | s.setLatin1("Elvis is alive", 14); | |
581 | EOF | |
582 | fi | |
583 | fi | |
584 | cat >> conftest.$ac_ext <<EOF | |
585 | return 0; | |
586 | } | |
587 | EOF | |
588 | ]) | |
589 | ||
590 | AC_DEFUN(KDE_USE_QT, | |
591 | [ | |
592 | ||
593 | if test -z "$1"; then | |
594 | kde_qtver=2 | |
595 | kde_qtsubver=1 | |
596 | else | |
597 | kde_qtsubver=`echo "$1" | sed -e 's#[0-9]\+\.\([0-9]\+\).*#\1#'` | |
598 | # following is the check if subversion isn´t found in passed argument | |
599 | if test "$kde_qtsubver" = "$1"; then | |
600 | kde_qtsubver=1 | |
601 | fi | |
602 | kde_qtver=`echo "$1" | sed -e 's#^\([0-9]\+\)\..*#\1#'` | |
603 | if test "$kde_qtver" = "1"; then | |
604 | kde_qtsubver=42 | |
605 | else | |
606 | # this is the version number fallback to 2.1, unless major version is 1 or 2 | |
607 | if test "$kde_qtver" != "2"; then | |
608 | kde_qtver=2 | |
609 | kde_qtsubver=1 | |
610 | fi | |
611 | fi | |
612 | fi | |
613 | ||
614 | if test -z "$2"; then | |
615 | if test $kde_qtver = 2; then | |
616 | if test $kde_qtsubver -gt 0; then | |
617 | kde_qt_minversion="snapshot >= Qt 2.1 beta2" | |
618 | else | |
619 | kde_qt_minversion=">= Qt 2.0.2" | |
620 | fi | |
621 | else | |
622 | kde_qt_minversion=">= 1.42 and < 2.0" | |
623 | fi | |
624 | else | |
625 | kde_qt_minversion=$2 | |
626 | fi | |
627 | ||
628 | if test -z "$3"; then | |
629 | if test $kde_qtver = 2; then | |
630 | if test $kde_qtsubver -gt 0; then | |
631 | kde_qt_verstring="QT_VERSION >= 210" | |
632 | else | |
633 | kde_qt_verstring="QT_VERSION >= 200" | |
634 | fi | |
635 | else | |
636 | kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" | |
637 | fi | |
638 | else | |
639 | kde_qt_verstring=$3 | |
640 | fi | |
641 | ]) | |
642 | ||
643 | AC_DEFUN(KDE_CHECK_QT_DIRECT, | |
644 | [ | |
645 | AC_REQUIRE([KDE_USE_QT]) | |
646 | AC_MSG_CHECKING([if Qt compiles without flags]) | |
647 | AC_CACHE_VAL(kde_cv_qt_direct, | |
648 | [ | |
649 | AC_LANG_SAVE | |
650 | AC_LANG_CPLUSPLUS | |
651 | ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH | |
652 | ac_LIBRARY_PATH="$LIBRARY_PATH" | |
653 | ac_cxxflags_safe="$CXXFLAGS" | |
654 | ac_ldflags_safe="$LDFLAGS" | |
655 | ac_libs_safe="$LIBS" | |
656 | ||
657 | CXXFLAGS="$CXXFLAGS -I$qt_includes" | |
658 | LDFLAGS="$X_LDFLAGS" | |
659 | LIBS="-lqt -lXext -lX11 $LIBSOCKET" | |
660 | LD_LIBRARY_PATH= | |
661 | export LD_LIBRARY_PATH | |
662 | LIBRARY_PATH= | |
663 | export LIBRARY_PATH | |
664 | ||
665 | KDE_PRINT_QT_PROGRAM | |
666 | ||
667 | if AC_TRY_EVAL(ac_link) && test -s conftest; then | |
668 | kde_cv_qt_direct="yes" | |
669 | else | |
670 | kde_cv_qt_direct="no" | |
671 | echo "configure: failed program was:" >&AC_FD_CC | |
672 | cat conftest.$ac_ext >&AC_FD_CC | |
673 | fi | |
674 | ||
675 | rm -f conftest* | |
676 | CXXFLAGS="$ac_cxxflags_safe" | |
677 | LDFLAGS="$ac_ldflags_safe" | |
678 | LIBS="$ac_libs_safe" | |
679 | ||
680 | LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe" | |
681 | export LD_LIBRARY_PATH | |
682 | LIBRARY_PATH="$ac_LIBRARY_PATH" | |
683 | export LIBRARY_PATH | |
684 | AC_LANG_RESTORE | |
685 | ]) | |
686 | ||
687 | if test "$kde_cv_qt_direct" = "yes"; then | |
688 | AC_MSG_RESULT(yes) | |
689 | $1 | |
690 | else | |
691 | AC_MSG_RESULT(no) | |
692 | $2 | |
693 | fi | |
694 | ]) | |
695 | ||
696 | dnl ------------------------------------------------------------------------ | |
697 | dnl Try to find the Qt headers and libraries. | |
698 | dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed) | |
699 | dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed) | |
700 | dnl ------------------------------------------------------------------------ | |
701 | dnl | |
702 | AC_DEFUN(AC_PATH_QT_1_3, | |
703 | [ | |
704 | AC_REQUIRE([K_PATH_X]) | |
705 | AC_REQUIRE([KDE_USE_QT]) | |
706 | LIBQT="-lqt" | |
707 | if test $kde_qtver = 2; then | |
708 | ||
709 | AC_REQUIRE([AC_FIND_PNG]) | |
710 | LIBQT="$LIBQT $LIBPNG" | |
711 | fi | |
712 | AC_MSG_CHECKING([for Qt]) | |
713 | ||
714 | LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSOCKET" | |
715 | ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO | |
716 | qt_libraries="" | |
717 | qt_includes="" | |
718 | AC_ARG_WITH(qt-dir, | |
719 | [ --with-qt-dir=DIR where the root of Qt is installed ], | |
720 | [ ac_qt_includes="$withval"/include | |
721 | ac_qt_libraries="$withval"/lib | |
722 | ac_qt_bindir="$withval"/bin | |
723 | ]) | |
724 | ||
725 | AC_ARG_WITH(qt-includes, | |
726 | [ --with-qt-includes=DIR where the Qt includes are. ], | |
727 | [ | |
728 | ac_qt_includes="$withval" | |
729 | ]) | |
730 | ||
731 | kde_qt_libs_given=no | |
732 | ||
733 | AC_ARG_WITH(qt-libraries, | |
734 | [ --with-qt-libraries=DIR where the Qt library is installed.], | |
735 | [ ac_qt_libraries="$withval" | |
736 | kde_qt_libs_given=yes | |
737 | ]) | |
738 | ||
739 | AC_CACHE_VAL(ac_cv_have_qt, | |
740 | [#try to guess Qt locations | |
741 | ||
742 | qt_incdirs="$QTINC /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/lib/qt2/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt $x_includes" | |
743 | test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs" | |
744 | qt_incdirs="$ac_qt_includes $qt_incdirs" | |
745 | ||
746 | if test "$kde_qtver" = "2"; then | |
747 | kde_qt_header=qstyle.h | |
748 | else | |
749 | kde_qt_header=qglobal.h | |
750 | fi | |
751 | ||
752 | AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) | |
753 | ac_qt_includes="$qt_incdir" | |
754 | ||
755 | qt_libdirs="$QTLIB /usr/lib/qt/lib /usr/X11R6/lib /usr/lib /usr/local/qt/lib /usr/lib/qt /usr/lib/qt2/lib $x_libraries" | |
756 | test -n "$QTDIR" && qt_libdirs="$QTDIR/lib $QTDIR $qt_libdirs" | |
757 | if test ! "$ac_qt_libraries" = "NO"; then | |
758 | qt_libdirs="$ac_qt_libraries $qt_libdirs" | |
759 | fi | |
760 | ||
761 | test=NONE | |
762 | qt_libdir=NONE | |
763 | for dir in $qt_libdirs; do | |
764 | try="ls -1 $dir/libqt.*" | |
765 | if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi | |
766 | done | |
767 | ||
768 | ac_qt_libraries="$qt_libdir" | |
769 | ||
770 | AC_LANG_SAVE | |
771 | AC_LANG_CPLUSPLUS | |
772 | ||
773 | ac_cxxflags_safe="$CXXFLAGS" | |
774 | ac_ldflags_safe="$LDFLAGS" | |
775 | ac_libs_safe="$LIBS" | |
776 | ||
777 | CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" | |
778 | LDFLAGS="-L$qt_libdir $all_libraries $USER_LDFLAGS" | |
779 | LIBS="$LIBS $LIBQT" | |
780 | ||
781 | KDE_PRINT_QT_PROGRAM | |
782 | ||
783 | if AC_TRY_EVAL(ac_link) && test -s conftest; then | |
784 | rm -f conftest* | |
785 | else | |
786 | echo "configure: failed program was:" >&AC_FD_CC | |
787 | cat conftest.$ac_ext >&AC_FD_CC | |
788 | ac_qt_libraries="NO" | |
789 | fi | |
790 | rm -f conftest* | |
791 | CXXFLAGS="$ac_cxxflags_safe" | |
792 | LDFLAGS="$ac_ldflags_safe" | |
793 | LIBS="$ac_libs_safe" | |
794 | ||
795 | AC_LANG_RESTORE | |
796 | if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then | |
797 | ac_cv_have_qt="have_qt=no" | |
798 | ac_qt_notfound="" | |
799 | if test "$ac_qt_includes" = NO; then | |
800 | if test "$ac_qt_libraries" = NO; then | |
801 | ac_qt_notfound="(headers and libraries)"; | |
802 | else | |
803 | ac_qt_notfound="(headers)"; | |
804 | fi | |
805 | else | |
806 | ac_qt_notfound="(libraries)"; | |
807 | fi | |
808 | ||
809 | AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation! ]); | |
810 | else | |
811 | have_qt="yes" | |
812 | fi | |
813 | ]) | |
814 | ||
815 | eval "$ac_cv_have_qt" | |
816 | ||
817 | if test "$have_qt" != yes; then | |
818 | AC_MSG_RESULT([$have_qt]); | |
819 | else | |
820 | ac_cv_have_qt="have_qt=yes \ | |
821 | ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries" | |
822 | AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes]) | |
823 | ||
824 | qt_libraries="$ac_qt_libraries" | |
825 | qt_includes="$ac_qt_includes" | |
826 | fi | |
827 | ||
828 | if test ! "$kde_qt_libs_given" = "yes"; then | |
829 | KDE_CHECK_QT_DIRECT(qt_libraries= ,[]) | |
830 | fi | |
831 | ||
832 | AC_SUBST(qt_libraries) | |
833 | AC_SUBST(qt_includes) | |
834 | ||
835 | if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then | |
836 | QT_INCLUDES=""; | |
837 | else | |
838 | QT_INCLUDES="-I$qt_includes" | |
839 | all_includes="$QT_INCLUDES $all_includes" | |
840 | fi | |
841 | ||
842 | if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then | |
843 | QT_LDFLAGS="" | |
844 | else | |
845 | QT_LDFLAGS="-L$qt_libraries" | |
846 | all_libraries="$all_libraries $QT_LDFLAGS" | |
847 | fi | |
848 | ||
849 | AC_SUBST(QT_INCLUDES) | |
850 | AC_SUBST(QT_LDFLAGS) | |
851 | AC_PATH_QT_MOC | |
852 | ||
853 | LIB_QT='-lqt $(LIBPNG) -lXext $(LIB_X11) $(X_PRE_LIBS)' | |
854 | AC_SUBST(LIB_QT) | |
855 | ||
856 | ]) | |
857 | ||
858 | AC_DEFUN(AC_PATH_QT, | |
859 | [ | |
860 | AC_PATH_QT_1_3 | |
861 | ]) | |
862 | ||
863 | AC_DEFUN(KDE_CHECK_FINAL, | |
864 | [ | |
865 | AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (needs lots of memory)], | |
866 | kde_use_final=$enableval, kde_use_final=no) | |
867 | ||
868 | if test "x$kde_use_final" = "xyes"; then | |
869 | KDE_USE_FINAL_TRUE="" | |
870 | KDE_USE_FINAL_FALSE="#" | |
871 | KDE_CHECK_REPO | |
872 | else | |
873 | KDE_USE_FINAL_TRUE="#" | |
874 | KDE_USE_FINAL_FALSE="" | |
875 | fi | |
876 | AC_SUBST(KDE_USE_FINAL_TRUE) | |
877 | AC_SUBST(KDE_USE_FINAL_FALSE) | |
878 | ||
879 | AC_ARG_ENABLE(closure, [ --disable-closure do not compile link tests], | |
880 | kde_use_closure=$enableval, kde_use_closure=yes) | |
881 | ||
882 | if test "x$kde_use_closure" = "xyes"; then | |
883 | KDE_USE_CLOSURE_TRUE="" | |
884 | KDE_USE_CLOSURE_FALSE="#" | |
885 | KDE_COMPILER_REPO | |
886 | # CXXFLAGS="$CXXFLAGS $REPO" | |
887 | else | |
888 | KDE_USE_CLOSURE_TRUE="#" | |
889 | KDE_USE_CLOSURE_FALSE="" | |
890 | fi | |
891 | AC_SUBST(KDE_USE_CLOSURE_TRUE) | |
892 | AC_SUBST(KDE_USE_CLOSURE_FALSE) | |
893 | ]) | |
894 | ||
895 | dnl ------------------------------------------------------------------------ | |
896 | dnl Now, the same with KDE | |
897 | dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed) | |
898 | dnl and $(kde_includes) will be the kdehdrlocation (if needed) | |
899 | dnl ------------------------------------------------------------------------ | |
900 | dnl | |
901 | AC_DEFUN(AC_BASE_PATH_KDE, | |
902 | [ | |
903 | AC_PREREQ([2.13]) | |
904 | AC_REQUIRE([KDE_MISC_TESTS]) | |
905 | AC_REQUIRE([AC_PATH_QT])dnl | |
906 | AC_CHECK_RPATH | |
907 | AC_MSG_CHECKING([for KDE]) | |
908 | ||
909 | if test "${prefix}" != NONE; then | |
910 | kde_includes=${prefix}/include | |
911 | ac_kde_includes=$prefix/include | |
912 | ||
913 | if test "${exec_prefix}" != NONE; then | |
914 | kde_libraries=${exec_prefix}/lib | |
915 | ac_kde_libraries=$exec_prefix/lib | |
916 | else | |
917 | kde_libraries=${prefix}/lib | |
918 | ac_kde_libraries=$prefix/lib | |
919 | fi | |
920 | else | |
921 | ac_kde_includes= | |
922 | ac_kde_libraries= | |
923 | kde_libraries="" | |
924 | kde_includes="" | |
925 | fi | |
926 | ||
927 | AC_CACHE_VAL(ac_cv_have_kde, | |
928 | [#try to guess kde locations | |
929 | ||
930 | if test -z "$1"; then | |
931 | ||
932 | kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde/include $x_includes $qt_includes" | |
933 | test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR $kde_incdirs" | |
934 | kde_incdirs="$ac_kde_includes $kde_incdirs" | |
935 | AC_FIND_FILE(ksock.h, $kde_incdirs, kde_incdir) | |
936 | ac_kde_includes="$kde_incdir" | |
937 | ||
938 | if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/ksock.h"; then | |
939 | AC_MSG_ERROR([ | |
940 | in the prefix, you've chosen, are no KDE headers installed. This will fail. | |
941 | So, check this please and use another prefix!]) | |
942 | fi | |
943 | ||
944 | kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde/lib /usr/X11R6/kde/lib" | |
945 | test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs" | |
946 | kde_libdirs="$ac_kde_libraries $kde_libdirs" | |
947 | AC_FIND_FILE(libkdecore.la, $kde_libdirs, kde_libdir) | |
948 | ac_kde_libraries="$kde_libdir" | |
949 | ||
950 | if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/libkdecore.la"; then | |
951 | AC_MSG_ERROR([ | |
952 | in the prefix, you've chosen, are no KDE libraries installed. This will fail. | |
953 | So, check this please and use another prefix!]) | |
954 | fi | |
955 | ac_kde_libraries="$kde_libdir" | |
956 | ||
957 | if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then | |
958 | ac_cv_have_kde="have_kde=no" | |
959 | else | |
960 | ac_cv_have_kde="have_kde=yes \ | |
961 | ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries" | |
962 | fi | |
963 | ||
964 | else dnl test -z $1 | |
965 | ||
966 | ac_cv_have_kde="have_kde=no" | |
967 | ||
968 | fi | |
969 | ])dnl | |
970 | ||
971 | eval "$ac_cv_have_kde" | |
972 | ||
973 | if test "$have_kde" != "yes"; then | |
974 | if test "${prefix}" = NONE; then | |
975 | ac_kde_prefix="$ac_default_prefix" | |
976 | else | |
977 | ac_kde_prefix="$prefix" | |
978 | fi | |
979 | if test "$exec_prefix" = NONE; then | |
980 | ac_kde_exec_prefix="$ac_kde_prefix" | |
981 | AC_MSG_RESULT([will be installed in $ac_kde_prefix]) | |
982 | else | |
983 | ac_kde_exec_prefix="$exec_prefix" | |
984 | AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix]) | |
985 | fi | |
986 | ||
987 | kde_libraries="${ac_kde_exec_prefix}/lib" | |
988 | kde_includes=${ac_kde_prefix}/include | |
989 | ||
990 | else | |
991 | ac_cv_have_kde="have_kde=yes \ | |
992 | ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries" | |
993 | AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes]) | |
994 | ||
995 | kde_libraries="$ac_kde_libraries" | |
996 | kde_includes="$ac_kde_includes" | |
997 | fi | |
998 | AC_SUBST(kde_libraries) | |
999 | AC_SUBST(kde_includes) | |
1000 | ||
1001 | if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" ; then | |
1002 | KDE_INCLUDES="" | |
1003 | else | |
1004 | KDE_INCLUDES="-I$kde_includes" | |
1005 | all_includes="$KDE_INCLUDES $all_includes" | |
1006 | fi | |
1007 | ||
1008 | if test "$kde_libraries" = "$x_libraries" || test "$kde_libraries" = "$qt_libraries" ; then | |
1009 | KDE_LDFLAGS="" | |
1010 | else | |
1011 | KDE_LDFLAGS="-L$kde_libraries" | |
1012 | all_libraries="$all_libraries $KDE_LDFLAGS" | |
1013 | fi | |
1014 | ||
1015 | AC_SUBST(KDE_LDFLAGS) | |
1016 | AC_SUBST(KDE_INCLUDES) | |
1017 | ||
1018 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) | |
1019 | ||
1020 | all_libraries="$all_libraries $USER_LDFLAGS" | |
1021 | all_includes="$all_includes $USER_INCLUDES" | |
1022 | AC_SUBST(all_includes) | |
1023 | AC_SUBST(all_libraries) | |
1024 | ||
1025 | AC_SUBST(AUTODIRS) | |
1026 | ||
1027 | if test -z "$DCOPIDL"; then | |
1028 | DCOPIDL='$(kde_bindir)/dcopidl' | |
1029 | fi | |
1030 | if test -z "$DCOPIDL2CPP"; then | |
1031 | DCOPIDL2CPP='$(kde_bindir)/dcopidl2cpp' | |
1032 | fi | |
1033 | DCOP_DEPENDENCIES='$(DCOPIDL)' | |
1034 | AC_SUBST(DCOPIDL) | |
1035 | AC_SUBST(DCOPIDL2CPP) | |
1036 | AC_SUBST(DCOP_DEPENDENCIES) | |
1037 | ]) | |
1038 | ||
1039 | AC_DEFUN(KDE_CHECK_EXTRA_LIBS, | |
1040 | [ | |
1041 | AC_MSG_CHECKING(for extra includes) | |
1042 | AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR | |
1043 | adds non standard include paths], | |
1044 | kde_use_extra_includes="$withval", | |
1045 | kde_use_extra_includes=NONE | |
1046 | ) | |
1047 | kde_extra_includes= | |
1048 | if test -n "$kde_use_extra_includes" && \ | |
1049 | test "$kde_use_extra_includes" != "NONE"; then | |
1050 | ||
1051 | ac_save_ifs=$IFS | |
1052 | IFS=':' | |
1053 | for dir in $kde_use_extra_includes; do | |
1054 | kde_extra_includes="$kde_extra_includes $dir" | |
1055 | USER_INCLUDES="$USER_INCLUDES -I$dir" | |
1056 | done | |
1057 | IFS=$ac_save_ifs | |
1058 | kde_use_extra_includes="added" | |
1059 | else | |
1060 | kde_use_extra_includes="no" | |
1061 | fi | |
1062 | AC_SUBST(USER_INCLUDES) | |
1063 | ||
1064 | AC_MSG_RESULT($kde_use_extra_includes) | |
1065 | ||
1066 | kde_extra_libs= | |
1067 | AC_MSG_CHECKING(for extra libs) | |
1068 | AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths], | |
1069 | kde_use_extra_libs=$withval, | |
1070 | kde_use_extra_libs=NONE | |
1071 | ) | |
1072 | if test -n "$kde_use_extra_libs" && \ | |
1073 | test "$kde_use_extra_libs" != "NONE"; then | |
1074 | ||
1075 | ac_save_ifs=$IFS | |
1076 | IFS=':' | |
1077 | for dir in $kde_use_extra_libs; do | |
1078 | kde_extra_libs="$kde_extra_libs $dir" | |
1079 | KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -rpath $dir" | |
1080 | USER_LDFLAGS="$USER_LDFLAGS -L$dir" | |
1081 | done | |
1082 | IFS=$ac_save_ifs | |
1083 | kde_use_extra_libs="added" | |
1084 | else | |
1085 | kde_use_extra_libs="no" | |
1086 | fi | |
1087 | ||
1088 | AC_SUBST(USER_LDFLAGS) | |
1089 | ||
1090 | AC_MSG_RESULT($kde_use_extra_libs) | |
1091 | ||
1092 | ]) | |
1093 | ||
1094 | AC_DEFUN(KDE_1_CHECK_PATH_HEADERS, | |
1095 | [ | |
1096 | AC_MSG_CHECKING([for KDE headers installed]) | |
1097 | AC_LANG_CPLUSPLUS | |
1098 | cat > conftest.$ac_ext <<EOF | |
1099 | #include <stdio.h> | |
1100 | #include "confdefs.h" | |
1101 | #include <kapp.h> | |
1102 | ||
1103 | int main() { | |
1104 | printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data()); | |
1105 | printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data()); | |
1106 | printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data()); | |
1107 | printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data()); | |
1108 | printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data()); | |
1109 | printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data()); | |
1110 | printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data()); | |
1111 | printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data()); | |
1112 | printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data()); | |
1113 | printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data()); | |
1114 | printf("kde_wallpaperdir=\\"%s\\"\n", | |
1115 | KApplication::kde_wallpaperdir().data()); | |
1116 | printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data()); | |
1117 | printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data()); | |
1118 | printf("kde_servicesdir=\\"/tmp/dummy\\"\n"); | |
1119 | printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n"); | |
1120 | return 0; | |
1121 | } | |
1122 | EOF | |
1123 | ||
1124 | ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext' | |
1125 | if AC_TRY_EVAL(ac_compile); then | |
1126 | AC_MSG_RESULT(yes) | |
1127 | else | |
1128 | AC_MSG_ERROR([your system is not able to compile a small KDE application! | |
1129 | Check, if you installed the KDE header files correctly.]) | |
1130 | fi | |
1131 | ]) | |
1132 | ||
1133 | AC_DEFUN(KDE_CHECK_KIMGIO, | |
1134 | [ | |
1135 | AC_REQUIRE([AC_BASE_PATH_KDE]) | |
1136 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) | |
1137 | AC_REQUIRE([AC_FIND_TIFF]) | |
1138 | AC_REQUIRE([AC_FIND_JPEG]) | |
1139 | AC_REQUIRE([AC_FIND_PNG]) | |
1140 | AC_REQUIRE([KDE_CREATE_LIBS_ALIASES]) | |
1141 | ||
1142 | if test "$1" = "existance"; then | |
1143 | AC_LANG_SAVE | |
1144 | AC_LANG_CPLUSPLUS | |
1145 | kde_save_LIBS="$LIBS" | |
1146 | LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm" | |
1147 | AC_CHECK_LIB(kimgio, kimgioRegister, [ | |
1148 | LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no) | |
1149 | LIBS="$kde_save_LIBS" | |
1150 | AC_LANG_RESTORE | |
1151 | else | |
1152 | LIBKIMGIO_EXISTS=yes | |
1153 | fi | |
1154 | ||
1155 | if test "$LIBKIMGIO_EXISTS" = "yes"; then | |
1156 | LIB_KIMGIO='-lkimgio' | |
1157 | else | |
1158 | LIB_KIMGIO='' | |
1159 | fi | |
1160 | AC_SUBST(LIB_KIMGIO) | |
1161 | ]) | |
1162 | ||
1163 | AC_DEFUN(KDE_CREATE_LIBS_ALIASES, | |
1164 | [ | |
1165 | AC_REQUIRE([KDE_MISC_TESTS]) | |
1166 | AC_REQUIRE([KDE_CHECK_LIBDL]) | |
1167 | AC_REQUIRE([K_PATH_X]) | |
1168 | ||
1169 | if test $kde_qtver = 2; then | |
1170 | LIB_KDECORE='-lkdecore' | |
1171 | AC_SUBST(LIB_KDECORE) | |
1172 | LIB_KDEUI='-lkdeui' | |
1173 | AC_SUBST(LIB_KDEUI) | |
1174 | LIB_KFORMULA='-lkformula' | |
1175 | AC_SUBST(LIB_KFORMULA) | |
1176 | LIB_KIO='-lkio' | |
1177 | AC_SUBST(LIB_KIO) | |
1178 | LIB_KSYCOCA='-lksycoca' | |
1179 | AC_SUBST(LIB_KSYCOCA) | |
1180 | LIB_SMB='-lsmb' | |
1181 | AC_SUBST(LIB_SMB) | |
1182 | LIB_KFILE='-lkfile' | |
1183 | AC_SUBST(LIB_KFILE) | |
1184 | LIB_KAB='-lkab' | |
1185 | AC_SUBST(LIB_KAB) | |
1186 | LIB_MEDIATOOL='-lmediatool' | |
1187 | AC_SUBST(LIB_MEDIATOOL) | |
1188 | LIB_KHTML='-lkhtml' | |
1189 | AC_SUBST(LIB_KHTML) | |
1190 | LIB_KSPELL='-lkspell' | |
1191 | AC_SUBST(LIB_KSPELL) | |
1192 | LIB_KPARTS='-lkparts' | |
1193 | AC_SUBST(LIB_KPARTS) | |
1194 | else | |
1195 | LIB_KDECORE='-lkdecore -lXext $(LIB_QT)' | |
1196 | AC_SUBST(LIB_KDECORE) | |
1197 | LIB_KDEUI='-lkdeui $(LIB_KDECORE)' | |
1198 | AC_SUBST(LIB_KDEUI) | |
1199 | LIB_KFM='-lkfm $(LIB_KDECORE)' | |
1200 | AC_SUBST(LIB_KFM) | |
1201 | LIB_KFILE='-lkfile $(LIB_KFM) $(LIB_KDEUI)' | |
1202 | AC_SUBST(LIB_KFILE) | |
1203 | LIB_KAB='-lkab $(LIB_KIMGIO) $(LIB_KDECORE)' | |
1204 | AC_SUBST(LIB_KAB) | |
1205 | LIB_MEDIATOOL='-lmediatool $(LIB_KDECORE)' | |
1206 | AC_SUBST(LIB_MEDIATOOL) | |
1207 | fi | |
1208 | ]) | |
1209 | ||
1210 | AC_DEFUN(AC_PATH_KDE, | |
1211 | [ | |
1212 | AC_BASE_PATH_KDE | |
1213 | AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install], | |
1214 | [ | |
1215 | if test "$enableval" = "no"; | |
1216 | then ac_use_path_checking="default" | |
1217 | else ac_use_path_checking="" | |
1218 | fi | |
1219 | ], | |
1220 | [ | |
1221 | if test "$kde_qtver" = 1; | |
1222 | then ac_use_path_checking="" | |
1223 | else ac_use_path_checking="default" | |
1224 | fi | |
1225 | ] | |
1226 | ) | |
1227 | ||
1228 | AC_CREATE_KFSSTND($ac_use_path_checking) | |
1229 | ||
1230 | AC_SUBST_KFSSTND | |
1231 | KDE_CREATE_LIBS_ALIASES | |
1232 | ]) | |
1233 | ||
1234 | dnl slightly changed version of AC_CHECK_FUNC(setenv) | |
1235 | AC_DEFUN(AC_CHECK_SETENV, | |
1236 | [AC_MSG_CHECKING([for setenv]) | |
1237 | AC_CACHE_VAL(ac_cv_func_setenv, | |
1238 | [AC_LANG_C | |
1239 | AC_TRY_LINK( | |
1240 | dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h> | |
1241 | dnl which includes <sys/select.h> which contains a prototype for | |
1242 | dnl select. Similarly for bzero. | |
1243 | [#include <assert.h> | |
1244 | ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus | |
1245 | extern "C" | |
1246 | #endif | |
1247 | ])dnl | |
1248 | [/* We use char because int might match the return type of a gcc2 | |
1249 | builtin and then its argument prototype would still apply. */ | |
1250 | #include <stdlib.h> | |
1251 | ], [ | |
1252 | /* The GNU C library defines this for functions which it implements | |
1253 | to always fail with ENOSYS. Some functions are actually named | |
1254 | something starting with __ and the normal name is an alias. */ | |
1255 | #if defined (__stub_$1) || defined (__stub___$1) | |
1256 | choke me | |
1257 | #else | |
1258 | setenv("TEST", "alle", 1); | |
1259 | #endif | |
1260 | ], eval "ac_cv_func_setenv=yes", eval "ac_cv_func_setenv=no")]) | |
1261 | ||
1262 | if test "$ac_cv_func_setenv" = "yes"; then | |
1263 | AC_MSG_RESULT(yes) | |
1264 | AC_DEFINE_UNQUOTED(HAVE_FUNC_SETENV, 1, [Define if you have setenv]) | |
1265 | else | |
1266 | AC_MSG_RESULT(no) | |
1267 | fi | |
1268 | ]) | |
1269 | ||
1270 | AC_DEFUN(AC_CHECK_GETDOMAINNAME, | |
1271 | [ | |
1272 | AC_LANG_CPLUSPLUS | |
1273 | save_CXXFLAGS="$CXXFLAGS" | |
1274 | if test "$GCC" = "yes"; then | |
1275 | CXXFLAGS="$CXXFLAGS -pedantic-errors" | |
1276 | fi | |
1277 | AC_MSG_CHECKING(for getdomainname) | |
1278 | AC_CACHE_VAL(ac_cv_func_getdomainname, | |
1279 | [ | |
1280 | AC_TRY_COMPILE([ | |
1281 | #include <stdlib.h> | |
1282 | #include <unistd.h> | |
1283 | ], | |
1284 | [ | |
1285 | char buffer[200]; | |
1286 | getdomainname(buffer, 200); | |
1287 | ], | |
1288 | ac_cv_func_getdomainname=yes, | |
1289 | ac_cv_func_getdomainname=no) | |
1290 | ]) | |
1291 | AC_MSG_RESULT($ac_cv_func_getdomainname) | |
1292 | if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then | |
1293 | AC_DEFINE(HAVE_GETDOMAINNAME, 1, [Define if you have getdomainname]) | |
1294 | fi | |
1295 | CXXFLAGS="$save_CXXFLAGS" | |
1296 | ]) | |
1297 | ||
1298 | AC_DEFUN(AC_CHECK_GETHOSTNAME, | |
1299 | [ | |
1300 | AC_LANG_CPLUSPLUS | |
1301 | save_CXXFLAGS="$CXXFLAGS" | |
1302 | if test "$GCC" = "yes"; then | |
1303 | CXXFLAGS="$CXXFLAGS -pedantic-errors" | |
1304 | fi | |
1305 | ||
1306 | AC_MSG_CHECKING([for gethostname]) | |
1307 | AC_CACHE_VAL(ac_cv_func_gethostname, | |
1308 | [ | |
1309 | AC_TRY_COMPILE([ | |
1310 | #include <stdlib.h> | |
1311 | #include <unistd.h> | |
1312 | ], | |
1313 | [ | |
1314 | char buffer[200]; | |
1315 | gethostname(buffer, 200); | |
1316 | ], | |
1317 | ac_cv_func_gethostname=yes, | |
1318 | ac_cv_func_gethostname=no) | |
1319 | ]) | |
1320 | AC_MSG_RESULT($ac_cv_func_gethostname) | |
1321 | if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then | |
1322 | AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have getdomainname]) | |
1323 | fi | |
1324 | CXXFLAGS="$save_CXXFLAGS" | |
1325 | ]) | |
1326 | ||
1327 | AC_DEFUN(AC_CHECK_USLEEP, | |
1328 | [ | |
1329 | AC_LANG_CPLUSPLUS | |
1330 | ||
1331 | AC_MSG_CHECKING([for usleep]) | |
1332 | AC_CACHE_VAL(ac_cv_func_usleep, | |
1333 | [ | |
1334 | ac_libs_safe="$LIBS" | |
1335 | LIBS="$LIBS $LIBUCB" | |
1336 | AC_TRY_LINK([ | |
1337 | #include <stdlib.h> | |
1338 | #include <unistd.h> | |
1339 | ], | |
1340 | [ | |
1341 | usleep(200); | |
1342 | ], | |
1343 | ac_cv_func_usleep=yes, | |
1344 | ac_cv_func_usleep=no) | |
1345 | ]) | |
1346 | AC_MSG_RESULT($ac_cv_func_usleep) | |
1347 | if eval "test \"`echo $ac_cv_func_usleep`\" = yes"; then | |
1348 | AC_DEFINE(HAVE_USLEEP, 1, [Define if you have the usleep function]) | |
1349 | fi | |
1350 | LIBS="$ac_libs_safe" | |
1351 | ]) | |
1352 | ||
1353 | AC_DEFUN(AC_CHECK_RANDOM, | |
1354 | [ | |
1355 | AC_LANG_CPLUSPLUS | |
1356 | ||
1357 | AC_MSG_CHECKING([for random]) | |
1358 | AC_CACHE_VAL(ac_cv_func_random, | |
1359 | [ | |
1360 | ac_libs_safe="$LIBS" | |
1361 | LIBS="$LIBS $LIBUCB" | |
1362 | AC_TRY_LINK([ | |
1363 | #include <stdlib.h> | |
1364 | ], | |
1365 | [ | |
1366 | random(); | |
1367 | ], | |
1368 | ac_cv_func_random=yes, | |
1369 | ac_cv_func_random=no) | |
1370 | ]) | |
1371 | AC_MSG_RESULT($ac_cv_func_random) | |
1372 | if eval "test \"`echo $ac_cv_func_random`\" = yes"; then | |
1373 | AC_DEFINE(HAVE_RANDOM, 1, [Define if you have random]) | |
1374 | fi | |
1375 | LIBS="$ac_libs_safe" | |
1376 | ]) | |
1377 | ||
1378 | AC_DEFUN(AC_FIND_GIF, | |
1379 | [AC_MSG_CHECKING([for giflib]) | |
1380 | AC_CACHE_VAL(ac_cv_lib_gif, | |
1381 | [ac_save_LIBS="$LIBS" | |
1382 | LIBS="$all_libraries -lgif -lX11 $LIBSOCKET" | |
1383 | AC_TRY_LINK(dnl | |
1384 | [ | |
1385 | #ifdef __cplusplus | |
1386 | extern "C" { | |
1387 | #endif | |
1388 | int GifLastError(void); | |
1389 | #ifdef __cplusplus | |
1390 | } | |
1391 | #endif | |
1392 | /* We use char because int might match the return type of a gcc2 | |
1393 | builtin and then its argument prototype would still apply. */ | |
1394 | ], | |
1395 | [return GifLastError();], | |
1396 | eval "ac_cv_lib_gif=yes", | |
1397 | eval "ac_cv_lib_gif=no") | |
1398 | LIBS="$ac_save_LIBS" | |
1399 | ])dnl | |
1400 | if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then | |
1401 | AC_MSG_RESULT(yes) | |
1402 | AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif]) | |
1403 | else | |
1404 | AC_MSG_ERROR(You need giflib30. Please install the kdesupport package) | |
1405 | fi | |
1406 | ]) | |
1407 | ||
1408 | AC_DEFUN(KDE_FIND_JPEG_HELPER, | |
1409 | [ | |
1410 | AC_MSG_CHECKING([for libjpeg$2]) | |
1411 | AC_CACHE_VAL(ac_cv_lib_jpeg_$1, | |
1412 | [ | |
1413 | AC_LANG_C | |
1414 | ac_save_LIBS="$LIBS" | |
1415 | LIBS="$all_libraries -ljpeg$2 -lm" | |
1416 | AC_TRY_LINK( | |
1417 | [/* Override any gcc2 internal prototype to avoid an error. */ | |
1418 | struct jpeg_decompress_struct; | |
1419 | typedef struct jpeg_decompress_struct * j_decompress_ptr; | |
1420 | typedef int size_t; | |
1421 | #ifdef __cplusplus | |
1422 | extern "C" { | |
1423 | #endif | |
1424 | void jpeg_CreateDecompress(j_decompress_ptr cinfo, | |
1425 | int version, size_t structsize); | |
1426 | #ifdef __cplusplus | |
1427 | } | |
1428 | #endif | |
1429 | /* We use char because int might match the return type of a gcc2 | |
1430 | builtin and then its argument prototype would still apply. */ | |
1431 | ], | |
1432 | [jpeg_CreateDecompress(0L, 0, 0);], | |
1433 | eval "ac_cv_lib_jpeg_$1=-ljpeg$2", | |
1434 | eval "ac_cv_lib_jpeg_$1=no") | |
1435 | LIBS="$ac_save_LIBS" | |
1436 | ]) | |
1437 | ||
1438 | if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then | |
1439 | LIBJPEG="$ac_cv_lib_jpeg_$1" | |
1440 | AC_MSG_RESULT($ac_cv_lib_jpeg_$1) | |
1441 | else | |
1442 | AC_MSG_RESULT(no) | |
1443 | $3 | |
1444 | fi | |
1445 | ||
1446 | ]) | |
1447 | ||
1448 | AC_DEFUN(AC_FIND_JPEG, | |
1449 | [ | |
1450 | KDE_FIND_JPEG_HELPER(6b, 6b, | |
1451 | KDE_FIND_JPEG_HELPER(normal, [], | |
1452 | [ | |
1453 | dnl what to do, if the normal way fails: | |
1454 | if test -f "$kde_libraries/libjpeg.so"; then | |
1455 | test -f ./libjpegkde.so || $LN_S $kde_libraries/libjpeg.so ./libjpegkde.so | |
1456 | ac_cv_lib_jpeg="-L\${topdir} -ljpegkde" | |
1457 | else if test -f "$kde_libraries/libjpeg.sl"; then | |
1458 | test -f ./libjpegkde.sl ||$LN_S $kde_libraries/libjpeg.sl ./libjpegkde.sl | |
1459 | ac_cv_lib_jpeg="-L\${topdir} -ljpegkde" | |
1460 | else if test -f "$kde_libraries/libjpeg.a"; then | |
1461 | test -f ./libjpegkde.a || $LN_S $kde_libraries/libjpeg.a ./libjpegkde.a | |
1462 | ac_cv_lib_jpeg="-L\${topdir} -ljpegkde" | |
1463 | else | |
1464 | AC_MSG_ERROR([ | |
1465 | You need the development package of libjpeg6b. You can get | |
1466 | a source package of libjpeg from http://www.ijg.org/ | |
1467 | ]) | |
1468 | fi | |
1469 | fi | |
1470 | fi | |
1471 | ||
1472 | LIBJPEG=$ac_cv_lib_jpeg | |
1473 | ])) | |
1474 | ||
1475 | AC_SUBST(LIBJPEG) | |
1476 | AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg]) | |
1477 | ||
1478 | ]) | |
1479 | ||
1480 | AC_DEFUN(AC_FIND_ZLIB, | |
1481 | [ | |
1482 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) | |
1483 | AC_MSG_CHECKING([for libz]) | |
1484 | AC_CACHE_VAL(ac_cv_lib_z, | |
1485 | [ | |
1486 | AC_LANG_C | |
1487 | kde_save_LIBS="$LIBS" | |
1488 | LIBS="$all_libraries -lz $LIBSOCKET" | |
1489 | kde_save_CFLAGS="$CFLAGS" | |
1490 | CFLAGS="$CFLAGS $all_includes" | |
1491 | AC_TRY_LINK(dnl | |
1492 | [ | |
1493 | #include<zlib.h> | |
1494 | ], | |
1495 | [return (zlibVersion() == ZLIB_VERSION); ], | |
1496 | eval "ac_cv_lib_z='-lz'", | |
1497 | eval "ac_cv_lib_z=no") | |
1498 | LIBS="$kde_save_LIBS" | |
1499 | CFLAGS="$kde_save_CFLAGS" | |
1500 | ])dnl | |
1501 | if eval "test ! \"`echo $ac_cv_lib_z`\" = no"; then | |
1502 | AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz]) | |
1503 | LIBZ="$ac_cv_lib_z" | |
1504 | AC_SUBST(LIBZ) | |
1505 | AC_MSG_RESULT($ac_cv_lib_z) | |
1506 | else | |
1507 | AC_MSG_RESULT(no) | |
1508 | LIBZ="" | |
1509 | AC_SUBST(LIBZ) | |
1510 | fi | |
1511 | ]) | |
1512 | ||
1513 | AC_DEFUN(KDE_TRY_TIFFLIB, | |
1514 | [ | |
1515 | AC_MSG_CHECKING([for libtiff $1]) | |
1516 | ||
1517 | AC_CACHE_VAL(kde_cv_libtiff_$1, | |
1518 | [ | |
1519 | AC_LANG_CPLUSPLUS | |
1520 | kde_save_LIBS="$LIBS" | |
1521 | LIBS="$all_libraries -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm" | |
1522 | kde_save_CXXFLAGS="$CXXFLAGS" | |
1523 | CXXFLAGS="$CXXFLAGS $all_includes" | |
1524 | ||
1525 | AC_TRY_LINK(dnl | |
1526 | [ | |
1527 | #include<tiffio.h> | |
1528 | ], | |
1529 | [return (TIFFOpen( "", "r") == 0); ], | |
1530 | [ | |
1531 | kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ" | |
1532 | ], [ | |
1533 | kde_cv_libtiff_$1=no | |
1534 | ]) | |
1535 | ||
1536 | LIBS="$kde_save_LIBS" | |
1537 | CXXFLAGS="$kde_save_CXXFLAGS" | |
1538 | ||
1539 | ]) | |
1540 | ||
1541 | if test "$kde_cv_libtiff_$1" = "no"; then | |
1542 | AC_MSG_RESULT(no) | |
1543 | LIBTIFF="" | |
1544 | $3 | |
1545 | else | |
1546 | LIBTIFF="$kde_cv_libtiff_$1" | |
1547 | AC_MSG_RESULT(yes) | |
1548 | AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff]) | |
1549 | $2 | |
1550 | fi | |
1551 | ||
1552 | ]) | |
1553 | ||
1554 | AC_DEFUN(AC_FIND_TIFF, | |
1555 | [ | |
1556 | AC_REQUIRE([K_PATH_X]) | |
1557 | AC_REQUIRE([AC_FIND_ZLIB]) | |
1558 | AC_REQUIRE([AC_FIND_JPEG]) | |
1559 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) | |
1560 | ||
1561 | KDE_TRY_TIFFLIB(tiff, [], | |
1562 | KDE_TRY_TIFFLIB(tiff34)) | |
1563 | ||
1564 | AC_SUBST(LIBTIFF) | |
1565 | ]) | |
1566 | ||
1567 | ||
1568 | AC_DEFUN(AC_FIND_PNG, | |
1569 | [ | |
1570 | AC_REQUIRE([AC_FIND_ZLIB]) | |
1571 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) | |
1572 | AC_MSG_CHECKING([for libpng]) | |
1573 | AC_CACHE_VAL(ac_cv_lib_png, | |
1574 | [ | |
1575 | kde_save_LIBS="$LIBS" | |
1576 | LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET" | |
1577 | kde_save_CFLAGS="$CFLAGS" | |
1578 | CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" | |
1579 | AC_LANG_C | |
1580 | AC_TRY_LINK(dnl | |
1581 | [ | |
1582 | #include<png.h> | |
1583 | ], | |
1584 | [ | |
1585 | png_structp png_ptr = png_create_read_struct( /* image ptr */ | |
1586 | PNG_LIBPNG_VER_STRING, 0, 0, 0 ); | |
1587 | return( png_ptr != 0 ); | |
1588 | ], | |
1589 | eval "ac_cv_lib_png='-lpng $LIBZ -lm'", | |
1590 | eval "ac_cv_lib_png=no" | |
1591 | ) | |
1592 | LIBS="$kde_save_LIBS" | |
1593 | CFLAGS="$kde_save_CFLAGS" | |
1594 | ])dnl | |
1595 | if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then | |
1596 | AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng]) | |
1597 | LIBPNG="$ac_cv_lib_png" | |
1598 | AC_SUBST(LIBPNG) | |
1599 | AC_MSG_RESULT($ac_cv_lib_png) | |
1600 | else | |
1601 | AC_MSG_RESULT(no) | |
1602 | LIBPNG="" | |
1603 | AC_SUBST(LIBPNG) | |
1604 | fi | |
1605 | ]) | |
1606 | ||
1607 | AC_DEFUN(AC_CHECK_BOOL, | |
1608 | [ | |
1609 | AC_MSG_CHECKING([for bool]) | |
1610 | AC_CACHE_VAL(ac_cv_have_bool, | |
1611 | [ | |
1612 | AC_LANG_CPLUSPLUS | |
1613 | AC_TRY_COMPILE([], | |
1614 | [bool aBool = true;], | |
1615 | [ac_cv_have_bool="yes"], | |
1616 | [ac_cv_have_bool="no"]) | |
1617 | ]) dnl end AC_CHECK_VAL | |
1618 | AC_MSG_RESULT($ac_cv_have_bool) | |
1619 | if test "$ac_cv_have_bool" = "yes"; then | |
1620 | AC_DEFINE(HAVE_BOOL, 1, [Define if the C++ compiler supports BOOL]) | |
1621 | fi | |
1622 | ]) | |
1623 | ||
1624 | AC_DEFUN(AC_CHECK_GNU_EXTENSIONS, | |
1625 | [ | |
1626 | AC_MSG_CHECKING(if you need GNU extensions) | |
1627 | AC_CACHE_VAL(ac_cv_gnu_extensions, | |
1628 | [ | |
1629 | cat > conftest.c << EOF | |
1630 | #include <features.h> | |
1631 | ||
1632 | #ifdef __GNU_LIBRARY__ | |
1633 | yes | |
1634 | #endif | |
1635 | EOF | |
1636 | ||
1637 | if (eval "$ac_cpp conftest.c") 2>&5 | | |
1638 | egrep "yes" >/dev/null 2>&1; then | |
1639 | rm -rf conftest* | |
1640 | ac_cv_gnu_extensions=yes | |
1641 | else | |
1642 | ac_cv_gnu_extensions=no | |
1643 | fi | |
1644 | ]) | |
1645 | ||
1646 | AC_MSG_RESULT($ac_cv_gnu_extensions) | |
1647 | if test "$ac_cv_gnu_extensions" = "yes"; then | |
1648 | AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions]) | |
1649 | fi | |
1650 | ]) | |
1651 | ||
1652 | AC_DEFUN(KDE_CHECK_COMPILER_FLAG, | |
1653 | [ | |
1654 | AC_REQUIRE([AC_CHECK_COMPILERS]) | |
1655 | AC_MSG_CHECKING(whether $CXX supports -$1) | |
1656 | kde_cache=`echo $1 | sed 'y%.=/+-%___p_%'` | |
1657 | AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache, | |
1658 | [ | |
1659 | echo 'void f(){}' >conftest.cc | |
1660 | if test -z "`$CXX -$1 -c conftest.cc 2>&1`"; then | |
1661 | eval "kde_cv_prog_cxx_$kde_cache=yes" | |
1662 | else | |
1663 | eval "kde_cv_prog_cxx_$kde_cache=no" | |
1664 | fi | |
1665 | rm -f conftest* | |
1666 | ]) | |
1667 | if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then | |
1668 | AC_MSG_RESULT(yes) | |
1669 | : | |
1670 | $2 | |
1671 | else | |
1672 | AC_MSG_RESULT(no) | |
1673 | : | |
1674 | $3 | |
1675 | fi | |
1676 | ]) | |
1677 | ||
1678 | AC_DEFUN(AC_CHECK_COMPILERS, | |
1679 | [ | |
1680 | dnl this is somehow a fat lie, but prevents other macros from double checking | |
1681 | AC_PROVIDE([AC_PROG_CC]) | |
1682 | AC_PROVIDE([AC_PROG_CPP]) | |
1683 | AC_ARG_ENABLE(debug,[ --enable-debug creates debugging code [default=no]], | |
1684 | [ | |
1685 | if test $enableval = "no"; dnl | |
1686 | then | |
1687 | kde_use_debug_code="no" | |
1688 | kde_use_debug_define=yes | |
1689 | else | |
1690 | kde_use_debug_code="yes" | |
1691 | kde_use_debug_define=no | |
1692 | fi | |
1693 | ], [kde_use_debug_code="no" | |
1694 | kde_use_debug_define=no | |
1695 | ]) | |
1696 | ||
1697 | AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)], | |
1698 | [ | |
1699 | if test $enableval = "no"; then | |
1700 | kde_use_strict_options="no" | |
1701 | else | |
1702 | kde_use_strict_options="yes" | |
1703 | fi | |
1704 | ], [kde_use_strict_options="no"]) | |
1705 | ||
1706 | dnl this was AC_PROG_CC. I had to include it manualy, since I had to patch it | |
1707 | AC_MSG_CHECKING(for a C-Compiler) | |
1708 | dnl if there is one, print out. if not, don't matter | |
1709 | AC_MSG_RESULT($CC) | |
1710 | ||
1711 | if test -z "$CC"; then AC_CHECK_PROG(CC, gcc, gcc) fi | |
1712 | if test -z "$CC"; then AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) fi | |
1713 | if test -z "$CC"; then AC_CHECK_PROG(CC, xlc, xlc) fi | |
1714 | test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) | |
1715 | ||
1716 | AC_PROG_CC_WORKS | |
1717 | AC_PROG_CC_GNU | |
1718 | ||
1719 | if test $ac_cv_prog_gcc = yes; then | |
1720 | GCC=yes | |
1721 | else | |
1722 | GCC= | |
1723 | fi | |
1724 | ||
1725 | if test -z "$CFLAGS"; then | |
1726 | if test "$kde_use_debug_code" = "yes"; then | |
1727 | AC_PROG_CC_G | |
1728 | if test $ac_cv_prog_cc_g = yes; then | |
1729 | CFLAGS="-g" | |
1730 | fi | |
1731 | else | |
1732 | if test "$GCC" = "yes"; then | |
1733 | CFLAGS="-O2" | |
1734 | else | |
1735 | CFLAGS="" | |
1736 | fi | |
1737 | if test "$kde_use_debug_define" = "yes"; then | |
1738 | CFLAGS="$CFLAGS -DNDEBUG" | |
1739 | fi | |
1740 | fi | |
1741 | ||
1742 | if test "$GCC" = "yes"; then | |
1743 | CFLAGS="$CFLAGS" | |
1744 | ||
1745 | if test "$kde_use_strict_options" = "yes"; then | |
1746 | CFLAGS="$CFLAGS -W -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" | |
1747 | fi | |
1748 | fi | |
1749 | ||
1750 | fi | |
1751 | ||
1752 | case "$host" in | |
1753 | *-*-sysv4.2uw*) CFLAGS="$CFLAGS -D_UNIXWARE";; | |
1754 | esac | |
1755 | ||
1756 | if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then | |
1757 | LDFLAGS="-s" | |
1758 | fi | |
1759 | ||
1760 | ||
1761 | dnl this is AC_PROG_CPP. I had to include it here, since autoconf checks | |
1762 | dnl dependecies between AC_PROG_CPP and AC_PROG_CC (or is it automake?) | |
1763 | ||
1764 | AC_MSG_CHECKING(how to run the C preprocessor) | |
1765 | # On Suns, sometimes $CPP names a directory. | |
1766 | if test -n "$CPP" && test -d "$CPP"; then | |
1767 | CPP= | |
1768 | fi | |
1769 | if test -z "$CPP"; then | |
1770 | AC_CACHE_VAL(ac_cv_prog_CPP, | |
1771 | [ # This must be in double quotes, not single quotes, because CPP may get | |
1772 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1773 | CPP="${CC-cc} -E" | |
1774 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
1775 | # not just through cpp. | |
1776 | dnl Use a header file that comes with gcc, so configuring glibc | |
1777 | dnl with a fresh cross-compiler works. | |
1778 | AC_TRY_CPP([#include <assert.h> | |
1779 | Syntax Error], , | |
1780 | CPP="${CC-cc} -E -traditional-cpp" | |
1781 | AC_TRY_CPP([#include <assert.h> | |
1782 | Syntax Error], , CPP=/lib/cpp)) | |
1783 | ac_cv_prog_CPP="$CPP"])dnl | |
1784 | CPP="$ac_cv_prog_CPP" | |
1785 | else | |
1786 | ac_cv_prog_CPP="$CPP" | |
1787 | fi | |
1788 | AC_MSG_RESULT($CPP) | |
1789 | AC_SUBST(CPP)dnl | |
1790 | ||
1791 | ||
1792 | AC_MSG_CHECKING(for a C++-Compiler) | |
1793 | dnl if there is one, print out. if not, don't matter | |
1794 | AC_MSG_RESULT($CXX) | |
1795 | ||
1796 | if test -z "$CXX"; then AC_CHECK_PROG(CXX, g++, g++) fi | |
1797 | if test -z "$CXX"; then AC_CHECK_PROG(CXX, CC, CC) fi | |
1798 | if test -z "$CXX"; then AC_CHECK_PROG(CXX, xlC, xlC) fi | |
1799 | if test -z "$CXX"; then AC_CHECK_PROG(CXX, DCC, DCC) fi | |
1800 | test -z "$CXX" && AC_MSG_ERROR([no acceptable C++-compiler found in \$PATH]) | |
1801 | ||
1802 | AC_PROG_CXX_WORKS | |
1803 | AC_PROG_CXX_GNU | |
1804 | ||
1805 | if test $ac_cv_prog_gxx = yes; then | |
1806 | GXX=yes | |
1807 | fi | |
1808 | ||
1809 | if test -z "$CXXFLAGS"; then | |
1810 | if test "$kde_use_debug_code" = "yes"; then | |
1811 | AC_PROG_CXX_G | |
1812 | if test $ac_cv_prog_cxx_g = yes; then | |
1813 | CXXFLAGS="-g" | |
1814 | fi | |
1815 | else | |
1816 | if test "$GXX" = "yes"; then | |
1817 | CXXFLAGS="-O2" | |
1818 | fi | |
1819 | if test "$kde_use_debug_define" = "yes"; then | |
1820 | CXXFLAGS="$CXXFLAGS -DNDEBUG" | |
1821 | fi | |
1822 | fi | |
1823 | ||
1824 | KDE_CHECK_COMPILER_FLAG(fno-exceptions, | |
1825 | [ | |
1826 | CXXFLAGS="$CXXFLAGS -fno-exceptions" | |
1827 | ]) | |
1828 | ||
1829 | KDE_CHECK_COMPILER_FLAG(fno-rtti, | |
1830 | [ | |
1831 | CXXFLAGS="$CXXFLAGS -fno-rtti" | |
1832 | ]) | |
1833 | ||
1834 | KDE_CHECK_COMPILER_FLAG(fno-check-new, | |
1835 | [ | |
1836 | CXXFLAGS="$CXXFLAGS -fno-check-new" | |
1837 | ]) | |
1838 | ||
1839 | if test "$GXX" = "yes"; then | |
1840 | CXXFLAGS="$CXXFLAGS" | |
1841 | ||
1842 | if test "$kde_use_debug_code" = "yes"; then | |
1843 | CXXFLAGS="$CXXFLAGS -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" | |
1844 | ||
1845 | KDE_CHECK_COMPILER_FLAG(Wno-long-long, | |
1846 | [ | |
1847 | CXXFLAGS="$CXXFLAGS -Wno-long-long" | |
1848 | ]) | |
1849 | KDE_CHECK_COMPILER_FLAG(fno-builtin, | |
1850 | [ | |
1851 | CXXFLAGS="$CXXFLAGS -fno-builtin" | |
1852 | ]) | |
1853 | ||
1854 | fi | |
1855 | ||
1856 | if test "$kde_use_strict_options" = "yes"; then | |
1857 | CXXFLAGS="$CXXFLAGS -Wcast-qual -Wbad-function-cast -Wshadow -Wcast-align -Woverloaded-virtual" | |
1858 | fi | |
1859 | ||
1860 | if test "$kde_very_strict" = "yes"; then | |
1861 | CXXFLAGS="$CXXFLAGS -Wold-style-cast -Wredundant-decls -Wconversion" | |
1862 | fi | |
1863 | fi | |
1864 | fi | |
1865 | ||
1866 | KDE_CHECK_COMPILER_FLAG(fexceptions, | |
1867 | [ | |
1868 | USE_EXCEPTIONS="-fexceptions" | |
1869 | ], | |
1870 | USE_EXCEPTIONS= | |
1871 | ) | |
1872 | AC_SUBST(USE_EXCEPTIONS) | |
1873 | ||
1874 | KDE_CHECK_COMPILER_FLAG(frtti, | |
1875 | [ | |
1876 | USE_RTTI="-frtti" | |
1877 | ], | |
1878 | USE_RTTI= | |
1879 | ) | |
1880 | AC_SUBST(USE_RTTI) | |
1881 | ||
1882 | case "$host" in | |
1883 | *-*-sysv4.2uw*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE";; | |
1884 | esac | |
1885 | ||
1886 | AC_PROVIDE(AC_PROG_CXXCPP) | |
1887 | ||
1888 | AC_MSG_CHECKING(how to run the C++ preprocessor) | |
1889 | if test -z "$CXXCPP"; then | |
1890 | AC_CACHE_VAL(ac_cv_prog_CXXCPP, | |
1891 | [ | |
1892 | AC_LANG_SAVE[]dnl | |
1893 | AC_LANG_CPLUSPLUS[]dnl | |
1894 | CXXCPP="${CXX-g++} -E" | |
1895 | AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp) | |
1896 | ac_cv_prog_CXXCPP="$CXXCPP" | |
1897 | AC_LANG_RESTORE[]dnl | |
1898 | ])dnl | |
1899 | CXXCPP="$ac_cv_prog_CXXCPP" | |
1900 | fi | |
1901 | AC_MSG_RESULT($CXXCPP) | |
1902 | AC_SUBST(CXXCPP)dnl | |
1903 | ||
1904 | # the following is to allow programs, that are known to | |
1905 | # have problems when compiled with -O2 | |
1906 | if test -n "$CXXFLAGS"; then | |
1907 | kde_safe_IFS=$IFS | |
1908 | IFS=" " | |
1909 | NOOPT_CXXFLAGS="" | |
1910 | for i in $CXXFLAGS; do | |
1911 | if test ! "$i" = "-O2"; then | |
1912 | NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i" | |
1913 | fi | |
1914 | done | |
1915 | IFS=$kde_safe_IFS | |
1916 | fi | |
1917 | AC_SUBST(NOOPT_CXXFLAGS) | |
1918 | ||
1919 | KDE_CHECK_FINAL | |
1920 | ||
1921 | ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), []) | |
1922 | ||
1923 | KDE_CXXFLAGS= | |
1924 | AC_SUBST(KDE_CXXFLAGS) | |
1925 | ]) | |
1926 | ||
1927 | AC_DEFUN(KDE_ADD_DEPENDENCIES, | |
1928 | [ | |
1929 | [A]M_DEPENDENCIES(CC) | |
1930 | [A]M_DEPENDENCIES(CXX) | |
1931 | ]) | |
1932 | ||
1933 | dnl just a wrapper to clean up configure.in | |
1934 | AC_DEFUN(KDE_PROG_LIBTOOL, | |
1935 | [ | |
1936 | AC_REQUIRE([AC_CHECK_COMPILERS]) | |
1937 | AC_REQUIRE([AC_ENABLE_SHARED]) | |
1938 | AC_REQUIRE([AC_ENABLE_STATIC]) | |
1939 | ||
1940 | if test -z "$LIBTOOL"; then | |
1941 | dnl libtool is only for C, so I must force him | |
1942 | dnl to find the correct flags for C++ | |
1943 | kde_save_cc=$CC | |
1944 | kde_save_cflags="$CFLAGS" | |
1945 | CC=$CXX | |
1946 | CFLAGS="$CXXFLAGS" | |
1947 | AC_LANG_SAVE | |
1948 | AC_LANG_C | |
1949 | AC_LIBTOOL_DLOPEN | |
1950 | AM_PROG_LIBTOOL | |
1951 | # LIBTOOL="$LIBTOOL --silent" | |
1952 | dnl AC_SUBST(LIBTOOL) | |
1953 | AC_LANG_RESTORE | |
1954 | CC=$kde_save_cc | |
1955 | CFLAGS="$kde_save_cflags" | |
1956 | LIBTOOL_SHELL='/bin/sh ./libtool' | |
1957 | else | |
1958 | LIBTOOL_SHELL=$LIBTOOL | |
1959 | fi | |
1960 | ]) | |
1961 | ||
1962 | AC_DEFUN(KDE_DO_IT_ALL, | |
1963 | [ | |
1964 | AC_CANONICAL_SYSTEM | |
1965 | AC_ARG_PROGRAM | |
1966 | AM_INIT_AUTOMAKE($1, $2) | |
1967 | AM_DISABLE_LIBRARIES | |
1968 | AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) | |
1969 | AC_CHECK_COMPILERS | |
1970 | KDE_PROG_LIBTOOL | |
1971 | AM_KDE_WITH_NLS | |
1972 | AC_PATH_KDE | |
1973 | ]) | |
1974 | ||
1975 | AC_DEFUN(AC_CHECK_RPATH, | |
1976 | [ | |
1977 | AC_MSG_CHECKING(for rpath) | |
1978 | AC_ARG_ENABLE(rpath, | |
1979 | [ --disable-rpath do not use the rpath feature of ld], | |
1980 | USE_RPATH=$enableval, USE_RPATH=yes) | |
1981 | ||
1982 | if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then | |
1983 | ||
1984 | KDE_RPATH="-rpath \$(kde_libraries)" | |
1985 | ||
1986 | if test -n "$qt_libraries"; then | |
1987 | KDE_RPATH="$KDE_RPATH -rpath \$(qt_libraries)" | |
1988 | fi | |
1989 | dnl $x_libraries is set to /usr/lib in case | |
1990 | if test -n "$X_LDFLAGS"; then | |
1991 | KDE_RPATH="$KDE_RPATH -rpath \$(x_libraries)" | |
1992 | fi | |
1993 | if test -n "$KDE_EXTRA_RPATH"; then | |
1994 | KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)" | |
1995 | fi | |
1996 | fi | |
1997 | AC_SUBST(KDE_EXTRA_RPATH) | |
1998 | AC_SUBST(KDE_RPATH) | |
1999 | AC_MSG_RESULT($USE_RPATH) | |
2000 | ]) | |
2001 | ||
2002 | dnl Check for the type of the third argument of getsockname | |
2003 | AC_DEFUN(AC_CHECK_KSIZE_T, | |
2004 | [AC_MSG_CHECKING(for the third argument of getsockname) | |
2005 | AC_CACHE_VAL(ac_cv_ksize_t, | |
2006 | AC_LANG_SAVE | |
2007 | AC_LANG_CPLUSPLUS | |
2008 | [AC_TRY_COMPILE([ | |
2009 | #include <sys/types.h> | |
2010 | #include <sys/socket.h> | |
2011 | ],[ | |
2012 | socklen_t a=0; | |
2013 | getsockname(0,(struct sockaddr*)0, &a); | |
2014 | ], | |
2015 | ac_cv_ksize_t=socklen_t, | |
2016 | ac_cv_ksize_t=) | |
2017 | if test -z "$ac_cv_ksize_t"; then | |
2018 | ac_safe_cxxflags="$CXXFLAGS" | |
2019 | if test "$GCC" = "yes"; then | |
2020 | CXXFLAGS="-Werror $CXXFLAGS" | |
2021 | fi | |
2022 | AC_TRY_COMPILE([ | |
2023 | #include <sys/types.h> | |
2024 | #include <sys/socket.h> | |
2025 | ],[ | |
2026 | int a=0; | |
2027 | getsockname(0,(struct sockaddr*)0, &a); | |
2028 | ], | |
2029 | ac_cv_ksize_t=int, | |
2030 | ac_cv_ksize_t=size_t) | |
2031 | CXXFLAGS="$ac_safe_cxxflags" | |
2032 | fi | |
2033 | AC_LANG_RESTORE | |
2034 | ]) | |
2035 | ||
2036 | if test -z "$ac_cv_ksize_t"; then | |
2037 | ac_cv_ksize_t=int | |
2038 | fi | |
2039 | ||
2040 | AC_MSG_RESULT($ac_cv_ksize_t) | |
2041 | AC_DEFINE_UNQUOTED(ksize_t, $ac_cv_ksize_t, | |
2042 | [Define the type of the third argument for getsockname] | |
2043 | ) | |
2044 | ||
2045 | ]) | |
2046 | ||
2047 | dnl This is a merge of some macros out of the gettext aclocal.m4 | |
2048 | dnl since we don't need anything, I took the things we need | |
2049 | dnl the copyright for them is: | |
2050 | dnl > | |
2051 | dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. | |
2052 | dnl This Makefile.in is free software; the Free Software Foundation | |
2053 | dnl gives unlimited permission to copy and/or distribute it, | |
2054 | dnl with or without modifications, as long as this notice is preserved. | |
2055 | ||
2056 | dnl This program is distributed in the hope that it will be useful, | |
2057 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
2058 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
2059 | dnl PARTICULAR PURPOSE. | |
2060 | dnl > | |
2061 | dnl for this file it is relicensed under LGPL | |
2062 | ||
2063 | AC_DEFUN(AM_KDE_WITH_NLS, | |
2064 | [AC_MSG_CHECKING([whether NLS is requested]) | |
2065 | dnl Default is enabled NLS | |
2066 | AC_ARG_ENABLE(nls, | |
2067 | [ --disable-nls do not use Native Language Support], | |
2068 | USE_NLS=$enableval, USE_NLS=yes) | |
2069 | AC_MSG_RESULT($USE_NLS) | |
2070 | AC_SUBST(USE_NLS) | |
2071 | ||
2072 | dnl If we use NLS figure out what method | |
2073 | if test "$USE_NLS" = "yes"; then | |
2074 | AC_DEFINE(ENABLE_NLS, 1, [Define if NLS is requested]) | |
2075 | ||
2076 | AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt, | |
2077 | [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt) | |
2078 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) | |
2079 | ||
2080 | if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then | |
2081 | AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it]) | |
2082 | GMSGFMT=":" | |
2083 | fi | |
2084 | MSGFMT=$GMSGFMT | |
2085 | AC_SUBST(GMSGFMT) | |
2086 | AC_SUBST(MSGFMT) | |
2087 | ||
2088 | AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext, | |
2089 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) | |
2090 | ||
2091 | dnl Test whether we really found GNU xgettext. | |
2092 | if test "$XGETTEXT" != ":"; then | |
2093 | dnl If it is no GNU xgettext we define it as : so that the | |
2094 | dnl Makefiles still can work. | |
2095 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
2096 | : ; | |
2097 | else | |
2098 | AC_MSG_RESULT( | |
2099 | [found xgettext programs is not GNU xgettext; ignore it]) | |
2100 | XGETTEXT=":" | |
2101 | fi | |
2102 | fi | |
2103 | AC_SUBST(XGETTEXT) | |
2104 | fi | |
2105 | ||
2106 | ]) | |
2107 | ||
2108 | # Search path for a program which passes the given test. | |
2109 | # Ulrich Drepper <drepper@cygnus.com>, 1996. | |
2110 | ||
2111 | # serial 1 | |
2112 | # Stephan Kulow: I appended a _KDE against name conflicts | |
2113 | ||
2114 | dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR, | |
2115 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) | |
2116 | AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE, | |
2117 | [# Extract the first word of "$2", so it can be a program name with args. | |
2118 | set dummy $2; ac_word=[$]2 | |
2119 | AC_MSG_CHECKING([for $ac_word]) | |
2120 | AC_CACHE_VAL(ac_cv_path_$1, | |
2121 | [case "[$]$1" in | |
2122 | /*) | |
2123 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. | |
2124 | ;; | |
2125 | *) | |
2126 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2127 | for ac_dir in ifelse([$5], , $PATH, [$5]); do | |
2128 | test -z "$ac_dir" && ac_dir=. | |
2129 | if test -f $ac_dir/$ac_word; then | |
2130 | if [$3]; then | |
2131 | ac_cv_path_$1="$ac_dir/$ac_word" | |
2132 | break | |
2133 | fi | |
2134 | fi | |
2135 | done | |
2136 | IFS="$ac_save_ifs" | |
2137 | dnl If no 4th arg is given, leave the cache variable unset, | |
2138 | dnl so AC_PATH_PROGS will keep looking. | |
2139 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" | |
2140 | ])dnl | |
2141 | ;; | |
2142 | esac])dnl | |
2143 | $1="$ac_cv_path_$1" | |
2144 | if test -n "[$]$1"; then | |
2145 | AC_MSG_RESULT([$]$1) | |
2146 | else | |
2147 | AC_MSG_RESULT(no) | |
2148 | fi | |
2149 | AC_SUBST($1)dnl | |
2150 | ]) | |
2151 | ||
2152 | ||
2153 | # Check whether LC_MESSAGES is available in <locale.h>. | |
2154 | # Ulrich Drepper <drepper@cygnus.com>, 1995. | |
2155 | ||
2156 | # serial 1 | |
2157 | ||
2158 | AC_DEFUN(AM_LC_MESSAGES, | |
2159 | [if test $ac_cv_header_locale_h = yes; then | |
2160 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, | |
2161 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], | |
2162 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) | |
2163 | if test $am_cv_val_LC_MESSAGES = yes; then | |
2164 | AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES]) | |
2165 | fi | |
2166 | fi]) | |
2167 | ||
2168 | dnl From Jim Meyering. | |
2169 | dnl FIXME: migrate into libit. | |
2170 | ||
2171 | AC_DEFUN(AM_FUNC_OBSTACK, | |
2172 | [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack, | |
2173 | [AC_TRY_LINK([#include "obstack.h"], | |
2174 | [struct obstack *mem;obstack_free(mem,(char *) 0)], | |
2175 | am_cv_func_obstack=yes, | |
2176 | am_cv_func_obstack=no)]) | |
2177 | if test $am_cv_func_obstack = yes; then | |
2178 | AC_DEFINE(HAVE_OBSTACK) | |
2179 | else | |
2180 | LIBOBJS="$LIBOBJS obstack.o" | |
2181 | fi | |
2182 | ]) | |
2183 | ||
2184 | dnl From Jim Meyering. Use this if you use the GNU error.[ch]. | |
2185 | dnl FIXME: Migrate into libit | |
2186 | ||
2187 | AC_DEFUN(AM_FUNC_ERROR_AT_LINE, | |
2188 | [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line, | |
2189 | [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");], | |
2190 | am_cv_lib_error_at_line=yes, | |
2191 | am_cv_lib_error_at_line=no)]) | |
2192 | if test $am_cv_lib_error_at_line = no; then | |
2193 | LIBOBJS="$LIBOBJS error.o" | |
2194 | fi | |
2195 | AC_SUBST(LIBOBJS)dnl | |
2196 | ]) | |
2197 | ||
2198 | # Macro to add for using GNU gettext. | |
2199 | # Ulrich Drepper <drepper@cygnus.com>, 1995. | |
2200 | ||
2201 | # serial 1 | |
2202 | # Stephan Kulow: I put a KDE in it to avoid name conflicts | |
2203 | ||
2204 | AC_DEFUN(AM_KDE_GNU_GETTEXT, | |
2205 | [AC_REQUIRE([AC_PROG_MAKE_SET])dnl | |
2206 | AC_REQUIRE([AC_PROG_RANLIB])dnl | |
2207 | AC_REQUIRE([AC_HEADER_STDC])dnl | |
2208 | AC_REQUIRE([AC_C_INLINE])dnl | |
2209 | AC_REQUIRE([AC_TYPE_OFF_T])dnl | |
2210 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl | |
2211 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl | |
2212 | AC_REQUIRE([AC_FUNC_MMAP])dnl | |
2213 | AC_REQUIRE([AM_KDE_WITH_NLS])dnl | |
2214 | AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
2215 | unistd.h values.h alloca.h]) | |
2216 | AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
2217 | __argz_count __argz_stringify __argz_next]) | |
2218 | ||
2219 | AC_MSG_CHECKING(for stpcpy) | |
2220 | AC_CACHE_VAL(kde_cv_func_stpcpy, | |
2221 | [ | |
2222 | kde_safe_cxxflags=$CXXFLAGS | |
2223 | CXXFLAGS="-Wmissing-prototypes -Werror" | |
2224 | AC_LANG_SAVE | |
2225 | AC_LANG_CPLUSPLUS | |
2226 | AC_TRY_COMPILE([ | |
2227 | #include <string.h> | |
2228 | ], | |
2229 | [ | |
2230 | char buffer[200]; | |
2231 | stpcpy(buffer, buffer); | |
2232 | ], | |
2233 | kde_cv_func_stpcpy=yes, | |
2234 | kde_cv_func_stpcpy=no) | |
2235 | AC_LANG_RESTORE | |
2236 | CXXFLAGS=$kde_safe_cxxflags | |
2237 | ]) | |
2238 | AC_MSG_RESULT($kde_cv_func_stpcpy) | |
2239 | if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then | |
2240 | AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy]) | |
2241 | fi | |
2242 | ||
2243 | AM_LC_MESSAGES | |
2244 | ||
2245 | if test "x$CATOBJEXT" != "x"; then | |
2246 | if test "x$ALL_LINGUAS" = "x"; then | |
2247 | LINGUAS= | |
2248 | else | |
2249 | AC_MSG_CHECKING(for catalogs to be installed) | |
2250 | NEW_LINGUAS= | |
2251 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
2252 | case "$ALL_LINGUAS" in | |
2253 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
2254 | esac | |
2255 | done | |
2256 | LINGUAS=$NEW_LINGUAS | |
2257 | AC_MSG_RESULT($LINGUAS) | |
2258 | fi | |
2259 | ||
2260 | dnl Construct list of names of catalog files to be constructed. | |
2261 | if test -n "$LINGUAS"; then | |
2262 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
2263 | fi | |
2264 | fi | |
2265 | ||
2266 | ]) | |
2267 | ||
2268 | AC_DEFUN(AC_HAVE_XPM, | |
2269 | [AC_REQUIRE_CPP()dnl | |
2270 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) | |
2271 | ||
2272 | test -z "$XPM_LDFLAGS" && XPM_LDFLAGS= | |
2273 | test -z "$XPM_INCLUDE" && XPM_INCLUDE= | |
2274 | ||
2275 | AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests], | |
2276 | xpm_test=$withval, xpm_test="yes") | |
2277 | if test "x$xpm_test" = xno; then | |
2278 | ac_cv_have_xpm=no | |
2279 | else | |
2280 | AC_MSG_CHECKING(for XPM) | |
2281 | AC_CACHE_VAL(ac_cv_have_xpm, | |
2282 | [ | |
2283 | AC_LANG_C | |
2284 | ac_save_ldflags="$LDFLAGS" | |
2285 | ac_save_cflags="$CFLAGS" | |
2286 | LDFLAGS="$LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBSOCKET" | |
2287 | CFLAGS="$CFLAGS $X_INCLUDES" | |
2288 | test ! -z "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS" | |
2289 | AC_TRY_LINK([#include <X11/xpm.h>],[], | |
2290 | ac_cv_have_xpm="yes",ac_cv_have_xpm="no") | |
2291 | LDFLAGS="$ac_save_ldflags" | |
2292 | CFLAGS="$ac_save_cflags" | |
2293 | ])dnl | |
2294 | ||
2295 | if test "$ac_cv_have_xpm" = no; then | |
2296 | AC_MSG_RESULT(no) | |
2297 | XPM_LDFLAGS="" | |
2298 | XPMINC="" | |
2299 | $2 | |
2300 | else | |
2301 | AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support]) | |
2302 | if test "$XPM_LDFLAGS" = ""; then | |
2303 | XPMLIB='-lXpm $(LIB_X11)' | |
2304 | else | |
2305 | XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)' | |
2306 | fi | |
2307 | if test "$XPM_INCLUDE" = ""; then | |
2308 | XPMINC="" | |
2309 | else | |
2310 | XPMINC="-I$XPM_INCLUDE" | |
2311 | fi | |
2312 | AC_MSG_RESULT(yes) | |
2313 | $1 | |
2314 | fi | |
2315 | fi | |
2316 | AC_SUBST(XPMINC) | |
2317 | AC_SUBST(XPMLIB) | |
2318 | ]) | |
2319 | ||
2320 | AC_DEFUN(AC_HAVE_DPMS, | |
2321 | [AC_REQUIRE_CPP()dnl | |
2322 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) | |
2323 | ||
2324 | test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS= | |
2325 | test -z "$DPMS_INCLUDE" && DPMS_INCLUDE= | |
2326 | ||
2327 | AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving], | |
2328 | dpms_test=$withval, dpms_test="yes") | |
2329 | if test "x$dpms_test" = xno; then | |
2330 | ac_cv_have_dpms=no | |
2331 | else | |
2332 | AC_MSG_CHECKING(for DPMS) | |
2333 | AC_CACHE_VAL(ac_cv_have_dpms, | |
2334 | [ | |
2335 | AC_LANG_C | |
2336 | ac_save_ldflags="$LDFLAGS" | |
2337 | ac_save_cflags="$CFLAGS" | |
2338 | LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBSOCKET" | |
2339 | CFLAGS="$CFLAGS $X_INCLUDES" | |
2340 | test ! -z "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS" | |
2341 | AC_TRY_LINK([#include <X11/extensions/dpms.h>],[], | |
2342 | ac_cv_have_dpms="yes",ac_cv_have_dpms="no") | |
2343 | LDFLAGS="$ac_save_ldflags" | |
2344 | CFLAGS="$ac_save_cflags" | |
2345 | ])dnl | |
2346 | ||
2347 | if test "$ac_cv_have_dpms" = no; then | |
2348 | AC_MSG_RESULT(no) | |
2349 | DPMS_LDFLAGS="" | |
2350 | DPMSINC="" | |
2351 | $2 | |
2352 | else | |
2353 | AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support]) | |
2354 | if test "$DPMS_LDFLAGS" = ""; then | |
2355 | DPMSLIB='-lXdpms $(LIB_X11)' | |
2356 | else | |
2357 | DPMSLIB="-L$DPMS_LDFLAGS -lXdpms "'$(LIB_X11)' | |
2358 | fi | |
2359 | if test "$DPMS_INCLUDE" = ""; then | |
2360 | DPMSINC="" | |
2361 | else | |
2362 | DPMSINC="-I$DPMS_INCLUDE" | |
2363 | fi | |
2364 | AC_MSG_RESULT(yes) | |
2365 | $1 | |
2366 | fi | |
2367 | fi | |
2368 | AC_SUBST(DPMSINC) | |
2369 | AC_SUBST(DPMSLIB) | |
2370 | ]) | |
2371 | ||
2372 | AC_DEFUN(AC_HAVE_GL, | |
2373 | [AC_REQUIRE_CPP()dnl | |
2374 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) | |
2375 | ||
2376 | test -z "$GL_LDFLAGS" && GL_LDFLAGS= | |
2377 | test -z "$GL_INCLUDE" && GL_INCLUDE= | |
2378 | ||
2379 | AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes], | |
2380 | gl_test=$withval, gl_test="yes") | |
2381 | if test "x$gl_test" = xno; then | |
2382 | ac_cv_have_gl=no | |
2383 | else | |
2384 | AC_MSG_CHECKING(for GL) | |
2385 | AC_CACHE_VAL(ac_cv_have_gl, | |
2386 | [ | |
2387 | AC_LANG_C | |
2388 | ac_save_ldflags="$LDFLAGS" | |
2389 | ac_save_cflags="$CFLAGS" | |
2390 | LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU -lX11 -lXext -lm $LIBSOCKET" | |
2391 | CFLAGS="$CFLAGS $X_INCLUDES" | |
2392 | test ! -z "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS" | |
2393 | AC_TRY_LINK([],[], | |
2394 | ac_cv_have_gl="mesa", ac_cv_have_gl="no") | |
2395 | if test "x$ac_cv_have_gl" = "xno"; then | |
2396 | LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU -lX11 -lXext -lm $LIBSOCKET" | |
2397 | CFLAGS="$ac_save_cflags $X_INCLUDES" | |
2398 | test ! -z "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS" | |
2399 | AC_TRY_LINK([],[], | |
2400 | ac_cv_have_gl="yes", ac_cv_have_gl="no") | |
2401 | fi | |
2402 | LDFLAGS="$ac_save_ldflags" | |
2403 | CFLAGS="$ac_save_cflags" | |
2404 | ])dnl | |
2405 | ||
2406 | if test "$ac_cv_have_gl" = "no"; then | |
2407 | AC_MSG_RESULT(no) | |
2408 | GL_LDFLAGS="" | |
2409 | GLINC="" | |
2410 | $2 | |
2411 | else | |
2412 | AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)]) | |
2413 | if test "$GL_LDFLAGS" = ""; then | |
2414 | if test "$ac_cv_have_gl" = "mesa"; then | |
2415 | GLLIB='-lMesaGL -lMesaGLU $(LIB_X11)' | |
2416 | else | |
2417 | GLLIB='-lGL -lGLU $(LIB_X11)' | |
2418 | fi | |
2419 | else | |
2420 | if test "$ac_cv_have_gl" = "mesa"; then | |
2421 | GLLIB="$GL_LDFLAGS -lMesaGL -lMesaGLU "'$(LIB_X11)' | |
2422 | else | |
2423 | GLLIB="$GL_LDFLAGS -lGL -lGLU "'$(LIB_X11)' | |
2424 | fi | |
2425 | fi | |
2426 | if test "$GL_INCLUDE" = ""; then | |
2427 | GLINC="" | |
2428 | else | |
2429 | GLINC="-I$GL_INCLUDE" | |
2430 | fi | |
2431 | AC_MSG_RESULT($ac_cv_have_gl) | |
2432 | $1 | |
2433 | fi | |
2434 | fi | |
2435 | AC_SUBST(GLINC) | |
2436 | AC_SUBST(GLLIB) | |
2437 | ]) | |
2438 | ||
2439 | dnl PAM pam | |
2440 | ||
2441 | dnl Should test for PAM (Pluggable Authentication Modules) | |
2442 | AC_DEFUN(AC_PATH_PAM_DIRECT, | |
2443 | [ | |
2444 | test -z "$pam_direct_test_library" && pam_direct_test_library=pam | |
2445 | test -z "$pam_direct_test_include" && pam_direct_test_include=security/pam_appl.h | |
2446 | ||
2447 | for ac_dir in \ | |
2448 | \ | |
2449 | /usr/local/include \ | |
2450 | /usr/include \ | |
2451 | /usr/unsupported/include \ | |
2452 | /opt/include \ | |
2453 | /usr/pam/include \ | |
2454 | /usr/local/pam/include \ | |
2455 | /usr/lib/pam/include \ | |
2456 | \ | |
2457 | $extra_include \ | |
2458 | ; \ | |
2459 | do | |
2460 | if test -r "$ac_dir/$pam_direct_test_include"; then | |
2461 | no_pam= ac_pam_includes=$ac_dir | |
2462 | break | |
2463 | fi | |
2464 | done | |
2465 | ||
2466 | # First see if replacing the include by lib works. | |
2467 | for ac_dir in `echo "$ac_pam_includes" | sed s/include/lib/` \ | |
2468 | \ | |
2469 | /lib \ | |
2470 | /usr/lib \ | |
2471 | /usr/local/lib \ | |
2472 | /usr/unsupported/lib \ | |
2473 | /lib/security \ | |
2474 | /usr/security/lib \ | |
2475 | $extra_lib \ | |
2476 | ; \ | |
2477 | do | |
2478 | for ac_extension in a so sl; do | |
2479 | if test -r $ac_dir/lib${pam_direct_test_library}.$ac_extension; then | |
2480 | no_pam= ac_pam_libraries=$ac_dir | |
2481 | break 2 | |
2482 | fi | |
2483 | done | |
2484 | done | |
2485 | ]) | |
2486 | ||
2487 | AC_DEFUN(AC_PATH_PAM, | |
2488 | [ | |
2489 | AC_REQUIRE([KDE_CHECK_LIBDL]) | |
2490 | AC_REQUIRE_CPP()dnl | |
2491 | ||
2492 | AC_CHECK_LIB(pam_misc, main, [PAM_MISC_LIB="-lpam_misc" | |
2493 | AC_DEFINE_UNQUOTED(HAVE_PAM_MISC, 1, [Define if you have a PAM implementation with the pam_misc library])], [], [-lpam $LIBDL]) | |
2494 | ||
2495 | AC_MSG_CHECKING(for PAM) | |
2496 | AC_ARG_WITH(pam, | |
2497 | [ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]], | |
2498 | [ | |
2499 | if test "x$withval" = "xyes"; then | |
2500 | no_pam= | |
2501 | default_pam=yes | |
2502 | elif test "x$withval" = "xno"; then | |
2503 | no_pam=yes | |
2504 | else | |
2505 | no_pam= | |
2506 | pam_service="$withval" | |
2507 | if test -z "$pam_service"; then | |
2508 | default_pam=yes | |
2509 | else | |
2510 | default_pam= | |
2511 | fi | |
2512 | fi | |
2513 | ], no_pam=yes | |
2514 | ) | |
2515 | ||
2516 | if test ! "$no_pam" = yes; then | |
2517 | ||
2518 | AC_CACHE_VAL(ac_cv_path_pam, | |
2519 | [ | |
2520 | ac_pam_includes=NONE | |
2521 | ac_pam_libraries=NONE | |
2522 | if test -z "$pam_libraries"; then | |
2523 | pam_libraries=NONE | |
2524 | fi | |
2525 | if test -z "$pam_includes"; then | |
2526 | pam_includes=NONE | |
2527 | fi | |
2528 | ||
2529 | AC_PATH_PAM_DIRECT | |
2530 | ||
2531 | test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes | |
2532 | test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries | |
2533 | ||
2534 | if test ! "x$pam_includes" = xNONE && test ! "x$pam_libraries" = xNONE; then | |
2535 | ac_pam_libs="-lpam $PAM_MISC_LIB $LIBDL" | |
2536 | ac_cv_path_pam="no_pam= ac_pam_includes=$ac_pam_includes ac_pam_libraries=$ac_pam_libraries ac_pam_libs=\"$ac_pam_libs\"" | |
2537 | else | |
2538 | ac_cv_path_pam="no_pam=yes" | |
2539 | fi | |
2540 | ]) | |
2541 | ||
2542 | eval "$ac_cv_path_pam" | |
2543 | ||
2544 | fi | |
2545 | ||
2546 | if test "$no_pam" = yes; then | |
2547 | AC_MSG_RESULT(no) | |
2548 | else | |
2549 | AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules); Redhat-Users!]) | |
2550 | PAMLIBS="$ac_pam_libs" | |
2551 | test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes | |
2552 | test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries | |
2553 | AC_MSG_RESULT([libraries $pam_libraries, headers $pam_includes]) | |
2554 | if test "$default_pam" = yes; then | |
2555 | AC_MSG_RESULT(["default pam service name will be used"]) | |
2556 | else | |
2557 | AC_DEFINE_UNQUOTED(KDE_PAM_SERVICE,"$pam_service", [Define to change the default name of the PAM service used by KDE]) | |
2558 | AC_MSG_RESULT(["pam service name will be: " $pam_service]) | |
2559 | fi | |
2560 | dnl test whether struct pam_message is const (Linux) or not (Sun) | |
2561 | pam_appl_h="$ac_pam_includes/security/pam_appl.h" | |
2562 | AC_MSG_CHECKING(for const pam_message) | |
2563 | AC_EGREP_HEADER([struct pam_message], | |
2564 | $pam_appl_h, | |
2565 | [ AC_EGREP_HEADER([const struct pam_message], | |
2566 | $pam_appl_h, | |
2567 | [AC_MSG_RESULT(["const: Linux-type PAM"]) ], | |
2568 | [AC_MSG_RESULT(["nonconst: Sun-type PAM"]) | |
2569 | AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])] | |
2570 | )], | |
2571 | [AC_MSG_RESULT(["not found - assume const, Linux-type PAM"])] | |
2572 | ) | |
2573 | fi | |
2574 | ||
2575 | if test "x$pam_libraries" != x && test "x$pam_libraries" != xNONE ; then | |
2576 | PAMLIBPATHS="-L$pam_libraries" | |
2577 | fi | |
2578 | if test "x$pam_includes" != x && test "x$pam_includes" != xNONE ; then | |
2579 | PAMINC="-I$pam_includes" | |
2580 | fi | |
2581 | ||
2582 | AC_SUBST(PAMINC) | |
2583 | AC_SUBST(PAMLIBS) | |
2584 | AC_SUBST(PAMLIBPATHS) | |
2585 | ||
2586 | ]) | |
2587 | ||
2588 | AC_DEFUN(KDE_CHECK_LIBDL, | |
2589 | [ | |
2590 | AC_CHECK_LIB(dl, dlopen, [ | |
2591 | LIBDL="-ldl" | |
2592 | ac_cv_have_dlfcn=yes | |
2593 | ]) | |
2594 | ||
2595 | AC_CHECK_LIB(dld, shl_unload, [ | |
2596 | LIBDL="-ldld" | |
2597 | ac_cv_have_shload=yes | |
2598 | ]) | |
2599 | ||
2600 | AC_SUBST(LIBDL) | |
2601 | ]) | |
2602 | ||
2603 | AC_DEFUN(KDE_CHECK_DLOPEN, | |
2604 | [ | |
2605 | KDE_CHECK_LIBDL | |
2606 | AC_CHECK_HEADERS(dlfcn.h dl.h) | |
2607 | if test "$ac_cv_header_dlfcn_h" = "no"; then | |
2608 | ac_cv_have_dlfcn=no | |
2609 | fi | |
2610 | ||
2611 | if test "$ac_cv_header_dl_h" = "no"; then | |
2612 | ac_cv_have_shload=no | |
2613 | fi | |
2614 | ||
2615 | enable_dlopen=no | |
2616 | AC_ARG_ENABLE(dlopen, | |
2617 | [ --disable-dlopen link staticly [default=no]] , | |
2618 | [if test "$enableval" = yes; then | |
2619 | enable_dlopen=yes | |
2620 | fi], | |
2621 | enable_dlopen=yes) | |
2622 | ||
2623 | # override the user's opinion, if we know it better ;) | |
2624 | if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then | |
2625 | enable_dlopen=no | |
2626 | fi | |
2627 | ||
2628 | if test "$ac_cv_have_dlfcn" = "yes"; then | |
2629 | AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn]) | |
2630 | fi | |
2631 | ||
2632 | if test "$ac_cv_have_shload" = "yes"; then | |
2633 | AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload]) | |
2634 | fi | |
2635 | ||
2636 | if test "$enable_dlopen" = no ; then | |
2637 | test -n "$1" && eval $1 | |
2638 | else | |
2639 | test -n "$2" && eval $2 | |
2640 | fi | |
2641 | ||
2642 | ]) | |
2643 | ||
2644 | AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING, | |
2645 | [ | |
2646 | KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no) | |
2647 | KDE_PROG_LIBTOOL | |
2648 | AC_MSG_CHECKING([dynamic loading]) | |
2649 | eval "`egrep '^build_libtool_libs=' libtool`" | |
2650 | if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then | |
2651 | dynamic_loading=yes | |
2652 | AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING) | |
2653 | else | |
2654 | dynamic_loading=no | |
2655 | fi | |
2656 | AC_MSG_RESULT($dynamic_loading) | |
2657 | if test "$dynamic_loading" = "yes"; then | |
2658 | $1 | |
2659 | else | |
2660 | $2 | |
2661 | fi | |
2662 | ]) | |
2663 | ||
2664 | AC_DEFUN(KDE_ADD_INCLUDES, | |
2665 | [ | |
2666 | if test -z "$1"; then | |
2667 | test_include="Pix.h" | |
2668 | else | |
2669 | test_include="$1" | |
2670 | fi | |
2671 | ||
2672 | AC_MSG_CHECKING([for libg++ ($test_include)]) | |
2673 | ||
2674 | AC_CACHE_VAL(kde_cv_libgpp_includes, | |
2675 | [ | |
2676 | kde_cv_libgpp_includes=no | |
2677 | ||
2678 | for ac_dir in \ | |
2679 | \ | |
2680 | /usr/include/g++ \ | |
2681 | /usr/include \ | |
2682 | /usr/unsupported/include \ | |
2683 | /opt/include \ | |
2684 | $extra_include \ | |
2685 | ; \ | |
2686 | do | |
2687 | if test -r "$ac_dir/$test_include"; then | |
2688 | kde_cv_libgpp_includes=$ac_dir | |
2689 | break | |
2690 | fi | |
2691 | done | |
2692 | ]) | |
2693 | ||
2694 | AC_MSG_RESULT($kde_cv_libgpp_includes) | |
2695 | if test "$kde_cv_libgpp_includes" != "no"; then | |
2696 | all_includes="-I$kde_cv_libgpp_includes $all_includes" | |
2697 | fi | |
2698 | ]) | |
2699 | ]) | |
2700 | ||
2701 | ||
2702 | AC_DEFUN(KDE_CHECK_MICO, | |
2703 | [ | |
2704 | AC_REQUIRE([KDE_CHECK_LIBDL]) | |
2705 | AC_REQUIRE([KDE_MISC_TESTS]) | |
2706 | AC_MSG_CHECKING(for MICO) | |
2707 | ||
2708 | if test -z "$MICODIR"; then | |
2709 | kde_micodir=/usr/local | |
2710 | else | |
2711 | kde_micodir="$MICODIR" | |
2712 | fi | |
2713 | ||
2714 | AC_ARG_WITH(micodir, | |
2715 | [ --with-micodir=micodir where mico is installed ], | |
2716 | kde_micodir=$withval, | |
2717 | kde_micodir=$kde_micodir | |
2718 | ) | |
2719 | ||
2720 | AC_CACHE_VAL(kde_cv_mico_incdir, | |
2721 | [ | |
2722 | mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes" | |
2723 | AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir) | |
2724 | ||
2725 | ]) | |
2726 | kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'` | |
2727 | ||
2728 | if test ! -r $kde_micodir/include/CORBA.h; then | |
2729 | AC_MSG_ERROR([No CORBA.h found, specify another micodir]) | |
2730 | fi | |
2731 | ||
2732 | AC_MSG_RESULT($kde_micodir) | |
2733 | ||
2734 | MICO_INCLUDES=-I$kde_micodir/include | |
2735 | AC_SUBST(MICO_INCLUDES) | |
2736 | MICO_LDFLAGS=-L$kde_micodir/lib | |
2737 | AC_SUBST(MICO_LDFLAGS) | |
2738 | micodir=$kde_micodir | |
2739 | AC_SUBST(micodir) | |
2740 | ||
2741 | AC_MSG_CHECKING([for MICO version]) | |
2742 | AC_CACHE_VAL(kde_cv_mico_version, | |
2743 | [ | |
2744 | AC_LANG_C | |
2745 | cat >conftest.$ac_ext <<EOF | |
2746 | #include <stdio.h> | |
2747 | #include <mico/version.h> | |
2748 | int main() { | |
2749 | ||
2750 | printf("MICO_VERSION=%s\n",MICO_VERSION); | |
2751 | return (0); | |
2752 | } | |
2753 | EOF | |
2754 | ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest' | |
2755 | if AC_TRY_EVAL(ac_compile); then | |
2756 | if eval `./conftest 2>&5`; then | |
2757 | kde_cv_mico_version=$MICO_VERSION | |
2758 | else | |
2759 | AC_MSG_ERROR([your system is not able to execute a small application to | |
2760 | find MICO version! Check $kde_micodir/include/mico/version.h]) | |
2761 | fi | |
2762 | else | |
2763 | AC_MSG_ERROR([your system is not able to compile a small application to | |
2764 | find MICO version! Check $kde_micodir/include/mico/version.h]) | |
2765 | fi | |
2766 | ]) | |
2767 | ||
2768 | dnl installed MICO version | |
2769 | mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'` | |
2770 | mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'` | |
2771 | mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'` | |
2772 | ||
2773 | if test "x$1" = "x"; then | |
2774 | req_version="2.3.0" | |
2775 | else | |
2776 | req_version=$1 | |
2777 | fi | |
2778 | ||
2779 | dnl required MICO version | |
2780 | req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'` | |
2781 | req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'` | |
2782 | req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'` | |
2783 | ||
2784 | if test "$mico_v_maj" -lt "$req_v_maj" || \ | |
2785 | ( test "$mico_v_maj" -eq "$req_v_maj" && \ | |
2786 | test "$mico_v_mid" -lt "$req_v_mid" ) || \ | |
2787 | ( test "$mico_v_mid" -eq "$req_v_mid" && \ | |
2788 | test "$mico_v_min" -lt "$req_v_min" ) | |
2789 | ||
2790 | then | |
2791 | AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \ | |
2792 | at least is required. You should upgrade MICO.]) | |
2793 | else | |
2794 | AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)]) | |
2795 | fi | |
2796 | ||
2797 | LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL" | |
2798 | AC_SUBST(LIBMICO) | |
2799 | if test -z "$IDL"; then | |
2800 | IDL='$(kde_bindir)/cuteidl' | |
2801 | fi | |
2802 | AC_SUBST(IDL) | |
2803 | IDL_DEPENDENCIES='$(kde_includes)/CUTE.h' | |
2804 | AC_SUBST(IDL_DEPENDENCIES) | |
2805 | ||
2806 | idldir="\$(includedir)/idl" | |
2807 | AC_SUBST(idldir) | |
2808 | ||
2809 | ]) | |
2810 | ||
2811 | AC_DEFUN(KDE_CHECK_MINI_STL, | |
2812 | [ | |
2813 | AC_REQUIRE([KDE_CHECK_MICO]) | |
2814 | ||
2815 | AC_MSG_CHECKING(if we use mico's mini-STL) | |
2816 | AC_CACHE_VAL(kde_cv_have_mini_stl, | |
2817 | [ | |
2818 | AC_LANG_SAVE | |
2819 | AC_LANG_CPLUSPLUS | |
2820 | kde_save_cxxflags="$CXXFLAGS" | |
2821 | CXXFLAGS="$CXXFLAGS $MICO_INCLUDES" | |
2822 | AC_TRY_COMPILE( | |
2823 | [ | |
2824 | #include <mico/config.h> | |
2825 | ], | |
2826 | [ | |
2827 | #ifdef HAVE_MINI_STL | |
2828 | #error "nothing" | |
2829 | #endif | |
2830 | ], | |
2831 | kde_cv_have_mini_stl=no, | |
2832 | kde_cv_have_mini_stl=yes) | |
2833 | CXXFLAGS="$kde_save_cxxflags" | |
2834 | AC_LANG_RESTORE | |
2835 | ]) | |
2836 | ||
2837 | if test "x$kde_cv_have_mini_stl" = "xyes"; then | |
2838 | AC_MSG_RESULT(yes) | |
2839 | $1 | |
2840 | else | |
2841 | AC_MSG_RESULT(no) | |
2842 | $2 | |
2843 | fi | |
2844 | ]) | |
2845 | ||
2846 | ]) | |
2847 | ||
2848 | ||
2849 | AC_DEFUN(KDE_CHECK_LIBPTHREAD, | |
2850 | [ | |
2851 | AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"], LIBPTHREAD= ) | |
2852 | AC_SUBST(LIBPTHREAD) | |
2853 | ]) | |
2854 | ||
2855 | AC_DEFUN(KDE_TRY_LINK_PYTHON, | |
2856 | [ | |
2857 | if test "$kde_python_link_found" = no; then | |
2858 | ||
2859 | if test "$1" = normal; then | |
2860 | AC_MSG_CHECKING(if a Python application links) | |
2861 | else | |
2862 | AC_MSG_CHECKING(if Python depends on $2) | |
2863 | fi | |
2864 | ||
2865 | AC_CACHE_VAL(kde_cv_try_link_python_$1, | |
2866 | [ | |
2867 | AC_LANG_SAVE | |
2868 | AC_LANG_C | |
2869 | kde_save_cflags="$CFLAGS" | |
2870 | CFLAGS="$CFLAGS $PYTHONINC" | |
2871 | kde_save_libs="$LIBS" | |
2872 | LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET" | |
2873 | kde_save_ldflags="$LDFLAGS" | |
2874 | LDFLAGS="$LDFLAGS $PYTHONLIB" | |
2875 | ||
2876 | AC_TRY_LINK( | |
2877 | [ | |
2878 | #include <Python.h> | |
2879 | ],[ | |
2880 | PySys_SetArgv(1, 0); | |
2881 | ], | |
2882 | [kde_cv_try_link_python_$1=yes], | |
2883 | [kde_cv_try_link_python_$1=no] | |
2884 | ) | |
2885 | CFLAGS="$kde_save_cflags" | |
2886 | LIBS="$kde_save_libs" | |
2887 | LDFLAGS="$kde_save_ldflags" | |
2888 | ]) | |
2889 | ||
2890 | if test "$kde_cv_try_link_python_$1" = "yes"; then | |
2891 | AC_MSG_RESULT(yes) | |
2892 | kde_python_link_found=yes | |
2893 | if test ! "$1" = normal; then | |
2894 | LIBPYTHON="$LIBPYTHON $2" | |
2895 | fi | |
2896 | $3 | |
2897 | else | |
2898 | AC_MSG_RESULT(no) | |
2899 | $4 | |
2900 | fi | |
2901 | AC_LANG_RESTORE | |
2902 | ||
2903 | fi | |
2904 | ||
2905 | ]) | |
2906 | ||
2907 | AC_DEFUN(KDE_CHECK_PYTHON, | |
2908 | [ | |
2909 | AC_REQUIRE([KDE_CHECK_LIBDL]) | |
2910 | AC_REQUIRE([KDE_CHECK_LIBPTHREAD]) | |
2911 | ||
2912 | AC_MSG_CHECKING([for Python directory]) | |
2913 | ||
2914 | AC_CACHE_VAL(kde_cv_pythondir, | |
2915 | [ | |
2916 | if test -z "$PYTHONDIR"; then | |
2917 | kde_cv_pythondir=/usr/local | |
2918 | else | |
2919 | kde_cv_pythondir="$PYTHONDIR" | |
2920 | fi | |
2921 | ]) | |
2922 | ||
2923 | AC_ARG_WITH(pythondir, | |
2924 | [ --with-pythondir=pythondir use python installed in pythondir ], | |
2925 | [ | |
2926 | ac_python_dir=$withval | |
2927 | ], ac_python_dir=$kde_cv_pythondir | |
2928 | ) | |
2929 | ||
2930 | AC_MSG_RESULT($ac_python_dir) | |
2931 | ||
2932 | if test -z "$1"; then | |
2933 | version="1.5" | |
2934 | else | |
2935 | version="$1" | |
2936 | fi | |
2937 | ||
2938 | AC_MSG_CHECKING([for Python$version]) | |
2939 | ||
2940 | python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes" | |
2941 | AC_FIND_FILE(Python.h, $python_incdirs, python_incdir) | |
2942 | if test ! -r $python_incdir/Python.h; then | |
2943 | AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir) | |
2944 | python_incdir=$python_incdir/python$version | |
2945 | if test ! -r $python_incdir/Python.h; then | |
2946 | AC_MSG_ERROR(Python.h not found.) | |
2947 | fi | |
2948 | fi | |
2949 | ||
2950 | PYTHONINC=-I$python_incdir | |
2951 | ||
2952 | python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs" | |
2953 | AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir) | |
2954 | if test ! -r $python_libdir/libpython$version.a; then | |
2955 | AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir) | |
2956 | python_libdir=$python_libdir/python$version/config | |
2957 | if test ! -r $python_libdir/libpython$version.a; then | |
2958 | AC_MSG_ERROR(libpython$version.a not found.) | |
2959 | fi | |
2960 | fi | |
2961 | ||
2962 | PYTHONLIB=-L$python_libdir | |
2963 | if test -z "$LIBPYTHON"; then | |
2964 | LIBPYTHON=-lpython$version | |
2965 | fi | |
2966 | ||
2967 | AC_MSG_RESULT(header $python_incdir library $python_libdir) | |
2968 | ||
2969 | dnl Note: this test is very weak | |
2970 | kde_python_link_found=no | |
2971 | KDE_TRY_LINK_PYTHON(normal) | |
2972 | KDE_TRY_LINK_PYTHON(m, -lm) | |
2973 | KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD) | |
2974 | KDE_TRY_LINK_PYTHON(tcl, -ltcl) | |
2975 | KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm], [], | |
2976 | [AC_MSG_WARN([it seems, Python depends on another library. | |
2977 | Pleae use \"make LIBPTYHON='-lpython$version -lotherlib'\" to fix this | |
2978 | and contact the authors to let them know about this problem]) | |
2979 | ]) | |
2980 | ||
2981 | LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET" | |
2982 | AC_SUBST(PYTHONINC) | |
2983 | AC_SUBST(PYTHONLIB) | |
2984 | AC_SUBST(LIBPYTHON) | |
2985 | ||
2986 | ]) | |
2987 | ||
2988 | ||
2989 | AC_DEFUN(KDE_CHECK_STL_SGI, | |
2990 | [ | |
2991 | AC_MSG_CHECKING([if STL implementation is SGI like]) | |
2992 | AC_CACHE_VAL(kde_cv_stl_type_sgi, | |
2993 | [ | |
2994 | AC_TRY_COMPILE([ | |
2995 | #include <string> | |
2996 | using namespace std; | |
2997 | ],[ | |
2998 | string astring="Hallo Welt."; | |
2999 | astring.erase(0, 6); // now astring is "Welt" | |
3000 | return 0; | |
3001 | ], kde_cv_stl_type_sgi=yes, | |
3002 | kde_cv_stl_type_sgi=no) | |
3003 | ]) | |
3004 | ||
3005 | AC_MSG_RESULT($kde_cv_stl_type_sgi) | |
3006 | ||
3007 | if test "$kde_cv_stl_type_sgi" = "yes"; then | |
3008 | AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI]) | |
3009 | fi | |
3010 | ]) | |
3011 | ||
3012 | AC_DEFUN(KDE_CHECK_STL_HP, | |
3013 | [ | |
3014 | AC_MSG_CHECKING([if STL implementation is HP like]) | |
3015 | AC_CACHE_VAL(kde_cv_stl_type_hp, | |
3016 | [ | |
3017 | AC_TRY_COMPILE([ | |
3018 | #include <string> | |
3019 | using namespace std; | |
3020 | ],[ | |
3021 | string astring="Hello World"; | |
3022 | astring.remove(0, 6); // now astring is "World" | |
3023 | return 0; | |
3024 | ], kde_cv_stl_type_hp=yes, | |
3025 | kde_cv_stl_type_hp=no) | |
3026 | ]) | |
3027 | AC_MSG_RESULT($kde_cv_stl_type_hp) | |
3028 | ||
3029 | if test "$kde_cv_stl_type_hp" = "yes"; then | |
3030 | AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by SGI]) | |
3031 | fi | |
3032 | ]) | |
3033 | ||
3034 | AC_DEFUN(KDE_CHECK_STL, | |
3035 | [ | |
3036 | AC_LANG_SAVE | |
3037 | AC_LANG_CPLUSPLUS | |
3038 | KDE_CHECK_STL_SGI | |
3039 | ||
3040 | if test "$kde_cv_stl_type_sgi" = "no"; then | |
3041 | KDE_CHECK_STL_HP | |
3042 | ||
3043 | if test "$kde_cv_stl_type_hp" = "no"; then | |
3044 | AC_MSG_ERROR("no known STL type found") | |
3045 | fi | |
3046 | fi | |
3047 | ||
3048 | AC_LANG_RESTORE | |
3049 | ]) | |
3050 | ||
3051 | AC_DEFUN(AC_FIND_QIMGIO, | |
3052 | [AC_REQUIRE([AC_FIND_JPEG]) | |
3053 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) | |
3054 | AC_MSG_CHECKING([for qimgio]) | |
3055 | AC_CACHE_VAL(ac_cv_lib_qimgio, | |
3056 | [ | |
3057 | AC_LANG_SAVE | |
3058 | AC_LANG_CPLUSPLUS | |
3059 | ac_save_LIBS="$LIBS" | |
3060 | ac_save_CXXFLAGS="$CXXFLAGS" | |
3061 | LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT" | |
3062 | CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" | |
3063 | AC_TRY_RUN(dnl | |
3064 | [ | |
3065 | #include <qimageio.h> | |
3066 | #include <qstring.h> | |
3067 | int main() { | |
3068 | QString t = "hallo"; | |
3069 | t.fill('t'); | |
3070 | qInitImageIO(); | |
3071 | } | |
3072 | ], | |
3073 | ac_cv_lib_qimgio=yes, | |
3074 | ac_cv_lib_qimgio=no, | |
3075 | ac_cv_lib_qimgio=no) | |
3076 | LIBS="$ac_save_LIBS" | |
3077 | CXXFLAGS="$ac_save_CXXFLAGS" | |
3078 | AC_LANG_RESTORE | |
3079 | ])dnl | |
3080 | if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then | |
3081 | LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG" | |
3082 | AC_MSG_RESULT(yes) | |
3083 | AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available]) | |
3084 | AC_SUBST(LIBQIMGIO) | |
3085 | else | |
3086 | AC_MSG_RESULT(not found) | |
3087 | fi | |
3088 | ]) | |
3089 | ||
3090 | AC_DEFUN(KDE_CHECK_ANSI, | |
3091 | [ | |
3092 | ]) | |
3093 | ||
3094 | AC_DEFUN(KDE_CHECK_INSURE, | |
3095 | [ | |
3096 | AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]], | |
3097 | [ | |
3098 | if test $enableval = "no"; dnl | |
3099 | then ac_use_insure="no" | |
3100 | else ac_use_insure="yes" | |
3101 | fi | |
3102 | ], [ac_use_insure="no"]) | |
3103 | ||
3104 | AC_MSG_CHECKING(if we will use Insure++ to debug) | |
3105 | AC_MSG_RESULT($ac_use_insure) | |
3106 | if test "$ac_use_insure" = "yes"; dnl | |
3107 | then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "???? | |
3108 | fi | |
3109 | ]) | |
3110 | ||
3111 | AC_DEFUN(AM_DISABLE_LIBRARIES, | |
3112 | [ | |
3113 | AC_PROVIDE([AM_ENABLE_STATIC]) | |
3114 | AC_PROVIDE([AM_ENABLE_SHARED]) | |
3115 | enable_static=no | |
3116 | enable_shared=yes | |
3117 | ]) | |
3118 | ||
3119 | ||
3120 | AC_DEFUN(AC_CHECK_UTMP_FILE, | |
3121 | [ | |
3122 | AC_MSG_CHECKING([for utmp file]) | |
3123 | ||
3124 | AC_CACHE_VAL(kde_cv_utmp_file, | |
3125 | [ | |
3126 | kde_cv_utmp_file=no | |
3127 | ||
3128 | for ac_file in \ | |
3129 | \ | |
3130 | /var/run/utmp \ | |
3131 | /var/adm/utmp \ | |
3132 | /etc/utmp \ | |
3133 | ; \ | |
3134 | do | |
3135 | if test -r "$ac_file"; then | |
3136 | kde_cv_utmp_file=$ac_file | |
3137 | break | |
3138 | fi | |
3139 | done | |
3140 | ]) | |
3141 | ||
3142 | AC_MSG_RESULT($kde_cv_utmp_file) | |
3143 | if test "$kde_cv_utmp_file" != "no"; then | |
3144 | AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries]) | |
3145 | fi | |
3146 | ]) | |
3147 | ||
3148 | ||
3149 | AC_DEFUN(KDE_CREATE_SUBDIRSLIST, | |
3150 | [ | |
3151 | ||
3152 | DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin" | |
3153 | ||
3154 | if test ! -s $srcdir/inst-apps && test -s $srcdir/subdirs; then | |
3155 | cp $srcdir/subdirs $srcdir/inst-apps | |
3156 | fi | |
3157 | ||
3158 | if test ! -s $srcdir/inst-apps; then | |
3159 | TOPSUBDIRS="" | |
3160 | files=`cd $srcdir && ls -1` | |
3161 | dirs=`for i in $files; do if test -d $i; then echo $i; fi; done` | |
3162 | for i in $dirs; do | |
3163 | echo $i >> $srcdir/subdirs | |
3164 | done | |
3165 | cp $srcdir/subdirs $srcdir/inst-apps | |
3166 | fi | |
3167 | ||
3168 | if test -s $srcdir/inst-apps; then | |
3169 | ac_topsubdirs="`cat $srcdir/inst-apps`" | |
3170 | fi | |
3171 | ||
3172 | for i in $ac_topsubdirs; do | |
3173 | AC_MSG_CHECKING([if $i should be compiled]) | |
3174 | if test -d $srcdir/$i; then | |
3175 | install_it="yes" | |
3176 | for j in $DO_NOT_COMPILE; do | |
3177 | if test $i = $j; then | |
3178 | install_it="no" | |
3179 | fi | |
3180 | done | |
3181 | else | |
3182 | install_it="no" | |
3183 | fi | |
3184 | AC_MSG_RESULT($install_it) | |
3185 | if test $install_it = "yes"; then | |
3186 | TOPSUBDIRS="$TOPSUBDIRS $i" | |
3187 | fi | |
3188 | done | |
3189 | ||
3190 | AC_SUBST(TOPSUBDIRS) | |
3191 | ]) | |
3192 | ||
3193 | AC_DEFUN(KDE_CHECK_NAMESPACES, | |
3194 | [ | |
3195 | AC_MSG_CHECKING(whether C++ compiler supports namespaces) | |
3196 | AC_LANG_SAVE | |
3197 | AC_LANG_CPLUSPLUS | |
3198 | AC_TRY_COMPILE([ | |
3199 | ], | |
3200 | [ | |
3201 | namespace Foo { | |
3202 | extern int i; | |
3203 | namespace Bar { | |
3204 | extern int i; | |
3205 | } | |
3206 | } | |
3207 | ||
3208 | int Foo::i = 0; | |
3209 | int Foo::Bar::i = 1; | |
3210 | ],[ | |
3211 | AC_MSG_RESULT(yes) | |
3212 | AC_DEFINE(HAVE_NAMESPACES) | |
3213 | ], [ | |
3214 | AC_MSG_RESULT(no) | |
3215 | ]) | |
3216 | AC_LANG_RESTORE | |
3217 | ]) | |
3218 | ||
3219 | AC_DEFUN(KDE_CHECK_NEWLIBS, | |
3220 | [ | |
3221 | ||
3222 | ]) | |
3223 | ||
3224 | dnl ------------------------------------------------------------------------ | |
3225 | dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org | |
3226 | dnl ------------------------------------------------------------------------ | |
3227 | dnl | |
3228 | AC_DEFUN(AC_CHECK_S_ISSOCK, | |
3229 | [ | |
3230 | AC_MSG_CHECKING(for S_ISSOCK) | |
3231 | AC_CACHE_VAL(ac_cv_have_s_issock, | |
3232 | [ | |
3233 | AC_LANG_SAVE | |
3234 | AC_LANG_C | |
3235 | AC_TRY_LINK( | |
3236 | [ | |
3237 | #include <sys/stat.h> | |
3238 | ], | |
3239 | [ | |
3240 | struct stat buff; | |
3241 | int b = S_ISSOCK( buff.st_mode ); | |
3242 | ], | |
3243 | ac_cv_have_s_issock=yes, | |
3244 | ac_cv_have_s_issock=no) | |
3245 | AC_LANG_RESTORE | |
3246 | ]) | |
3247 | AC_MSG_RESULT($ac_cv_have_s_issock) | |
3248 | if test "$ac_cv_have_s_issock" = "yes"; then | |
3249 | AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.]) | |
3250 | fi | |
3251 | ]) | |
3252 | ||
3253 | dnl ------------------------------------------------------------------------ | |
3254 | dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org | |
3255 | dnl ------------------------------------------------------------------------ | |
3256 | dnl | |
3257 | AC_DEFUN(AC_CHECK_KDEMAXPATHLEN, | |
3258 | [ | |
3259 | AC_MSG_CHECKING(for MAXPATHLEN) | |
3260 | AC_CACHE_VAL(ac_cv_maxpathlen, | |
3261 | [ | |
3262 | AC_LANG_C | |
3263 | cat > conftest.$ac_ext <<EOF | |
3264 | #include <stdio.h> | |
3265 | #include <sys/param.h> | |
3266 | #ifndef MAXPATHLEN | |
3267 | #define MAXPATHLEN 1024 | |
3268 | #endif | |
3269 | ||
3270 | KDE_HELLO MAXPATHLEN | |
3271 | ||
3272 | EOF | |
3273 | ||
3274 | ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out" | |
3275 | ||
3276 | if AC_TRY_EVAL(ac_try) && test -s conftest.out; then | |
3277 | ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out` | |
3278 | else | |
3279 | ac_cv_maxpathlen=1024 | |
3280 | fi | |
3281 | ||
3282 | rm conftest.* | |
3283 | ||
3284 | ]) | |
3285 | AC_MSG_RESULT($ac_cv_maxpathlen) | |
3286 | AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXLENPATH] ) | |
3287 | ]) | |
3288 | ||
3289 | dnl ------------------------------------------------------------------------- | |
3290 | dnl See if the compiler supports a template repository bero@redhat.de | |
3291 | dnl ------------------------------------------------------------------------- | |
3292 | AC_DEFUN(KDE_COMPILER_REPO, | |
3293 | [ | |
3294 | REPO="" | |
3295 | NOREPO="" | |
3296 | ||
3297 | KDE_CHECK_COMPILER_FLAG(frepo, | |
3298 | [ | |
3299 | REPO="-frepo" | |
3300 | NOREPO="-fno-repo" | |
3301 | ]) | |
3302 | ||
3303 | if test -z "$REPO"; then | |
3304 | KDE_CHECK_COMPILER_FLAG(instances=explicit, | |
3305 | [ | |
3306 | REPO="-instances=explicit" | |
3307 | NOREPO="-instances=extern" | |
3308 | ]) | |
3309 | fi | |
3310 | ||
3311 | if test -n "$REPO"; then | |
3312 | AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1, | |
3313 | [C++ compiler supports template repository]) | |
3314 | $1 | |
3315 | fi | |
3316 | ||
3317 | AC_SUBST(REPO) | |
3318 | AC_SUBST(NOREPO) | |
3319 | ]) | |
3320 | ||
3321 | AC_DEFUN(KDE_CHECK_HEADER, | |
3322 | [ | |
3323 | AC_LANG_SAVE | |
3324 | kde_safe_cppflags=$CPPFLAGS | |
3325 | CPPFLAGS="$CPPFLAGS $all_includes" | |
3326 | AC_LANG_CPLUSPLUS | |
3327 | AC_CHECK_HEADER($1, $2, $3) | |
3328 | CPPFLAGS=$kde_safe_cppflags | |
3329 | AC_LANG_RESTORE | |
3330 | ]) | |
3331 | ||
3332 | AC_DEFUN(KDE_CHECK_QWSPRITEFIELD, | |
3333 | [ | |
3334 | KDE_CHECK_HEADER(QwSpriteField.h, , | |
3335 | [ | |
3336 | AC_MSG_WARN([you don't have QwSpriteField.h somewhere. Please install | |
3337 | QwSpriteField out of kdesupport.]) | |
3338 | $1 | |
3339 | ]) | |
3340 | ]) | |
3341 | ||
3342 | AC_DEFUN(KDE_SET_PREFIX, | |
3343 | [ | |
3344 | dnl make $KDEDIR the default for the installation | |
3345 | AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) | |
3346 | ||
3347 | if test "x$prefix" = "xNONE"; then | |
3348 | prefix=$ac_default_prefix | |
3349 | ac_configure_args="$ac_configure_args --prefix $prefix" | |
3350 | fi | |
3351 | ||
3352 | ]) |
0 | dnl aclocal.m4 generated automatically by aclocal 1.4 | |
1 | ||
2 | dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | dnl aclocal.m4 generated automatically by aclocal 1.4-p5 | |
1 | ||
2 | dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | dnl This file is free software; the Free Software Foundation |
4 | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | 5 | dnl with or without modifications, as long as this notice is preserved. |
629 | 629 | |
630 | 630 | dnl AM_PROG_LEX |
631 | 631 | dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT |
632 | AC_DEFUN(AM_PROG_LEX, | |
632 | AC_DEFUN([AM_PROG_LEX], | |
633 | 633 | [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) |
634 | 634 | AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") |
635 | 635 | AC_PROG_LEX |
644 | 644 | dnl Usage: |
645 | 645 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
646 | 646 | |
647 | AC_DEFUN(AM_INIT_AUTOMAKE, | |
647 | AC_DEFUN([AM_INIT_AUTOMAKE], | |
648 | 648 | [AC_REQUIRE([AC_PROG_INSTALL]) |
649 | 649 | PACKAGE=[$1] |
650 | 650 | AC_SUBST(PACKAGE) |
672 | 672 | # Check to make sure that the build environment is sane. |
673 | 673 | # |
674 | 674 | |
675 | AC_DEFUN(AM_SANITY_CHECK, | |
675 | AC_DEFUN([AM_SANITY_CHECK], | |
676 | 676 | [AC_MSG_CHECKING([whether build environment is sane]) |
677 | 677 | # Just in case |
678 | 678 | sleep 1 |
713 | 713 | |
714 | 714 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
715 | 715 | dnl The program must properly implement --version. |
716 | AC_DEFUN(AM_MISSING_PROG, | |
716 | AC_DEFUN([AM_MISSING_PROG], | |
717 | 717 | [AC_MSG_CHECKING(for working $2) |
718 | 718 | # Run test in a subshell; some versions of sh will print an error if |
719 | 719 | # an executable is not found, even if stderr is redirected. |
729 | 729 | |
730 | 730 | # Like AC_CONFIG_HEADER, but automatically create stamp file. |
731 | 731 | |
732 | AC_DEFUN(AM_CONFIG_HEADER, | |
732 | AC_DEFUN([AM_CONFIG_HEADER], | |
733 | 733 | [AC_PREREQ([2.12]) |
734 | 734 | AC_CONFIG_HEADER([$1]) |
735 | 735 | dnl When config.status generates a header, we must update the stamp-h file. |
1 | 1 | running configure, to aid debugging if configure makes a mistake. |
2 | 2 | |
3 | 3 | configure:533: checking how to run the C preprocessor |
4 | configure:554: cc -E conftest.c >/dev/null 2>conftest.out | |
5 | 4 | configure:618: checking for flex |
6 | 5 | configure:651: checking for flex |
7 | 6 | configure:685: checking for yywrap in -lfl |
8 | configure:704: cc -o conftest conftest.c -lfl 1>&5 | |
9 | 7 | configure:727: checking lex output file root |
10 | 8 | configure:748: checking whether yytext is a pointer |
11 | configure:767: cc -o conftest conftest.c -lfl 1>&5 | |
12 | 9 | configure:823: checking for a BSD compatible install |
13 | 10 | configure:876: checking whether build environment is sane |
14 | 11 | configure:933: checking whether make sets ${MAKE} |
23 | 20 | configure:1132: c++ -o conftest -O2 conftest.C 1>&5 |
24 | 21 | configure:1158: checking whether the C++ compiler (c++ -O2 ) is a cross-compiler |
25 | 22 | configure:1163: checking whether we are using GNU C++ |
26 | configure:1172: c++ -E conftest.C | |
27 | 23 | configure:1191: checking whether c++ accepts -g |
28 | 24 | configure:1234: checking for a BSD compatible install |
29 | 25 | configure:1293: checking target system type |
31 | 27 | configure:1396: checking for SDL - version >= 1.1.5 |
32 | 28 | configure:1478: cc -o conftest -I/usr/local/include -I/usr/local/include/SDL -D_REENTRANT conftest.c -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread 1>&5 |
33 | 29 | configure:1561: checking for IMG_Load in -lSDL_image |
34 | configure:1580: cc -o conftest conftest.c -lSDL_image -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread 1>&5 |
1 | 1 | # Generated automatically by configure. |
2 | 2 | # Run this file to recreate the current configuration. |
3 | 3 | # This directory was configured as follows, |
4 | # on host polidor: | |
4 | # on host localhost.localdomain: | |
5 | 5 | # |
6 | 6 | # ./configure |
7 | 7 | # |
25 | 25 | done |
26 | 26 | |
27 | 27 | ac_given_srcdir=. |
28 | ac_given_INSTALL="/usr/bin/install -c" | |
28 | ac_given_INSTALL="/usr//bin/install -c" | |
29 | 29 | |
30 | 30 | trap 'rm -fr |
31 | 31 | Makefile |
32 | src/Makefile | |
32 | pipenightdreams/Makefile | |
33 | 33 | levels/Makefile |
34 | 34 | images/Makefile |
35 | 35 | images/arrows_yellow/Makefile |
48 | 48 | images/pipes_space/back03/Makefile |
49 | 49 | images/pipes_space/back04/Makefile |
50 | 50 | images/pipes_space/back05/Makefile |
51 | man/Makefile | |
52 | src/config.h conftest*; exit 1' 1 2 15 | |
51 | pipenightdreams/config.h conftest*; exit 1' 1 2 15 | |
53 | 52 | |
54 | 53 | # Protect against being on the right side of a sed subst in config.status. |
55 | 54 | sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g; |
140 | 139 | fi |
141 | 140 | |
142 | 141 | CONFIG_FILES=${CONFIG_FILES-"Makefile |
143 | src/Makefile | |
142 | pipenightdreams/Makefile | |
144 | 143 | levels/Makefile |
145 | 144 | images/Makefile |
146 | 145 | images/arrows_yellow/Makefile |
159 | 158 | images/pipes_space/back03/Makefile |
160 | 159 | images/pipes_space/back04/Makefile |
161 | 160 | images/pipes_space/back05/Makefile |
162 | man/Makefile | |
163 | 161 | "} |
164 | 162 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then |
165 | 163 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
237 | 235 | ac_eD='%g' |
238 | 236 | |
239 | 237 | if test "${CONFIG_HEADERS+set}" != set; then |
240 | CONFIG_HEADERS="src/config.h" | |
238 | CONFIG_HEADERS="pipenightdreams/config.h" | |
241 | 239 | fi |
242 | 240 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
243 | 241 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
302 | 300 | |
303 | 301 | |
304 | 302 | |
305 | test -z "$CONFIG_HEADERS" || echo timestamp > src/stamp-h | |
303 | test -z "$CONFIG_HEADERS" || echo timestamp > pipenightdreams/stamp-h | |
306 | 304 | |
307 | 305 | exit 0 |
787 | 787 | # The AM_INIT_AUTOMAKE macro tells automake the name and version number |
788 | 788 | # of the software package so it can generate rules for building a source |
789 | 789 | # archive. |
790 | ||
790 | 791 | ac_aux_dir= |
791 | 792 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
792 | 793 | if test -f $ac_dir/install-sh; then |
818 | 819 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
819 | 820 | # ./install, which can be erroneously created by make from ./install.sh. |
820 | 821 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
821 | echo "configure:823: checking for a BSD compatible install" >&5 | |
822 | echo "configure:824: checking for a BSD compatible install" >&5 | |
822 | 823 | if test -z "$INSTALL"; then |
823 | 824 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
824 | 825 | echo $ac_n "(cached) $ac_c" 1>&6 |
871 | 872 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
872 | 873 | |
873 | 874 | echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 |
874 | echo "configure:876: checking whether build environment is sane" >&5 | |
875 | echo "configure:877: checking whether build environment is sane" >&5 | |
875 | 876 | # Just in case |
876 | 877 | sleep 1 |
877 | 878 | echo timestamp > conftestfile |
928 | 929 | test "$program_transform_name" = "" && program_transform_name="s,x,x," |
929 | 930 | |
930 | 931 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
931 | echo "configure:933: checking whether ${MAKE-make} sets \${MAKE}" >&5 | |
932 | echo "configure:934: checking whether ${MAKE-make} sets \${MAKE}" >&5 | |
932 | 933 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
933 | 934 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then |
934 | 935 | echo $ac_n "(cached) $ac_c" 1>&6 |
957 | 958 | |
958 | 959 | PACKAGE=pipenightdreams |
959 | 960 | |
960 | VERSION=0.9.0 | |
961 | VERSION=0.10.0 | |
961 | 962 | |
962 | 963 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
963 | 964 | { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } |
974 | 975 | |
975 | 976 | missing_dir=`cd $ac_aux_dir && pwd` |
976 | 977 | echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 |
977 | echo "configure:979: checking for working aclocal" >&5 | |
978 | echo "configure:980: checking for working aclocal" >&5 | |
978 | 979 | # Run test in a subshell; some versions of sh will print an error if |
979 | 980 | # an executable is not found, even if stderr is redirected. |
980 | 981 | # Redirect stdin to placate older versions of autoconf. Sigh. |
987 | 988 | fi |
988 | 989 | |
989 | 990 | echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 |
990 | echo "configure:992: checking for working autoconf" >&5 | |
991 | echo "configure:993: checking for working autoconf" >&5 | |
991 | 992 | # Run test in a subshell; some versions of sh will print an error if |
992 | 993 | # an executable is not found, even if stderr is redirected. |
993 | 994 | # Redirect stdin to placate older versions of autoconf. Sigh. |
1000 | 1001 | fi |
1001 | 1002 | |
1002 | 1003 | echo $ac_n "checking for working automake""... $ac_c" 1>&6 |
1003 | echo "configure:1005: checking for working automake" >&5 | |
1004 | echo "configure:1006: checking for working automake" >&5 | |
1004 | 1005 | # Run test in a subshell; some versions of sh will print an error if |
1005 | 1006 | # an executable is not found, even if stderr is redirected. |
1006 | 1007 | # Redirect stdin to placate older versions of autoconf. Sigh. |
1013 | 1014 | fi |
1014 | 1015 | |
1015 | 1016 | echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 |
1016 | echo "configure:1018: checking for working autoheader" >&5 | |
1017 | echo "configure:1019: checking for working autoheader" >&5 | |
1017 | 1018 | # Run test in a subshell; some versions of sh will print an error if |
1018 | 1019 | # an executable is not found, even if stderr is redirected. |
1019 | 1020 | # Redirect stdin to placate older versions of autoconf. Sigh. |
1026 | 1027 | fi |
1027 | 1028 | |
1028 | 1029 | echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 |
1029 | echo "configure:1031: checking for working makeinfo" >&5 | |
1030 | echo "configure:1032: checking for working makeinfo" >&5 | |
1030 | 1031 | # Run test in a subshell; some versions of sh will print an error if |
1031 | 1032 | # an executable is not found, even if stderr is redirected. |
1032 | 1033 | # Redirect stdin to placate older versions of autoconf. Sigh. |
1044 | 1045 | |
1045 | 1046 | |
1046 | 1047 | CXXFLAGS="-O2" |
1048 | ||
1047 | 1049 | # We now have a list of macros which tell autoconf what tools we need to |
1048 | 1050 | # build our software, in this case "make", a C++ compiler, and "install". |
1049 | 1051 | # If we were creating a C program, we would use AC_PROC_CC instead of CXX. |
1052 | ||
1050 | 1053 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
1051 | echo "configure:1053: checking whether ${MAKE-make} sets \${MAKE}" >&5 | |
1054 | echo "configure:1056: checking whether ${MAKE-make} sets \${MAKE}" >&5 | |
1052 | 1055 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
1053 | 1056 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then |
1054 | 1057 | echo $ac_n "(cached) $ac_c" 1>&6 |
1079 | 1082 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
1080 | 1083 | set dummy $ac_prog; ac_word=$2 |
1081 | 1084 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
1082 | echo "configure:1084: checking for $ac_word" >&5 | |
1085 | echo "configure:1087: checking for $ac_word" >&5 | |
1083 | 1086 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
1084 | 1087 | echo $ac_n "(cached) $ac_c" 1>&6 |
1085 | 1088 | else |
1111 | 1114 | |
1112 | 1115 | |
1113 | 1116 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
1114 | echo "configure:1116: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 | |
1117 | echo "configure:1119: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 | |
1115 | 1118 | |
1116 | 1119 | ac_ext=C |
1117 | 1120 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
1122 | 1125 | |
1123 | 1126 | cat > conftest.$ac_ext << EOF |
1124 | 1127 | |
1125 | #line 1127 "configure" | |
1128 | #line 1130 "configure" | |
1126 | 1129 | #include "confdefs.h" |
1127 | 1130 | |
1128 | 1131 | int main(){return(0);} |
1129 | 1132 | EOF |
1130 | if { (eval echo configure:1132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
1133 | if { (eval echo configure:1135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
1131 | 1134 | ac_cv_prog_cxx_works=yes |
1132 | 1135 | # If we can't run a trivial program, we are probably using a cross compiler. |
1133 | 1136 | if (./conftest; exit) 2>/dev/null; then |
1153 | 1156 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
1154 | 1157 | fi |
1155 | 1158 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
1156 | echo "configure:1158: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 | |
1159 | echo "configure:1161: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 | |
1157 | 1160 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
1158 | 1161 | cross_compiling=$ac_cv_prog_cxx_cross |
1159 | 1162 | |
1160 | 1163 | echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 |
1161 | echo "configure:1163: checking whether we are using GNU C++" >&5 | |
1164 | echo "configure:1166: checking whether we are using GNU C++" >&5 | |
1162 | 1165 | if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then |
1163 | 1166 | echo $ac_n "(cached) $ac_c" 1>&6 |
1164 | 1167 | else |
1167 | 1170 | yes; |
1168 | 1171 | #endif |
1169 | 1172 | EOF |
1170 | if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then | |
1173 | if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then | |
1171 | 1174 | ac_cv_prog_gxx=yes |
1172 | 1175 | else |
1173 | 1176 | ac_cv_prog_gxx=no |
1186 | 1189 | ac_save_CXXFLAGS="$CXXFLAGS" |
1187 | 1190 | CXXFLAGS= |
1188 | 1191 | echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 |
1189 | echo "configure:1191: checking whether ${CXX-g++} accepts -g" >&5 | |
1192 | echo "configure:1194: checking whether ${CXX-g++} accepts -g" >&5 | |
1190 | 1193 | if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then |
1191 | 1194 | echo $ac_n "(cached) $ac_c" 1>&6 |
1192 | 1195 | else |
1229 | 1232 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
1230 | 1233 | # ./install, which can be erroneously created by make from ./install.sh. |
1231 | 1234 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
1232 | echo "configure:1234: checking for a BSD compatible install" >&5 | |
1235 | echo "configure:1237: checking for a BSD compatible install" >&5 | |
1233 | 1236 | if test -z "$INSTALL"; then |
1234 | 1237 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
1235 | 1238 | echo $ac_n "(cached) $ac_c" 1>&6 |
1286 | 1289 | # architecture doesn't produce code that works on all versions of the |
1287 | 1290 | # alpha processor. This bit detects the current compile architecture |
1288 | 1291 | # and sets the compiler flags to produce portable binary code. |
1292 | ||
1289 | 1293 | #AC_CANONICAL_HOST |
1290 | 1294 | echo $ac_n "checking target system type""... $ac_c" 1>&6 |
1291 | echo "configure:1293: checking target system type" >&5 | |
1295 | echo "configure:1297: checking target system type" >&5 | |
1292 | 1296 | |
1293 | 1297 | target_alias=$target |
1294 | 1298 | case "$target_alias" in |
1356 | 1360 | # Extract the first word of "sdl-config", so it can be a program name with args. |
1357 | 1361 | set dummy sdl-config; ac_word=$2 |
1358 | 1362 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
1359 | echo "configure:1361: checking for $ac_word" >&5 | |
1363 | echo "configure:1365: checking for $ac_word" >&5 | |
1360 | 1364 | if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then |
1361 | 1365 | echo $ac_n "(cached) $ac_c" 1>&6 |
1362 | 1366 | else |
1391 | 1395 | |
1392 | 1396 | min_sdl_version=$SDL_VERSION |
1393 | 1397 | echo $ac_n "checking for SDL - version >= $min_sdl_version""... $ac_c" 1>&6 |
1394 | echo "configure:1396: checking for SDL - version >= $min_sdl_version" >&5 | |
1398 | echo "configure:1400: checking for SDL - version >= $min_sdl_version" >&5 | |
1395 | 1399 | no_sdl="" |
1396 | 1400 | if test "$SDL_CONFIG" = "no" ; then |
1397 | 1401 | no_sdl=yes |
1415 | 1419 | echo $ac_n "cross compiling; assumed OK... $ac_c" |
1416 | 1420 | else |
1417 | 1421 | cat > conftest.$ac_ext <<EOF |
1418 | #line 1420 "configure" | |
1422 | #line 1424 "configure" | |
1419 | 1423 | #include "confdefs.h" |
1420 | 1424 | |
1421 | 1425 | #include <stdio.h> |
1473 | 1477 | |
1474 | 1478 | |
1475 | 1479 | EOF |
1476 | if { (eval echo configure:1478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |
1480 | if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |
1477 | 1481 | then |
1478 | 1482 | : |
1479 | 1483 | else |
1507 | 1511 | CFLAGS="$CFLAGS $SDL_CFLAGS" |
1508 | 1512 | LIBS="$LIBS $SDL_LIBS" |
1509 | 1513 | cat > conftest.$ac_ext <<EOF |
1510 | #line 1512 "configure" | |
1514 | #line 1516 "configure" | |
1511 | 1515 | #include "confdefs.h" |
1512 | 1516 | |
1513 | 1517 | #include <stdio.h> |
1517 | 1521 | return 0; |
1518 | 1522 | ; return 0; } |
1519 | 1523 | EOF |
1520 | if { (eval echo configure:1522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
1524 | if { (eval echo configure:1526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
1521 | 1525 | rm -rf conftest* |
1522 | 1526 | echo "*** The test program compiled, but did not run. This usually means" |
1523 | 1527 | echo "*** that the run-time linker is not finding SDL or finding the wrong" |
1556 | 1560 | LIBS="$LIBS $SDL_LIBS" |
1557 | 1561 | |
1558 | 1562 | echo $ac_n "checking for IMG_Load in -lSDL_image""... $ac_c" 1>&6 |
1559 | echo "configure:1561: checking for IMG_Load in -lSDL_image" >&5 | |
1563 | echo "configure:1565: checking for IMG_Load in -lSDL_image" >&5 | |
1560 | 1564 | ac_lib_var=`echo SDL_image'_'IMG_Load | sed 'y%./+-%__p_%'` |
1561 | 1565 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
1562 | 1566 | echo $ac_n "(cached) $ac_c" 1>&6 |
1564 | 1568 | ac_save_LIBS="$LIBS" |
1565 | 1569 | LIBS="-lSDL_image $LIBS" |
1566 | 1570 | cat > conftest.$ac_ext <<EOF |
1567 | #line 1569 "configure" | |
1571 | #line 1573 "configure" | |
1568 | 1572 | #include "confdefs.h" |
1569 | 1573 | /* Override any gcc2 internal prototype to avoid an error. */ |
1570 | 1574 | /* We use char because int might match the return type of a gcc2 |
1575 | 1579 | IMG_Load() |
1576 | 1580 | ; return 0; } |
1577 | 1581 | EOF |
1578 | if { (eval echo configure:1580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
1582 | if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
1579 | 1583 | rm -rf conftest* |
1580 | 1584 | eval "ac_cv_lib_$ac_lib_var=yes" |
1581 | 1585 | else |
0 | 0 | # This first line initializes autoconf and gives it a file that it can |
1 | 1 | # look for to make sure the source distribution is complete. |
2 | ||
2 | 3 | AC_INIT(README) |
3 | 4 | AM_PROG_LEX |
4 | 5 | |
5 | 6 | # The AM_INIT_AUTOMAKE macro tells automake the name and version number |
6 | 7 | # of the software package so it can generate rules for building a source |
7 | 8 | # archive. |
8 | AM_INIT_AUTOMAKE(pipenightdreams, 0.9.0) | |
9 | ||
10 | AM_INIT_AUTOMAKE(pipenightdreams, 0.10.0) | |
9 | 11 | AC_PREFIX_DEFAULT(/usr/local) |
10 | 12 | AM_CONFIG_HEADER(src/config.h) |
11 | 13 | CXXFLAGS="-O2" |
14 | ||
12 | 15 | # We now have a list of macros which tell autoconf what tools we need to |
13 | 16 | # build our software, in this case "make", a C++ compiler, and "install". |
14 | 17 | # If we were creating a C program, we would use AC_PROC_CC instead of CXX. |
18 | ||
15 | 19 | AC_PROG_MAKE_SET |
16 | 20 | AC_PROG_CXX |
17 | 21 | AC_PROG_INSTALL |
20 | 24 | # architecture doesn't produce code that works on all versions of the |
21 | 25 | # alpha processor. This bit detects the current compile architecture |
22 | 26 | # and sets the compiler flags to produce portable binary code. |
27 | ||
23 | 28 | #AC_CANONICAL_HOST |
24 | 29 | AC_CANONICAL_TARGET |
25 | 30 | case "$target" in |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
89 | 89 | |
90 | 90 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
91 | 91 | |
92 | TAR = tar | |
92 | TAR = gtar | |
93 | 93 | GZIP_ENV = --best |
94 | 94 | all: all-redirect |
95 | 95 | .SUFFIXES: |
156 | 156 | dot_seen=no; \ |
157 | 157 | rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ |
158 | 158 | rev="$$subdir $$rev"; \ |
159 | test "$$subdir" = "." && dot_seen=yes; \ | |
159 | test "$$subdir" != "." || dot_seen=yes; \ | |
160 | 160 | done; \ |
161 | 161 | test "$$dot_seen" = "no" && rev=". $$rev"; \ |
162 | 162 | target=`echo $@ | sed s/-recursive//`; \ |
Binary diff not shown
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
89 | 89 | |
90 | 90 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
91 | 91 | |
92 | TAR = tar | |
92 | TAR = gtar | |
93 | 93 | GZIP_ENV = --best |
94 | 94 | all: all-redirect |
95 | 95 | .SUFFIXES: |
156 | 156 | dot_seen=no; \ |
157 | 157 | rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ |
158 | 158 | rev="$$subdir $$rev"; \ |
159 | test "$$subdir" = "." && dot_seen=yes; \ | |
159 | test "$$subdir" != "." || dot_seen=yes; \ | |
160 | 160 | done; \ |
161 | 161 | test "$$dot_seen" = "no" && rev=". $$rev"; \ |
162 | 162 | target=`echo $@ | sed s/-recursive//`; \ |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | ../back01/board_back.jpg⏎ |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
9 | 9 | restrict_coef=4 #defines the % of restricted connections |
10 | 10 | fixed_coef=5 #defines the % of fixed pipes |
11 | 11 | background=mosaic #defines the type of the background |
12 | require=25 | |
12 | required=25 | |
13 | 13 | entry{ #entry attributes block |
14 | 14 | row=6 |
15 | 15 | column=0 |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
87 | 87 | |
88 | 88 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
89 | 89 | |
90 | TAR = tar | |
90 | TAR = gtar | |
91 | 91 | GZIP_ENV = --best |
92 | 92 | all: all-redirect |
93 | 93 | .SUFFIXES: |
0 | ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- | |
1 | ## Copyright (C) 1996-2000 Free Software Foundation, Inc. | |
2 | ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |
3 | ## | |
4 | ## This program is free software; you can redistribute it and/or modify | |
5 | ## it under the terms of the GNU General Public License as published by | |
6 | ## the Free Software Foundation; either version 2 of the License, or | |
7 | ## (at your option) any later version. | |
8 | ## | |
9 | ## This program is distributed in the hope that it will be useful, but | |
10 | ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 | ## General Public License for more details. | |
13 | ## | |
14 | ## You should have received a copy of the GNU General Public License | |
15 | ## along with this program; if not, write to the Free Software | |
16 | ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
17 | ## | |
18 | ## As a special exception to the GNU General Public License, if you | |
19 | ## distribute this file as part of a program that contains a | |
20 | ## configuration script generated by Autoconf, you may include it under | |
21 | ## the same distribution terms that you use for the rest of that program. | |
22 | ||
23 | # serial 42 AC_PROG_LIBTOOL | |
24 | AC_DEFUN(AC_PROG_LIBTOOL, | |
25 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl | |
26 | ||
27 | # Save cache, so that ltconfig can load it | |
28 | AC_CACHE_SAVE | |
29 | ||
30 | # Actually configure libtool. ac_aux_dir is where install-sh is found. | |
31 | AR="$AR" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
32 | MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ | |
33 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ | |
34 | AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ | |
35 | objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ | |
36 | deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ | |
37 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ | |
38 | $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $lt_target \ | |
39 | || AC_MSG_ERROR([libtool configure failed]) | |
40 | ||
41 | # Reload cache, that may have been modified by ltconfig | |
42 | AC_CACHE_LOAD | |
43 | ||
44 | # This can be used to rebuild libtool when needed | |
45 | LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" | |
46 | ||
47 | # Always use our own libtool. | |
48 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
49 | AC_SUBST(LIBTOOL)dnl | |
50 | ||
51 | # Redirect the config.log output again, so that the ltconfig log is not | |
52 | # clobbered by the next message. | |
53 | exec 5>>./config.log | |
54 | ]) | |
55 | ||
56 | AC_DEFUN(AC_LIBTOOL_SETUP, | |
57 | [AC_PREREQ(2.13)dnl | |
58 | AC_REQUIRE([AC_ENABLE_SHARED])dnl | |
59 | AC_REQUIRE([AC_ENABLE_STATIC])dnl | |
60 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl | |
61 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
62 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
63 | AC_REQUIRE([AC_PROG_CC])dnl | |
64 | AC_REQUIRE([AC_PROG_LD])dnl | |
65 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl | |
66 | AC_REQUIRE([AC_PROG_NM])dnl | |
67 | AC_REQUIRE([AC_PROG_LN_S])dnl | |
68 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl | |
69 | AC_REQUIRE([AC_OBJEXT])dnl | |
70 | AC_REQUIRE([AC_EXEEXT])dnl | |
71 | dnl | |
72 | ||
73 | # Only perform the check for file, if the check method requires it | |
74 | case "$deplibs_check_method" in | |
75 | file_magic*) | |
76 | if test "$file_magic_cmd" = '${MAGIC}'; then | |
77 | AC_PATH_MAGIC | |
78 | fi | |
79 | ;; | |
80 | esac | |
81 | ||
82 | case "$target" in | |
83 | NONE) lt_target="$host" ;; | |
84 | *) lt_target="$target" ;; | |
85 | esac | |
86 | ||
87 | AC_CHECK_TOOL(RANLIB, ranlib, :) | |
88 | AC_CHECK_TOOL(STRIP, strip, :) | |
89 | ||
90 | # Check for any special flags to pass to ltconfig. | |
91 | libtool_flags="--cache-file=$cache_file" | |
92 | test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" | |
93 | test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" | |
94 | test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" | |
95 | test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" | |
96 | test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
97 | ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], | |
98 | [libtool_flags="$libtool_flags --enable-dlopen"]) | |
99 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], | |
100 | [libtool_flags="$libtool_flags --enable-win32-dll"]) | |
101 | AC_ARG_ENABLE(libtool-lock, | |
102 | [ --disable-libtool-lock avoid locking (might break parallel builds)]) | |
103 | test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" | |
104 | test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" | |
105 | ||
106 | AC_ARG_WITH(pic, | |
107 | [ --with-pic try to use only PIC/non-PIC objects [default=use both]], | |
108 | pic_mode="$withval", pic_mode=default) | |
109 | test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" | |
110 | test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" | |
111 | ||
112 | # Some flags need to be propagated to the compiler or linker for good | |
113 | # libtool support. | |
114 | case "$lt_target" in | |
115 | *-*-irix6*) | |
116 | # Find out which ABI we are using. | |
117 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext | |
118 | if AC_TRY_EVAL(ac_compile); then | |
119 | case "`/usr/bin/file conftest.o`" in | |
120 | *32-bit*) | |
121 | LD="${LD-ld} -32" | |
122 | ;; | |
123 | *N32*) | |
124 | LD="${LD-ld} -n32" | |
125 | ;; | |
126 | *64-bit*) | |
127 | LD="${LD-ld} -64" | |
128 | ;; | |
129 | esac | |
130 | fi | |
131 | rm -rf conftest* | |
132 | ;; | |
133 | ||
134 | *-*-sco3.2v5*) | |
135 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
136 | SAVE_CFLAGS="$CFLAGS" | |
137 | CFLAGS="$CFLAGS -belf" | |
138 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, | |
139 | [AC_LANG_SAVE | |
140 | AC_LANG_C | |
141 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) | |
142 | AC_LANG_RESTORE]) | |
143 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then | |
144 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
145 | CFLAGS="$SAVE_CFLAGS" | |
146 | fi | |
147 | ;; | |
148 | ||
149 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], | |
150 | [*-*-cygwin* | *-*-mingw*) | |
151 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) | |
152 | AC_CHECK_TOOL(AS, as, false) | |
153 | AC_CHECK_TOOL(OBJDUMP, objdump, false) | |
154 | ||
155 | # recent cygwin and mingw systems supply a stub DllMain which the user | |
156 | # can override, but on older systems we have to supply one | |
157 | AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, | |
158 | [AC_TRY_LINK([], | |
159 | [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); | |
160 | DllMain (0, 0, 0);], | |
161 | [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) | |
162 | ||
163 | case "$lt_target/$CC" in | |
164 | *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) | |
165 | # old mingw systems require "-dll" to link a DLL, while more recent ones | |
166 | # require "-mdll" | |
167 | SAVE_CFLAGS="$CFLAGS" | |
168 | CFLAGS="$CFLAGS -mdll" | |
169 | AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, | |
170 | [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) | |
171 | CFLAGS="$SAVE_CFLAGS" ;; | |
172 | *-*-cygwin*) | |
173 | # cygwin systems need to pass --dll to the linker, and not link | |
174 | # crt.o which will require a WinMain@16 definition. | |
175 | lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; | |
176 | esac | |
177 | ;; | |
178 | ]) | |
179 | esac | |
180 | ]) | |
181 | ||
182 | # AC_LIBTOOL_DLOPEN - enable checks for dlopen support | |
183 | AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) | |
184 | ||
185 | # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's | |
186 | AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) | |
187 | ||
188 | # AC_ENABLE_SHARED - implement the --enable-shared flag | |
189 | # Usage: AC_ENABLE_SHARED[(DEFAULT)] | |
190 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
191 | # `yes'. | |
192 | AC_DEFUN(AC_ENABLE_SHARED, [dnl | |
193 | define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl | |
194 | AC_ARG_ENABLE(shared, | |
195 | changequote(<<, >>)dnl | |
196 | << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], | |
197 | changequote([, ])dnl | |
198 | [p=${PACKAGE-default} | |
199 | case "$enableval" in | |
200 | yes) enable_shared=yes ;; | |
201 | no) enable_shared=no ;; | |
202 | *) | |
203 | enable_shared=no | |
204 | # Look at the argument we got. We use all the common list separators. | |
205 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
206 | for pkg in $enableval; do | |
207 | if test "X$pkg" = "X$p"; then | |
208 | enable_shared=yes | |
209 | fi | |
210 | done | |
211 | IFS="$ac_save_ifs" | |
212 | ;; | |
213 | esac], | |
214 | enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl | |
215 | ]) | |
216 | ||
217 | # AC_DISABLE_SHARED - set the default shared flag to --disable-shared | |
218 | AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
219 | AC_ENABLE_SHARED(no)]) | |
220 | ||
221 | # AC_ENABLE_STATIC - implement the --enable-static flag | |
222 | # Usage: AC_ENABLE_STATIC[(DEFAULT)] | |
223 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
224 | # `yes'. | |
225 | AC_DEFUN(AC_ENABLE_STATIC, [dnl | |
226 | define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl | |
227 | AC_ARG_ENABLE(static, | |
228 | changequote(<<, >>)dnl | |
229 | << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], | |
230 | changequote([, ])dnl | |
231 | [p=${PACKAGE-default} | |
232 | case "$enableval" in | |
233 | yes) enable_static=yes ;; | |
234 | no) enable_static=no ;; | |
235 | *) | |
236 | enable_static=no | |
237 | # Look at the argument we got. We use all the common list separators. | |
238 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
239 | for pkg in $enableval; do | |
240 | if test "X$pkg" = "X$p"; then | |
241 | enable_static=yes | |
242 | fi | |
243 | done | |
244 | IFS="$ac_save_ifs" | |
245 | ;; | |
246 | esac], | |
247 | enable_static=AC_ENABLE_STATIC_DEFAULT)dnl | |
248 | ]) | |
249 | ||
250 | # AC_DISABLE_STATIC - set the default static flag to --disable-static | |
251 | AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
252 | AC_ENABLE_STATIC(no)]) | |
253 | ||
254 | ||
255 | # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag | |
256 | # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] | |
257 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
258 | # `yes'. | |
259 | AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl | |
260 | define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl | |
261 | AC_ARG_ENABLE(fast-install, | |
262 | changequote(<<, >>)dnl | |
263 | << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], | |
264 | changequote([, ])dnl | |
265 | [p=${PACKAGE-default} | |
266 | case "$enableval" in | |
267 | yes) enable_fast_install=yes ;; | |
268 | no) enable_fast_install=no ;; | |
269 | *) | |
270 | enable_fast_install=no | |
271 | # Look at the argument we got. We use all the common list separators. | |
272 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
273 | for pkg in $enableval; do | |
274 | if test "X$pkg" = "X$p"; then | |
275 | enable_fast_install=yes | |
276 | fi | |
277 | done | |
278 | IFS="$ac_save_ifs" | |
279 | ;; | |
280 | esac], | |
281 | enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl | |
282 | ]) | |
283 | ||
284 | # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install | |
285 | AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
286 | AC_ENABLE_FAST_INSTALL(no)]) | |
287 | ||
288 | ||
289 | # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library | |
290 | AC_DEFUN(AC_PATH_TOOL_PREFIX, | |
291 | [AC_MSG_CHECKING([for $1]) | |
292 | AC_CACHE_VAL(lt_cv_path_MAGIC, | |
293 | [case "$MAGIC" in | |
294 | /*) | |
295 | lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path. | |
296 | ;; | |
297 | ?:/*) | |
298 | ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path. | |
299 | ;; | |
300 | *) | |
301 | ac_save_MAGIC="$MAGIC" | |
302 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
303 | dnl $ac_dummy forces splitting on constant user-supplied paths. | |
304 | dnl POSIX.2 word splitting is done only on the output of word expansions, | |
305 | dnl not every word. This closes a longstanding sh security hole. | |
306 | ac_dummy="ifelse([$2], , $PATH, [$2])" | |
307 | for ac_dir in $ac_dummy; do | |
308 | test -z "$ac_dir" && ac_dir=. | |
309 | if test -f $ac_dir/$1; then | |
310 | lt_cv_path_MAGIC="$ac_dir/$1" | |
311 | if test -n "$file_magic_test_file"; then | |
312 | case "$deplibs_check_method" in | |
313 | "file_magic "*) | |
314 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" | |
315 | MAGIC="$lt_cv_path_MAGIC" | |
316 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | |
317 | egrep "$file_magic_regex" > /dev/null; then | |
318 | : | |
319 | else | |
320 | cat <<EOF 1>&2 | |
321 | ||
322 | *** Warning: the command libtool uses to detect shared libraries, | |
323 | *** $file_magic_cmd, produces output that libtool cannot recognize. | |
324 | *** The result is that libtool may fail to recognize shared libraries | |
325 | *** as such. This will affect the creation of libtool libraries that | |
326 | *** depend on shared libraries, but programs linked with such libtool | |
327 | *** libraries will work regardless of this problem. Nevertheless, you | |
328 | *** may want to report the problem to your system manager and/or to | |
329 | *** bug-libtool@gnu.org | |
330 | ||
331 | EOF | |
332 | fi ;; | |
333 | esac | |
334 | fi | |
335 | break | |
336 | fi | |
337 | done | |
338 | IFS="$ac_save_ifs" | |
339 | MAGIC="$ac_save_MAGIC" | |
340 | ;; | |
341 | esac]) | |
342 | MAGIC="$lt_cv_path_MAGIC" | |
343 | if test -n "$MAGIC"; then | |
344 | AC_MSG_RESULT($MAGIC) | |
345 | else | |
346 | AC_MSG_RESULT(no) | |
347 | fi | |
348 | ]) | |
349 | ||
350 | ||
351 | # AC_PATH_MAGIC - find a file program which can recognise a shared library | |
352 | AC_DEFUN(AC_PATH_MAGIC, | |
353 | [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl | |
354 | AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) | |
355 | if test -z "$lt_cv_path_MAGIC"; then | |
356 | if test -n "$ac_tool_prefix"; then | |
357 | AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) | |
358 | else | |
359 | MAGIC=: | |
360 | fi | |
361 | fi | |
362 | ]) | |
363 | ||
364 | ||
365 | # AC_PROG_LD - find the path to the GNU or non-GNU linker | |
366 | AC_DEFUN(AC_PROG_LD, | |
367 | [AC_ARG_WITH(gnu-ld, | |
368 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], | |
369 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) | |
370 | AC_REQUIRE([AC_PROG_CC])dnl | |
371 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
372 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
373 | ac_prog=ld | |
374 | if test "$ac_cv_prog_gcc" = yes; then | |
375 | # Check if gcc -print-prog-name=ld gives a path. | |
376 | AC_MSG_CHECKING([for ld used by GCC]) | |
377 | case $lt_target in | |
378 | *-*-mingw*) | |
379 | # gcc leaves a trailing carriage return which upsets mingw | |
380 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
381 | *) | |
382 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
383 | esac | |
384 | case "$ac_prog" in | |
385 | # Accept absolute paths. | |
386 | changequote(,)dnl | |
387 | [\\/]* | [A-Za-z]:[\\/]*) | |
388 | re_direlt='/[^/][^/]*/\.\./' | |
389 | changequote([,])dnl | |
390 | # Canonicalize the path of ld | |
391 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
392 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
393 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
394 | done | |
395 | test -z "$LD" && LD="$ac_prog" | |
396 | ;; | |
397 | "") | |
398 | # If it fails, then pretend we aren't using GCC. | |
399 | ac_prog=ld | |
400 | ;; | |
401 | *) | |
402 | # If it is relative, then search for the first ld in PATH. | |
403 | with_gnu_ld=unknown | |
404 | ;; | |
405 | esac | |
406 | elif test "$with_gnu_ld" = yes; then | |
407 | AC_MSG_CHECKING([for GNU ld]) | |
408 | else | |
409 | AC_MSG_CHECKING([for non-GNU ld]) | |
410 | fi | |
411 | AC_CACHE_VAL(ac_cv_path_LD, | |
412 | [if test -z "$LD"; then | |
413 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
414 | for ac_dir in $PATH; do | |
415 | test -z "$ac_dir" && ac_dir=. | |
416 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
417 | ac_cv_path_LD="$ac_dir/$ac_prog" | |
418 | # Check to see if the program is GNU ld. I'd rather use --version, | |
419 | # but apparently some GNU ld's only accept -v. | |
420 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
421 | if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
422 | test "$with_gnu_ld" != no && break | |
423 | else | |
424 | test "$with_gnu_ld" != yes && break | |
425 | fi | |
426 | fi | |
427 | done | |
428 | IFS="$ac_save_ifs" | |
429 | else | |
430 | ac_cv_path_LD="$LD" # Let the user override the test with a path. | |
431 | fi]) | |
432 | LD="$ac_cv_path_LD" | |
433 | if test -n "$LD"; then | |
434 | AC_MSG_RESULT($LD) | |
435 | else | |
436 | AC_MSG_RESULT(no) | |
437 | fi | |
438 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
439 | AC_PROG_LD_GNU | |
440 | ]) | |
441 | ||
442 | AC_DEFUN(AC_PROG_LD_GNU, | |
443 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, | |
444 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
445 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
446 | ac_cv_prog_gnu_ld=yes | |
447 | else | |
448 | ac_cv_prog_gnu_ld=no | |
449 | fi]) | |
450 | with_gnu_ld=$ac_cv_prog_gnu_ld | |
451 | ]) | |
452 | ||
453 | # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker | |
454 | # -- PORTME Some linkers may need a different reload flag. | |
455 | AC_DEFUN(AC_PROG_LD_RELOAD_FLAG, | |
456 | [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, | |
457 | [lt_cv_ld_reload_flag='-r']) | |
458 | reload_flag=$lt_cv_ld_reload_flag | |
459 | test -n "$reload_flag" && reload_flag=" $reload_flag" | |
460 | ]) | |
461 | ||
462 | # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies | |
463 | # -- PORTME fill in with the dynamic library characteristics | |
464 | AC_DEFUN(AC_DEPLIBS_CHECK_METHOD, | |
465 | [AC_CACHE_CHECK([how to recognise dependant libraries], | |
466 | lt_cv_deplibs_check_method, | |
467 | [lt_cv_file_magic_cmd='${MAGIC}' | |
468 | lt_cv_file_magic_test_file= | |
469 | lt_cv_deplibs_check_method='unknown' | |
470 | # Need to set the preceding variable on all platforms that support | |
471 | # interlibrary dependencies. | |
472 | # 'none' -- dependencies not supported. | |
473 | # `unknown' -- same as none, but documents that we really don't know. | |
474 | # 'pass_all' -- all dependencies passed with no checks. | |
475 | # 'test_compile' -- check by making test program. | |
476 | # 'file_magic [regex]' -- check by looking for files in library path | |
477 | # which responds to the $file_magic_cmd with a given egrep regex. | |
478 | # If you have `file' or equivalent on your system and you're not sure | |
479 | # whether `pass_all' will *always* work, you probably want this one. | |
480 | ||
481 | case "$host_os" in | |
482 | aix4* | beos*) | |
483 | lt_cv_deplibs_check_method=pass_all | |
484 | ;; | |
485 | ||
486 | bsdi4*) | |
487 | changequote(,)dnl | |
488 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' | |
489 | changequote([, ])dnl | |
490 | lt_cv_file_magic_test_file=/shlib/libc.so | |
491 | ;; | |
492 | ||
493 | cygwin* | mingw*) | |
494 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | |
495 | lt_cv_file_magic_cmd='${OBJDUMP} -f' | |
496 | ;; | |
497 | ||
498 | freebsd*) | |
499 | lt_cv_deplibs_check_method=pass_all | |
500 | ;; | |
501 | ||
502 | gnu*) | |
503 | lt_cv_deplibs_check_method=pass_all | |
504 | ;; | |
505 | ||
506 | irix5* | irix6*) | |
507 | case "$host_os" in | |
508 | irix5*) | |
509 | # this will be overridden with pass_all, but let us keep it just in case | |
510 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" | |
511 | ;; | |
512 | *) | |
513 | case "$LD" in | |
514 | *-32|*"-32 ") libmagic=32-bit;; | |
515 | *-n32|*"-n32 ") libmagic=N32;; | |
516 | *-64|*"-64 ") libmagic=64-bit;; | |
517 | *) libmagic=never-match;; | |
518 | esac | |
519 | # this will be overridden with pass_all, but let us keep it just in case | |
520 | changequote(,)dnl | |
521 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" | |
522 | changequote([, ])dnl | |
523 | ;; | |
524 | esac | |
525 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` | |
526 | lt_cv_deplibs_check_method=pass_all | |
527 | ;; | |
528 | ||
529 | # This must be Linux ELF. | |
530 | linux-gnu*) | |
531 | case "$host_cpu" in | |
532 | alpha* | i*86 | powerpc* | sparc* ) | |
533 | lt_cv_deplibs_check_method=pass_all ;; | |
534 | *) | |
535 | # glibc up to 2.1.1 does not perform some relocations on ARM | |
536 | changequote(,)dnl | |
537 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; | |
538 | changequote([, ])dnl | |
539 | esac | |
540 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` | |
541 | ;; | |
542 | ||
543 | osf3* | osf4* | osf5*) | |
544 | # this will be overridden with pass_all, but let us keep it just in case | |
545 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' | |
546 | lt_cv_file_magic_test_file=/shlib/libc.so | |
547 | lt_cv_deplibs_check_method=pass_all | |
548 | ;; | |
549 | ||
550 | sco3.2v5*) | |
551 | lt_cv_deplibs_check_method=pass_all | |
552 | ;; | |
553 | ||
554 | solaris*) | |
555 | lt_cv_deplibs_check_method=pass_all | |
556 | lt_cv_file_magic_test_file=/lib/libc.so | |
557 | ;; | |
558 | ||
559 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
560 | case "$host_vendor" in | |
561 | ncr) | |
562 | lt_cv_deplibs_check_method=pass_all | |
563 | ;; | |
564 | motorola) | |
565 | changequote(,)dnl | |
566 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' | |
567 | changequote([, ])dnl | |
568 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | |
569 | ;; | |
570 | esac | |
571 | ;; | |
572 | esac | |
573 | ]) | |
574 | file_magic_cmd=$lt_cv_file_magic_cmd | |
575 | deplibs_check_method=$lt_cv_deplibs_check_method | |
576 | ]) | |
577 | ||
578 | ||
579 | # AC_PROG_NM - find the path to a BSD-compatible name lister | |
580 | AC_DEFUN(AC_PROG_NM, | |
581 | [AC_MSG_CHECKING([for BSD-compatible nm]) | |
582 | AC_CACHE_VAL(ac_cv_path_NM, | |
583 | [if test -n "$NM"; then | |
584 | # Let the user override the test. | |
585 | ac_cv_path_NM="$NM" | |
586 | else | |
587 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
588 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do | |
589 | test -z "$ac_dir" && ac_dir=. | |
590 | if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then | |
591 | # Check to see if the nm accepts a BSD-compat flag. | |
592 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
593 | # nm: unknown option "B" ignored | |
594 | if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then | |
595 | ac_cv_path_NM="$ac_dir/nm -B" | |
596 | break | |
597 | elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then | |
598 | ac_cv_path_NM="$ac_dir/nm -p" | |
599 | break | |
600 | else | |
601 | ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but | |
602 | continue # so that we can try to find one that supports BSD flags | |
603 | fi | |
604 | fi | |
605 | done | |
606 | IFS="$ac_save_ifs" | |
607 | test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm | |
608 | fi]) | |
609 | NM="$ac_cv_path_NM" | |
610 | AC_MSG_RESULT([$NM]) | |
611 | ]) | |
612 | ||
613 | # AC_CHECK_LIBM - check for math library | |
614 | AC_DEFUN(AC_CHECK_LIBM, | |
615 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
616 | LIBM= | |
617 | case "$lt_target" in | |
618 | *-*-beos* | *-*-cygwin*) | |
619 | # These system don't have libm | |
620 | ;; | |
621 | *-ncr-sysv4.3*) | |
622 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") | |
623 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") | |
624 | ;; | |
625 | *) | |
626 | AC_CHECK_LIB(m, main, LIBM="-lm") | |
627 | ;; | |
628 | esac | |
629 | ]) | |
630 | ||
631 | # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for | |
632 | # the libltdl convenience library, adds --enable-ltdl-convenience to | |
633 | # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor | |
634 | # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed | |
635 | # to be `${top_builddir}/libltdl'. Make sure you start DIR with | |
636 | # '${top_builddir}/' (note the single quotes!) if your package is not | |
637 | # flat, and, if you're not using automake, define top_builddir as | |
638 | # appropriate in the Makefiles. | |
639 | AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
640 | case "$enable_ltdl_convenience" in | |
641 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; | |
642 | "") enable_ltdl_convenience=yes | |
643 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; | |
644 | esac | |
645 | LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la | |
646 | INCLTDL=ifelse($#,1,-I$1,['-I${top_srcdir}/libltdl']) | |
647 | ]) | |
648 | ||
649 | # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for | |
650 | # the libltdl installable library, and adds --enable-ltdl-install to | |
651 | # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor | |
652 | # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed | |
653 | # to be `${top_builddir}/libltdl'. Make sure you start DIR with | |
654 | # '${top_builddir}/' (note the single quotes!) if your package is not | |
655 | # flat, and, if you're not using automake, define top_builddir as | |
656 | # appropriate in the Makefiles. | |
657 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. | |
658 | AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
659 | AC_CHECK_LIB(ltdl, main, | |
660 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], | |
661 | [if test x"$enable_ltdl_install" = xno; then | |
662 | AC_MSG_WARN([libltdl not installed, but installation disabled]) | |
663 | else | |
664 | enable_ltdl_install=yes | |
665 | fi | |
666 | ]) | |
667 | if test x"$enable_ltdl_install" = x"yes"; then | |
668 | ac_configure_args="$ac_configure_args --enable-ltdl-install" | |
669 | LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la | |
670 | INCLTDL=ifelse($#,1,-I$1,['-I${top_srcdir}/libltdl']) | |
671 | else | |
672 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" | |
673 | LIBLTDL="-lltdl" | |
674 | INCLTDL= | |
675 | fi | |
676 | ]) | |
677 | ||
678 | dnl old names | |
679 | AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl | |
680 | AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl | |
681 | AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl | |
682 | AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl | |
683 | AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl | |
684 | AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl | |
685 | AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl | |
686 | ||
687 | dnl This is just to silence aclocal about the macro not being used | |
688 | ifelse([AC_DISABLE_FAST_INSTALL])dnl |
0 | #! /bin/sh | |
1 | ||
2 | # ltconfig - Create a system-specific libtool. | |
3 | # Copyright (C) 1996-2000 Free Software Foundation, Inc. | |
4 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |
5 | # | |
6 | # This file is free software; you can redistribute it and/or modify it | |
7 | # under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation; either version 2 of the License, or | |
9 | # (at your option) any later version. | |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, but | |
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | # General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program; if not, write to the Free Software | |
18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
19 | # | |
20 | # As a special exception to the GNU General Public License, if you | |
21 | # distribute this file as part of a program that contains a | |
22 | # configuration script generated by Autoconf, you may include it under | |
23 | # the same distribution terms that you use for the rest of that program. | |
24 | ||
25 | # A lot of this script is taken from autoconf-2.10. | |
26 | ||
27 | # Check that we are running under the correct shell. | |
28 | SHELL=${CONFIG_SHELL-/bin/sh} | |
29 | echo=echo | |
30 | if test "X$1" = X--no-reexec; then | |
31 | # Discard the --no-reexec flag, and continue. | |
32 | shift | |
33 | elif test "X$1" = X--fallback-echo; then | |
34 | # Avoid inline document here, it may be left over | |
35 | : | |
36 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then | |
37 | # Yippee, $echo works! | |
38 | : | |
39 | else | |
40 | # Restart under the correct shell. | |
41 | exec "$SHELL" "$0" --no-reexec ${1+"$@"} | |
42 | fi | |
43 | ||
44 | if test "X$1" = X--fallback-echo; then | |
45 | # used as fallback echo | |
46 | shift | |
47 | cat <<EOF | |
48 | $* | |
49 | EOF | |
50 | exit 0 | |
51 | fi | |
52 | ||
53 | # Find the correct PATH separator. Usually this is `:', but | |
54 | # DJGPP uses `;' like DOS. | |
55 | if test "X${PATH_SEPARATOR+set}" != Xset; then | |
56 | UNAME=${UNAME-`uname 2>/dev/null`} | |
57 | case X$UNAME in | |
58 | *-DOS) PATH_SEPARATOR=';' ;; | |
59 | *) PATH_SEPARATOR=':' ;; | |
60 | esac | |
61 | fi | |
62 | ||
63 | # The HP-UX ksh and POSIX shell print the target directory to stdout | |
64 | # if CDPATH is set. | |
65 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | |
66 | ||
67 | if test "X${echo_test_string+set}" != Xset; then | |
68 | # find a string as large as possible, as long as the shell can cope with it | |
69 | for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do | |
70 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... | |
71 | if (echo_test_string="`eval $cmd`") 2>/dev/null && | |
72 | echo_test_string="`eval $cmd`" && | |
73 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then | |
74 | break | |
75 | fi | |
76 | done | |
77 | fi | |
78 | ||
79 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | |
80 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | |
81 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
82 | : | |
83 | else | |
84 | # The Solaris, AIX, and Digital Unix default echo programs unquote | |
85 | # backslashes. This makes it impossible to quote backslashes using | |
86 | # echo "$something" | sed 's/\\/\\\\/g' | |
87 | # | |
88 | # So, first we look for a working echo in the user's PATH. | |
89 | ||
90 | IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" | |
91 | for dir in $PATH /usr/ucb; do | |
92 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && | |
93 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && | |
94 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && | |
95 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
96 | echo="$dir/echo" | |
97 | break | |
98 | fi | |
99 | done | |
100 | IFS="$save_ifs" | |
101 | ||
102 | if test "X$echo" = Xecho; then | |
103 | # We didn't find a better echo, so look for alternatives. | |
104 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && | |
105 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && | |
106 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
107 | # This shell has a builtin print -r that does the trick. | |
108 | echo='print -r' | |
109 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && | |
110 | test "X$CONFIG_SHELL" != X/bin/ksh; then | |
111 | # If we have ksh, try running ltconfig again with it. | |
112 | ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" | |
113 | export ORIGINAL_CONFIG_SHELL | |
114 | CONFIG_SHELL=/bin/ksh | |
115 | export CONFIG_SHELL | |
116 | exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} | |
117 | else | |
118 | # Try using printf. | |
119 | echo='printf "%s\n"' | |
120 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | |
121 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | |
122 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
123 | # Cool, printf works | |
124 | : | |
125 | elif echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` && | |
126 | test "X$echo_testing_string" = 'X\t' && | |
127 | echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
128 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
129 | CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" | |
130 | export CONFIG_SHELL | |
131 | SHELL="$CONFIG_SHELL" | |
132 | export SHELL | |
133 | echo="$CONFIG_SHELL $0 --fallback-echo" | |
134 | elif echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` && | |
135 | test "X$echo_testing_string" = 'X\t' && | |
136 | echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
137 | test "X$echo_testing_string" = "X$echo_test_string"; then | |
138 | echo="$CONFIG_SHELL $0 --fallback-echo" | |
139 | else | |
140 | # maybe with a smaller string... | |
141 | prev=: | |
142 | ||
143 | for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do | |
144 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then | |
145 | break | |
146 | fi | |
147 | prev="$cmd" | |
148 | done | |
149 | ||
150 | if test "$prev" != 'sed 50q "$0"'; then | |
151 | echo_test_string=`eval $prev` | |
152 | export echo_test_string | |
153 | exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} | |
154 | else | |
155 | # Oops. We lost completely, so just stick with echo. | |
156 | echo=echo | |
157 | fi | |
158 | fi | |
159 | fi | |
160 | fi | |
161 | fi | |
162 | ||
163 | # Sed substitution that helps us do robust quoting. It backslashifies | |
164 | # metacharacters that are still active within double-quoted strings. | |
165 | Xsed='sed -e s/^X//' | |
166 | sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' | |
167 | ||
168 | # Same as above, but do not quote variable references. | |
169 | double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' | |
170 | ||
171 | # Sed substitution to delay expansion of an escaped shell variable in a | |
172 | # double_quote_subst'ed string. | |
173 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | |
174 | ||
175 | # The name of this program. | |
176 | progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` | |
177 | ||
178 | # Constants: | |
179 | PROGRAM=ltconfig | |
180 | PACKAGE=libtool | |
181 | VERSION=1.3c | |
182 | TIMESTAMP=" (1.695 2000/02/24 02:15:35)" | |
183 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
184 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
185 | rm="rm -f" | |
186 | ||
187 | help="Try \`$progname --help' for more information." | |
188 | ||
189 | # Global variables: | |
190 | default_ofile=libtool | |
191 | can_build_shared=yes | |
192 | enable_shared=yes | |
193 | # All known linkers require a `.a' archive for static linking (except M$VC, | |
194 | # which needs '.lib'). | |
195 | enable_static=yes | |
196 | enable_fast_install=yes | |
197 | enable_dlopen=unknown | |
198 | enable_win32_dll=no | |
199 | pic_mode=default | |
200 | ltmain= | |
201 | silent= | |
202 | srcdir= | |
203 | ac_config_guess= | |
204 | ac_config_sub= | |
205 | host= | |
206 | build=NONE | |
207 | nonopt=NONE | |
208 | ofile="$default_ofile" | |
209 | verify_host=yes | |
210 | with_gcc=no | |
211 | with_gnu_ld=no | |
212 | need_locks=yes | |
213 | ac_ext=c | |
214 | libext=a | |
215 | cache_file= | |
216 | ||
217 | old_AR="$AR" | |
218 | old_CC="$CC" | |
219 | old_CFLAGS="$CFLAGS" | |
220 | old_CPPFLAGS="$CPPFLAGS" | |
221 | old_LDFLAGS="$LDFLAGS" | |
222 | old_LIBS="$LIBS" | |
223 | old_MAGIC="$MAGIC" | |
224 | old_LD="$LD" | |
225 | old_LN_S="$LN_S" | |
226 | old_NM="$NM" | |
227 | old_RANLIB="$RANLIB" | |
228 | old_STRIP="$STRIP" | |
229 | old_AS="$AS" | |
230 | old_DLLTOOL="$DLLTOOL" | |
231 | old_OBJDUMP="$OBJDUMP" | |
232 | old_OBJEXT="$OBJEXT" | |
233 | old_EXEEXT="$EXEEXT" | |
234 | old_reload_Flag="$reload_flag" | |
235 | old_deplibs_check_method="$deplibs_check_method" | |
236 | old_file_magic_cmd="$file_magic_cmd" | |
237 | ||
238 | # Parse the command line options. | |
239 | args= | |
240 | prev= | |
241 | for option | |
242 | do | |
243 | case "$option" in | |
244 | -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
245 | *) optarg= ;; | |
246 | esac | |
247 | ||
248 | # If the previous option needs an argument, assign it. | |
249 | if test -n "$prev"; then | |
250 | eval "$prev=\$option" | |
251 | prev= | |
252 | continue | |
253 | fi | |
254 | ||
255 | case "$option" in | |
256 | --help) cat <<EOM | |
257 | Usage: $progname [OPTION]... LTMAIN [HOST] | |
258 | ||
259 | Generate a system-specific libtool script. | |
260 | ||
261 | --build configure for building on BUILD [BUILD=HOST] | |
262 | --debug enable verbose shell tracing | |
263 | --disable-shared do not build shared libraries | |
264 | --disable-static do not build static libraries | |
265 | --disable-fast-install do not optimize for fast installation | |
266 | --enable-dlopen enable dlopen support | |
267 | --enable-win32-dll enable building dlls on win32 hosts | |
268 | --help display this help and exit | |
269 | --no-verify do not verify that HOST is a valid host type | |
270 | -o, --output=FILE specify the output file [default=$default_ofile] | |
271 | --quiet same as \`--silent' | |
272 | --silent do not print informational messages | |
273 | --srcdir=DIR find \`config.guess' in DIR | |
274 | --version output version information and exit | |
275 | --with-gcc assume that the GNU C compiler will be used | |
276 | --with-gnu-ld assume that the C compiler uses the GNU linker | |
277 | --prefer-pic try to use only PIC objects | |
278 | --prefer-non-pic try to use only non-PIC objects | |
279 | --disable-lock disable file locking | |
280 | --cache-file=FILE configure cache file | |
281 | ||
282 | LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program | |
283 | that provides basic libtool functionality. | |
284 | ||
285 | HOST is the canonical host system name [default=guessed]. | |
286 | EOM | |
287 | exit 0 | |
288 | ;; | |
289 | ||
290 | --build) prev=build ;; | |
291 | --build=*) build="$optarg" ;; | |
292 | ||
293 | --debug) | |
294 | echo "$progname: enabling shell trace mode" | |
295 | set -x | |
296 | ;; | |
297 | ||
298 | --disable-shared) enable_shared=no ;; | |
299 | ||
300 | --disable-static) enable_static=no ;; | |
301 | ||
302 | --disable-fast-install) enable_fast_install=no ;; | |
303 | ||
304 | --enable-dlopen) enable_dlopen=yes ;; | |
305 | ||
306 | --enable-win32-dll) enable_win32_dll=yes ;; | |
307 | ||
308 | --quiet | --silent) silent=yes ;; | |
309 | ||
310 | --srcdir) prev=srcdir ;; | |
311 | --srcdir=*) srcdir="$optarg" ;; | |
312 | ||
313 | --no-verify) verify_host=no ;; | |
314 | ||
315 | --output | -o) prev=ofile ;; | |
316 | --output=*) ofile="$optarg" ;; | |
317 | ||
318 | --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;; | |
319 | ||
320 | --with-gcc) with_gcc=yes ;; | |
321 | --with-gnu-ld) with_gnu_ld=yes ;; | |
322 | ||
323 | --prefer-pic) pic_mode=yes ;; | |
324 | --prefer-non-pic) pic_mode=no ;; | |
325 | ||
326 | --disable-lock) need_locks=no ;; | |
327 | ||
328 | --cache-file=*) cache_file="$optarg" ;; | |
329 | ||
330 | -*) | |
331 | echo "$progname: unrecognized option \`$option'" 1>&2 | |
332 | echo "$help" 1>&2 | |
333 | exit 1 | |
334 | ;; | |
335 | ||
336 | *) | |
337 | if test -z "$ltmain"; then | |
338 | ltmain="$option" | |
339 | elif test -z "$host"; then | |
340 | # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 | |
341 | # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then | |
342 | # echo "$progname: warning \`$option' is not a valid host type" 1>&2 | |
343 | # fi | |
344 | host="$option" | |
345 | else | |
346 | echo "$progname: too many arguments" 1>&2 | |
347 | echo "$help" 1>&2 | |
348 | exit 1 | |
349 | fi ;; | |
350 | esac | |
351 | done | |
352 | ||
353 | if test -z "$ltmain"; then | |
354 | echo "$progname: you must specify a LTMAIN file" 1>&2 | |
355 | echo "$help" 1>&2 | |
356 | exit 1 | |
357 | fi | |
358 | ||
359 | if test ! -f "$ltmain"; then | |
360 | echo "$progname: \`$ltmain' does not exist" 1>&2 | |
361 | echo "$help" 1>&2 | |
362 | exit 1 | |
363 | fi | |
364 | ||
365 | # Quote any args containing shell metacharacters. | |
366 | ltconfig_args= | |
367 | for arg | |
368 | do | |
369 | case "$arg" in | |
370 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
371 | ltconfig_args="$ltconfig_args '$arg'" ;; | |
372 | *) ltconfig_args="$ltconfig_args $arg" ;; | |
373 | esac | |
374 | done | |
375 | ||
376 | # A relevant subset of AC_INIT. | |
377 | ||
378 | # File descriptor usage: | |
379 | # 0 standard input | |
380 | # 1 file creation | |
381 | # 2 errors and warnings | |
382 | # 3 some systems may open it to /dev/tty | |
383 | # 4 used on the Kubota Titan | |
384 | # 5 compiler messages saved in config.log | |
385 | # 6 checking for... messages and results | |
386 | if test "$silent" = yes; then | |
387 | exec 6>/dev/null | |
388 | else | |
389 | exec 6>&1 | |
390 | fi | |
391 | exec 5>>./config.log | |
392 | ||
393 | # NLS nuisances. | |
394 | # Only set LANG and LC_ALL to C if already set. | |
395 | # These must not be set unconditionally because not all systems understand | |
396 | # e.g. LANG=C (notably SCO). | |
397 | if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi | |
398 | if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi | |
399 | ||
400 | if test -n "$cache_file" && test -r "$cache_file"; then | |
401 | echo "loading cache $cache_file within ltconfig" | |
402 | . $cache_file | |
403 | fi | |
404 | ||
405 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
406 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
407 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
408 | ac_n= ac_c=' | |
409 | ' ac_t=' ' | |
410 | else | |
411 | ac_n=-n ac_c= ac_t= | |
412 | fi | |
413 | else | |
414 | ac_n= ac_c='\c' ac_t= | |
415 | fi | |
416 | ||
417 | if test -z "$srcdir"; then | |
418 | # Assume the source directory is the same one as the path to LTMAIN. | |
419 | srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` | |
420 | test "$srcdir" = "$ltmain" && srcdir=. | |
421 | fi | |
422 | ||
423 | trap "$rm conftest*; exit 1" 1 2 15 | |
424 | if test "$verify_host" = yes; then | |
425 | # Check for config.guess and config.sub. | |
426 | ac_aux_dir= | |
427 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
428 | if test -f $ac_dir/config.guess; then | |
429 | ac_aux_dir=$ac_dir | |
430 | break | |
431 | fi | |
432 | done | |
433 | if test -z "$ac_aux_dir"; then | |
434 | echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 | |
435 | echo "$help" 1>&2 | |
436 | exit 1 | |
437 | fi | |
438 | ac_config_guess=$ac_aux_dir/config.guess | |
439 | ac_config_sub=$ac_aux_dir/config.sub | |
440 | ||
441 | # Make sure we can run config.sub. | |
442 | if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : | |
443 | else | |
444 | echo "$progname: cannot run $ac_config_sub" 1>&2 | |
445 | echo "$help" 1>&2 | |
446 | exit 1 | |
447 | fi | |
448 | ||
449 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
450 | ||
451 | host_alias=$host | |
452 | case "$host_alias" in | |
453 | "") | |
454 | if host_alias=`$SHELL $ac_config_guess`; then : | |
455 | else | |
456 | echo "$progname: cannot guess host type; you must specify one" 1>&2 | |
457 | echo "$help" 1>&2 | |
458 | exit 1 | |
459 | fi ;; | |
460 | esac | |
461 | host=`$SHELL $ac_config_sub $host_alias` | |
462 | echo "$ac_t$host" 1>&6 | |
463 | ||
464 | # Make sure the host verified. | |
465 | test -z "$host" && exit 1 | |
466 | ||
467 | # Check for the build system type | |
468 | echo $ac_n "checking build system type... $ac_c" 1>&6 | |
469 | ||
470 | build_alias=$build | |
471 | case "$build_alias" in | |
472 | NONE) | |
473 | case $nonopt in | |
474 | NONE) build_alias=$host_alias ;; | |
475 | *) build_alias=$nonopt ;; | |
476 | esac ;; | |
477 | esac | |
478 | ||
479 | build=`$SHELL $ac_config_sub $build_alias` | |
480 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
481 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
482 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
483 | echo "$ac_t""$build" 1>&6 | |
484 | ||
485 | elif test -z "$host"; then | |
486 | echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 | |
487 | echo "$help" 1>&2 | |
488 | exit 1 | |
489 | else | |
490 | host_alias=$host | |
491 | build_alias=$host_alias | |
492 | build=$host | |
493 | fi | |
494 | ||
495 | if test x"$host" != x"$build"; then | |
496 | ac_tool_prefix=${host_alias}- | |
497 | else | |
498 | ac_tool_prefix= | |
499 | fi | |
500 | ||
501 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
502 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
503 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
504 | ||
505 | # Transform linux* to *-*-linux-gnu*, to support old configure scripts. | |
506 | case "$host_os" in | |
507 | linux-gnu*) ;; | |
508 | linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` | |
509 | esac | |
510 | ||
511 | case "$host_os" in | |
512 | aix3*) | |
513 | # AIX sometimes has problems with the GCC collect2 program. For some | |
514 | # reason, if we set the COLLECT_NAMES environment variable, the problems | |
515 | # vanish in a puff of smoke. | |
516 | if test "X${COLLECT_NAMES+set}" != Xset; then | |
517 | COLLECT_NAMES= | |
518 | export COLLECT_NAMES | |
519 | fi | |
520 | ;; | |
521 | esac | |
522 | ||
523 | # Determine commands to create old-style static archives. | |
524 | old_archive_cmds='$AR cru $oldlib$oldobjs$old_deplibs' | |
525 | old_postinstall_cmds='chmod 644 $oldlib' | |
526 | old_postuninstall_cmds= | |
527 | ||
528 | # Set sane defaults for various variables | |
529 | test -z "$AR" && AR=ar | |
530 | test -z "$AS" && AS=as | |
531 | test -z "$CC" && CC=cc | |
532 | test -z "$DLLTOOL" && DLLTOOL=dlltool | |
533 | test -z "$MAGIC" && MAGIC=file | |
534 | test -z "$LD" && LD=ld | |
535 | test -z "$LN_S" && LN_S="ln -s" | |
536 | test -z "$NM" && NM=nm | |
537 | test -z "$OBJDUMP" && OBJDUMP=objdump | |
538 | test -z "$RANLIB" && RANLIB=: | |
539 | test -z "$STRIP" && STRIP=: | |
540 | test -z "$objext" && objext=o | |
541 | ||
542 | echo $ac_n "checking for objdir... $ac_c" 1>&6 | |
543 | rm -f .libs 2>/dev/null | |
544 | mkdir .libs 2>/dev/null | |
545 | if test -d .libs; then | |
546 | objdir=.libs | |
547 | else | |
548 | # MS-DOS does not allow filenames that begin with a dot. | |
549 | objdir=_libs | |
550 | fi | |
551 | rmdir .libs 2>/dev/null | |
552 | echo "$ac_t$objdir" 1>&6 | |
553 | ||
554 | # Allow CC to be a program name with arguments. | |
555 | set dummy $CC | |
556 | compiler="$2" | |
557 | ||
558 | # We assume here that the value for ac_cv_prog_cc_pic will not be cached | |
559 | # in isolation, and that seeing it set (from the cache) indicates that | |
560 | # the associated values are set (in the cache) correctly too. | |
561 | echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 | |
562 | echo "$progname:563:checking for $compiler option to produce PIC" 1>&5 | |
563 | if test "X${ac_cv_prog_cc_pic+set}" = Xset; then | |
564 | echo $ac_n "(cached) $ac_c" 1>&6 | |
565 | else | |
566 | ac_cv_prog_cc_pic= | |
567 | ac_cv_prog_cc_shlib= | |
568 | ac_cv_prog_cc_wl= | |
569 | ac_cv_prog_cc_static= | |
570 | ac_cv_prog_cc_no_builtin= | |
571 | ac_cv_prog_cc_can_build_shared=$can_build_shared | |
572 | ||
573 | if test "$with_gcc" = yes; then | |
574 | ac_cv_prog_cc_wl='-Wl,' | |
575 | ac_cv_prog_cc_static='-static' | |
576 | ||
577 | case "$host_os" in | |
578 | beos* | irix5* | irix6* | osf3* | osf4* | osf5*) | |
579 | # PIC is the default for these OSes. | |
580 | ;; | |
581 | aix*) | |
582 | # Below there is a dirty hack to force normal static linking with -ldl | |
583 | # The problem is because libdl dynamically linked with both libc and | |
584 | # libC (AIX C++ library), which obviously doesn't included in libraries | |
585 | # list by gcc. This cause undefined symbols with -static flags. | |
586 | # This hack allows C programs to be linked with "-static -ldl", but | |
587 | # we not sure about C++ programs. | |
588 | ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC" | |
589 | ;; | |
590 | cygwin* | mingw* | os2*) | |
591 | # This hack is so that the source file can tell whether it is being | |
592 | # built for inclusion in a dll (and should export symbols for example). | |
593 | ac_cv_prog_cc_pic='-DDLL_EXPORT' | |
594 | ;; | |
595 | amigaos*) | |
596 | # FIXME: we need at least 68020 code to build shared libraries, but | |
597 | # adding the `-m68020' flag to GCC prevents building anything better, | |
598 | # like `-m68040'. | |
599 | ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' | |
600 | ;; | |
601 | sysv4*MP*) | |
602 | if test -d /usr/nec; then | |
603 | ac_cv_prog_cc_pic=-Kconform_pic | |
604 | fi | |
605 | ;; | |
606 | *) | |
607 | ac_cv_prog_cc_pic='-fPIC' | |
608 | ;; | |
609 | esac | |
610 | else | |
611 | # PORTME Check for PIC flags for the system compiler. | |
612 | case "$host_os" in | |
613 | aix3* | aix4*) | |
614 | # All AIX code is PIC. | |
615 | ac_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' | |
616 | ;; | |
617 | ||
618 | hpux9* | hpux10* | hpux11*) | |
619 | # Is there a better ac_cv_prog_cc_static that works with the bundled CC? | |
620 | ac_cv_prog_cc_wl='-Wl,' | |
621 | ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" | |
622 | ac_cv_prog_cc_pic='+Z' | |
623 | ;; | |
624 | ||
625 | irix5* | irix6*) | |
626 | ac_cv_prog_cc_wl='-Wl,' | |
627 | ac_cv_prog_cc_static='-non_shared' | |
628 | # PIC (with -KPIC) is the default. | |
629 | ;; | |
630 | ||
631 | cygwin* | mingw* | os2*) | |
632 | # This hack is so that the source file can tell whether it is being | |
633 | # built for inclusion in a dll (and should export symbols for example). | |
634 | ac_cv_prog_cc_pic='-DDLL_EXPORT' | |
635 | ;; | |
636 | ||
637 | osf3* | osf4* | osf5*) | |
638 | # All OSF/1 code is PIC. | |
639 | ac_cv_prog_cc_wl='-Wl,' | |
640 | ac_cv_prog_cc_static='-non_shared' | |
641 | ;; | |
642 | ||
643 | sco3.2v5*) | |
644 | ac_cv_prog_cc_pic='-Kpic' | |
645 | ac_cv_prog_cc_static='-dn' | |
646 | ac_cv_prog_cc_shlib='-belf' | |
647 | ;; | |
648 | ||
649 | solaris*) | |
650 | ac_cv_prog_cc_pic='-KPIC' | |
651 | ac_cv_prog_cc_static='-Bstatic' | |
652 | ac_cv_prog_cc_wl='-Wl,' | |
653 | ;; | |
654 | ||
655 | sunos4*) | |
656 | ac_cv_prog_cc_pic='-PIC' | |
657 | ac_cv_prog_cc_static='-Bstatic' | |
658 | ac_cv_prog_cc_wl='-Qoption ld ' | |
659 | ;; | |
660 | ||
661 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
662 | ac_cv_prog_cc_pic='-KPIC' | |
663 | ac_cv_prog_cc_static='-Bstatic' | |
664 | ac_cv_prog_cc_wl='-Wl,' | |
665 | ;; | |
666 | ||
667 | uts4*) | |
668 | ac_cv_prog_cc_pic='-pic' | |
669 | ac_cv_prog_cc_static='-Bstatic' | |
670 | ;; | |
671 | ||
672 | sysv4*MP*) | |
673 | if test -d /usr/nec ;then | |
674 | ac_cv_prog_cc_pic='-Kconform_pic' | |
675 | ac_cv_prog_cc_static='-Bstatic' | |
676 | fi | |
677 | ;; | |
678 | ||
679 | *) | |
680 | ac_cv_prog_cc_can_build_shared=no | |
681 | ;; | |
682 | esac | |
683 | fi | |
684 | fi | |
685 | if test -z "$ac_cv_prog_cc_pic"; then | |
686 | echo "$ac_t"none 1>&6 | |
687 | else | |
688 | echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6 | |
689 | ||
690 | # Check to make sure the pic_flag actually works. | |
691 | echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6 | |
692 | echo "$progname:693:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5 | |
693 | if test "X${ac_cv_prog_cc_pic_works+set}" = Xset; then | |
694 | echo $ac_n "(cached) $ac_c" 1>&6 | |
695 | else | |
696 | ac_cv_prog_cc_pic_works=yes | |
697 | $rm conftest* | |
698 | echo "int some_variable = 0;" > conftest.c | |
699 | save_CFLAGS="$CFLAGS" | |
700 | CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC" | |
701 | if { (eval echo $progname:702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then | |
702 | # Append any warnings to the config.log. | |
703 | cat conftest.err 1>&5 | |
704 | ||
705 | case "$host_os" in | |
706 | hpux9* | hpux10* | hpux11*) | |
707 | # On HP-UX, both CC and GCC only warn that PIC is supported... then | |
708 | # they create non-PIC objects. So, if there were any warnings, we | |
709 | # assume that PIC is not supported. | |
710 | if test -s conftest.err; then | |
711 | ac_cv_prog_cc_pic_works=no | |
712 | ac_cv_prog_cc_can_build_shared=no | |
713 | ac_cv_prog_cc_pic= | |
714 | else | |
715 | ac_cv_prog_cc_pic_works=yes | |
716 | ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic" | |
717 | fi | |
718 | ;; | |
719 | *) | |
720 | ac_cv_prog_cc_pic_works=yes | |
721 | ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic" | |
722 | ;; | |
723 | esac | |
724 | else | |
725 | # Append any errors to the config.log. | |
726 | cat conftest.err 1>&5 | |
727 | ac_cv_prog_cc_pic_works=no | |
728 | ac_cv_prog_cc_can_build_shared=no | |
729 | ac_cv_prog_cc_pic= | |
730 | fi | |
731 | CFLAGS="$save_CFLAGS" | |
732 | $rm conftest* | |
733 | fi | |
734 | # Belt *and* braces to stop my trousers falling down: | |
735 | if test "X$ac_cv_prog_cc_pic_works" = Xno; then | |
736 | ac_cv_prog_cc_pic= | |
737 | ac_cv_prog_cc_can_build_shared=no | |
738 | fi | |
739 | echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6 | |
740 | fi | |
741 | ||
742 | # Check for any special shared library compilation flags. | |
743 | if test -n "$ac_cv_prog_cc_shlib"; then | |
744 | echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2 | |
745 | if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev/null; then : | |
746 | else | |
747 | echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2 | |
748 | ac_cv_prog_cc_can_build_shared=no | |
749 | fi | |
750 | fi | |
751 | ||
752 | echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6 | |
753 | echo "$progname:754: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5 | |
754 | if test "X${ac_cv_prog_cc_static_works+set}" = Xset; then | |
755 | echo $ac_n "(cached) $ac_c" 1>&6 | |
756 | else | |
757 | $rm conftest* | |
758 | echo 'main(){return(0);}' > conftest.c | |
759 | save_LDFLAGS="$LDFLAGS" | |
760 | LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static" | |
761 | if { (eval echo $progname:762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
762 | ac_cv_prog_cc_static_works=yes | |
763 | else | |
764 | ac_cv_prog_cc_static_works=no | |
765 | ac_cv_prog_cc_static= | |
766 | fi | |
767 | LDFLAGS="$save_LDFLAGS" | |
768 | $rm conftest* | |
769 | fi | |
770 | # Belt *and* braces to stop my trousers falling down: | |
771 | if test "X$ac_cv_prog_cc_static_works" = Xno; then | |
772 | ac_cv_prog_cc_static= | |
773 | fi | |
774 | echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6 | |
775 | pic_flag="$ac_cv_prog_cc_pic" | |
776 | special_shlib_compile_flags="$ac_cv_prog_cc_shlib" | |
777 | wl="$ac_cv_prog_cc_wl" | |
778 | link_static_flag="$ac_cv_prog_cc_static" | |
779 | no_builtin_flag="$ac_cv_prog_cc_no_builtin" | |
780 | can_build_shared="$ac_cv_prog_cc_can_build_shared" | |
781 | ||
782 | # Check to see if options -o and -c are simultaneously supported by compiler | |
783 | echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 | |
784 | $rm -r conftest 2>/dev/null | |
785 | mkdir conftest | |
786 | cd conftest | |
787 | $rm conftest* | |
788 | echo "int some_variable = 0;" > conftest.c | |
789 | mkdir out | |
790 | # According to Tom Tromey, Ian Lance Taylor reported there are C compilers | |
791 | # that will create temporary files in the current directory regardless of | |
792 | # the output directory. Thus, making CWD read-only will cause this test | |
793 | # to fail, enabling locking or at least warning the user not to do parallel | |
794 | # builds. | |
795 | chmod -w . | |
796 | save_CFLAGS="$CFLAGS" | |
797 | CFLAGS="$CFLAGS -o out/conftest2.o" | |
798 | echo "$progname:799: checking if $compiler supports -c -o file.o" >&5 | |
799 | if { (eval echo $progname:800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then | |
800 | ||
801 | # The compiler can only warn and ignore the option if not recognized | |
802 | # So say no if there are warnings | |
803 | if test -s out/conftest.err; then | |
804 | echo "$ac_t"no 1>&6 | |
805 | compiler_c_o=no | |
806 | else | |
807 | echo "$ac_t"yes 1>&6 | |
808 | compiler_c_o=yes | |
809 | fi | |
810 | else | |
811 | # Append any errors to the config.log. | |
812 | cat out/conftest.err 1>&5 | |
813 | compiler_c_o=no | |
814 | echo "$ac_t"no 1>&6 | |
815 | fi | |
816 | CFLAGS="$save_CFLAGS" | |
817 | chmod u+w . | |
818 | $rm conftest* out/* | |
819 | rmdir out | |
820 | cd .. | |
821 | rmdir conftest | |
822 | $rm -r conftest 2>/dev/null | |
823 | ||
824 | if test x"$compiler_c_o" = x"yes"; then | |
825 | # Check to see if we can write to a .lo | |
826 | echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 | |
827 | $rm conftest* | |
828 | echo "int some_variable = 0;" > conftest.c | |
829 | save_CFLAGS="$CFLAGS" | |
830 | CFLAGS="$CFLAGS -c -o conftest.lo" | |
831 | echo "$progname:832: checking if $compiler supports -c -o file.lo" >&5 | |
832 | if { (eval echo $progname:833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then | |
833 | ||
834 | # The compiler can only warn and ignore the option if not recognized | |
835 | # So say no if there are warnings | |
836 | if test -s conftest.err; then | |
837 | echo "$ac_t"no 1>&6 | |
838 | compiler_o_lo=no | |
839 | else | |
840 | echo "$ac_t"yes 1>&6 | |
841 | compiler_o_lo=yes | |
842 | fi | |
843 | else | |
844 | # Append any errors to the config.log. | |
845 | cat conftest.err 1>&5 | |
846 | compiler_o_lo=no | |
847 | echo "$ac_t"no 1>&6 | |
848 | fi | |
849 | CFLAGS="$save_CFLAGS" | |
850 | $rm conftest* | |
851 | else | |
852 | compiler_o_lo=no | |
853 | fi | |
854 | ||
855 | # Check to see if we can do hard links to lock some files if needed | |
856 | hard_links="nottested" | |
857 | if test "$compiler_c_o" = no && test "$need_locks" != no; then | |
858 | # do not overwrite the value of need_locks provided by the user | |
859 | echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 | |
860 | hard_links=yes | |
861 | $rm conftest* | |
862 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
863 | touch conftest.a | |
864 | ln conftest.a conftest.b 2>&5 || hard_links=no | |
865 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
866 | echo "$ac_t$hard_links" 1>&6 | |
867 | $rm conftest* | |
868 | if test "$hard_links" = no; then | |
869 | echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 | |
870 | need_locks=warn | |
871 | fi | |
872 | else | |
873 | need_locks=no | |
874 | fi | |
875 | ||
876 | if test "$with_gcc" = yes; then | |
877 | # Check to see if options -fno-rtti -fno-exceptions are supported by compiler | |
878 | echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 | |
879 | $rm conftest* | |
880 | echo "int some_variable = 0;" > conftest.c | |
881 | save_CFLAGS="$CFLAGS" | |
882 | CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" | |
883 | echo "$progname:884: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 | |
884 | if { (eval echo $progname:885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then | |
885 | ||
886 | # The compiler can only warn and ignore the option if not recognized | |
887 | # So say no if there are warnings | |
888 | if test -s conftest.err; then | |
889 | echo "$ac_t"no 1>&6 | |
890 | compiler_rtti_exceptions=no | |
891 | else | |
892 | echo "$ac_t"yes 1>&6 | |
893 | compiler_rtti_exceptions=yes | |
894 | fi | |
895 | else | |
896 | # Append any errors to the config.log. | |
897 | cat conftest.err 1>&5 | |
898 | compiler_rtti_exceptions=no | |
899 | echo "$ac_t"no 1>&6 | |
900 | fi | |
901 | CFLAGS="$save_CFLAGS" | |
902 | $rm conftest* | |
903 | ||
904 | if test "$compiler_rtti_exceptions" = "yes"; then | |
905 | no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' | |
906 | else | |
907 | no_builtin_flag=' -fno-builtin' | |
908 | fi | |
909 | ||
910 | fi | |
911 | ||
912 | # See if the linker supports building shared libraries. | |
913 | echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 | |
914 | ||
915 | allow_undefined_flag= | |
916 | no_undefined_flag= | |
917 | need_lib_prefix=unknown | |
918 | need_version=unknown | |
919 | # when you set need_version to no, make sure it does not cause -set_version | |
920 | # flags to be left without arguments | |
921 | archive_cmds= | |
922 | archive_expsym_cmds= | |
923 | old_archive_from_new_cmds= | |
924 | old_archive_from_expsyms_cmds= | |
925 | striplib= | |
926 | old_striplib= | |
927 | export_dynamic_flag_spec= | |
928 | whole_archive_flag_spec= | |
929 | thread_safe_flag_spec= | |
930 | hardcode_into_libs=no | |
931 | hardcode_libdir_flag_spec= | |
932 | hardcode_libdir_separator= | |
933 | hardcode_direct=no | |
934 | hardcode_minus_L=no | |
935 | hardcode_shlibpath_var=unsupported | |
936 | runpath_var= | |
937 | link_all_deplibs=unknown | |
938 | always_export_symbols=no | |
939 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
940 | # include_expsyms should be a list of space-separated symbols to be *always* | |
941 | # included in the symbol list | |
942 | include_expsyms= | |
943 | # exclude_expsyms can be an egrep regular expression of symbols to exclude | |
944 | # it will be wrapped by ` (' and `)$', so one must not match beginning or | |
945 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | |
946 | # as well as any symbol that contains `d'. | |
947 | exclude_expsyms="_GLOBAL_OFFSET_TABLE_" | |
948 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | |
949 | # platforms (ab)use it in PIC code, but their linkers get confused if | |
950 | # the symbol is explicitly referenced. Since portable code cannot | |
951 | # rely on this symbol name, it's probably fine to never include it in | |
952 | # preloaded symbol tables. | |
953 | extract_expsyms_cmds= | |
954 | ||
955 | case "$host_os" in | |
956 | cygwin* | mingw*) | |
957 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | |
958 | # When not using gcc, we currently assume that we are using | |
959 | # Microsoft Visual C++. | |
960 | if test "$with_gcc" != yes; then | |
961 | with_gnu_ld=no | |
962 | fi | |
963 | ;; | |
964 | ||
965 | esac | |
966 | ||
967 | ld_shlibs=yes | |
968 | if test "$with_gnu_ld" = yes; then | |
969 | # If archive_cmds runs LD, not CC, wlarc should be empty | |
970 | wlarc='${wl}' | |
971 | ||
972 | # See if GNU ld supports shared libraries. | |
973 | case "$host_os" in | |
974 | aix3* | aix4*) | |
975 | # On AIX, the GNU linker is very broken | |
976 | ld_shlibs=no | |
977 | cat <<EOF 1>&2 | |
978 | ||
979 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported | |
980 | *** to be unable to reliably create shared libraries on AIX. | |
981 | *** Therefore, libtool is disabling shared libraries support. If you | |
982 | *** really care for shared libraries, you may want to modify your PATH | |
983 | *** so that a non-GNU linker is found, and then restart. | |
984 | ||
985 | EOF | |
986 | ;; | |
987 | ||
988 | amigaos*) | |
989 | archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
990 | hardcode_libdir_flag_spec='-L$libdir' | |
991 | hardcode_minus_L=yes | |
992 | ||
993 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports | |
994 | # that the semantics of dynamic libraries on AmigaOS, at least up | |
995 | # to version 4, is to share data among multiple programs linked | |
996 | # with the same dynamic library. Since this doesn't match the | |
997 | # behavior of shared libraries on other platforms, we can use | |
998 | # them. | |
999 | ld_shlibs=no | |
1000 | ;; | |
1001 | ||
1002 | beos*) | |
1003 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
1004 | allow_undefined_flag=unsupported | |
1005 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
1006 | # support --undefined. This deserves some investigation. FIXME | |
1007 | archive_cmds='$CC -nostart $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib' | |
1008 | else | |
1009 | ld_shlibs=no | |
1010 | fi | |
1011 | ;; | |
1012 | ||
1013 | cygwin* | mingw*) | |
1014 | # hardcode_libdir_flag_spec is actually meaningless, as there is | |
1015 | # no search path for DLLs. | |
1016 | hardcode_libdir_flag_spec='-L$libdir' | |
1017 | allow_undefined_flag=unsupported | |
1018 | always_export_symbols=yes | |
1019 | ||
1020 | extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ | |
1021 | sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~ | |
1022 | test -f $output_objdir/impgen.exe || (cd $output_objdir && \ | |
1023 | if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ | |
1024 | else $CC -o impgen impgen.c ; fi)~ | |
1025 | $output_objdir/impgen $dir/$soname > $output_objdir/$soname-def' | |
1026 | ||
1027 | old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' | |
1028 | ||
1029 | # cygwin and mingw dlls have different entry points and sets of symbols | |
1030 | # to exclude. | |
1031 | # FIXME: what about values for MSVC? | |
1032 | dll_entry=__cygwin_dll_entry@12 | |
1033 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ | |
1034 | case "$host_os" in | |
1035 | mingw*) | |
1036 | # mingw values | |
1037 | dll_entry=_DllMainCRTStartup@12 | |
1038 | dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ | |
1039 | ;; | |
1040 | esac | |
1041 | ||
1042 | # mingw and cygwin differ, and it's simplest to just exclude the union | |
1043 | # of the two symbol sets. | |
1044 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 | |
1045 | ||
1046 | # recent cygwin and mingw systems supply a stub DllMain which the user | |
1047 | # can override, but on older systems we have to supply one (in ltdll.c) | |
1048 | if test "x$lt_cv_need_dllmain" = "xyes"; then | |
1049 | ltdll_obj='$output_objdir/$soname-ltdll.'"$objext " | |
1050 | ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~ | |
1051 | test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' | |
1052 | else | |
1053 | ltdll_obj= | |
1054 | ltdll_cmds= | |
1055 | fi | |
1056 | ||
1057 | # Extract the symbol export list from an `--export-all' def file, | |
1058 | # then regenerate the def file from the symbol export list, so that | |
1059 | # the compiled dll only exports the symbol export list. | |
1060 | # Be careful not to strip the DATA tag left be newer dlltools. | |
1061 | export_symbols_cmds="$ltdll_cmds"' | |
1062 | $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ | |
1063 | sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' | |
1064 | ||
1065 | # If DATA tags from a recent dlltool are present, honour them! | |
1066 | archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~ | |
1067 | _lt_hint=1; | |
1068 | cat $export_symbols | while read symbol; do | |
1069 | set dummy \$symbol; | |
1070 | case \$# in | |
1071 | 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; | |
1072 | *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; | |
1073 | esac; | |
1074 | _lt_hint=`expr 1 + \$_lt_hint`; | |
1075 | done~ | |
1076 | '"$ltdll_cmds"' | |
1077 | $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~ | |
1078 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ | |
1079 | $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~ | |
1080 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ | |
1081 | $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags' | |
1082 | ;; | |
1083 | ||
1084 | netbsd*) | |
1085 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
1086 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
1087 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
1088 | else | |
1089 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | |
1090 | fi | |
1091 | ;; | |
1092 | ||
1093 | solaris* | sysv5*) | |
1094 | if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then | |
1095 | ld_shlibs=no | |
1096 | cat <<EOF 1>&2 | |
1097 | ||
1098 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably | |
1099 | *** create shared libraries on Solaris systems. Therefore, libtool | |
1100 | *** is disabling shared libraries support. We urge you to upgrade GNU | |
1101 | *** binutils to release 2.9.1 or newer. Another option is to modify | |
1102 | *** your PATH or compiler configuration so that the native linker is | |
1103 | *** used, and then restart. | |
1104 | ||
1105 | EOF | |
1106 | elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
1107 | archive_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib' | |
1108 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
1109 | else | |
1110 | ld_shlibs=no | |
1111 | fi | |
1112 | ;; | |
1113 | ||
1114 | sunos4*) | |
1115 | archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
1116 | wlarc= | |
1117 | hardcode_direct=yes | |
1118 | hardcode_shlibpath_var=no | |
1119 | ;; | |
1120 | ||
1121 | *) | |
1122 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
1123 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
1124 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
1125 | else | |
1126 | ld_shlibs=no | |
1127 | fi | |
1128 | ;; | |
1129 | esac | |
1130 | ||
1131 | if test "$ld_shlibs" = yes; then | |
1132 | runpath_var=LD_RUN_PATH | |
1133 | hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' | |
1134 | export_dynamic_flag_spec='${wl}--export-dynamic' | |
1135 | case $host_os in | |
1136 | cygwin* | mingw*) | |
1137 | # dlltool doesn't understand --whole-archive et. al. | |
1138 | whole_archive_flag_spec= | |
1139 | ;; | |
1140 | *) | |
1141 | # ancient GNU ld didn't support --whole-archive et. al. | |
1142 | if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then | |
1143 | whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
1144 | else | |
1145 | whole_archive_flag_spec= | |
1146 | fi | |
1147 | ;; | |
1148 | esac | |
1149 | fi | |
1150 | else | |
1151 | # PORTME fill in a description of your system's linker (not GNU ld) | |
1152 | case "$host_os" in | |
1153 | aix3*) | |
1154 | allow_undefined_flag=unsupported | |
1155 | always_export_symbols=yes | |
1156 | archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $output_objdir/$soname' | |
1157 | # Note: this linker hardcodes the directories in LIBPATH if there | |
1158 | # are no directories specified by -L. | |
1159 | hardcode_minus_L=yes | |
1160 | if test "$with_gcc" = yes && test -z "$link_static_flag"; then | |
1161 | # Neither direct hardcoding nor static linking is supported with a | |
1162 | # broken collect2. | |
1163 | hardcode_direct=unsupported | |
1164 | fi | |
1165 | ;; | |
1166 | ||
1167 | aix4*) | |
1168 | hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' | |
1169 | hardcode_libdir_separator=':' | |
1170 | if test "$with_gcc" = yes; then | |
1171 | collect2name=`${CC} -print-prog-name=collect2` | |
1172 | if test -f "$collect2name" && \ | |
1173 | strings "$collect2name" | grep resolve_lib_name >/dev/null | |
1174 | then | |
1175 | # We have reworked collect2 | |
1176 | hardcode_direct=yes | |
1177 | else | |
1178 | # We have old collect2 | |
1179 | hardcode_direct=unsupported | |
1180 | # It fails to find uninstalled libraries when the uninstalled | |
1181 | # path is not listed in the libpath. Setting hardcode_minus_L | |
1182 | # to unsupported forces relinking | |
1183 | hardcode_minus_L=yes | |
1184 | hardcode_libdir_flag_spec='-L$libdir' | |
1185 | hardcode_libdir_separator= | |
1186 | fi | |
1187 | shared_flag='-shared' | |
1188 | else | |
1189 | shared_flag='${wl}-bM:SRE' | |
1190 | hardcode_direct=yes | |
1191 | fi | |
1192 | allow_undefined_flag=' ${wl}-berok' | |
1193 | archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' | |
1194 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' | |
1195 | case "$host_os" in aix4.[01]|aix4.[01].*) | |
1196 | # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on | |
1197 | always_export_symbols=yes ;; | |
1198 | esac | |
1199 | ;; | |
1200 | ||
1201 | amigaos*) | |
1202 | archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
1203 | hardcode_libdir_flag_spec='-L$libdir' | |
1204 | hardcode_minus_L=yes | |
1205 | # see comment about different semantics on the GNU ld section | |
1206 | ld_shlibs=no | |
1207 | ;; | |
1208 | ||
1209 | cygwin* | mingw*) | |
1210 | # When not using gcc, we currently assume that we are using | |
1211 | # Microsoft Visual C++. | |
1212 | # hardcode_libdir_flag_spec is actually meaningless, as there is | |
1213 | # no search path for DLLs. | |
1214 | hardcode_libdir_flag_spec=' ' | |
1215 | allow_undefined_flag=unsupported | |
1216 | # Tell ltmain to make .lib files, not .a files. | |
1217 | libext=lib | |
1218 | # FIXME: Setting linknames here is a bad hack. | |
1219 | archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' | |
1220 | # The linker will automatically build a .lib file if we build a DLL. | |
1221 | old_archive_from_new_cmds='true' | |
1222 | # FIXME: Should let the user specify the lib program. | |
1223 | old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' | |
1224 | fix_srcfile_path='`cygpath -w $srcfile`' | |
1225 | ;; | |
1226 | ||
1227 | freebsd1*) | |
1228 | ld_shlibs=no | |
1229 | ;; | |
1230 | ||
1231 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | |
1232 | # support. Future versions do this automatically, but an explicit c++rt0.o | |
1233 | # does not break anything, and helps significantly (at the cost of a little | |
1234 | # extra space). | |
1235 | freebsd2.2*) | |
1236 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | |
1237 | hardcode_libdir_flag_spec='-R$libdir' | |
1238 | hardcode_direct=yes | |
1239 | hardcode_shlibpath_var=no | |
1240 | ;; | |
1241 | ||
1242 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. | |
1243 | freebsd2*) | |
1244 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
1245 | hardcode_direct=yes | |
1246 | hardcode_minus_L=yes | |
1247 | hardcode_shlibpath_var=no | |
1248 | ;; | |
1249 | ||
1250 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | |
1251 | freebsd*) | |
1252 | archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | |
1253 | hardcode_libdir_flag_spec='-R$libdir' | |
1254 | hardcode_direct=yes | |
1255 | hardcode_shlibpath_var=no | |
1256 | ;; | |
1257 | ||
1258 | hpux9* | hpux10* | hpux11*) | |
1259 | case "$host_os" in | |
1260 | hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; | |
1261 | *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; | |
1262 | esac | |
1263 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |
1264 | hardcode_libdir_separator=: | |
1265 | hardcode_direct=yes | |
1266 | hardcode_minus_L=yes # Not in the search PATH, but as the default | |
1267 | # location of the library. | |
1268 | export_dynamic_flag_spec='${wl}-E' | |
1269 | ;; | |
1270 | ||
1271 | irix5* | irix6*) | |
1272 | if test "$with_gcc" = yes; then | |
1273 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
1274 | else | |
1275 | archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | |
1276 | fi | |
1277 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
1278 | hardcode_libdir_separator=: | |
1279 | link_all_deplibs=yes | |
1280 | ;; | |
1281 | ||
1282 | netbsd*) | |
1283 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
1284 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | |
1285 | else | |
1286 | archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | |
1287 | fi | |
1288 | hardcode_libdir_flag_spec='${wl}-R$libdir' | |
1289 | hardcode_direct=yes | |
1290 | hardcode_shlibpath_var=no | |
1291 | ;; | |
1292 | ||
1293 | openbsd*) | |
1294 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
1295 | hardcode_libdir_flag_spec='-R$libdir' | |
1296 | hardcode_direct=yes | |
1297 | hardcode_shlibpath_var=no | |
1298 | ;; | |
1299 | ||
1300 | os2*) | |
1301 | hardcode_libdir_flag_spec='-L$libdir' | |
1302 | hardcode_minus_L=yes | |
1303 | allow_undefined_flag=unsupported | |
1304 | archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' | |
1305 | old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | |
1306 | ;; | |
1307 | ||
1308 | osf3*) | |
1309 | if test "$with_gcc" = yes; then | |
1310 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | |
1311 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
1312 | else | |
1313 | allow_undefined_flag=' -expect_unresolved \*' | |
1314 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | |
1315 | fi | |
1316 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
1317 | hardcode_libdir_separator=: | |
1318 | ;; | |
1319 | ||
1320 | osf4* | osf5*) # as osf3* with the addition of -msym flag | |
1321 | if test "$with_gcc" = yes; then | |
1322 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | |
1323 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
1324 | else | |
1325 | allow_undefined_flag=' -expect_unresolved \*' | |
1326 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | |
1327 | fi | |
1328 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
1329 | hardcode_libdir_separator=: | |
1330 | ;; | |
1331 | ||
1332 | sco3.2v5*) | |
1333 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
1334 | hardcode_shlibpath_var=no | |
1335 | runpath_var=LD_RUN_PATH | |
1336 | hardcode_runpath_var=yes | |
1337 | ;; | |
1338 | ||
1339 | solaris*) | |
1340 | no_undefined_flag=' -z text' | |
1341 | # $CC -shared without GNU ld will not create a library from C++ | |
1342 | # object files and a static libstdc++, better avoid it by now | |
1343 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
1344 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
1345 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | |
1346 | hardcode_libdir_flag_spec='-R$libdir' | |
1347 | hardcode_shlibpath_var=no | |
1348 | case "$host_os" in | |
1349 | solaris2.[0-5] | solaris2.[0-5].*) ;; | |
1350 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) | |
1351 | whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; | |
1352 | esac | |
1353 | link_all_deplibs=yes | |
1354 | ;; | |
1355 | ||
1356 | sunos4*) | |
1357 | archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | |
1358 | hardcode_libdir_flag_spec='-L$libdir' | |
1359 | hardcode_direct=yes | |
1360 | hardcode_minus_L=yes | |
1361 | hardcode_shlibpath_var=no | |
1362 | ;; | |
1363 | ||
1364 | sysv4) | |
1365 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
1366 | runpath_var='LD_RUN_PATH' | |
1367 | hardcode_shlibpath_var=no | |
1368 | hardcode_direct=no #Motorola manual says yes, but my tests say they lie | |
1369 | ;; | |
1370 | ||
1371 | sysv4.3*) | |
1372 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
1373 | hardcode_shlibpath_var=no | |
1374 | export_dynamic_flag_spec='-Bexport' | |
1375 | ;; | |
1376 | ||
1377 | sysv5*) | |
1378 | no_undefined_flag=' -z text' | |
1379 | # $CC -shared without GNU ld will not create a library from C++ | |
1380 | # object files and a static libstdc++, better avoid it by now | |
1381 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
1382 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
1383 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | |
1384 | hardcode_libdir_flag_spec= | |
1385 | hardcode_shlibpath_var=no | |
1386 | runpath_var='LD_RUN_PATH' | |
1387 | ;; | |
1388 | ||
1389 | uts4*) | |
1390 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
1391 | hardcode_libdir_flag_spec='-L$libdir' | |
1392 | hardcode_shlibpath_var=no | |
1393 | ;; | |
1394 | ||
1395 | dgux*) | |
1396 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
1397 | hardcode_libdir_flag_spec='-L$libdir' | |
1398 | hardcode_shlibpath_var=no | |
1399 | ;; | |
1400 | ||
1401 | sysv4*MP*) | |
1402 | if test -d /usr/nec; then | |
1403 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
1404 | hardcode_shlibpath_var=no | |
1405 | runpath_var=LD_RUN_PATH | |
1406 | hardcode_runpath_var=yes | |
1407 | ld_shlibs=yes | |
1408 | fi | |
1409 | ;; | |
1410 | ||
1411 | sysv4.2uw2*) | |
1412 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' | |
1413 | hardcode_direct=yes | |
1414 | hardcode_minus_L=no | |
1415 | hardcode_shlibpath_var=no | |
1416 | hardcode_runpath_var=yes | |
1417 | runpath_var=LD_RUN_PATH | |
1418 | ;; | |
1419 | ||
1420 | unixware7*) | |
1421 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
1422 | runpath_var='LD_RUN_PATH' | |
1423 | hardcode_shlibpath_var=no | |
1424 | ;; | |
1425 | ||
1426 | *) | |
1427 | ld_shlibs=no | |
1428 | ;; | |
1429 | esac | |
1430 | fi | |
1431 | echo "$ac_t$ld_shlibs" 1>&6 | |
1432 | test "$ld_shlibs" = no && can_build_shared=no | |
1433 | ||
1434 | # Check hardcoding attributes. | |
1435 | echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 | |
1436 | hardcode_action= | |
1437 | if test -n "$hardcode_libdir_flag_spec" || \ | |
1438 | test -n "$runpath_var"; then | |
1439 | ||
1440 | # We can hardcode non-existant directories. | |
1441 | if test "$hardcode_direct" != no && | |
1442 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | |
1443 | # have to relink, otherwise we might link with an installed library | |
1444 | # when we should be linking with a yet-to-be-installed one | |
1445 | ## test "$hardcode_shlibpath_var" != no && | |
1446 | test "$hardcode_minus_L" != no; then | |
1447 | # Linking always hardcodes the temporary library directory. | |
1448 | hardcode_action=relink | |
1449 | else | |
1450 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | |
1451 | hardcode_action=immediate | |
1452 | fi | |
1453 | else | |
1454 | # We cannot hardcode anything, or else we can only hardcode existing | |
1455 | # directories. | |
1456 | hardcode_action=unsupported | |
1457 | fi | |
1458 | echo "$ac_t$hardcode_action" 1>&6 | |
1459 | ||
1460 | echo $ac_n "checking whether stripping libraries is possible... $ac_c" 1>&6 | |
1461 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then | |
1462 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | |
1463 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | |
1464 | echo "${ac_t}yes" 1>&6 | |
1465 | else | |
1466 | echo "${ac_t}no" 1>&6 | |
1467 | fi | |
1468 | ||
1469 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
1470 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | |
1471 | ||
1472 | # PORTME Fill in your ld.so characteristics | |
1473 | library_names_spec= | |
1474 | libname_spec='lib$name' | |
1475 | soname_spec= | |
1476 | postinstall_cmds= | |
1477 | postuninstall_cmds= | |
1478 | finish_cmds= | |
1479 | finish_eval= | |
1480 | shlibpath_var= | |
1481 | shlibpath_overrides_runpath=unknown | |
1482 | version_type=none | |
1483 | dynamic_linker="$host_os ld.so" | |
1484 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | |
1485 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | |
1486 | ||
1487 | echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 | |
1488 | case "$host_os" in | |
1489 | aix3*) | |
1490 | version_type=linux | |
1491 | library_names_spec='${libname}${release}.so$versuffix $libname.a' | |
1492 | shlibpath_var=LIBPATH | |
1493 | ||
1494 | # AIX has no versioning support, so we append a major version to the name. | |
1495 | soname_spec='${libname}${release}.so$major' | |
1496 | ;; | |
1497 | ||
1498 | aix4*) | |
1499 | version_type=linux | |
1500 | # AIX has no versioning support, so currently we can not hardcode correct | |
1501 | # soname into executable. Probably we can add versioning support to | |
1502 | # collect2, so additional links can be useful in future. | |
1503 | # We preserve .a as extension for shared libraries though AIX4.2 | |
1504 | # and later linker supports .so | |
1505 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' | |
1506 | shlibpath_var=LIBPATH | |
1507 | ;; | |
1508 | ||
1509 | amigaos*) | |
1510 | library_names_spec='$libname.ixlibrary $libname.a' | |
1511 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | |
1512 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' | |
1513 | ;; | |
1514 | ||
1515 | beos*) | |
1516 | library_names_spec='${libname}.so' | |
1517 | dynamic_linker="$host_os ld.so" | |
1518 | shlibpath_var=LIBRARY_PATH | |
1519 | lt_cv_dlopen="load_add_on" | |
1520 | lt_cv_dlopen_libs= | |
1521 | lt_cv_dlopen_self=yes | |
1522 | ;; | |
1523 | ||
1524 | bsdi4*) | |
1525 | version_type=linux | |
1526 | need_version=no | |
1527 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
1528 | soname_spec='${libname}${release}.so$major' | |
1529 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | |
1530 | shlibpath_var=LD_LIBRARY_PATH | |
1531 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | |
1532 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | |
1533 | export_dynamic_flag_spec=-rdynamic | |
1534 | # the default ld.so.conf also contains /usr/contrib/lib and | |
1535 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | |
1536 | # libtool to hard-code these into programs | |
1537 | ;; | |
1538 | ||
1539 | cygwin* | mingw*) | |
1540 | version_type=windows | |
1541 | need_version=no | |
1542 | need_lib_prefix=no | |
1543 | if test "$with_gcc" = yes; then | |
1544 | library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' | |
1545 | else | |
1546 | library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' | |
1547 | fi | |
1548 | dynamic_linker='Win32 ld.exe' | |
1549 | # FIXME: first we should search . and the directory the executable is in | |
1550 | shlibpath_var=PATH | |
1551 | lt_cv_dlopen="LoadLibrary" | |
1552 | lt_cv_dlopen_libs= | |
1553 | ;; | |
1554 | ||
1555 | freebsd1*) | |
1556 | dynamic_linker=no | |
1557 | ;; | |
1558 | ||
1559 | freebsd*) | |
1560 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` | |
1561 | version_type=freebsd-$objformat | |
1562 | case "$version_type" in | |
1563 | freebsd-elf*) | |
1564 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' | |
1565 | need_version=no | |
1566 | need_lib_prefix=no | |
1567 | ;; | |
1568 | freebsd-*) | |
1569 | library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' | |
1570 | need_version=yes | |
1571 | ;; | |
1572 | esac | |
1573 | shlibpath_var=LD_LIBRARY_PATH | |
1574 | case "$host_os" in | |
1575 | freebsd2*) | |
1576 | shlibpath_overrides_runpath=yes | |
1577 | ;; | |
1578 | freebsd3.[01]* | freebsdelf3.[01]*) | |
1579 | shlibpath_overrides_runpath=yes | |
1580 | hardcode_into_libs=yes | |
1581 | ;; | |
1582 | *) # from 3.2 on | |
1583 | shlibpath_overrides_runpath=no | |
1584 | hardcode_into_libs=yes | |
1585 | ;; | |
1586 | esac | |
1587 | ;; | |
1588 | ||
1589 | gnu*) | |
1590 | version_type=linux | |
1591 | need_lib_prefix=no | |
1592 | need_version=no | |
1593 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' | |
1594 | soname_spec='${libname}${release}.so$major' | |
1595 | shlibpath_var=LD_LIBRARY_PATH | |
1596 | hardcode_into_libs=yes | |
1597 | ;; | |
1598 | ||
1599 | hpux9* | hpux10* | hpux11*) | |
1600 | # Give a soname corresponding to the major version so that dld.sl refuses to | |
1601 | # link against other versions. | |
1602 | dynamic_linker="$host_os dld.sl" | |
1603 | version_type=sunos | |
1604 | need_lib_prefix=no | |
1605 | need_version=no | |
1606 | shlibpath_var=SHLIB_PATH | |
1607 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | |
1608 | library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' | |
1609 | soname_spec='${libname}${release}.sl$major' | |
1610 | # HP-UX runs *really* slowly unless shared libraries are mode 555. | |
1611 | postinstall_cmds='chmod 555 $lib' | |
1612 | ;; | |
1613 | ||
1614 | irix5* | irix6*) | |
1615 | version_type=irix | |
1616 | need_lib_prefix=no | |
1617 | need_version=no | |
1618 | soname_spec='${libname}${release}.so.$major' | |
1619 | library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' | |
1620 | case "$host_os" in | |
1621 | irix5*) | |
1622 | libsuff= shlibsuff= | |
1623 | ;; | |
1624 | *) | |
1625 | case "$LD" in # libtool.m4 will add one of these switches to LD | |
1626 | *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; | |
1627 | *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; | |
1628 | *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; | |
1629 | *) libsuff= shlibsuff= libmagic=never-match;; | |
1630 | esac | |
1631 | ;; | |
1632 | esac | |
1633 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | |
1634 | shlibpath_overrides_runpath=no | |
1635 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | |
1636 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | |
1637 | ;; | |
1638 | ||
1639 | # No shared lib support for Linux oldld, aout, or coff. | |
1640 | linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) | |
1641 | dynamic_linker=no | |
1642 | ;; | |
1643 | ||
1644 | # This must be Linux ELF. | |
1645 | linux-gnu*) | |
1646 | version_type=linux | |
1647 | need_lib_prefix=no | |
1648 | need_version=no | |
1649 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
1650 | soname_spec='${libname}${release}.so$major' | |
1651 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | |
1652 | shlibpath_var=LD_LIBRARY_PATH | |
1653 | shlibpath_overrides_runpath=no | |
1654 | # This implies no fast_install, which is unacceptable. | |
1655 | # Some rework will be needed to allow for fast_install | |
1656 | # before this can be enabled. | |
1657 | hardcode_into_libs=yes | |
1658 | ||
1659 | if test -f /lib/ld.so.1; then | |
1660 | dynamic_linker='GNU ld.so' | |
1661 | else | |
1662 | # Only the GNU ld.so supports shared libraries on MkLinux. | |
1663 | case "$host_cpu" in | |
1664 | powerpc*) dynamic_linker=no ;; | |
1665 | *) dynamic_linker='Linux ld.so' ;; | |
1666 | esac | |
1667 | fi | |
1668 | ;; | |
1669 | ||
1670 | netbsd*) | |
1671 | version_type=sunos | |
1672 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
1673 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
1674 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
1675 | dynamic_linker='NetBSD (a.out) ld.so' | |
1676 | else | |
1677 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' | |
1678 | soname_spec='${libname}${release}.so$major' | |
1679 | dynamic_linker='NetBSD ld.elf_so' | |
1680 | fi | |
1681 | shlibpath_var=LD_LIBRARY_PATH | |
1682 | ;; | |
1683 | ||
1684 | openbsd*) | |
1685 | version_type=sunos | |
1686 | if test "$with_gnu_ld" = yes; then | |
1687 | need_lib_prefix=no | |
1688 | need_version=no | |
1689 | fi | |
1690 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
1691 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
1692 | shlibpath_var=LD_LIBRARY_PATH | |
1693 | ;; | |
1694 | ||
1695 | os2*) | |
1696 | libname_spec='$name' | |
1697 | need_lib_prefix=no | |
1698 | library_names_spec='$libname.dll $libname.a' | |
1699 | dynamic_linker='OS/2 ld.exe' | |
1700 | shlibpath_var=LIBPATH | |
1701 | ;; | |
1702 | ||
1703 | osf3* | osf4* | osf5*) | |
1704 | version_type=osf | |
1705 | need_version=no | |
1706 | soname_spec='${libname}${release}.so' | |
1707 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' | |
1708 | shlibpath_var=LD_LIBRARY_PATH | |
1709 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | |
1710 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | |
1711 | ;; | |
1712 | ||
1713 | sco3.2v5*) | |
1714 | version_type=osf | |
1715 | soname_spec='${libname}${release}.so$major' | |
1716 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
1717 | shlibpath_var=LD_LIBRARY_PATH | |
1718 | ;; | |
1719 | ||
1720 | solaris*) | |
1721 | version_type=linux | |
1722 | need_lib_prefix=no | |
1723 | need_version=no | |
1724 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
1725 | soname_spec='${libname}${release}.so$major' | |
1726 | shlibpath_var=LD_LIBRARY_PATH | |
1727 | shlibpath_overrides_runpath=yes | |
1728 | hardcode_into_libs=yes | |
1729 | # ldd complains unless libraries are executable | |
1730 | postinstall_cmds='chmod +x $lib' | |
1731 | ;; | |
1732 | ||
1733 | sunos4*) | |
1734 | version_type=sunos | |
1735 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
1736 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | |
1737 | shlibpath_var=LD_LIBRARY_PATH | |
1738 | shlibpath_overrides_runpath=yes | |
1739 | if test "$with_gnu_ld" = yes; then | |
1740 | need_lib_prefix=no | |
1741 | fi | |
1742 | need_version=yes | |
1743 | ;; | |
1744 | ||
1745 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
1746 | version_type=linux | |
1747 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
1748 | soname_spec='${libname}${release}.so$major' | |
1749 | shlibpath_var=LD_LIBRARY_PATH | |
1750 | case "$host_vendor" in | |
1751 | motorola) | |
1752 | need_lib_prefix=no | |
1753 | need_version=no | |
1754 | shlibpath_overrides_runpath=no | |
1755 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | |
1756 | ;; | |
1757 | esac | |
1758 | ;; | |
1759 | ||
1760 | uts4*) | |
1761 | version_type=linux | |
1762 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
1763 | soname_spec='${libname}${release}.so$major' | |
1764 | shlibpath_var=LD_LIBRARY_PATH | |
1765 | ;; | |
1766 | ||
1767 | dgux*) | |
1768 | version_type=linux | |
1769 | need_lib_prefix=no | |
1770 | need_version=no | |
1771 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
1772 | soname_spec='${libname}${release}.so$major' | |
1773 | shlibpath_var=LD_LIBRARY_PATH | |
1774 | ;; | |
1775 | ||
1776 | sysv4*MP*) | |
1777 | if test -d /usr/nec ;then | |
1778 | version_type=linux | |
1779 | library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' | |
1780 | soname_spec='$libname.so.$major' | |
1781 | shlibpath_var=LD_LIBRARY_PATH | |
1782 | fi | |
1783 | ;; | |
1784 | ||
1785 | *) | |
1786 | dynamic_linker=no | |
1787 | ;; | |
1788 | esac | |
1789 | echo "$ac_t$dynamic_linker" 1>&6 | |
1790 | test "$dynamic_linker" = no && can_build_shared=no | |
1791 | ||
1792 | # Check for command to grab the raw symbol name followed by C symbol from nm. | |
1793 | echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 | |
1794 | ||
1795 | # These are sane defaults that work on at least a few old systems. | |
1796 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] | |
1797 | ||
1798 | # Character class describing NM global symbol codes. | |
1799 | symcode='[BCDEGRST]' | |
1800 | ||
1801 | # Regexp to match symbols that can be accessed directly from C. | |
1802 | sympat='\([_A-Za-z][_A-Za-z0-9]*\)' | |
1803 | ||
1804 | # Transform the above into a raw symbol and a C symbol. | |
1805 | symxfrm='\1 \2\3 \3' | |
1806 | ||
1807 | # Transform an extracted symbol line into a proper C declaration | |
1808 | global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" | |
1809 | ||
1810 | # Define system-specific variables. | |
1811 | case "$host_os" in | |
1812 | aix*) | |
1813 | symcode='[BCDT]' | |
1814 | ;; | |
1815 | cygwin* | mingw*) | |
1816 | symcode='[ABCDGISTW]' | |
1817 | ;; | |
1818 | hpux*) # Its linker distinguishes data from code symbols | |
1819 | global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" | |
1820 | ;; | |
1821 | irix*) | |
1822 | symcode='[BCDEGRST]' | |
1823 | ;; | |
1824 | solaris* | sysv5*) | |
1825 | symcode='[BDT]' | |
1826 | ;; | |
1827 | sysv4) | |
1828 | symcode='[DFNSTU]' | |
1829 | ;; | |
1830 | esac | |
1831 | ||
1832 | # Handle CRLF in mingw too chain | |
1833 | opt_cr= | |
1834 | case "$host_os" in | |
1835 | mingw*) | |
1836 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp | |
1837 | ;; | |
1838 | esac | |
1839 | ||
1840 | # If we're using GNU nm, then use its standard symbol codes. | |
1841 | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then | |
1842 | symcode='[ABCDGISTW]' | |
1843 | fi | |
1844 | ||
1845 | # Try without a prefix undercore, then with it. | |
1846 | for ac_symprfx in "" "_"; do | |
1847 | ||
1848 | # Write the raw and C identifiers. | |
1849 | global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" | |
1850 | ||
1851 | # Check to see that the pipe works correctly. | |
1852 | pipe_works=no | |
1853 | $rm conftest* | |
1854 | cat > conftest.c <<EOF | |
1855 | #ifdef __cplusplus | |
1856 | extern "C" { | |
1857 | #endif | |
1858 | char nm_test_var; | |
1859 | void nm_test_func(){} | |
1860 | #ifdef __cplusplus | |
1861 | } | |
1862 | #endif | |
1863 | main(){nm_test_var='a';nm_test_func();return(0);} | |
1864 | EOF | |
1865 | ||
1866 | echo "$progname:1867: checking if global_symbol_pipe works" >&5 | |
1867 | if { (eval echo $progname:1868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then | |
1868 | # Now try to grab the symbols. | |
1869 | nlist=conftest.nm | |
1870 | if { echo "$progname:1871: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then | |
1871 | ||
1872 | # Try sorting and uniquifying the output. | |
1873 | if sort "$nlist" | uniq > "$nlist"T; then | |
1874 | mv -f "$nlist"T "$nlist" | |
1875 | else | |
1876 | rm -f "$nlist"T | |
1877 | fi | |
1878 | ||
1879 | # Make sure that we snagged all the symbols we need. | |
1880 | if egrep ' nm_test_var$' "$nlist" >/dev/null; then | |
1881 | if egrep ' nm_test_func$' "$nlist" >/dev/null; then | |
1882 | cat <<EOF > conftest.c | |
1883 | #ifdef __cplusplus | |
1884 | extern "C" { | |
1885 | #endif | |
1886 | ||
1887 | EOF | |
1888 | # Now generate the symbol file. | |
1889 | eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' | |
1890 | ||
1891 | cat <<EOF >> conftest.c | |
1892 | #if defined (__STDC__) && __STDC__ | |
1893 | # define lt_ptr_t void * | |
1894 | #else | |
1895 | # define lt_ptr_t char * | |
1896 | # define const | |
1897 | #endif | |
1898 | ||
1899 | /* The mapping between symbol names and symbols. */ | |
1900 | const struct { | |
1901 | const char *name; | |
1902 | lt_ptr_t address; | |
1903 | } | |
1904 | lt_preloaded_symbols[] = | |
1905 | { | |
1906 | EOF | |
1907 | sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c | |
1908 | cat <<\EOF >> conftest.c | |
1909 | {0, (lt_ptr_t) 0} | |
1910 | }; | |
1911 | ||
1912 | #ifdef __cplusplus | |
1913 | } | |
1914 | #endif | |
1915 | EOF | |
1916 | # Now try linking the two files. | |
1917 | mv conftest.$objext conftstm.$objext | |
1918 | save_LIBS="$LIBS" | |
1919 | save_CFLAGS="$CFLAGS" | |
1920 | LIBS="conftstm.$objext" | |
1921 | CFLAGS="$CFLAGS$no_builtin_flag" | |
1922 | if { (eval echo $progname:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
1923 | pipe_works=yes | |
1924 | else | |
1925 | echo "$progname: failed program was:" >&5 | |
1926 | cat conftest.c >&5 | |
1927 | fi | |
1928 | LIBS="$save_LIBS" | |
1929 | else | |
1930 | echo "cannot find nm_test_func in $nlist" >&5 | |
1931 | fi | |
1932 | else | |
1933 | echo "cannot find nm_test_var in $nlist" >&5 | |
1934 | fi | |
1935 | else | |
1936 | echo "cannot run $global_symbol_pipe" >&5 | |
1937 | fi | |
1938 | else | |
1939 | echo "$progname: failed program was:" >&5 | |
1940 | cat conftest.c >&5 | |
1941 | fi | |
1942 | $rm conftest* conftst* | |
1943 | ||
1944 | # Do not use the global_symbol_pipe unless it works. | |
1945 | if test "$pipe_works" = yes; then | |
1946 | break | |
1947 | else | |
1948 | global_symbol_pipe= | |
1949 | fi | |
1950 | done | |
1951 | if test "$pipe_works" = yes; then | |
1952 | echo "${ac_t}ok" 1>&6 | |
1953 | else | |
1954 | echo "${ac_t}failed" 1>&6 | |
1955 | fi | |
1956 | ||
1957 | if test -z "$global_symbol_pipe"; then | |
1958 | global_symbol_to_cdecl= | |
1959 | fi | |
1960 | ||
1961 | # Report the final consequences. | |
1962 | echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 | |
1963 | ||
1964 | # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in | |
1965 | # configure.in, otherwise build static only libraries. | |
1966 | case "$host_os" in | |
1967 | cygwin* | mingw* | os2*) | |
1968 | if test x$can_build_shared = xyes; then | |
1969 | test x$enable_win32_dll = xno && can_build_shared=no | |
1970 | echo "checking if package supports dlls... $can_build_shared" 1>&6 | |
1971 | fi | |
1972 | ;; | |
1973 | esac | |
1974 | ||
1975 | echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 | |
1976 | test "$can_build_shared" = "no" && enable_shared=no | |
1977 | ||
1978 | # On AIX, shared libraries and static libraries use the same namespace, and | |
1979 | # are all built from PIC. | |
1980 | case "$host_os" in | |
1981 | aix3*) | |
1982 | test "$enable_shared" = yes && enable_static=no | |
1983 | if test -n "$RANLIB"; then | |
1984 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
1985 | postinstall_cmds='$RANLIB $lib' | |
1986 | fi | |
1987 | ;; | |
1988 | ||
1989 | aix4*) | |
1990 | test "$enable_shared" = yes && enable_static=no | |
1991 | ;; | |
1992 | esac | |
1993 | ||
1994 | echo "$ac_t$enable_shared" 1>&6 | |
1995 | ||
1996 | # Make sure either enable_shared or enable_static is yes. | |
1997 | test "$enable_shared" = yes || enable_static=yes | |
1998 | ||
1999 | echo "checking whether to build static libraries... $enable_static" 1>&6 | |
2000 | ||
2001 | if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then | |
2002 | # Fast installation is not supported | |
2003 | enable_fast_install=no | |
2004 | elif test "$shlibpath_overrides_runpath" = yes || | |
2005 | test "$enable_shared" = no; then | |
2006 | # Fast installation is not necessary | |
2007 | enable_fast_install=needless | |
2008 | fi | |
2009 | ||
2010 | # Check whether we must set pic_mode to default | |
2011 | test -z "$pic_flag" && pic_mode=default | |
2012 | # On Cygwin there's no "real" PIC flag so we must build both object types | |
2013 | case "$host_os" in | |
2014 | cygwin* | mingw* | os2*) | |
2015 | pic_mode=default | |
2016 | ;; | |
2017 | esac | |
2018 | if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then | |
2019 | # non-PIC code in shared libraries is not supported | |
2020 | pic_mode=default | |
2021 | fi | |
2022 | ||
2023 | if test "x$enable_dlopen" != xyes; then | |
2024 | enable_dlopen=unknown | |
2025 | enable_dlopen_self=unknown | |
2026 | enable_dlopen_self_static=unknown | |
2027 | else | |
2028 | if test "X${lt_cv_dlopen+set}" != Xset; then | |
2029 | lt_cv_dlopen=no lt_cv_dlopen_libs= | |
2030 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 | |
2031 | echo "$progname:2032: checking for dlopen in -ldl" >&5 | |
2032 | if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then | |
2033 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2034 | else | |
2035 | ac_save_LIBS="$LIBS" | |
2036 | LIBS="-ldl $LIBS" | |
2037 | cat > conftest.$ac_ext <<EOF | |
2038 | #line 2039 "ltconfig" | |
2039 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2040 | /* We use char because int might match the return type of a gcc2 | |
2041 | builtin and then its argument prototype would still apply. */ | |
2042 | #ifdef __cplusplus | |
2043 | extern "C" | |
2044 | #endif | |
2045 | char dlopen(); | |
2046 | ||
2047 | int main() { | |
2048 | dlopen() | |
2049 | ; return 0; } | |
2050 | EOF | |
2051 | if { (eval echo $progname:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
2052 | rm -rf conftest* | |
2053 | ac_cv_lib_dl_dlopen=yes | |
2054 | else | |
2055 | echo "$progname: failed program was:" >&5 | |
2056 | cat conftest.$ac_ext >&5 | |
2057 | rm -rf conftest* | |
2058 | ac_cv_lib_dl_dlopen=no | |
2059 | fi | |
2060 | rm -f conftest* | |
2061 | LIBS="$ac_save_LIBS" | |
2062 | ||
2063 | fi | |
2064 | if test "X$ac_cv_lib_dl_dlopen" = Xyes; then | |
2065 | echo "$ac_t""yes" 1>&6 | |
2066 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" | |
2067 | else | |
2068 | echo "$ac_t""no" 1>&6 | |
2069 | echo $ac_n "checking for dlopen""... $ac_c" 1>&6 | |
2070 | echo "$progname:2071: checking for dlopen" >&5 | |
2071 | if test "X${ac_cv_func_dlopen+set}" = Xset; then | |
2072 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2073 | else | |
2074 | cat > conftest.$ac_ext <<EOF | |
2075 | #line 2076 "ltconfig" | |
2076 | /* System header to define __stub macros and hopefully few prototypes, | |
2077 | which can conflict with char dlopen(); below. */ | |
2078 | #include <assert.h> | |
2079 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2080 | /* We use char because int might match the return type of a gcc2 | |
2081 | builtin and then its argument prototype would still apply. */ | |
2082 | #ifdef __cplusplus | |
2083 | extern "C" | |
2084 | #endif | |
2085 | char dlopen(); | |
2086 | ||
2087 | int main() { | |
2088 | ||
2089 | /* The GNU C library defines this for functions which it implements | |
2090 | to always fail with ENOSYS. Some functions are actually named | |
2091 | something starting with __ and the normal name is an alias. */ | |
2092 | #if defined (__stub_dlopen) || defined (__stub___dlopen) | |
2093 | choke me | |
2094 | #else | |
2095 | dlopen(); | |
2096 | #endif | |
2097 | ||
2098 | ; return 0; } | |
2099 | EOF | |
2100 | if { (eval echo $progname:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
2101 | rm -rf conftest* | |
2102 | ac_cv_func_dlopen=yes | |
2103 | else | |
2104 | echo "$progname: failed program was:" >&5 | |
2105 | cat conftest.$ac_ext >&5 | |
2106 | rm -rf conftest* | |
2107 | ac_cv_func_dlopen=no | |
2108 | fi | |
2109 | rm -f conftest* | |
2110 | fi | |
2111 | if test "X$ac_cv_func_dlopen" = Xyes; then | |
2112 | echo "$ac_t""yes" 1>&6 | |
2113 | lt_cv_dlopen="dlopen" | |
2114 | else | |
2115 | echo "$ac_t""no" 1>&6 | |
2116 | echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 | |
2117 | echo "$progname:2118: checking for dld_link in -ldld" >&5 | |
2118 | if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then | |
2119 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2120 | else | |
2121 | ac_save_LIBS="$LIBS" | |
2122 | LIBS="-ldld $LIBS" | |
2123 | cat > conftest.$ac_ext <<EOF | |
2124 | #line 2125 "ltconfig" | |
2125 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2126 | /* We use char because int might match the return type of a gcc2 | |
2127 | builtin and then its argument prototype would still apply. */ | |
2128 | #ifdef __cplusplus | |
2129 | extern "C" | |
2130 | #endif | |
2131 | char dld_link(); | |
2132 | ||
2133 | int main() { | |
2134 | dld_link() | |
2135 | ; return 0; } | |
2136 | EOF | |
2137 | if { (eval echo $progname:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
2138 | rm -rf conftest* | |
2139 | ac_cv_lib_dld_dld_link=yes | |
2140 | else | |
2141 | echo "$progname: failed program was:" >&5 | |
2142 | cat conftest.$ac_ext >&5 | |
2143 | rm -rf conftest* | |
2144 | ac_cv_lib_dld_dld_link=no | |
2145 | fi | |
2146 | rm -f conftest* | |
2147 | LIBS="$ac_save_LIBS" | |
2148 | ||
2149 | fi | |
2150 | if test "X$ac_cv_lib_dld_dld_link" = Xyes; then | |
2151 | echo "$ac_t""yes" 1>&6 | |
2152 | lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" | |
2153 | else | |
2154 | echo "$ac_t""no" 1>&6 | |
2155 | echo $ac_n "checking for shl_load""... $ac_c" 1>&6 | |
2156 | echo "$progname:2157: checking for shl_load" >&5 | |
2157 | if test "X${ac_cv_func_shl_load+set}" = Xset; then | |
2158 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2159 | else | |
2160 | cat > conftest.$ac_ext <<EOF | |
2161 | #line 2162 "ltconfig" | |
2162 | /* System header to define __stub macros and hopefully few prototypes, | |
2163 | which can conflict with char shl_load(); below. */ | |
2164 | #include <assert.h> | |
2165 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2166 | /* We use char because int might match the return type of a gcc2 | |
2167 | builtin and then its argument prototype would still apply. */ | |
2168 | #ifdef __cplusplus | |
2169 | extern "C" | |
2170 | #endif | |
2171 | char shl_load(); | |
2172 | ||
2173 | int main() { | |
2174 | ||
2175 | /* The GNU C library defines this for functions which it implements | |
2176 | to always fail with ENOSYS. Some functions are actually named | |
2177 | something starting with __ and the normal name is an alias. */ | |
2178 | #if defined (__stub_shl_load) || defined (__stub___shl_load) | |
2179 | choke me | |
2180 | #else | |
2181 | shl_load(); | |
2182 | #endif | |
2183 | ||
2184 | ; return 0; } | |
2185 | EOF | |
2186 | if { (eval echo $progname:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
2187 | rm -rf conftest* | |
2188 | ac_cv_func_shl_load=yes | |
2189 | else | |
2190 | echo "$progname: failed program was:" >&5 | |
2191 | cat conftest.$ac_ext >&5 | |
2192 | rm -rf conftest* | |
2193 | ac_cv_func_shl_load=no | |
2194 | fi | |
2195 | rm -f conftest* | |
2196 | fi | |
2197 | ||
2198 | if test "X$ac_cv_func_shl_load" = Xyes; then | |
2199 | echo "$ac_t""yes" 1>&6 | |
2200 | lt_cv_dlopen="shl_load" | |
2201 | else | |
2202 | echo "$ac_t""no" 1>&6 | |
2203 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 | |
2204 | echo "$progname:2205: checking for shl_load in -ldld" >&5 | |
2205 | if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then | |
2206 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2207 | else | |
2208 | ac_save_LIBS="$LIBS" | |
2209 | LIBS="-ldld $LIBS" | |
2210 | cat > conftest.$ac_ext <<EOF | |
2211 | #line 2212 "ltconfig" | |
2212 | #include "confdefs.h" | |
2213 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2214 | /* We use char because int might match the return type of a gcc2 | |
2215 | builtin and then its argument prototype would still apply. */ | |
2216 | #ifdef __cplusplus | |
2217 | extern "C" | |
2218 | #endif | |
2219 | char shl_load(); | |
2220 | ||
2221 | int main() { | |
2222 | shl_load() | |
2223 | ; return 0; } | |
2224 | EOF | |
2225 | if { (eval echo $progname:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
2226 | rm -rf conftest* | |
2227 | ac_cv_lib_dld_shl_load=yes | |
2228 | else | |
2229 | echo "$progname: failed program was:" >&5 | |
2230 | cat conftest.$ac_ext >&5 | |
2231 | rm -rf conftest* | |
2232 | ac_cv_lib_dld_shl_load=no | |
2233 | fi | |
2234 | rm -f conftest* | |
2235 | LIBS="$ac_save_LIBS" | |
2236 | ||
2237 | fi | |
2238 | if test "X$ac_cv_lib_dld_shl_load" = Xyes; then | |
2239 | echo "$ac_t""yes" 1>&6 | |
2240 | lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" | |
2241 | else | |
2242 | echo "$ac_t""no" 1>&6 | |
2243 | fi | |
2244 | ||
2245 | ||
2246 | fi | |
2247 | ||
2248 | ||
2249 | fi | |
2250 | ||
2251 | ||
2252 | fi | |
2253 | ||
2254 | ||
2255 | fi | |
2256 | ||
2257 | fi | |
2258 | ||
2259 | if test "x$lt_cv_dlopen" != xno; then | |
2260 | enable_dlopen=yes | |
2261 | fi | |
2262 | ||
2263 | case "$lt_cv_dlopen" in | |
2264 | dlopen) | |
2265 | for ac_hdr in dlfcn.h; do | |
2266 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
2267 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
2268 | echo "$progname:2269: checking for $ac_hdr" >&5 | |
2269 | if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then | |
2270 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2271 | else | |
2272 | cat > conftest.$ac_ext <<EOF | |
2273 | #line 2274 "ltconfig" | |
2274 | #include <$ac_hdr> | |
2275 | int fnord = 0; | |
2276 | EOF | |
2277 | ac_try="$ac_compile >/dev/null 2>conftest.out" | |
2278 | { (eval echo $progname:2279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
2279 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
2280 | if test -z "$ac_err"; then | |
2281 | rm -rf conftest* | |
2282 | eval "ac_cv_header_$ac_safe=yes" | |
2283 | else | |
2284 | echo "$ac_err" >&5 | |
2285 | echo "$progname: failed program was:" >&5 | |
2286 | cat conftest.$ac_ext >&5 | |
2287 | rm -rf conftest* | |
2288 | eval "ac_cv_header_$ac_safe=no" | |
2289 | fi | |
2290 | rm -f conftest* | |
2291 | fi | |
2292 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2293 | echo "$ac_t""yes" 1>&6 | |
2294 | else | |
2295 | echo "$ac_t""no" 1>&6 | |
2296 | fi | |
2297 | done | |
2298 | ||
2299 | if test "x$ac_cv_header_dlfcn_h" = xyes; then | |
2300 | CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | |
2301 | fi | |
2302 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | |
2303 | LIBS="$lt_cv_dlopen_libs $LIBS" | |
2304 | ||
2305 | echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 | |
2306 | echo "$progname:2307: checking whether a program can dlopen itself" >&5 | |
2307 | if test "X${lt_cv_dlopen_self+set}" = Xset; then | |
2308 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2309 | else | |
2310 | if test "$cross_compiling" = yes; then | |
2311 | lt_cv_dlopen_self=cross | |
2312 | else | |
2313 | cat > conftest.c <<EOF | |
2314 | #line 2315 "ltconfig" | |
2315 | ||
2316 | #if HAVE_DLFCN_H | |
2317 | #include <dlfcn.h> | |
2318 | #endif | |
2319 | ||
2320 | #include <stdio.h> | |
2321 | ||
2322 | #ifdef RTLD_GLOBAL | |
2323 | # define LTDL_GLOBAL RTLD_GLOBAL | |
2324 | #else | |
2325 | # ifdef DL_GLOBAL | |
2326 | # define LTDL_GLOBAL DL_GLOBAL | |
2327 | # else | |
2328 | # define LTDL_GLOBAL 0 | |
2329 | # endif | |
2330 | #endif | |
2331 | ||
2332 | /* We may have to define LTDL_LAZY_OR_NOW in the command line if we | |
2333 | find out it does not work in some platform. */ | |
2334 | #ifndef LTDL_LAZY_OR_NOW | |
2335 | # ifdef RTLD_LAZY | |
2336 | # define LTDL_LAZY_OR_NOW RTLD_LAZY | |
2337 | # else | |
2338 | # ifdef DL_LAZY | |
2339 | # define LTDL_LAZY_OR_NOW DL_LAZY | |
2340 | # else | |
2341 | # ifdef RTLD_NOW | |
2342 | # define LTDL_LAZY_OR_NOW RTLD_NOW | |
2343 | # else | |
2344 | # ifdef DL_NOW | |
2345 | # define LTDL_LAZY_OR_NOW DL_NOW | |
2346 | # else | |
2347 | # define LTDL_LAZY_OR_NOW 0 | |
2348 | # endif | |
2349 | # endif | |
2350 | # endif | |
2351 | # endif | |
2352 | #endif | |
2353 | ||
2354 | fnord() { int i=42;} | |
2355 | main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); | |
2356 | if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); | |
2357 | if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } | |
2358 | ||
2359 | EOF | |
2360 | if { (eval echo $progname:2361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null | |
2361 | then | |
2362 | lt_cv_dlopen_self=yes | |
2363 | else | |
2364 | echo "$progname: failed program was:" >&5 | |
2365 | cat conftest.$ac_ext >&5 | |
2366 | rm -fr conftest* | |
2367 | lt_cv_dlopen_self=no | |
2368 | fi | |
2369 | rm -fr conftest* | |
2370 | fi | |
2371 | ||
2372 | fi | |
2373 | ||
2374 | echo "$ac_t""$lt_cv_dlopen_self" 1>&6 | |
2375 | ||
2376 | if test "$lt_cv_dlopen_self" = yes; then | |
2377 | LDFLAGS="$LDFLAGS $link_static_flag" | |
2378 | echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 | |
2379 | echo "$progname:2380: checking whether a statically linked program can dlopen itself" >&5 | |
2380 | if test "X${lt_cv_dlopen_self_static+set}" = Xset; then | |
2381 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2382 | else | |
2383 | if test "$cross_compiling" = yes; then | |
2384 | lt_cv_dlopen_self_static=cross | |
2385 | else | |
2386 | cat > conftest.c <<EOF | |
2387 | #line 2388 "ltconfig" | |
2388 | ||
2389 | #if HAVE_DLFCN_H | |
2390 | #include <dlfcn.h> | |
2391 | #endif | |
2392 | ||
2393 | #include <stdio.h> | |
2394 | ||
2395 | #ifdef RTLD_GLOBAL | |
2396 | # define LTDL_GLOBAL RTLD_GLOBAL | |
2397 | #else | |
2398 | # ifdef DL_GLOBAL | |
2399 | # define LTDL_GLOBAL DL_GLOBAL | |
2400 | # else | |
2401 | # define LTDL_GLOBAL 0 | |
2402 | # endif | |
2403 | #endif | |
2404 | ||
2405 | /* We may have to define LTDL_LAZY_OR_NOW in the command line if we | |
2406 | find out it does not work in some platform. */ | |
2407 | #ifndef LTDL_LAZY_OR_NOW | |
2408 | # ifdef RTLD_LAZY | |
2409 | # define LTDL_LAZY_OR_NOW RTLD_LAZY | |
2410 | # else | |
2411 | # ifdef DL_LAZY | |
2412 | # define LTDL_LAZY_OR_NOW DL_LAZY | |
2413 | # else | |
2414 | # ifdef RTLD_NOW | |
2415 | # define LTDL_LAZY_OR_NOW RTLD_NOW | |
2416 | # else | |
2417 | # ifdef DL_NOW | |
2418 | # define LTDL_LAZY_OR_NOW DL_NOW | |
2419 | # else | |
2420 | # define LTDL_LAZY_OR_NOW 0 | |
2421 | # endif | |
2422 | # endif | |
2423 | # endif | |
2424 | # endif | |
2425 | #endif | |
2426 | ||
2427 | fnord() { int i=42;} | |
2428 | main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); | |
2429 | if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); | |
2430 | if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } | |
2431 | ||
2432 | EOF | |
2433 | if { (eval echo $progname:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null | |
2434 | then | |
2435 | lt_cv_dlopen_self_static=yes | |
2436 | else | |
2437 | echo "$progname: failed program was:" >&5 | |
2438 | cat conftest.$ac_ext >&5 | |
2439 | rm -fr conftest* | |
2440 | lt_cv_dlopen_self_static=no | |
2441 | fi | |
2442 | rm -fr conftest* | |
2443 | fi | |
2444 | ||
2445 | fi | |
2446 | ||
2447 | echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 | |
2448 | fi | |
2449 | ;; | |
2450 | esac | |
2451 | ||
2452 | case "$lt_cv_dlopen_self" in | |
2453 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | |
2454 | *) enable_dlopen_self=unknown ;; | |
2455 | esac | |
2456 | ||
2457 | case "$lt_cv_dlopen_self_static" in | |
2458 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | |
2459 | *) enable_dlopen_self_static=unknown ;; | |
2460 | esac | |
2461 | fi | |
2462 | ||
2463 | # Copy echo and quote the copy, instead of the original, because it is | |
2464 | # used later. | |
2465 | ltecho="$echo" | |
2466 | if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then | |
2467 | ltecho="$CONFIG_SHELL \$0 --fallback-echo" | |
2468 | fi | |
2469 | LTSHELL="$SHELL" | |
2470 | ||
2471 | LTCONFIG_VERSION="$VERSION" | |
2472 | ||
2473 | # Only quote variables if we're using ltmain.sh. | |
2474 | case "$ltmain" in | |
2475 | *.sh) | |
2476 | # Now quote all the things that may contain metacharacters. | |
2477 | for var in ltecho old_AR old_CC old_CFLAGS old_CPPFLAGS \ | |
2478 | old_MAGIC old_LD old_LDFLAGS old_LIBS \ | |
2479 | old_LN_S old_NM old_RANLIB old_STRIP \ | |
2480 | old_AS old_DLLTOOL old_OBJDUMP \ | |
2481 | old_OBJEXT old_EXEEXT old_reload_flag \ | |
2482 | old_deplibs_check_method old_file_magic_cmd \ | |
2483 | AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ | |
2484 | reload_flag reload_cmds wl \ | |
2485 | pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ | |
2486 | thread_safe_flag_spec whole_archive_flag_spec libname_spec \ | |
2487 | library_names_spec soname_spec \ | |
2488 | RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ | |
2489 | old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ | |
2490 | postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ | |
2491 | old_striplib striplib file_magic_cmd export_symbols_cmds \ | |
2492 | deplibs_check_method allow_undefined_flag no_undefined_flag \ | |
2493 | finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ | |
2494 | hardcode_libdir_flag_spec hardcode_libdir_separator \ | |
2495 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ | |
2496 | compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do | |
2497 | ||
2498 | case "$var" in | |
2499 | reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ | |
2500 | old_postinstall_cmds | old_postuninstall_cmds | \ | |
2501 | export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ | |
2502 | extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ | |
2503 | postinstall_cmds | postuninstall_cmds | \ | |
2504 | finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) | |
2505 | # Double-quote double-evaled strings. | |
2506 | eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ### testsuite: skip nested quoting test | |
2507 | ;; | |
2508 | *) | |
2509 | eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test | |
2510 | ;; | |
2511 | esac | |
2512 | done | |
2513 | ||
2514 | case "$ltecho" in | |
2515 | *'\$0 --fallback-echo"') | |
2516 | ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` | |
2517 | ;; | |
2518 | esac | |
2519 | ||
2520 | trap "$rm \"$ofile\"; exit 1" 1 2 15 | |
2521 | echo "creating $ofile" | |
2522 | $rm "$ofile" | |
2523 | cat <<EOF > "$ofile" | |
2524 | #! $SHELL | |
2525 | ||
2526 | # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. | |
2527 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) | |
2528 | # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. | |
2529 | # | |
2530 | # Copyright (C) 1996-2000 Free Software Foundation, Inc. | |
2531 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |
2532 | # | |
2533 | # This program is free software; you can redistribute it and/or modify | |
2534 | # it under the terms of the GNU General Public License as published by | |
2535 | # the Free Software Foundation; either version 2 of the License, or | |
2536 | # (at your option) any later version. | |
2537 | # | |
2538 | # This program is distributed in the hope that it will be useful, but | |
2539 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
2540 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
2541 | # General Public License for more details. | |
2542 | # | |
2543 | # You should have received a copy of the GNU General Public License | |
2544 | # along with this program; if not, write to the Free Software | |
2545 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
2546 | # | |
2547 | # As a special exception to the GNU General Public License, if you | |
2548 | # distribute this file as part of a program that contains a | |
2549 | # configuration script generated by Autoconf, you may include it under | |
2550 | # the same distribution terms that you use for the rest of that program. | |
2551 | ||
2552 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. | |
2553 | Xsed="sed -e s/^X//" | |
2554 | ||
2555 | # The HP-UX ksh and POSIX shell print the target directory to stdout | |
2556 | # if CDPATH is set. | |
2557 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | |
2558 | ||
2559 | ### BEGIN LIBTOOL CONFIG | |
2560 | EOF | |
2561 | cfgfile="$ofile" | |
2562 | ;; | |
2563 | ||
2564 | *) | |
2565 | # Double-quote the variables that need it (for aesthetics). | |
2566 | for var in old_AR old_CC old_CFLAGS old_CPPFLAGS \ | |
2567 | old_MAGIC old_LD old_LDFLAGS old_LIBS \ | |
2568 | old_LN_S old_NM old_RANLIB old_STRIP \ | |
2569 | old_AS old_DLLTOOL old_OBJDUMP \ | |
2570 | old_OBJEXT old_EXEEXT old_reload_flag \ | |
2571 | old_deplibs_check_method old_file_magic_cmd; do | |
2572 | eval "$var=\\\"\$var\\\"" | |
2573 | done | |
2574 | ||
2575 | # Just create a config file. | |
2576 | cfgfile="$ofile.cfg" | |
2577 | trap "$rm \"$cfgfile\"; exit 1" 1 2 15 | |
2578 | echo "creating $cfgfile" | |
2579 | $rm "$cfgfile" | |
2580 | cat <<EOF > "$cfgfile" | |
2581 | # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. | |
2582 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) | |
2583 | EOF | |
2584 | ;; | |
2585 | esac | |
2586 | ||
2587 | cat <<EOF >> "$cfgfile" | |
2588 | # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
2589 | # | |
2590 | # AR=$old_AR CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ | |
2591 | # MAGIC=$old_MAGIC LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ | |
2592 | # LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\ | |
2593 | # AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\ | |
2594 | # objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\ | |
2595 | # deplibs_check_method=$old_deplibs_check_method file_magic_cmd=$old_file_magic_cmd \\ | |
2596 | # $0$ltconfig_args | |
2597 | # | |
2598 | # Compiler and other test output produced by $progname, useful for | |
2599 | # debugging $progname, is in ./config.log if it exists. | |
2600 | # The version of $progname that generated this script. | |
2601 | LTCONFIG_VERSION=$LTCONFIG_VERSION | |
2602 | ||
2603 | # Shell to use when invoking shell scripts. | |
2604 | SHELL=$LTSHELL | |
2605 | ||
2606 | # Whether or not to build shared libraries. | |
2607 | build_libtool_libs=$enable_shared | |
2608 | ||
2609 | # Whether or not to build static libraries. | |
2610 | build_old_libs=$enable_static | |
2611 | ||
2612 | # Whether or not to optimize for fast installation. | |
2613 | fast_install=$enable_fast_install | |
2614 | ||
2615 | # The host system. | |
2616 | host_alias=$host_alias | |
2617 | host=$host | |
2618 | ||
2619 | # An echo program that does not interpret backslashes. | |
2620 | echo=$ltecho | |
2621 | ||
2622 | # The archiver. | |
2623 | AR=$AR | |
2624 | ||
2625 | # The default C compiler. | |
2626 | CC=$CC | |
2627 | ||
2628 | # The linker used to build libraries. | |
2629 | LD=$LD | |
2630 | ||
2631 | # Whether we need hard or soft links. | |
2632 | LN_S=$LN_S | |
2633 | ||
2634 | # A BSD-compatible nm program. | |
2635 | NM=$NM | |
2636 | ||
2637 | # A symbol stripping program | |
2638 | STRIP=$STRIP | |
2639 | ||
2640 | # Used to examine libraries when file_magic_cmd begins "file" | |
2641 | MAGIC=$MAGIC | |
2642 | ||
2643 | # Used on cygwin: DLL creation program. | |
2644 | DLLTOOL="$DLLTOOL" | |
2645 | ||
2646 | # Used on cygwin: object dumper. | |
2647 | OBJDUMP="$OBJDUMP" | |
2648 | ||
2649 | # Used on cygwin: assembler. | |
2650 | AS="$AS" | |
2651 | ||
2652 | # The name of the directory that contains temporary libtool files. | |
2653 | objdir=$objdir | |
2654 | ||
2655 | # How to create reloadable object files. | |
2656 | reload_flag=$reload_flag | |
2657 | reload_cmds=$reload_cmds | |
2658 | ||
2659 | # How to pass a linker flag through the compiler. | |
2660 | wl=$wl | |
2661 | ||
2662 | # Object file suffix (normally "o"). | |
2663 | objext="$objext" | |
2664 | ||
2665 | # Old archive suffix (normally "a"). | |
2666 | libext="$libext" | |
2667 | ||
2668 | # Executable file suffix (normally ""). | |
2669 | exeext="$exeext" | |
2670 | ||
2671 | # Additional compiler flags for building library objects. | |
2672 | pic_flag=$pic_flag | |
2673 | pic_mode=$pic_mode | |
2674 | ||
2675 | # Does compiler simultaneously support -c and -o options? | |
2676 | compiler_c_o=$compiler_c_o | |
2677 | ||
2678 | # Can we write directly to a .lo ? | |
2679 | compiler_o_lo=$compiler_o_lo | |
2680 | ||
2681 | # Must we lock files when doing compilation ? | |
2682 | need_locks=$need_locks | |
2683 | ||
2684 | # Do we need the lib prefix for modules? | |
2685 | need_lib_prefix=$need_lib_prefix | |
2686 | ||
2687 | # Do we need a version for libraries? | |
2688 | need_version=$need_version | |
2689 | ||
2690 | # Whether dlopen is supported. | |
2691 | dlopen_support=$enable_dlopen | |
2692 | ||
2693 | # Whether dlopen of programs is supported. | |
2694 | dlopen_self=$enable_dlopen_self | |
2695 | ||
2696 | # Whether dlopen of statically linked programs is supported. | |
2697 | dlopen_self_static=$enable_dlopen_self_static | |
2698 | ||
2699 | # Compiler flag to prevent dynamic linking. | |
2700 | link_static_flag=$link_static_flag | |
2701 | ||
2702 | # Compiler flag to turn off builtin functions. | |
2703 | no_builtin_flag=$no_builtin_flag | |
2704 | ||
2705 | # Compiler flag to allow reflexive dlopens. | |
2706 | export_dynamic_flag_spec=$export_dynamic_flag_spec | |
2707 | ||
2708 | # Compiler flag to generate shared objects directly from archives. | |
2709 | whole_archive_flag_spec=$whole_archive_flag_spec | |
2710 | ||
2711 | # Compiler flag to generate thread-safe objects. | |
2712 | thread_safe_flag_spec=$thread_safe_flag_spec | |
2713 | ||
2714 | # Library versioning type. | |
2715 | version_type=$version_type | |
2716 | ||
2717 | # Format of library name prefix. | |
2718 | libname_spec=$libname_spec | |
2719 | ||
2720 | # List of archive names. First name is the real one, the rest are links. | |
2721 | # The last name is the one that the linker finds with -lNAME. | |
2722 | library_names_spec=$library_names_spec | |
2723 | ||
2724 | # The coded name of the library, if different from the real name. | |
2725 | soname_spec=$soname_spec | |
2726 | ||
2727 | # Commands used to build and install an old-style archive. | |
2728 | RANLIB=$RANLIB | |
2729 | old_archive_cmds=$old_archive_cmds | |
2730 | old_postinstall_cmds=$old_postinstall_cmds | |
2731 | old_postuninstall_cmds=$old_postuninstall_cmds | |
2732 | ||
2733 | # Create an old-style archive from a shared archive. | |
2734 | old_archive_from_new_cmds=$old_archive_from_new_cmds | |
2735 | ||
2736 | # Create a temporary old-style archive to link instead of a shared archive. | |
2737 | old_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds | |
2738 | ||
2739 | # Commands used to build and install a shared archive. | |
2740 | archive_cmds=$archive_cmds | |
2741 | archive_expsym_cmds=$archive_expsym_cmds | |
2742 | postinstall_cmds=$postinstall_cmds | |
2743 | postuninstall_cmds=$postuninstall_cmds | |
2744 | ||
2745 | # Commands to strip libraries. | |
2746 | old_striplib=$old_striplib | |
2747 | striplib=$striplib | |
2748 | ||
2749 | # Method to check whether dependent libraries are shared objects. | |
2750 | deplibs_check_method=$deplibs_check_method | |
2751 | ||
2752 | # Command to use when deplibs_check_method == file_magic. | |
2753 | file_magic_cmd=$file_magic_cmd | |
2754 | ||
2755 | # Flag that allows shared libraries with undefined symbols to be built. | |
2756 | allow_undefined_flag=$allow_undefined_flag | |
2757 | ||
2758 | # Flag that forces no undefined symbols. | |
2759 | no_undefined_flag=$no_undefined_flag | |
2760 | ||
2761 | # Commands used to finish a libtool library installation in a directory. | |
2762 | finish_cmds=$finish_cmds | |
2763 | ||
2764 | # Same as above, but a single script fragment to be evaled but not shown. | |
2765 | finish_eval=$finish_eval | |
2766 | ||
2767 | # Take the output of nm and produce a listing of raw symbols and C names. | |
2768 | global_symbol_pipe=$global_symbol_pipe | |
2769 | ||
2770 | # Transform the output of nm in a proper C declaration | |
2771 | global_symbol_to_cdecl=$global_symbol_to_cdecl | |
2772 | ||
2773 | # This is the shared library runtime path variable. | |
2774 | runpath_var=$runpath_var | |
2775 | ||
2776 | # This is the shared library path variable. | |
2777 | shlibpath_var=$shlibpath_var | |
2778 | ||
2779 | # Is shlibpath searched before the hard-coded library search path? | |
2780 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath | |
2781 | ||
2782 | # How to hardcode a shared library path into an executable. | |
2783 | hardcode_action=$hardcode_action | |
2784 | ||
2785 | # Whether we should hardcode library paths into libraries. | |
2786 | hardcode_into_libs=$hardcode_into_libs | |
2787 | ||
2788 | # Flag to hardcode \$libdir into a binary during linking. | |
2789 | # This must work even if \$libdir does not exist. | |
2790 | hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec | |
2791 | ||
2792 | # Whether we need a single -rpath flag with a separated argument. | |
2793 | hardcode_libdir_separator=$hardcode_libdir_separator | |
2794 | ||
2795 | # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the | |
2796 | # resulting binary. | |
2797 | hardcode_direct=$hardcode_direct | |
2798 | ||
2799 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the | |
2800 | # resulting binary. | |
2801 | hardcode_minus_L=$hardcode_minus_L | |
2802 | ||
2803 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | |
2804 | # the resulting binary. | |
2805 | hardcode_shlibpath_var=$hardcode_shlibpath_var | |
2806 | ||
2807 | # Whether libtool must link a program against all its dependency libraries. | |
2808 | link_all_deplibs=$link_all_deplibs | |
2809 | ||
2810 | # Compile-time system search path for libraries | |
2811 | sys_lib_search_path_spec=$sys_lib_search_path_spec | |
2812 | ||
2813 | # Run-time system search path for libraries | |
2814 | sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec | |
2815 | ||
2816 | # Fix the shell variable \$srcfile for the compiler. | |
2817 | fix_srcfile_path="$fix_srcfile_path" | |
2818 | ||
2819 | # Set to yes if exported symbols are required. | |
2820 | always_export_symbols=$always_export_symbols | |
2821 | ||
2822 | # The commands to list exported symbols. | |
2823 | export_symbols_cmds=$export_symbols_cmds | |
2824 | ||
2825 | # The commands to extract the exported symbol list from a shared archive. | |
2826 | extract_expsyms_cmds=$extract_expsyms_cmds | |
2827 | ||
2828 | # Symbols that should not be listed in the preloaded symbols. | |
2829 | exclude_expsyms=$exclude_expsyms | |
2830 | ||
2831 | # Symbols that must always be exported. | |
2832 | include_expsyms=$include_expsyms | |
2833 | ||
2834 | EOF | |
2835 | ||
2836 | case "$ltmain" in | |
2837 | *.sh) | |
2838 | echo '### END LIBTOOL CONFIG' >> "$ofile" | |
2839 | echo >> "$ofile" | |
2840 | case "$host_os" in | |
2841 | aix3*) | |
2842 | cat <<\EOF >> "$ofile" | |
2843 | ||
2844 | # AIX sometimes has problems with the GCC collect2 program. For some | |
2845 | # reason, if we set the COLLECT_NAMES environment variable, the problems | |
2846 | # vanish in a puff of smoke. | |
2847 | if test "X${COLLECT_NAMES+set}" != Xset; then | |
2848 | COLLECT_NAMES= | |
2849 | export COLLECT_NAMES | |
2850 | fi | |
2851 | EOF | |
2852 | ;; | |
2853 | esac | |
2854 | case "$host" in | |
2855 | *-*-cygwin* | *-*-mingw* | *-*-os2*) | |
2856 | cat <<'EOF' >> "$ofile" | |
2857 | # This is a source program that is used to create dlls on Windows | |
2858 | # Don't remove nor modify the starting and closing comments | |
2859 | # /* ltdll.c starts here */ | |
2860 | # #define WIN32_LEAN_AND_MEAN | |
2861 | # #include <windows.h> | |
2862 | # #undef WIN32_LEAN_AND_MEAN | |
2863 | # #include <stdio.h> | |
2864 | # | |
2865 | # #ifndef __CYGWIN__ | |
2866 | # # ifdef __CYGWIN32__ | |
2867 | # # define __CYGWIN__ __CYGWIN32__ | |
2868 | # # endif | |
2869 | # #endif | |
2870 | # | |
2871 | # #ifdef __cplusplus | |
2872 | # extern "C" { | |
2873 | # #endif | |
2874 | # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); | |
2875 | # #ifdef __cplusplus | |
2876 | # } | |
2877 | # #endif | |
2878 | # | |
2879 | # #ifdef __CYGWIN__ | |
2880 | # #include <cygwin/cygwin_dll.h> | |
2881 | # DECLARE_CYGWIN_DLL( DllMain ); | |
2882 | # #endif | |
2883 | # HINSTANCE __hDllInstance_base; | |
2884 | # | |
2885 | # BOOL APIENTRY | |
2886 | # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) | |
2887 | # { | |
2888 | # __hDllInstance_base = hInst; | |
2889 | # return TRUE; | |
2890 | # } | |
2891 | # /* ltdll.c ends here */ | |
2892 | # This is a source program that is used to create import libraries | |
2893 | # on Windows for dlls which lack them. Don't remove nor modify the | |
2894 | # starting and closing comments | |
2895 | # /* impgen.c starts here */ | |
2896 | # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. | |
2897 | # | |
2898 | # This file is part of GNU libtool. | |
2899 | # | |
2900 | # This program is free software; you can redistribute it and/or modify | |
2901 | # it under the terms of the GNU General Public License as published by | |
2902 | # the Free Software Foundation; either version 2 of the License, or | |
2903 | # (at your option) any later version. | |
2904 | # | |
2905 | # This program is distributed in the hope that it will be useful, | |
2906 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
2907 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
2908 | # GNU General Public License for more details. | |
2909 | # | |
2910 | # You should have received a copy of the GNU General Public License | |
2911 | # along with this program; if not, write to the Free Software | |
2912 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
2913 | # */ | |
2914 | # | |
2915 | # #include <stdio.h> /* for printf() */ | |
2916 | # #include <unistd.h> /* for open(), lseek(), read() */ | |
2917 | # #include <fcntl.h> /* for O_RDONLY, O_BINARY */ | |
2918 | # #include <string.h> /* for strdup() */ | |
2919 | # | |
2920 | # /* O_BINARY isn't required (or even defined sometimes) under Unix */ | |
2921 | # #ifndef O_BINARY | |
2922 | # #define O_BINARY 0 | |
2923 | # #endif | |
2924 | # | |
2925 | # static unsigned int | |
2926 | # pe_get16 (fd, offset) | |
2927 | # int fd; | |
2928 | # int offset; | |
2929 | # { | |
2930 | # unsigned char b[2]; | |
2931 | # lseek (fd, offset, SEEK_SET); | |
2932 | # read (fd, b, 2); | |
2933 | # return b[0] + (b[1]<<8); | |
2934 | # } | |
2935 | # | |
2936 | # static unsigned int | |
2937 | # pe_get32 (fd, offset) | |
2938 | # int fd; | |
2939 | # int offset; | |
2940 | # { | |
2941 | # unsigned char b[4]; | |
2942 | # lseek (fd, offset, SEEK_SET); | |
2943 | # read (fd, b, 4); | |
2944 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); | |
2945 | # } | |
2946 | # | |
2947 | # static unsigned int | |
2948 | # pe_as32 (ptr) | |
2949 | # void *ptr; | |
2950 | # { | |
2951 | # unsigned char *b = ptr; | |
2952 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); | |
2953 | # } | |
2954 | # | |
2955 | # int | |
2956 | # main (argc, argv) | |
2957 | # int argc; | |
2958 | # char *argv[]; | |
2959 | # { | |
2960 | # int dll; | |
2961 | # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; | |
2962 | # unsigned long export_rva, export_size, nsections, secptr, expptr; | |
2963 | # unsigned long name_rvas, nexp; | |
2964 | # unsigned char *expdata, *erva; | |
2965 | # char *filename, *dll_name; | |
2966 | # | |
2967 | # filename = argv[1]; | |
2968 | # | |
2969 | # dll = open(filename, O_RDONLY|O_BINARY); | |
2970 | # if (!dll) | |
2971 | # return 1; | |
2972 | # | |
2973 | # dll_name = filename; | |
2974 | # | |
2975 | # for (i=0; filename[i]; i++) | |
2976 | # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') | |
2977 | # dll_name = filename + i +1; | |
2978 | # | |
2979 | # pe_header_offset = pe_get32 (dll, 0x3c); | |
2980 | # opthdr_ofs = pe_header_offset + 4 + 20; | |
2981 | # num_entries = pe_get32 (dll, opthdr_ofs + 92); | |
2982 | # | |
2983 | # if (num_entries < 1) /* no exports */ | |
2984 | # return 1; | |
2985 | # | |
2986 | # export_rva = pe_get32 (dll, opthdr_ofs + 96); | |
2987 | # export_size = pe_get32 (dll, opthdr_ofs + 100); | |
2988 | # nsections = pe_get16 (dll, pe_header_offset + 4 +2); | |
2989 | # secptr = (pe_header_offset + 4 + 20 + | |
2990 | # pe_get16 (dll, pe_header_offset + 4 + 16)); | |
2991 | # | |
2992 | # expptr = 0; | |
2993 | # for (i = 0; i < nsections; i++) | |
2994 | # { | |
2995 | # char sname[8]; | |
2996 | # unsigned long secptr1 = secptr + 40 * i; | |
2997 | # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); | |
2998 | # unsigned long vsize = pe_get32 (dll, secptr1 + 16); | |
2999 | # unsigned long fptr = pe_get32 (dll, secptr1 + 20); | |
3000 | # lseek(dll, secptr1, SEEK_SET); | |
3001 | # read(dll, sname, 8); | |
3002 | # if (vaddr <= export_rva && vaddr+vsize > export_rva) | |
3003 | # { | |
3004 | # expptr = fptr + (export_rva - vaddr); | |
3005 | # if (export_rva + export_size > vaddr + vsize) | |
3006 | # export_size = vsize - (export_rva - vaddr); | |
3007 | # break; | |
3008 | # } | |
3009 | # } | |
3010 | # | |
3011 | # expdata = (unsigned char*)malloc(export_size); | |
3012 | # lseek (dll, expptr, SEEK_SET); | |
3013 | # read (dll, expdata, export_size); | |
3014 | # erva = expdata - export_rva; | |
3015 | # | |
3016 | # nexp = pe_as32 (expdata+24); | |
3017 | # name_rvas = pe_as32 (expdata+32); | |
3018 | # | |
3019 | # printf ("EXPORTS\n"); | |
3020 | # for (i = 0; i<nexp; i++) | |
3021 | # { | |
3022 | # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); | |
3023 | # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); | |
3024 | # } | |
3025 | # | |
3026 | # return 0; | |
3027 | # } | |
3028 | # /* impgen.c ends here */ | |
3029 | ||
3030 | EOF | |
3031 | ;; | |
3032 | esac | |
3033 | ||
3034 | ||
3035 | # Append the ltmain.sh script. | |
3036 | sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) | |
3037 | # We use sed instead of cat because bash on DJGPP gets confused if | |
3038 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | |
3039 | # text mode, it properly converts lines to CR/LF. This bash problem | |
3040 | # is reportedly fixed, but why not run on old versions too? | |
3041 | ||
3042 | chmod +x "$ofile" | |
3043 | ;; | |
3044 | ||
3045 | *) | |
3046 | # Compile the libtool program. | |
3047 | echo "FIXME: would compile $ltmain" | |
3048 | ;; | |
3049 | esac | |
3050 | ||
3051 | test -n "$cache_file" || exit 0 | |
3052 | ||
3053 | # AC_CACHE_SAVE | |
3054 | trap '' 1 2 15 | |
3055 | cat > confcache <<\EOF | |
3056 | # This file is a shell script that caches the results of configure | |
3057 | # tests run on this system so they can be shared between configure | |
3058 | # scripts and configure runs. It is not useful on other systems. | |
3059 | # If it contains results you don't want to keep, you may remove or edit it. | |
3060 | # | |
3061 | # By default, configure uses ./config.cache as the cache file, | |
3062 | # creating it if it does not exist already. You can give configure | |
3063 | # the --cache-file=FILE option to use a different cache file; that is | |
3064 | # what configure does when it calls configure scripts in | |
3065 | # subdirectories, so they share the cache. | |
3066 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
3067 | # config.status only pays attention to the cache file if you give it the | |
3068 | # --recheck option to rerun configure. | |
3069 | # | |
3070 | EOF | |
3071 | # The following way of writing the cache mishandles newlines in values, | |
3072 | # but we know of no workaround that is simple, portable, and efficient. | |
3073 | # So, don't put newlines in cache variables' values. | |
3074 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
3075 | # and sets the high bit in the cache file unless we assign to the vars. | |
3076 | (set) 2>&1 | | |
3077 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
3078 | *ac_space=\ *) | |
3079 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
3080 | # turns \\\\ into \\, and sed turns \\ into \). | |
3081 | sed -n \ | |
3082 | -e "s/'/'\\\\''/g" \ | |
3083 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
3084 | ;; | |
3085 | *) | |
3086 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
3087 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
3088 | ;; | |
3089 | esac >> confcache | |
3090 | if cmp -s $cache_file confcache; then | |
3091 | : | |
3092 | else | |
3093 | if test -w $cache_file; then | |
3094 | echo "updating cache $cache_file" | |
3095 | cat confcache > $cache_file | |
3096 | else | |
3097 | echo "not updating unwritable cache $cache_file" | |
3098 | fi | |
3099 | fi | |
3100 | rm -f confcache | |
3101 | ||
3102 | exit 0 | |
3103 | ||
3104 | # Local Variables: | |
3105 | # mode:shell-script | |
3106 | # sh-indentation:2 | |
3107 | # End: |
0 | # ltmain.sh - Provide generalized library-building support services. | |
1 | # NOTE: Changing this file will not affect anything until you rerun ltconfig. | |
2 | # | |
3 | # Copyright (C) 1996-2000 Free Software Foundation, Inc. | |
4 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |
5 | # | |
6 | # This program is free software; you can redistribute it and/or modify | |
7 | # it under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation; either version 2 of the License, or | |
9 | # (at your option) any later version. | |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, but | |
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | # General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program; if not, write to the Free Software | |
18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
19 | # | |
20 | # As a special exception to the GNU General Public License, if you | |
21 | # distribute this file as part of a program that contains a | |
22 | # configuration script generated by Autoconf, you may include it under | |
23 | # the same distribution terms that you use for the rest of that program. | |
24 | ||
25 | # Check that we have a working $echo. | |
26 | if test "X$1" = X--no-reexec; then | |
27 | # Discard the --no-reexec flag, and continue. | |
28 | shift | |
29 | elif test "X$1" = X--fallback-echo; then | |
30 | # Avoid inline document here, it may be left over | |
31 | : | |
32 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then | |
33 | # Yippee, $echo works! | |
34 | : | |
35 | else | |
36 | # Restart under the correct shell, and then maybe $echo will work. | |
37 | exec $SHELL "$0" --no-reexec ${1+"$@"} | |
38 | fi | |
39 | ||
40 | if test "X$1" = X--fallback-echo; then | |
41 | # used as fallback echo | |
42 | shift | |
43 | cat <<EOF | |
44 | $* | |
45 | EOF | |
46 | exit 0 | |
47 | fi | |
48 | ||
49 | # The name of this program. | |
50 | progname=`$echo "$0" | sed 's%^.*/%%'` | |
51 | modename="$progname" | |
52 | ||
53 | # Constants. | |
54 | PROGRAM=ltmain.sh | |
55 | PACKAGE=libtool | |
56 | VERSION=1.3c | |
57 | TIMESTAMP=" (1.695 2000/02/24 02:15:35)" | |
58 | ||
59 | default_mode= | |
60 | help="Try \`$progname --help' for more information." | |
61 | magic="%%%MAGIC variable%%%" | |
62 | mkdir="mkdir" | |
63 | mv="mv -f" | |
64 | rm="rm -f" | |
65 | ||
66 | # Sed substitution that helps us do robust quoting. It backslashifies | |
67 | # metacharacters that are still active within double-quoted strings. | |
68 | Xsed='sed -e 1s/^X//' | |
69 | sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' | |
70 | SP2NL='tr \040 \012' | |
71 | NL2SP='tr \015\012 \040\040' | |
72 | ||
73 | # NLS nuisances. | |
74 | # Only set LANG and LC_ALL to C if already set. | |
75 | # These must not be set unconditionally because not all systems understand | |
76 | # e.g. LANG=C (notably SCO). | |
77 | # We save the old values to restore during execute mode. | |
78 | if test "${LC_ALL+set}" = set; then | |
79 | save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL | |
80 | fi | |
81 | if test "${LANG+set}" = set; then | |
82 | save_LANG="$LANG"; LANG=C; export LANG | |
83 | fi | |
84 | ||
85 | if test "$LTCONFIG_VERSION" != "$VERSION"; then | |
86 | echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 | |
87 | echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 | |
88 | exit 1 | |
89 | fi | |
90 | ||
91 | if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then | |
92 | echo "$modename: not configured to build any kind of library" 1>&2 | |
93 | echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 | |
94 | exit 1 | |
95 | fi | |
96 | ||
97 | # Global variables. | |
98 | mode=$default_mode | |
99 | nonopt= | |
100 | prev= | |
101 | prevopt= | |
102 | run= | |
103 | show="$echo" | |
104 | show_help= | |
105 | execute_dlfiles= | |
106 | lo2o="s/\\.lo\$/.${objext}/" | |
107 | o2lo="s/\\.${objext}\$/.lo/" | |
108 | ||
109 | # Parse our command line options once, thoroughly. | |
110 | while test $# -gt 0 | |
111 | do | |
112 | arg="$1" | |
113 | shift | |
114 | ||
115 | case "$arg" in | |
116 | -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; | |
117 | *) optarg= ;; | |
118 | esac | |
119 | ||
120 | # If the previous option needs an argument, assign it. | |
121 | if test -n "$prev"; then | |
122 | case "$prev" in | |
123 | execute_dlfiles) | |
124 | eval "$prev=\"\$$prev \$arg\"" | |
125 | ;; | |
126 | *) | |
127 | eval "$prev=\$arg" | |
128 | ;; | |
129 | esac | |
130 | ||
131 | prev= | |
132 | prevopt= | |
133 | continue | |
134 | fi | |
135 | ||
136 | # Have we seen a non-optional argument yet? | |
137 | case "$arg" in | |
138 | --help) | |
139 | show_help=yes | |
140 | ;; | |
141 | ||
142 | --version) | |
143 | echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" | |
144 | exit 0 | |
145 | ;; | |
146 | ||
147 | --config) | |
148 | sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 | |
149 | exit 0 | |
150 | ;; | |
151 | ||
152 | --debug) | |
153 | echo "$progname: enabling shell trace mode" | |
154 | set -x | |
155 | ;; | |
156 | ||
157 | --dry-run | -n) | |
158 | run=: | |
159 | ;; | |
160 | ||
161 | --features) | |
162 | echo "host: $host" | |
163 | if test "$build_libtool_libs" = yes; then | |
164 | echo "enable shared libraries" | |
165 | else | |
166 | echo "disable shared libraries" | |
167 | fi | |
168 | if test "$build_old_libs" = yes; then | |
169 | echo "enable static libraries" | |
170 | else | |
171 | echo "disable static libraries" | |
172 | fi | |
173 | exit 0 | |
174 | ;; | |
175 | ||
176 | --finish) mode="finish" ;; | |
177 | ||
178 | --mode) prevopt="--mode" prev=mode ;; | |
179 | --mode=*) mode="$optarg" ;; | |
180 | ||
181 | --quiet | --silent) | |
182 | show=: | |
183 | ;; | |
184 | ||
185 | -dlopen) | |
186 | prevopt="-dlopen" | |
187 | prev=execute_dlfiles | |
188 | ;; | |
189 | ||
190 | -*) | |
191 | $echo "$modename: unrecognized option \`$arg'" 1>&2 | |
192 | $echo "$help" 1>&2 | |
193 | exit 1 | |
194 | ;; | |
195 | ||
196 | *) | |
197 | nonopt="$arg" | |
198 | break | |
199 | ;; | |
200 | esac | |
201 | done | |
202 | ||
203 | if test -n "$prevopt"; then | |
204 | $echo "$modename: option \`$prevopt' requires an argument" 1>&2 | |
205 | $echo "$help" 1>&2 | |
206 | exit 1 | |
207 | fi | |
208 | ||
209 | if test -z "$show_help"; then | |
210 | ||
211 | # Infer the operation mode. | |
212 | if test -z "$mode"; then | |
213 | case "$nonopt" in | |
214 | *cc | *++ | gcc* | *-gcc*) | |
215 | mode=link | |
216 | for arg | |
217 | do | |
218 | case "$arg" in | |
219 | -c) | |
220 | mode=compile | |
221 | break | |
222 | ;; | |
223 | esac | |
224 | done | |
225 | ;; | |
226 | *db | *dbx | *strace | *truss) | |
227 | mode=execute | |
228 | ;; | |
229 | *install*|cp|mv) | |
230 | mode=install | |
231 | ;; | |
232 | *rm) | |
233 | mode=uninstall | |
234 | ;; | |
235 | *) | |
236 | # If we have no mode, but dlfiles were specified, then do execute mode. | |
237 | test -n "$execute_dlfiles" && mode=execute | |
238 | ||
239 | # Just use the default operation mode. | |
240 | if test -z "$mode"; then | |
241 | if test -n "$nonopt"; then | |
242 | $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 | |
243 | else | |
244 | $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 | |
245 | fi | |
246 | fi | |
247 | ;; | |
248 | esac | |
249 | fi | |
250 | ||
251 | # Only execute mode is allowed to have -dlopen flags. | |
252 | if test -n "$execute_dlfiles" && test "$mode" != execute; then | |
253 | $echo "$modename: unrecognized option \`-dlopen'" 1>&2 | |
254 | $echo "$help" 1>&2 | |
255 | exit 1 | |
256 | fi | |
257 | ||
258 | # Change the help message to a mode-specific one. | |
259 | generic_help="$help" | |
260 | help="Try \`$modename --help --mode=$mode' for more information." | |
261 | ||
262 | # These modes are in order of execution frequency so that they run quickly. | |
263 | case "$mode" in | |
264 | # libtool compile mode | |
265 | compile) | |
266 | modename="$modename: compile" | |
267 | # Get the compilation command and the source file. | |
268 | base_compile= | |
269 | prev= | |
270 | lastarg= | |
271 | srcfile="$nonopt" | |
272 | suppress_output= | |
273 | ||
274 | user_target=no | |
275 | for arg | |
276 | do | |
277 | case "$prev" in | |
278 | "") ;; | |
279 | xcompiler) | |
280 | # Aesthetically quote the previous argument. | |
281 | prev= | |
282 | lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | |
283 | ||
284 | case "$arg" in | |
285 | # Double-quote args containing other shell metacharacters. | |
286 | # Many Bourne shells cannot handle close brackets correctly | |
287 | # in scan sets, so we specify it separately. | |
288 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
289 | arg="\"$arg\"" | |
290 | ;; | |
291 | esac | |
292 | ||
293 | # Add the previous argument to base_compile. | |
294 | if test -z "$base_compile"; then | |
295 | base_compile="$lastarg" | |
296 | else | |
297 | base_compile="$base_compile $lastarg" | |
298 | fi | |
299 | continue | |
300 | ;; | |
301 | esac | |
302 | ||
303 | # Accept any command-line options. | |
304 | case "$arg" in | |
305 | -o) | |
306 | if test "$user_target" != "no"; then | |
307 | $echo "$modename: you cannot specify \`-o' more than once" 1>&2 | |
308 | exit 1 | |
309 | fi | |
310 | user_target=next | |
311 | ;; | |
312 | ||
313 | -static) | |
314 | build_old_libs=yes | |
315 | continue | |
316 | ;; | |
317 | ||
318 | -Xcompiler) | |
319 | prev=xcompiler | |
320 | continue | |
321 | ;; | |
322 | ||
323 | -Wc,*) | |
324 | args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` | |
325 | lastarg= | |
326 | IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' | |
327 | for arg in $args; do | |
328 | IFS="$save_ifs" | |
329 | ||
330 | # Double-quote args containing other shell metacharacters. | |
331 | # Many Bourne shells cannot handle close brackets correctly | |
332 | # in scan sets, so we specify it separately. | |
333 | case "$arg" in | |
334 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
335 | arg="\"$arg\"" | |
336 | ;; | |
337 | esac | |
338 | lastarg="$lastarg $arg" | |
339 | done | |
340 | IFS="$save_ifs" | |
341 | lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` | |
342 | ||
343 | # Add the arguments to base_compile. | |
344 | if test -z "$base_compile"; then | |
345 | base_compile="$lastarg" | |
346 | else | |
347 | base_compile="$base_compile $lastarg" | |
348 | fi | |
349 | continue | |
350 | ;; | |
351 | esac | |
352 | ||
353 | case "$user_target" in | |
354 | next) | |
355 | # The next one is the -o target name | |
356 | user_target=yes | |
357 | continue | |
358 | ;; | |
359 | yes) | |
360 | # We got the output file | |
361 | user_target=set | |
362 | libobj="$arg" | |
363 | continue | |
364 | ;; | |
365 | esac | |
366 | ||
367 | # Accept the current argument as the source file. | |
368 | lastarg="$srcfile" | |
369 | srcfile="$arg" | |
370 | ||
371 | # Aesthetically quote the previous argument. | |
372 | ||
373 | # Backslashify any backslashes, double quotes, and dollar signs. | |
374 | # These are the only characters that are still specially | |
375 | # interpreted inside of double-quoted scrings. | |
376 | lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` | |
377 | ||
378 | # Double-quote args containing other shell metacharacters. | |
379 | # Many Bourne shells cannot handle close brackets correctly | |
380 | # in scan sets, so we specify it separately. | |
381 | case "$lastarg" in | |
382 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
383 | lastarg="\"$lastarg\"" | |
384 | ;; | |
385 | esac | |
386 | ||
387 | # Add the previous argument to base_compile. | |
388 | if test -z "$base_compile"; then | |
389 | base_compile="$lastarg" | |
390 | else | |
391 | base_compile="$base_compile $lastarg" | |
392 | fi | |
393 | done | |
394 | ||
395 | case "$user_target" in | |
396 | set) | |
397 | ;; | |
398 | no) | |
399 | # Get the name of the library object. | |
400 | libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` | |
401 | ;; | |
402 | *) | |
403 | $echo "$modename: you must specify a target with \`-o'" 1>&2 | |
404 | exit 1 | |
405 | ;; | |
406 | esac | |
407 | ||
408 | # Recognize several different file suffixes. | |
409 | # If the user specifies -o file.o, it is replaced with file.lo | |
410 | xform='[cCFSfmso]' | |
411 | case "$libobj" in | |
412 | *.ada) xform=ada ;; | |
413 | *.adb) xform=adb ;; | |
414 | *.ads) xform=ads ;; | |
415 | *.asm) xform=asm ;; | |
416 | *.c++) xform=c++ ;; | |
417 | *.cc) xform=cc ;; | |
418 | *.cpp) xform=cpp ;; | |
419 | *.cxx) xform=cxx ;; | |
420 | *.f90) xform=f90 ;; | |
421 | *.for) xform=for ;; | |
422 | esac | |
423 | ||
424 | libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` | |
425 | ||
426 | case "$libobj" in | |
427 | *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; | |
428 | *) | |
429 | $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 | |
430 | exit 1 | |
431 | ;; | |
432 | esac | |
433 | ||
434 | if test -z "$base_compile"; then | |
435 | $echo "$modename: you must specify a compilation command" 1>&2 | |
436 | $echo "$help" 1>&2 | |
437 | exit 1 | |
438 | fi | |
439 | ||
440 | # Delete any leftover library objects. | |
441 | if test "$build_old_libs" = yes; then | |
442 | removelist="$obj $libobj" | |
443 | else | |
444 | removelist="$libobj" | |
445 | fi | |
446 | ||
447 | $run $rm $removelist | |
448 | trap "$run $rm $removelist; exit 1" 1 2 15 | |
449 | ||
450 | # Calculate the filename of the output object if compiler does | |
451 | # not support -o with -c | |
452 | if test "$compiler_c_o" = no; then | |
453 | output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} | |
454 | lockfile="$output_obj.lock" | |
455 | removelist="$removelist $output_obj $lockfile" | |
456 | trap "$run $rm $removelist; exit 1" 1 2 15 | |
457 | else | |
458 | need_locks=no | |
459 | lockfile= | |
460 | fi | |
461 | ||
462 | # Lock this critical section if it is needed | |
463 | # We use this script file to make the link, it avoids creating a new file | |
464 | if test "$need_locks" = yes; then | |
465 | until ln "$0" "$lockfile" 2>/dev/null; do | |
466 | $show "Waiting for $lockfile to be removed" | |
467 | sleep 2 | |
468 | done | |
469 | elif test "$need_locks" = warn; then | |
470 | if test -f "$lockfile"; then | |
471 | echo "\ | |
472 | *** ERROR, $lockfile exists and contains: | |
473 | `cat $lockfile 2>/dev/null` | |
474 | ||
475 | This indicates that another process is trying to use the same | |
476 | temporary object file, and libtool could not work around it because | |
477 | your compiler does not support \`-c' and \`-o' together. If you | |
478 | repeat this compilation, it may succeed, by chance, but you had better | |
479 | avoid parallel builds (make -j) in this platform, or get a better | |
480 | compiler." | |
481 | ||
482 | $run $rm $removelist | |
483 | exit 1 | |
484 | fi | |
485 | echo $srcfile > "$lockfile" | |
486 | fi | |
487 | ||
488 | if test -n "$fix_srcfile_path"; then | |
489 | eval srcfile=\"$fix_srcfile_path\" | |
490 | fi | |
491 | ||
492 | # Only build a PIC object if we are building libtool libraries. | |
493 | if test "$build_libtool_libs" = yes; then | |
494 | # Without this assignment, base_compile gets emptied. | |
495 | fbsd_hideous_sh_bug=$base_compile | |
496 | ||
497 | if test "$pic_mode" != no; then | |
498 | # All platforms use -DPIC, to notify preprocessed assembler code. | |
499 | command="$base_compile $srcfile $pic_flag -DPIC" | |
500 | else | |
501 | # Don't build PIC code | |
502 | command="$base_compile $srcfile" | |
503 | fi | |
504 | if test "$build_old_libs" = yes; then | |
505 | lo_libobj="$libobj" | |
506 | dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` | |
507 | if test "X$dir" = "X$libobj"; then | |
508 | dir="$objdir" | |
509 | else | |
510 | dir="$dir/$objdir" | |
511 | fi | |
512 | libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` | |
513 | ||
514 | if test -d "$dir"; then | |
515 | $show "$rm $libobj" | |
516 | $run $rm $libobj | |
517 | else | |
518 | $show "$mkdir $dir" | |
519 | $run $mkdir $dir | |
520 | status=$? | |
521 | if test $status -ne 0 && test ! -d $dir; then | |
522 | exit $status | |
523 | fi | |
524 | fi | |
525 | fi | |
526 | if test "$compiler_o_lo" = yes; then | |
527 | output_obj="$libobj" | |
528 | command="$command -o $output_obj" | |
529 | elif test "$compiler_c_o" = yes; then | |
530 | output_obj="$obj" | |
531 | command="$command -o $output_obj" | |
532 | fi | |
533 | ||
534 | $run $rm "$output_obj" | |
535 | $show "$command" | |
536 | if $run eval "$command"; then : | |
537 | else | |
538 | test -n "$output_obj" && $run $rm $removelist | |
539 | exit 1 | |
540 | fi | |
541 | ||
542 | if test "$need_locks" = warn && | |
543 | test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then | |
544 | echo "\ | |
545 | *** ERROR, $lockfile contains: | |
546 | `cat $lockfile 2>/dev/null` | |
547 | ||
548 | but it should contain: | |
549 | $srcfile | |
550 | ||
551 | This indicates that another process is trying to use the same | |
552 | temporary object file, and libtool could not work around it because | |
553 | your compiler does not support \`-c' and \`-o' together. If you | |
554 | repeat this compilation, it may succeed, by chance, but you had better | |
555 | avoid parallel builds (make -j) in this platform, or get a better | |
556 | compiler." | |
557 | ||
558 | $run $rm $removelist | |
559 | exit 1 | |
560 | fi | |
561 | ||
562 | # Just move the object if needed, then go on to compile the next one | |
563 | if test x"$output_obj" != x"$libobj"; then | |
564 | $show "$mv $output_obj $libobj" | |
565 | if $run $mv $output_obj $libobj; then : | |
566 | else | |
567 | error=$? | |
568 | $run $rm $removelist | |
569 | exit $error | |
570 | fi | |
571 | fi | |
572 | ||
573 | # If we have no pic_flag, then copy the object into place and finish. | |
574 | if (test -z "$pic_flag" || test "$pic_mode" != default) && | |
575 | test "$build_old_libs" = yes; then | |
576 | # Rename the .lo from within objdir to obj | |
577 | if test -f $obj; then | |
578 | $show $rm $obj | |
579 | $run $rm $obj | |
580 | fi | |
581 | ||
582 | $show "$mv $libobj $obj" | |
583 | if $run $mv $libobj $obj; then : | |
584 | else | |
585 | error=$? | |
586 | $run $rm $removelist | |
587 | exit $error | |
588 | fi | |
589 | ||
590 | xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` | |
591 | if test "X$xdir" = "X$obj"; then | |
592 | xdir="." | |
593 | else | |
594 | xdir="$xdir" | |
595 | fi | |
596 | baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` | |
597 | libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` | |
598 | # Now arrange that obj and lo_libobj become the same file | |
599 | $show "(cd $xdir && $LN_S $baseobj $libobj)" | |
600 | if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then | |
601 | exit 0 | |
602 | else | |
603 | error=$? | |
604 | $run $rm $removelist | |
605 | exit $error | |
606 | fi | |
607 | fi | |
608 | ||
609 | # Allow error messages only from the first compilation. | |
610 | suppress_output=' >/dev/null 2>&1' | |
611 | fi | |
612 | ||
613 | # Only build a position-dependent object if we build old libraries. | |
614 | if test "$build_old_libs" = yes; then | |
615 | if test "$pic_mode" != yes; then | |
616 | # Don't build PIC code | |
617 | command="$base_compile $srcfile" | |
618 | else | |
619 | # All platforms use -DPIC, to notify preprocessed assembler code. | |
620 | command="$base_compile $srcfile $pic_flag -DPIC" | |
621 | fi | |
622 | if test "$compiler_c_o" = yes; then | |
623 | command="$command -o $obj" | |
624 | output_obj="$obj" | |
625 | fi | |
626 | ||
627 | # Suppress compiler output if we already did a PIC compilation. | |
628 | command="$command$suppress_output" | |
629 | $run $rm "$output_obj" | |
630 | $show "$command" | |
631 | if $run eval "$command"; then : | |
632 | else | |
633 | $run $rm $removelist | |
634 | exit 1 | |
635 | fi | |
636 | ||
637 | if test "$need_locks" = warn && | |
638 | test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then | |
639 | echo "\ | |
640 | *** ERROR, $lockfile contains: | |
641 | `cat $lockfile 2>/dev/null` | |
642 | ||
643 | but it should contain: | |
644 | $srcfile | |
645 | ||
646 | This indicates that another process is trying to use the same | |
647 | temporary object file, and libtool could not work around it because | |
648 | your compiler does not support \`-c' and \`-o' together. If you | |
649 | repeat this compilation, it may succeed, by chance, but you had better | |
650 | avoid parallel builds (make -j) in this platform, or get a better | |
651 | compiler." | |
652 | ||
653 | $run $rm $removelist | |
654 | exit 1 | |
655 | fi | |
656 | ||
657 | # Just move the object if needed | |
658 | if test x"$output_obj" != x"$obj"; then | |
659 | $show "$mv $output_obj $obj" | |
660 | if $run $mv $output_obj $obj; then : | |
661 | else | |
662 | error=$? | |
663 | $run $rm $removelist | |
664 | exit $error | |
665 | fi | |
666 | fi | |
667 | ||
668 | # Create an invalid libtool object if no PIC, so that we do not | |
669 | # accidentally link it into a program. | |
670 | if test "$build_libtool_libs" != yes; then | |
671 | $show "echo timestamp > $libobj" | |
672 | $run eval "echo timestamp > \$libobj" || exit $? | |
673 | else | |
674 | # Move the .lo from within objdir | |
675 | $show "$mv $libobj $lo_libobj" | |
676 | if $run $mv $libobj $lo_libobj; then : | |
677 | else | |
678 | error=$? | |
679 | $run $rm $removelist | |
680 | exit $error | |
681 | fi | |
682 | fi | |
683 | fi | |
684 | ||
685 | # Unlock the critical section if it was locked | |
686 | if test "$need_locks" != no; then | |
687 | $rm "$lockfile" | |
688 | fi | |
689 | ||
690 | exit 0 | |
691 | ;; | |
692 | ||
693 | # libtool link mode | |
694 | link | relink) | |
695 | modename="$modename: link" | |
696 | case "$host" in | |
697 | *-*-cygwin* | *-*-mingw* | *-*-os2*) | |
698 | # It is impossible to link a dll without this setting, and | |
699 | # we shouldn't force the makefile maintainer to figure out | |
700 | # which system we are compiling for in order to pass an extra | |
701 | # flag for every libtool invokation. | |
702 | # allow_undefined=no | |
703 | ||
704 | # FIXME: Unfortunately, there are problems with the above when trying | |
705 | # to make a dll which has undefined symbols, in which case not | |
706 | # even a static library is built. For now, we need to specify | |
707 | # -no-undefined on the libtool link line when we can be certain | |
708 | # that all symbols are satisfied, otherwise we get a static library. | |
709 | allow_undefined=yes | |
710 | ;; | |
711 | *) | |
712 | allow_undefined=yes | |
713 | ;; | |
714 | esac | |
715 | libtool_args="$nonopt" | |
716 | compile_command="$nonopt" | |
717 | finalize_command="$nonopt" | |
718 | ||
719 | compile_rpath= | |
720 | finalize_rpath= | |
721 | compile_shlibpath= | |
722 | finalize_shlibpath= | |
723 | convenience= | |
724 | old_convenience= | |
725 | deplibs= | |
726 | old_deplibs= | |
727 | compiler_flags= | |
728 | linker_flags= | |
729 | dllsearchpath= | |
730 | lib_search_path=`pwd` | |
731 | ||
732 | avoid_version=no | |
733 | dlfiles= | |
734 | dlprefiles= | |
735 | dlself=no | |
736 | export_dynamic=no | |
737 | export_symbols= | |
738 | export_symbols_regex= | |
739 | generated= | |
740 | libobjs= | |
741 | ltlibs= | |
742 | module=no | |
743 | no_install=no | |
744 | objs= | |
745 | prefer_static_libs=no | |
746 | preload=no | |
747 | prev= | |
748 | prevarg= | |
749 | release= | |
750 | rpath= | |
751 | xrpath= | |
752 | perm_rpath= | |
753 | temp_rpath= | |
754 | thread_safe=no | |
755 | vinfo= | |
756 | ||
757 | # We need to know -static, to get the right output filenames. | |
758 | for arg | |
759 | do | |
760 | case "$arg" in | |
761 | -all-static | -static) | |
762 | if test "X$arg" = "X-all-static"; then | |
763 | if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then | |
764 | $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 | |
765 | fi | |
766 | if test -n "$link_static_flag"; then | |
767 | dlopen_self=$dlopen_self_static | |
768 | fi | |
769 | else | |
770 | if test -z "$pic_flag" && test -n "$link_static_flag"; then | |
771 | dlopen_self=$dlopen_self_static | |
772 | fi | |
773 | fi | |
774 | build_libtool_libs=no | |
775 | build_old_libs=yes | |
776 | prefer_static_libs=yes | |
777 | break | |
778 | ;; | |
779 | esac | |
780 | done | |
781 | ||
782 | # See if our shared archives depend on static archives. | |
783 | test -n "$old_archive_from_new_cmds" && build_old_libs=yes | |
784 | ||
785 | # Go through the arguments, transforming them on the way. | |
786 | while test $# -gt 0; do | |
787 | arg="$1" | |
788 | shift | |
789 | case "$arg" in | |
790 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
791 | qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test | |
792 | ;; | |
793 | *) qarg=$arg ;; | |
794 | esac | |
795 | libtool_args="$libtool_args $qarg" | |
796 | ||
797 | # If the previous option needs an argument, assign it. | |
798 | if test -n "$prev"; then | |
799 | case "$prev" in | |
800 | output) | |
801 | compile_command="$compile_command @OUTPUT@" | |
802 | finalize_command="$finalize_command @OUTPUT@" | |
803 | ;; | |
804 | esac | |
805 | ||
806 | case "$prev" in | |
807 | dlfiles|dlprefiles) | |
808 | if test "$preload" = no; then | |
809 | # Add the symbol object into the linking commands. | |
810 | compile_command="$compile_command @SYMFILE@" | |
811 | finalize_command="$finalize_command @SYMFILE@" | |
812 | preload=yes | |
813 | fi | |
814 | case "$arg" in | |
815 | *.la | *.lo) ;; # We handle these cases below. | |
816 | force) | |
817 | if test "$dlself" = no; then | |
818 | dlself=needless | |
819 | export_dynamic=yes | |
820 | fi | |
821 | prev= | |
822 | continue | |
823 | ;; | |
824 | self) | |
825 | if test "$prev" = dlprefiles; then | |
826 | dlself=yes | |
827 | elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then | |
828 | dlself=yes | |
829 | else | |
830 | dlself=needless | |
831 | export_dynamic=yes | |
832 | fi | |
833 | prev= | |
834 | continue | |
835 | ;; | |
836 | *) | |
837 | if test "$prev" = dlfiles; then | |
838 | dlfiles="$dlfiles $arg" | |
839 | else | |
840 | dlprefiles="$dlprefiles $arg" | |
841 | fi | |
842 | prev= | |
843 | continue | |
844 | ;; | |
845 | esac | |
846 | ;; | |
847 | expsyms) | |
848 | export_symbols="$arg" | |
849 | if test ! -f "$arg"; then | |
850 | $echo "$modename: symbol file \`$arg' does not exist" | |
851 | exit 1 | |
852 | fi | |
853 | prev= | |
854 | continue | |
855 | ;; | |
856 | expsyms_regex) | |
857 | export_symbols_regex="$arg" | |
858 | prev= | |
859 | continue | |
860 | ;; | |
861 | release) | |
862 | release="-$arg" | |
863 | prev= | |
864 | continue | |
865 | ;; | |
866 | rpath | xrpath) | |
867 | # We need an absolute path. | |
868 | case "$arg" in | |
869 | [\\/]* | [A-Za-z]:[\\/]*) ;; | |
870 | *) | |
871 | $echo "$modename: only absolute run-paths are allowed" 1>&2 | |
872 | exit 1 | |
873 | ;; | |
874 | esac | |
875 | if test "$prev" = rpath; then | |
876 | case "$rpath " in | |
877 | *" $arg "*) ;; | |
878 | *) rpath="$rpath $arg" ;; | |
879 | esac | |
880 | else | |
881 | case "$xrpath " in | |
882 | *" $arg "*) ;; | |
883 | *) xrpath="$xrpath $arg" ;; | |
884 | esac | |
885 | fi | |
886 | prev= | |
887 | continue | |
888 | ;; | |
889 | xcompiler) | |
890 | compiler_flags="$compiler_flags $qarg" | |
891 | prev= | |
892 | compile_command="$compile_command $qarg" | |
893 | finalize_command="$finalize_command $qarg" | |
894 | continue | |
895 | ;; | |
896 | xlinker) | |
897 | linker_flags="$linker_flags $qarg" | |
898 | compiler_flags="$compiler_flags $wl$qarg" | |
899 | prev= | |
900 | compile_command="$compile_command $wl$qarg" | |
901 | finalize_command="$finalize_command $wl$qarg" | |
902 | continue | |
903 | ;; | |
904 | *) | |
905 | eval "$prev=\"\$arg\"" | |
906 | prev= | |
907 | continue | |
908 | ;; | |
909 | esac | |
910 | fi | |
911 | ||
912 | prevarg="$arg" | |
913 | ||
914 | case "$arg" in | |
915 | -all-static) | |
916 | if test -n "$link_static_flag"; then | |
917 | compile_command="$compile_command $link_static_flag" | |
918 | finalize_command="$finalize_command $link_static_flag" | |
919 | fi | |
920 | continue | |
921 | ;; | |
922 | ||
923 | -allow-undefined) | |
924 | # FIXME: remove this flag sometime in the future. | |
925 | $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 | |
926 | continue | |
927 | ;; | |
928 | ||
929 | -avoid-version) | |
930 | avoid_version=yes | |
931 | continue | |
932 | ;; | |
933 | ||
934 | -dlopen) | |
935 | prev=dlfiles | |
936 | continue | |
937 | ;; | |
938 | ||
939 | -dlpreopen) | |
940 | prev=dlprefiles | |
941 | continue | |
942 | ;; | |
943 | ||
944 | -export-dynamic) | |
945 | export_dynamic=yes | |
946 | continue | |
947 | ;; | |
948 | ||
949 | -export-symbols | -export-symbols-regex) | |
950 | if test -n "$export_symbols" || test -n "$export_symbols_regex"; then | |
951 | $echo "$modename: not more than one -exported-symbols argument allowed" | |
952 | exit 1 | |
953 | fi | |
954 | if test "X$arg" = "X-export-symbols"; then | |
955 | prev=expsyms | |
956 | else | |
957 | prev=expsyms_regex | |
958 | fi | |
959 | continue | |
960 | ;; | |
961 | ||
962 | -L*) | |
963 | dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` | |
964 | # We need an absolute path. | |
965 | case "$dir" in | |
966 | [\\/]* | [A-Za-z]:[\\/]*) ;; | |
967 | *) | |
968 | absdir=`cd "$dir" && pwd` | |
969 | if test -z "$absdir"; then | |
970 | $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 | |
971 | exit 1 | |
972 | fi | |
973 | dir="$absdir" | |
974 | ;; | |
975 | esac | |
976 | case "$deplibs " in | |
977 | *" -L$dir "*) ;; | |
978 | *) | |
979 | deplibs="$deplibs -L$dir" | |
980 | lib_search_path="$lib_search_path $dir" | |
981 | ;; | |
982 | esac | |
983 | case "$host" in | |
984 | *-*-cygwin* | *-*-mingw* | *-*-os2*) | |
985 | case ":$dllsearchpath:" in | |
986 | *":$dir:"*) ;; | |
987 | *) dllsearchpath="$dllsearchpath:$dir";; | |
988 | esac | |
989 | ;; | |
990 | esac | |
991 | continue | |
992 | ;; | |
993 | ||
994 | -l*) | |
995 | if test "$arg" = "-lc"; then | |
996 | case "$host" in | |
997 | *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) | |
998 | # These systems don't actually have c library (as such) | |
999 | continue | |
1000 | ;; | |
1001 | esac | |
1002 | elif test "$arg" = "-lm"; then | |
1003 | case "$host" in | |
1004 | *-*-cygwin* | *-*-beos*) | |
1005 | # These systems don't actually have math library (as such) | |
1006 | continue | |
1007 | ;; | |
1008 | esac | |
1009 | fi | |
1010 | deplibs="$deplibs $arg" | |
1011 | continue | |
1012 | ;; | |
1013 | ||
1014 | -module) | |
1015 | module=yes | |
1016 | continue | |
1017 | ;; | |
1018 | ||
1019 | -no-fast-install) | |
1020 | fast_install=no | |
1021 | continue | |
1022 | ;; | |
1023 | ||
1024 | -no-install) | |
1025 | case "$host" in | |
1026 | *-*-cygwin* | *-*-mingw* | *-*-os2*) | |
1027 | # The PATH hackery in wrapper scripts is required on Windows | |
1028 | # in order for the loader to find any dlls it needs. | |
1029 | $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 | |
1030 | $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 | |
1031 | fast_install=no | |
1032 | ;; | |
1033 | *) | |
1034 | no_install=yes | |
1035 | ;; | |
1036 | esac | |
1037 | continue | |
1038 | ;; | |
1039 | ||
1040 | -no-undefined) | |
1041 | allow_undefined=no | |
1042 | continue | |
1043 | ;; | |
1044 | ||
1045 | -o) prev=output ;; | |
1046 | ||
1047 | -release) | |
1048 | prev=release | |
1049 | continue | |
1050 | ;; | |
1051 | ||
1052 | -rpath) | |
1053 | prev=rpath | |
1054 | continue | |
1055 | ;; | |
1056 | ||
1057 | -R) | |
1058 | prev=xrpath | |
1059 | continue | |
1060 | ;; | |
1061 | ||
1062 | -R*) | |
1063 | dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` | |
1064 | # We need an absolute path. | |
1065 | case "$dir" in | |
1066 | [\\/]* | [A-Za-z]:[\\/]*) ;; | |
1067 | *) | |
1068 | $echo "$modename: only absolute run-paths are allowed" 1>&2 | |
1069 | exit 1 | |
1070 | ;; | |
1071 | esac | |
1072 | case "$xrpath " in | |
1073 | *" $dir "*) ;; | |
1074 | *) xrpath="$xrpath $dir" ;; | |
1075 | esac | |
1076 | continue | |
1077 | ;; | |
1078 | ||
1079 | -static) | |
1080 | # If we have no pic_flag, then this is the same as -all-static. | |
1081 | if test -z "$pic_flag" && test -n "$link_static_flag"; then | |
1082 | compile_command="$compile_command $link_static_flag" | |
1083 | finalize_command="$finalize_command $link_static_flag" | |
1084 | fi | |
1085 | continue | |
1086 | ;; | |
1087 | ||
1088 | -thread-safe) | |
1089 | thread_safe=yes | |
1090 | continue | |
1091 | ;; | |
1092 | ||
1093 | -version-info) | |
1094 | prev=vinfo | |
1095 | continue | |
1096 | ;; | |
1097 | ||
1098 | -Wc,*) | |
1099 | args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` | |
1100 | arg= | |
1101 | IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' | |
1102 | for flag in $args; do | |
1103 | IFS="$save_ifs" | |
1104 | case "$flag" in | |
1105 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
1106 | flag="\"$flag\"" | |
1107 | ;; | |
1108 | esac | |
1109 | arg="$arg $wl$flag" | |
1110 | compiler_flags="$compiler_flags $flag" | |
1111 | done | |
1112 | IFS="$save_ifs" | |
1113 | arg=`$echo "X$arg" | $Xsed -e "s/^ //"` | |
1114 | ;; | |
1115 | ||
1116 | -Wl,*) | |
1117 | args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` | |
1118 | arg= | |
1119 | IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' | |
1120 | for flag in $args; do | |
1121 | IFS="$save_ifs" | |
1122 | case "$flag" in | |
1123 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
1124 | flag="\"$flag\"" | |
1125 | ;; | |
1126 | esac | |
1127 | arg="$arg $wl$flag" | |
1128 | compiler_flags="$compiler_flags $wl$flag" | |
1129 | linker_flags="$linker_flags $flag" | |
1130 | done | |
1131 | IFS="$save_ifs" | |
1132 | arg=`$echo "X$arg" | $Xsed -e "s/^ //"` | |
1133 | ;; | |
1134 | ||
1135 | -Xcompiler) | |
1136 | prev=xcompiler | |
1137 | continue | |
1138 | ;; | |
1139 | ||
1140 | -Xlinker) | |
1141 | prev=xlinker | |
1142 | continue | |
1143 | ;; | |
1144 | ||
1145 | # Some other compiler flag. | |
1146 | -* | +*) | |
1147 | # Unknown arguments in both finalize_command and compile_command need | |
1148 | # to be aesthetically quoted because they are evaled later. | |
1149 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | |
1150 | case "$arg" in | |
1151 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
1152 | arg="\"$arg\"" | |
1153 | ;; | |
1154 | esac | |
1155 | ;; | |
1156 | ||
1157 | *.$objext) | |
1158 | # A standard object. | |
1159 | objs="$objs $arg" | |
1160 | ;; | |
1161 | ||
1162 | *.lo) | |
1163 | # A library object. | |
1164 | if test "$prev" = dlfiles; then | |
1165 | # This file was specified with -dlopen. | |
1166 | if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then | |
1167 | dlfiles="$dlfiles $arg" | |
1168 | prev= | |
1169 | continue | |
1170 | else | |
1171 | # If libtool objects are unsupported, then we need to preload. | |
1172 | prev=dlprefiles | |
1173 | fi | |
1174 | fi | |
1175 | ||
1176 | if test "$prev" = dlprefiles; then | |
1177 | # Preload the old-style object. | |
1178 | dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` | |
1179 | prev= | |
1180 | else | |
1181 | libobjs="$libobjs $arg" | |
1182 | fi | |
1183 | ;; | |
1184 | ||
1185 | *.$libext) | |
1186 | # An archive. | |
1187 | deplibs="$deplibs $arg" | |
1188 | old_deplibs="$old_deplibs $arg" | |
1189 | continue | |
1190 | ;; | |
1191 | ||
1192 | *.la) | |
1193 | # A libtool-controlled library. | |
1194 | ||
1195 | if test "$prev" = dlfiles; then | |
1196 | # This library was specified with -dlopen. | |
1197 | dlfiles="$dlfiles $arg" | |
1198 | prev= | |
1199 | elif test "$prev" = dlprefiles; then | |
1200 | # The library was specified with -dlpreopen. | |
1201 | dlprefiles="$dlprefiles $arg" | |
1202 | prev= | |
1203 | else | |
1204 | deplibs="$deplibs $arg" | |
1205 | fi | |
1206 | continue | |
1207 | ;; | |
1208 | ||
1209 | # Some other compiler argument. | |
1210 | *) | |
1211 | # Unknown arguments in both finalize_command and compile_command need | |
1212 | # to be aesthetically quoted because they are evaled later. | |
1213 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | |
1214 | case "$arg" in | |
1215 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
1216 | arg="\"$arg\"" | |
1217 | ;; | |
1218 | esac | |
1219 | ;; | |
1220 | esac | |
1221 | ||
1222 | # Now actually substitute the argument into the commands. | |
1223 | if test -n "$arg"; then | |
1224 | compile_command="$compile_command $arg" | |
1225 | finalize_command="$finalize_command $arg" | |
1226 | fi | |
1227 | done | |
1228 | ||
1229 | if test -n "$prev"; then | |
1230 | $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 | |
1231 | $echo "$help" 1>&2 | |
1232 | exit 1 | |
1233 | fi | |
1234 | ||
1235 | if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then | |
1236 | eval arg=\"$export_dynamic_flag_spec\" | |
1237 | compile_command="$compile_command $arg" | |
1238 | finalize_command="$finalize_command $arg" | |
1239 | fi | |
1240 | ||
1241 | oldlibs= | |
1242 | # calculate the name of the file, without its directory | |
1243 | outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` | |
1244 | libobjs_save="$libobjs" | |
1245 | ||
1246 | if test -n "$shlibpath_var"; then | |
1247 | # get the directories listed in $shlibpath_var | |
1248 | eval shlib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` | |
1249 | else | |
1250 | shlib_search_path= | |
1251 | fi | |
1252 | eval sys_lib_search_path=\"$sys_lib_search_path_spec\" | |
1253 | eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" | |
1254 | lib_search_path="$lib_search_path $sys_lib_search_path $shlib_search_path" | |
1255 | ||
1256 | output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` | |
1257 | if test "X$output_objdir" = "X$output"; then | |
1258 | output_objdir="$objdir" | |
1259 | else | |
1260 | output_objdir="$output_objdir/$objdir" | |
1261 | fi | |
1262 | # Create the object directory. | |
1263 | if test ! -d $output_objdir; then | |
1264 | $show "$mkdir $output_objdir" | |
1265 | $run $mkdir $output_objdir | |
1266 | status=$? | |
1267 | if test $status -ne 0 && test ! -d $output_objdir; then | |
1268 | exit $status | |
1269 | fi | |
1270 | fi | |
1271 | ||
1272 | case "$output" in | |
1273 | "") | |
1274 | $echo "$modename: you must specify an output file" 1>&2 | |
1275 | $echo "$help" 1>&2 | |
1276 | exit 1 | |
1277 | ;; | |
1278 | *.$libext) | |
1279 | linkmode=oldlib ;; | |
1280 | *.lo | *.$objext) | |
1281 | linkmode=obj ;; | |
1282 | *.la) | |
1283 | linkmode=lib ;; | |
1284 | *) # Anything else should be a program. | |
1285 | linkmode=prog ;; | |
1286 | esac | |
1287 | ||
1288 | specialdeplibs= | |
1289 | libs= | |
1290 | # Find all interdependent deplibs that | |
1291 | # are linked more than once (e.g. -la -lb -la) | |
1292 | for deplib in $deplibs; do | |
1293 | case "$libs " in | |
1294 | *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; | |
1295 | esac | |
1296 | libs="$libs $deplib" | |
1297 | done | |
1298 | deplibs= | |
1299 | newdependency_libs= | |
1300 | uninst_path= # paths that contain uninstalled libtool libraries | |
1301 | new_lib_search_path= | |
1302 | need_relink=no # whether we're linking any uninstalled libtool libraries | |
1303 | case $linkmode in | |
1304 | lib) | |
1305 | passes="link" | |
1306 | for file in $dlfiles $dlprefiles; do | |
1307 | case "$file" in | |
1308 | *.la) ;; | |
1309 | *) | |
1310 | $echo "$modename: libraries can \`-dlopen' only libtool libraries" 1>&2 | |
1311 | exit 1 | |
1312 | ;; | |
1313 | esac | |
1314 | done | |
1315 | ;; | |
1316 | prog) | |
1317 | compile_deplibs= | |
1318 | finalize_deplibs= | |
1319 | alldeplibs=no | |
1320 | newdlfiles= | |
1321 | newdlprefiles= | |
1322 | link_against_libtool_libs= | |
1323 | passes="scan dlopen dlpreopen link" | |
1324 | ;; | |
1325 | *) passes="link" | |
1326 | ;; | |
1327 | esac | |
1328 | for pass in $passes; do | |
1329 | if test $linkmode = prog; then | |
1330 | case $pass in | |
1331 | dlopen) libs="$dlfiles" ;; | |
1332 | dlpreopen) libs="$dlprefiles" ;; | |
1333 | link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; | |
1334 | esac | |
1335 | fi | |
1336 | if test $pass = dlopen; then | |
1337 | # Collect dlpreopened libraries | |
1338 | save_deplibs="$deplibs" | |
1339 | deplibs= | |
1340 | fi | |
1341 | for deplib in $libs; do | |
1342 | lib= | |
1343 | found=no | |
1344 | case "$deplib" in | |
1345 | -l*) | |
1346 | if test $linkmode != lib && test $linkmode != prog; then | |
1347 | $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 | |
1348 | continue | |
1349 | fi | |
1350 | name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` | |
1351 | for searchdir in $lib_search_path; do | |
1352 | # Search the libtool library | |
1353 | lib="$searchdir/lib${name}.la" | |
1354 | if test -f "$lib"; then | |
1355 | found=yes | |
1356 | break | |
1357 | fi | |
1358 | done | |
1359 | if test "$found" != yes; then | |
1360 | if test "$linkmode,$pass" = "prog,link"; then | |
1361 | compile_deplibs="$deplib $compile_deplibs" | |
1362 | finalize_deplibs="$deplib $finalize_deplibs" | |
1363 | else | |
1364 | deplibs="$deplib $deplibs" | |
1365 | test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs" | |
1366 | fi | |
1367 | continue | |
1368 | fi | |
1369 | ;; | |
1370 | -L*) | |
1371 | case $linkmode in | |
1372 | lib) | |
1373 | deplibs="$deplib $deplibs" | |
1374 | newdependency_libs="$deplib $newdependency_libs" | |
1375 | new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` | |
1376 | ;; | |
1377 | prog) | |
1378 | if test $pass = scan; then | |
1379 | deplibs="$deplib $deplibs" | |
1380 | new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` | |
1381 | else | |
1382 | compile_deplibs="$deplib $compile_deplibs" | |
1383 | finalize_deplibs="$deplib $finalize_deplibs" | |
1384 | fi | |
1385 | ;; | |
1386 | *) | |
1387 | $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 | |
1388 | ;; | |
1389 | esac | |
1390 | continue | |
1391 | ;; | |
1392 | -R*) | |
1393 | if test "$linkmode,$pass" = "prog,link"; then | |
1394 | dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` | |
1395 | # Make sure the xrpath contains only unique directories. | |
1396 | case "$xrpath " in | |
1397 | *" $dir "*) ;; | |
1398 | *) xrpath="$xrpath $dir" ;; | |
1399 | esac | |
1400 | fi | |
1401 | continue | |
1402 | ;; | |
1403 | *.la) lib="$deplib" ;; | |
1404 | *.$libext) | |
1405 | case $linkmode in | |
1406 | lib) | |
1407 | if test "$deplibs_check_method" != pass_all; then | |
1408 | echo | |
1409 | echo "*** Warning: This library needs some functionality provided by $deplib." | |
1410 | echo "*** I have the capability to make that library automatically link in when" | |
1411 | echo "*** you link to this library. But I can only do this if you have a" | |
1412 | echo "*** shared version of the library, which you do not appear to have." | |
1413 | else | |
1414 | echo | |
1415 | echo "*** Warning: Linking the shared library $output against the" | |
1416 | echo "*** static library $deplib is not portable!" | |
1417 | deplibs="$deplib $deplibs" | |
1418 | fi | |
1419 | continue | |
1420 | ;; | |
1421 | prog) | |
1422 | if test $pass != link; then | |
1423 | deplibs="$deplib $deplibs" | |
1424 | else | |
1425 | compile_deplibs="$deplib $compile_deplibs" | |
1426 | finalize_deplibs="$deplib $finalize_deplibs" | |
1427 | fi | |
1428 | continue | |
1429 | ;; | |
1430 | esac | |
1431 | ;; | |
1432 | *.lo | *.$objext) | |
1433 | if test $linkmode = prog; then | |
1434 | if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then | |
1435 | # If there is no dlopen support or we're linking statically, | |
1436 | # we need to preload. | |
1437 | newdlprefiles="$newdlprefiles $deplib" | |
1438 | compile_deplibs="$deplib $compile_deplibs" | |
1439 | finalize_deplibs="$deplib $finalize_deplibs" | |
1440 | else | |
1441 | newdlfiles="$newdlfiles $deplib" | |
1442 | fi | |
1443 | fi | |
1444 | continue | |
1445 | ;; | |
1446 | %DEPLIBS%) | |
1447 | alldeplibs=yes | |
1448 | continue | |
1449 | ;; | |
1450 | esac | |
1451 | if test $found = yes || test -f "$lib"; then : | |
1452 | else | |
1453 | $echo "$modename: cannot find the library \`$lib'" 1>&2 | |
1454 | exit 1 | |
1455 | fi | |
1456 | ||
1457 | # Check to see that this really is a libtool archive. | |
1458 | if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | |
1459 | else | |
1460 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | |
1461 | exit 1 | |
1462 | fi | |
1463 | ||
1464 | ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` | |
1465 | test "X$ladir" = "X$lib" && ladir="." | |
1466 | ||
1467 | dlname= | |
1468 | dlopen= | |
1469 | dlpreopen= | |
1470 | libdir= | |
1471 | library_names= | |
1472 | old_library= | |
1473 | # If the library was installed with an old release of libtool, | |
1474 | # it will not redefine variable installed. | |
1475 | installed=yes | |
1476 | ||
1477 | # Read the .la file | |
1478 | case "$lib" in | |
1479 | */* | *\\*) . $lib ;; | |
1480 | *) . ./$lib ;; | |
1481 | esac | |
1482 | ||
1483 | if test $linkmode = lib || test "$linkmode,$pass" = "prog,scan"; then | |
1484 | test -n "$dlopen" && dlfiles="$dlfiles $dlopen" | |
1485 | test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" | |
1486 | fi | |
1487 | ||
1488 | if test $linkmode != lib && test $linkmode != prog; then | |
1489 | # only check for convenience libraries | |
1490 | if test -z "$old_library"; then | |
1491 | $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 | |
1492 | exit 1 | |
1493 | fi | |
1494 | if test -n "$libdir"; then | |
1495 | $echo "$modename: \`$lib' is not a convenience library" 1>&2 | |
1496 | exit 1 | |
1497 | fi | |
1498 | # It is a libtool convenience library, so add in its objects. | |
1499 | convenience="$convenience $ladir/$objdir/$old_library" | |
1500 | old_convenience="$old_convenience $ladir/$objdir/$old_library" | |
1501 | continue | |
1502 | fi | |
1503 | ||
1504 | # Get the name of the library we link against. | |
1505 | linklib= | |
1506 | for l in $old_library $library_names; do | |
1507 | linklib="$l" | |
1508 | done | |
1509 | if test -z "$linklib"; then | |
1510 | $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 | |
1511 | exit 1 | |
1512 | fi | |
1513 | ||
1514 | # This library was specified with -dlopen. | |
1515 | if test $pass = dlopen; then | |
1516 | if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then | |
1517 | # If there is no dlname, no dlopen support or we're linking statically, | |
1518 | # we need to preload. | |
1519 | dlprefiles="$dlprefiles $lib" | |
1520 | else | |
1521 | newdlfiles="$newdlfiles $lib" | |
1522 | fi | |
1523 | continue | |
1524 | fi | |
1525 | ||
1526 | # We need an absolute path. | |
1527 | case "$ladir" in | |
1528 | [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; | |
1529 | *) | |
1530 | abs_ladir=`cd "$ladir" && pwd` | |
1531 | if test -z "$abs_ladir"; then | |
1532 | $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 | |
1533 | $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 | |
1534 | abs_ladir="$ladir" | |
1535 | fi | |
1536 | ;; | |
1537 | esac | |
1538 | laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` | |
1539 | ||
1540 | # Find the relevant object directory and library name. | |
1541 | if test "X$installed" = Xyes; then | |
1542 | if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then | |
1543 | $echo "$modename: warning: library \`$lib' was moved." 1>&2 | |
1544 | dir="$ladir" | |
1545 | absdir="$abs_ladir" | |
1546 | libdir="$abs_ladir" | |
1547 | else | |
1548 | dir="$libdir" | |
1549 | absdir="$libdir" | |
1550 | fi | |
1551 | else | |
1552 | dir="$ladir/$objdir" | |
1553 | absdir="$abs_ladir/$objdir" | |
1554 | # Remove this search path later | |
1555 | uninst_path="$uninst_path $abs_ladir" | |
1556 | fi | |
1557 | name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` | |
1558 | ||
1559 | # This library was specified with -dlpreopen. | |
1560 | if test $pass = dlpreopen; then | |
1561 | # Prefer using a static library (so that no silly _DYNAMIC symbols | |
1562 | # are required to link). | |
1563 | if test -n "$old_library"; then | |
1564 | newdlprefiles="$newdlprefiles $dir/$old_library" | |
1565 | else | |
1566 | newdlprefiles="$newdlprefiles $dir/$linklib" | |
1567 | fi | |
1568 | fi | |
1569 | ||
1570 | if test $linkmode = prog && test $pass != link; then | |
1571 | new_lib_search_path="$new_lib_search_path $ladir" | |
1572 | deplibs="$lib $deplibs" | |
1573 | ||
1574 | linkalldeplibs=no | |
1575 | if test "$link_all_deplibs" != no || test "$fast_install" != no || \ | |
1576 | test "$build_libtool_libs" = no || test -z "$library_names"; then | |
1577 | linkalldeplibs=yes | |
1578 | fi | |
1579 | ||
1580 | tmp_libs= | |
1581 | for deplib in $dependency_libs; do | |
1582 | case "$deplib" in | |
1583 | -L*) new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test | |
1584 | esac | |
1585 | # Need to link against all dependency_libs? | |
1586 | if test $linkalldeplibs = yes; then | |
1587 | deplibs="$deplib $deplibs" | |
1588 | else | |
1589 | # Need to hardcode shared library paths | |
1590 | # or/and link against static libraries | |
1591 | newdependency_libs="$deplib $newdependency_libs" | |
1592 | fi | |
1593 | case "$tmp_libs " in | |
1594 | *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; | |
1595 | esac | |
1596 | tmp_libs="$tmp_libs $deplib" | |
1597 | done | |
1598 | continue | |
1599 | fi | |
1600 | ||
1601 | if test -z "$libdir"; then | |
1602 | # It is a libtool convenience library, so add in its objects. | |
1603 | convenience="$convenience $dir/$old_library" | |
1604 | old_convenience="$old_convenience $dir/$old_library" | |
1605 | if test $linkmode = lib; then | |
1606 | deplibs="$dir/$old_library $deplibs" | |
1607 | tmp_libs= | |
1608 | for deplib in $dependency_libs; do | |
1609 | newdependency_libs="$deplib $newdependency_libs" | |
1610 | case "$tmp_libs " in | |
1611 | *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; | |
1612 | esac | |
1613 | tmp_libs="$tmp_libs $deplib" | |
1614 | done | |
1615 | elif test "$linkmode,$pass" = "prog,link"; then | |
1616 | compile_deplibs="$dir/$old_library $compile_deplibs" | |
1617 | finalize_deplibs="$dir/$old_library $finalize_deplibs" | |
1618 | fi | |
1619 | continue | |
1620 | fi | |
1621 | ||
1622 | if test "$linkmode,$pass" = "prog,link"; then | |
1623 | if test -n "$library_names" && | |
1624 | { test "$hardcode_into_libs" != all || test "$alldeplibs" != yes; } && | |
1625 | { test "$prefer_static_libs" = no || test -z "$old_library"; }; then | |
1626 | # We need to hardcode the library path | |
1627 | if test -n "$shlibpath_var"; then | |
1628 | # Make sure the rpath contains only unique directories. | |
1629 | case "$temp_rpath " in | |
1630 | *" $dir "*) ;; | |
1631 | *" $absdir "*) ;; | |
1632 | *) temp_rpath="$temp_rpath $dir" ;; | |
1633 | esac | |
1634 | fi | |
1635 | ||
1636 | # Hardcode the library path. | |
1637 | # Skip directories that are in the system default run-time | |
1638 | # search path. | |
1639 | case " $sys_lib_dlsearch_path " in | |
1640 | *" $absdir "*) ;; | |
1641 | *) | |
1642 | case "$compile_rpath " in | |
1643 | *" $absdir "*) ;; | |
1644 | *) compile_rpath="$compile_rpath $absdir" | |
1645 | esac | |
1646 | ;; | |
1647 | esac | |
1648 | ||
1649 | case " $sys_lib_dlsearch_path " in | |
1650 | *" $libdir "*) ;; | |
1651 | *) | |
1652 | case "$finalize_rpath " in | |
1653 | *" $libdir "*) ;; | |
1654 | *) finalize_rpath="$finalize_rpath $libdir" | |
1655 | esac | |
1656 | ;; | |
1657 | esac | |
1658 | fi | |
1659 | ||
1660 | if test "$alldeplibs" = yes && | |
1661 | { test "$deplibs_check_method" = pass_all || | |
1662 | { test "$build_libtool_libs" = yes && | |
1663 | test -n "$library_names"; }; }; then | |
1664 | # Do we only need to link against static libraries? | |
1665 | continue | |
1666 | fi | |
1667 | fi | |
1668 | ||
1669 | link_static=no # Whether this library is linked statically | |
1670 | if test -n "$library_names" && | |
1671 | { test "$prefer_static_libs" = no || test -z "$old_library"; }; then | |
1672 | link_against_libtool_libs="$link_against_libtool_libs $lib" | |
1673 | test "X$installed" = xno && need_relink=yes | |
1674 | # This is a shared library | |
1675 | if test $linkmode = lib && test "$hardcode_into_libs" = all; then | |
1676 | # Hardcode the library path. | |
1677 | # Skip directories that are in the system default run-time | |
1678 | # search path. | |
1679 | case " $sys_lib_dlsearch_path " in | |
1680 | *" $absdir "*) ;; | |
1681 | *) | |
1682 | case "$compile_rpath " in | |
1683 | *" $absdir "*) ;; | |
1684 | *) compile_rpath="$compile_rpath $absdir" | |
1685 | esac | |
1686 | ;; | |
1687 | esac | |
1688 | case " $sys_lib_dlsearch_path " in | |
1689 | *" $libdir "*) ;; | |
1690 | *) | |
1691 | case "$finalize_rpath " in | |
1692 | *" $libdir "*) ;; | |
1693 | *) finalize_rpath="$finalize_rpath $libdir" | |
1694 | esac | |
1695 | ;; | |
1696 | esac | |
1697 | fi | |
1698 | ||
1699 | if test -n "$old_archive_from_expsyms_cmds"; then | |
1700 | # figure out the soname | |
1701 | set dummy $library_names | |
1702 | realname="$2" | |
1703 | shift; shift | |
1704 | libname=`eval \\$echo \"$libname_spec\"` | |
1705 | if test -n "$soname_spec"; then | |
1706 | eval soname=\"$soname_spec\" | |
1707 | else | |
1708 | soname="$realname" | |
1709 | fi | |
1710 | ||
1711 | # Make a new name for the extract_expsyms_cmds to use | |
1712 | newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" | |
1713 | ||
1714 | # If the library has no export list, then create one now | |
1715 | if test -f "$output_objdir/$soname-def"; then : | |
1716 | else | |
1717 | $show "extracting exported symbol list from \`$soname'" | |
1718 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
1719 | eval cmds=\"$extract_expsyms_cmds\" | |
1720 | for cmd in $cmds; do | |
1721 | IFS="$save_ifs" | |
1722 | $show "$cmd" | |
1723 | $run eval "$cmd" || exit $? | |
1724 | done | |
1725 | IFS="$save_ifs" | |
1726 | fi | |
1727 | ||
1728 | # Create $newlib | |
1729 | if test -f "$output_objdir/$newlib"; then :; else | |
1730 | $show "generating import library for \`$soname'" | |
1731 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
1732 | eval cmds=\"$old_archive_from_expsyms_cmds\" | |
1733 | for cmd in $cmds; do | |
1734 | IFS="$save_ifs" | |
1735 | $show "$cmd" | |
1736 | $run eval "$cmd" || exit $? | |
1737 | done | |
1738 | IFS="$save_ifs" | |
1739 | fi | |
1740 | # make sure the library variables are pointing to the new library | |
1741 | dir=$output_objdir | |
1742 | linklib=$newlib | |
1743 | fi | |
1744 | ||
1745 | if test $linkmode = prog || test "$mode" != relink; then | |
1746 | add_shlibpath= | |
1747 | add_dir= | |
1748 | add= | |
1749 | lib_linked=yes | |
1750 | case "$hardcode_action" in | |
1751 | immediate | unsupported) | |
1752 | if test "$hardcode_direct" = no; then | |
1753 | add="$dir/$linklib" | |
1754 | elif test "$hardcode_minus_L" = no; then | |
1755 | case "$host" in | |
1756 | *-*-sunos*) add_shlibpath="$dir" ;; | |
1757 | esac | |
1758 | add_dir="-L$dir" | |
1759 | add="-l$name" | |
1760 | elif test "$hardcode_shlibpath_var" = no; then | |
1761 | add_shlibpath="$dir" | |
1762 | add="-l$name" | |
1763 | else | |
1764 | lib_linked=no | |
1765 | fi | |
1766 | ;; | |
1767 | relink) | |
1768 | if test "$hardcode_direct" = yes; then | |
1769 | add="$dir/$linklib" | |
1770 | elif test "$hardcode_minus_L" = yes; then | |
1771 | add_dir="-L$dir" | |
1772 | add="-l$name" | |
1773 | elif test "$hardcode_shlibpath_var" = yes; then | |
1774 | add_shlibpath="$dir" | |
1775 | add="-l$name" | |
1776 | else | |
1777 | lib_linked=no | |
1778 | fi | |
1779 | ;; | |
1780 | *) lib_linked=no ;; | |
1781 | esac | |
1782 | ||
1783 | if test "$lib_linked" != yes; then | |
1784 | $echo "$modename: configuration error: unsupported hardcode properties" | |
1785 | exit 1 | |
1786 | fi | |
1787 | ||
1788 | if test -n "$add_shlibpath"; then | |
1789 | case ":$compile_shlibpath:" in | |
1790 | *":$add_shlibpath:"*) ;; | |
1791 | *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; | |
1792 | esac | |
1793 | fi | |
1794 | if test $linkmode = prog; then | |
1795 | test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" | |
1796 | test -n "$add" && compile_deplibs="$add $compile_deplibs" | |
1797 | else | |
1798 | test -n "$add_dir" && deplibs="$add_dir $deplibs" | |
1799 | test -n "$add" && deplibs="$add $deplibs" | |
1800 | if test "$hardcode_direct" != yes && \ | |
1801 | test "$hardcode_minus_L" != yes && \ | |
1802 | test "$hardcode_shlibpath_var" = yes; then | |
1803 | case ":$finalize_shlibpath:" in | |
1804 | *":$libdir:"*) ;; | |
1805 | *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; | |
1806 | esac | |
1807 | fi | |
1808 | fi | |
1809 | fi | |
1810 | ||
1811 | if test $linkmode = prog || test "$mode" = relink; then | |
1812 | add_shlibpath= | |
1813 | add_dir= | |
1814 | add= | |
1815 | # Finalize command for both is simple: just hardcode it. | |
1816 | if test "$hardcode_direct" = yes; then | |
1817 | add="$libdir/$linklib" | |
1818 | elif test "$hardcode_minus_L" = yes; then | |
1819 | add_dir="-L$libdir" | |
1820 | add="-l$name" | |
1821 | elif test "$hardcode_shlibpath_var" = yes; then | |
1822 | case ":$finalize_shlibpath:" in | |
1823 | *":$libdir:"*) ;; | |
1824 | *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; | |
1825 | esac | |
1826 | add="-l$name" | |
1827 | else | |
1828 | # We cannot seem to hardcode it, guess we'll fake it. | |
1829 | add_dir="-L$libdir" | |
1830 | add="-l$name" | |
1831 | fi | |
1832 | ||
1833 | if test $linkmode = prog; then | |
1834 | test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" | |
1835 | test -n "$add" && finalize_deplibs="$add $finalize_deplibs" | |
1836 | else | |
1837 | test -n "$add_dir" && deplibs="$add_dir $deplibs" | |
1838 | test -n "$add" && deplibs="$add deplibs" | |
1839 | fi | |
1840 | fi | |
1841 | elif test $linkmode = prog; then | |
1842 | # Here we assume that one of hardcode_direct or hardcode_minus_L | |
1843 | # is not unsupported. This is valid on all known static and | |
1844 | # shared platforms. | |
1845 | if test "$hardcode_direct" != unsupported; then | |
1846 | test -n "$old_library" && linklib="$old_library" | |
1847 | compile_deplibs="$dir/$linklib $compile_deplibs" | |
1848 | finalize_deplibs="$dir/$linklib $finalize_deplibs" | |
1849 | else | |
1850 | compile_deplibs="-l$name -L$dir $compile_deplibs" | |
1851 | finalize_deplibs="-l$name -L$dir $finalize_deplibs" | |
1852 | fi | |
1853 | elif test "$build_libtool_libs" = yes; then | |
1854 | # Not a shared library | |
1855 | if test "$deplibs_check_method" != pass_all; then | |
1856 | # We're trying link a shared library against a static one | |
1857 | # but the system doesn't support it. | |
1858 | # Just print a warning and add the library to dependency_libs so | |
1859 | # that the program can be linked against the static library. | |
1860 | echo | |
1861 | echo "*** Warning: This library needs some functionality provided by $lib." | |
1862 | echo "*** I have the capability to make that library automatically link in when" | |
1863 | echo "*** you link to this library. But I can only do this if you have a" | |
1864 | echo "*** shared version of the library, which you do not appear to have." | |
1865 | else | |
1866 | convenience="$convenience $dir/$old_library" | |
1867 | old_convenience="$old_convenience $dir/$old_library" | |
1868 | deplibs="$dir/$old_library $deplibs" | |
1869 | link_static=yes | |
1870 | fi | |
1871 | fi | |
1872 | ||
1873 | if test $linkmode = lib; then | |
1874 | if test -n "$dependency_libs" && | |
1875 | { test "$hardcode_into_libs" = no || test $build_old_libs = yes || | |
1876 | test $link_static = yes; }; then | |
1877 | # Extract -R from dependency_libs | |
1878 | temp_deplibs= | |
1879 | for libdir in $dependency_libs; do | |
1880 | case "$libdir" in | |
1881 | -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` | |
1882 | case " $xrpath " in | |
1883 | *" $temp_xrpath "*) ;; | |
1884 | *) xrpath="$xrpath $temp_xrpath";; | |
1885 | esac;; | |
1886 | *) temp_deplibs="$temp_deplibs $libdir";; | |
1887 | esac | |
1888 | done | |
1889 | dependency_libs="$temp_deplibs" | |
1890 | fi | |
1891 | ||
1892 | new_lib_search_path="$new_lib_search_path $absdir" | |
1893 | # Link against this library | |
1894 | test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" | |
1895 | # ... and its dependency_libs | |
1896 | tmp_libs= | |
1897 | for deplib in $dependency_libs; do | |
1898 | newdependency_libs="$deplib $newdependency_libs" | |
1899 | case "$tmp_libs " in | |
1900 | *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; | |
1901 | esac | |
1902 | tmp_libs="$tmp_libs $deplib" | |
1903 | done | |
1904 | ||
1905 | if test $link_all_deplibs != no; then | |
1906 | # Add the search paths of all dependency libraries | |
1907 | for deplib in $dependency_libs; do | |
1908 | case "$deplib" in | |
1909 | -L*) path="$deplib" ;; | |
1910 | *.la) | |
1911 | dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` | |
1912 | test "X$dir" = "X$deplib" && dir="." | |
1913 | # We need an absolute path. | |
1914 | case "$dir" in | |
1915 | [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; | |
1916 | *) | |
1917 | absdir=`cd "$dir" && pwd` | |
1918 | if test -z "$absdir"; then | |
1919 | $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 | |
1920 | absdir="$dir" | |
1921 | fi | |
1922 | ;; | |
1923 | esac | |
1924 | if grep "^installed=no" $deplib > /dev/null; then | |
1925 | path="-L$absdir/$objdir" | |
1926 | else | |
1927 | eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` | |
1928 | if test -z "$libdir"; then | |
1929 | $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 | |
1930 | exit 1 | |
1931 | fi | |
1932 | if test "$absdir" != "$libdir"; then | |
1933 | $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 | |
1934 | fi | |
1935 | path="-L$absdir" | |
1936 | fi | |
1937 | ;; | |
1938 | *) continue ;; | |
1939 | esac | |
1940 | case " $deplibs " in | |
1941 | *" $path "*) ;; | |
1942 | *) deplibs="$deplibs $path" ;; | |
1943 | esac | |
1944 | done | |
1945 | fi | |
1946 | fi | |
1947 | done | |
1948 | dependency_libs="$newdependency_libs" | |
1949 | if test $pass = dlpreopen; then | |
1950 | # Link the dlpreopened libraries before other libraries | |
1951 | deplibs="$deplibs $save_deplibs" | |
1952 | elif test $pass != dlopen; then | |
1953 | # Make sure lib_search_path contains only unique directories. | |
1954 | lib_search_path= | |
1955 | for dir in $new_lib_search_path; do | |
1956 | case "$lib_search_path " in | |
1957 | *" $dir "*) ;; | |
1958 | *) lib_search_path="$lib_search_path $dir" ;; | |
1959 | esac | |
1960 | done | |
1961 | lib_search_path="$lib_search_path $sys_lib_search_path" | |
1962 | ||
1963 | if test "$linkmode,$pass" != "prog,link"; then | |
1964 | vars="deplibs" | |
1965 | else | |
1966 | vars="compile_deplibs finalize_deplibs" | |
1967 | fi | |
1968 | for var in $vars dependency_libs; do | |
1969 | # Make sure that $var contains only unique libraries | |
1970 | # and add them in reverse order | |
1971 | eval tmp_libs=\"\$$var\" | |
1972 | new_libs= | |
1973 | for deplib in $tmp_libs; do | |
1974 | case "$deplib" in | |
1975 | -L*) new_libs="$deplib $new_libs" ;; | |
1976 | *) | |
1977 | case " $specialdeplibs " in | |
1978 | *" $deplib "*) new_libs="$deplib $new_libs" ;; | |
1979 | *) | |
1980 | case " $new_libs " in | |
1981 | *" $deplib "*) ;; | |
1982 | *) new_libs="$deplib $new_libs" ;; | |
1983 | esac | |
1984 | ;; | |
1985 | esac | |
1986 | ;; | |
1987 | esac | |
1988 | done | |
1989 | tmp_libs= | |
1990 | for deplib in $new_libs; do | |
1991 | case "$deplib" in | |
1992 | -L*) | |
1993 | case " $tmp_libs " in | |
1994 | *" $deplib "*) ;; | |
1995 | *) tmp_libs="$tmp_libs $deplib" ;; | |
1996 | esac | |
1997 | ;; | |
1998 | *) tmp_libs="$tmp_libs $deplib" ;; | |
1999 | esac | |
2000 | done | |
2001 | eval $var=\"$tmp_libs\" | |
2002 | done | |
2003 | fi | |
2004 | done | |
2005 | if test $linkmode = prog; then | |
2006 | dlfiles="$newdlfiles" | |
2007 | dlprefiles="$newdlprefiles" | |
2008 | fi | |
2009 | ||
2010 | case $linkmode in | |
2011 | oldlib) | |
2012 | if test -n "$deplibs"; then | |
2013 | $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 | |
2014 | fi | |
2015 | ||
2016 | if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | |
2017 | $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 | |
2018 | fi | |
2019 | ||
2020 | if test -n "$rpath"; then | |
2021 | $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 | |
2022 | fi | |
2023 | ||
2024 | if test -n "$xrpath"; then | |
2025 | $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 | |
2026 | fi | |
2027 | ||
2028 | if test -n "$vinfo"; then | |
2029 | $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 | |
2030 | fi | |
2031 | ||
2032 | if test -n "$release"; then | |
2033 | $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 | |
2034 | fi | |
2035 | ||
2036 | if test -n "$export_symbols" || test -n "$export_symbols_regex"; then | |
2037 | $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 | |
2038 | fi | |
2039 | ||
2040 | # Now set the variables for building old libraries. | |
2041 | build_libtool_libs=no | |
2042 | oldlibs="$output" | |
2043 | objs="$objs$old_deplibs" | |
2044 | ;; | |
2045 | ||
2046 | lib) | |
2047 | # Make sure we only generate libraries of the form `libNAME.la'. | |
2048 | case "$outputname" in | |
2049 | lib*) | |
2050 | name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` | |
2051 | eval libname=\"$libname_spec\" | |
2052 | ;; | |
2053 | *) | |
2054 | if test "$module" = no; then | |
2055 | $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 | |
2056 | $echo "$help" 1>&2 | |
2057 | exit 1 | |
2058 | fi | |
2059 | if test "$need_lib_prefix" != no; then | |
2060 | # Add the "lib" prefix for modules if required | |
2061 | name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` | |
2062 | eval libname=\"$libname_spec\" | |
2063 | else | |
2064 | libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` | |
2065 | fi | |
2066 | ;; | |
2067 | esac | |
2068 | ||
2069 | if test -n "$objs"; then | |
2070 | if test "$deplibs_check_method" != pass_all; then | |
2071 | $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 | |
2072 | exit 1 | |
2073 | else | |
2074 | echo | |
2075 | echo "*** Warning: Linking the shared library $output against the non-libtool" | |
2076 | echo "*** objects $objs is not portable!" | |
2077 | libobjs="$libobjs $objs" | |
2078 | fi | |
2079 | fi | |
2080 | ||
2081 | if test "$dlself" != no; then | |
2082 | $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 | |
2083 | fi | |
2084 | ||
2085 | set dummy $rpath | |
2086 | if test $# -gt 2; then | |
2087 | $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 | |
2088 | fi | |
2089 | install_libdir="$2" | |
2090 | ||
2091 | oldlibs= | |
2092 | if test -z "$rpath"; then | |
2093 | if test "$build_libtool_libs" = yes; then | |
2094 | # Building a libtool convenience library. | |
2095 | libext=al | |
2096 | oldlibs="$output_objdir/$libname.$libext $oldlibs" | |
2097 | build_libtool_libs=convenience | |
2098 | build_old_libs=yes | |
2099 | fi | |
2100 | ||
2101 | if test -n "$vinfo"; then | |
2102 | $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 | |
2103 | fi | |
2104 | ||
2105 | if test -n "$release"; then | |
2106 | $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 | |
2107 | fi | |
2108 | else | |
2109 | ||
2110 | # Parse the version information argument. | |
2111 | IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' | |
2112 | set dummy $vinfo 0 0 0 | |
2113 | IFS="$save_ifs" | |
2114 | ||
2115 | if test -n "$8"; then | |
2116 | $echo "$modename: too many parameters to \`-version-info'" 1>&2 | |
2117 | $echo "$help" 1>&2 | |
2118 | exit 1 | |
2119 | fi | |
2120 | ||
2121 | current="$2" | |
2122 | revision="$3" | |
2123 | age="$4" | |
2124 | ||
2125 | # Check that each of the things are valid numbers. | |
2126 | case "$current" in | |
2127 | 0 | [1-9] | [1-9][0-9]*) ;; | |
2128 | *) | |
2129 | $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 | |
2130 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | |
2131 | exit 1 | |
2132 | ;; | |
2133 | esac | |
2134 | ||
2135 | case "$revision" in | |
2136 | 0 | [1-9] | [1-9][0-9]*) ;; | |
2137 | *) | |
2138 | $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 | |
2139 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | |
2140 | exit 1 | |
2141 | ;; | |
2142 | esac | |
2143 | ||
2144 | case "$age" in | |
2145 | 0 | [1-9] | [1-9][0-9]*) ;; | |
2146 | *) | |
2147 | $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 | |
2148 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | |
2149 | exit 1 | |
2150 | ;; | |
2151 | esac | |
2152 | ||
2153 | if test $age -gt $current; then | |
2154 | $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 | |
2155 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | |
2156 | exit 1 | |
2157 | fi | |
2158 | ||
2159 | # Calculate the version variables. | |
2160 | major= | |
2161 | versuffix= | |
2162 | verstring= | |
2163 | case "$version_type" in | |
2164 | none) ;; | |
2165 | ||
2166 | irix) | |
2167 | major=`expr $current - $age + 1` | |
2168 | versuffix="$major.$revision" | |
2169 | verstring="sgi$major.$revision" | |
2170 | ||
2171 | # Add in all the interfaces that we are compatible with. | |
2172 | loop=$revision | |
2173 | while test $loop != 0; do | |
2174 | iface=`expr $revision - $loop` | |
2175 | loop=`expr $loop - 1` | |
2176 | verstring="sgi$major.$iface:$verstring" | |
2177 | done | |
2178 | ;; | |
2179 | ||
2180 | linux) | |
2181 | major=.`expr $current - $age` | |
2182 | versuffix="$major.$age.$revision" | |
2183 | ;; | |
2184 | ||
2185 | osf) | |
2186 | major=`expr $current - $age` | |
2187 | versuffix=".$current.$age.$revision" | |
2188 | verstring="$current.$age.$revision" | |
2189 | ||
2190 | # Add in all the interfaces that we are compatible with. | |
2191 | loop=$age | |
2192 | while test $loop != 0; do | |
2193 | iface=`expr $current - $loop` | |
2194 | loop=`expr $loop - 1` | |
2195 | verstring="$verstring:${iface}.0" | |
2196 | done | |
2197 | ||
2198 | # Make executables depend on our current version. | |
2199 | verstring="$verstring:${current}.0" | |
2200 | ;; | |
2201 | ||
2202 | sunos) | |
2203 | major=".$current" | |
2204 | versuffix=".$current.$revision" | |
2205 | ;; | |
2206 | ||
2207 | freebsd-aout) | |
2208 | major=".$current" | |
2209 | versuffix=".$current.$revision"; | |
2210 | ;; | |
2211 | ||
2212 | freebsd-elf) | |
2213 | major=".$current" | |
2214 | versuffix=".$current"; | |
2215 | ;; | |
2216 | ||
2217 | windows) | |
2218 | # Like Linux, but with '-' rather than '.', since we only | |
2219 | # want one extension on Windows 95. | |
2220 | major=`expr $current - $age` | |
2221 | versuffix="-$major-$age-$revision" | |
2222 | ;; | |
2223 | ||
2224 | *) | |
2225 | $echo "$modename: unknown library version type \`$version_type'" 1>&2 | |
2226 | echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 | |
2227 | exit 1 | |
2228 | ;; | |
2229 | esac | |
2230 | ||
2231 | # Clear the version info if we defaulted, and they specified a release. | |
2232 | if test -z "$vinfo" && test -n "$release"; then | |
2233 | major= | |
2234 | verstring="0.0" | |
2235 | if test "$need_version" = no; then | |
2236 | versuffix= | |
2237 | else | |
2238 | versuffix=".0.0" | |
2239 | fi | |
2240 | fi | |
2241 | ||
2242 | # Remove version info from name if versioning should be avoided | |
2243 | if test "$avoid_version" = yes && test "$need_version" = no; then | |
2244 | major= | |
2245 | versuffix= | |
2246 | verstring="" | |
2247 | fi | |
2248 | ||
2249 | # Check to see if the archive will have undefined symbols. | |
2250 | if test "$allow_undefined" = yes; then | |
2251 | if test "$allow_undefined_flag" = unsupported; then | |
2252 | $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 | |
2253 | build_libtool_libs=no | |
2254 | build_old_libs=yes | |
2255 | fi | |
2256 | else | |
2257 | # Don't allow undefined symbols. | |
2258 | allow_undefined_flag="$no_undefined_flag" | |
2259 | fi | |
2260 | fi | |
2261 | ||
2262 | if test "$mode" != relink; then | |
2263 | # Remove our outputs. | |
2264 | $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" | |
2265 | $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* | |
2266 | fi | |
2267 | ||
2268 | # Now set the variables for building old libraries. | |
2269 | if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then | |
2270 | oldlibs="$oldlibs $output_objdir/$libname.$libext" | |
2271 | ||
2272 | # Transform .lo files to .o files. | |
2273 | oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` | |
2274 | fi | |
2275 | ||
2276 | # Eliminate all temporary directories. | |
2277 | for path in $uninst_path; do | |
2278 | lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` | |
2279 | deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` | |
2280 | dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` | |
2281 | done | |
2282 | ||
2283 | if test -n "$xrpath"; then | |
2284 | # If the user specified any rpath flags, then add them. | |
2285 | temp_xrpath= | |
2286 | for libdir in $xrpath; do | |
2287 | temp_xrpath="$temp_xrpath -R$libdir" | |
2288 | case "$finalize_rpath " in | |
2289 | *" $libdir "*) ;; | |
2290 | *) finalize_rpath="$finalize_rpath $libdir" ;; | |
2291 | esac | |
2292 | done | |
2293 | if test "$hardcode_into_libs" = no || test $build_old_libs = yes; then | |
2294 | dependency_libs="$temp_xrpath $dependency_libs" | |
2295 | fi | |
2296 | fi | |
2297 | ||
2298 | # Make sure dlfiles contains only unique files that won't be dlpreopened | |
2299 | old_dlfiles="$dlfiles" | |
2300 | dlfiles= | |
2301 | for lib in $old_dlfiles; do | |
2302 | case " $dlprefiles $dlfiles " in | |
2303 | *" $lib "*) ;; | |
2304 | *) dlfiles="$dlfiles $lib" ;; | |
2305 | esac | |
2306 | done | |
2307 | ||
2308 | # Make sure dlprefiles contains only unique files | |
2309 | old_dlprefiles="$dlprefiles" | |
2310 | dlprefiles= | |
2311 | for lib in $old_dlprefiles; do | |
2312 | case "$dlprefiles " in | |
2313 | *" $lib "*) ;; | |
2314 | *) dlprefiles="$dlprefiles $lib" ;; | |
2315 | esac | |
2316 | done | |
2317 | ||
2318 | if test "$build_libtool_libs" = yes; then | |
2319 | if test -n "$rpath"; then | |
2320 | case "$host" in | |
2321 | *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) | |
2322 | # these systems don't actually have a c library (as such)! | |
2323 | ;; | |
2324 | *) | |
2325 | # Add libc to deplibs on all other systems. | |
2326 | deplibs="$deplibs -lc" | |
2327 | ;; | |
2328 | esac | |
2329 | fi | |
2330 | ||
2331 | # Transform deplibs into only deplibs that can be linked in shared. | |
2332 | name_save=$name | |
2333 | libname_save=$libname | |
2334 | release_save=$release | |
2335 | versuffix_save=$versuffix | |
2336 | major_save=$major | |
2337 | # I'm not sure if I'm treating the release correctly. I think | |
2338 | # release should show up in the -l (ie -lgmp5) so we don't want to | |
2339 | # add it in twice. Is that correct? | |
2340 | release="" | |
2341 | versuffix="" | |
2342 | major="" | |
2343 | newdeplibs= | |
2344 | droppeddeps=no | |
2345 | case "$deplibs_check_method" in | |
2346 | pass_all) | |
2347 | # Don't check for shared/static. Everything works. | |
2348 | # This might be a little naive. We might want to check | |
2349 | # whether the library exists or not. But this is on | |
2350 | # osf3 & osf4 and I'm not really sure... Just | |
2351 | # implementing what was already the behaviour. | |
2352 | newdeplibs=$deplibs | |
2353 | ;; | |
2354 | test_compile) | |
2355 | # This code stresses the "libraries are programs" paradigm to its | |
2356 | # limits. Maybe even breaks it. We compile a program, linking it | |
2357 | # against the deplibs as a proxy for the library. Then we can check | |
2358 | # whether they linked in statically or dynamically with ldd. | |
2359 | $rm conftest.c | |
2360 | cat > conftest.c <<EOF | |
2361 | int main() { return 0; } | |
2362 | EOF | |
2363 | $rm conftest | |
2364 | $CC -o conftest conftest.c $deplibs | |
2365 | if test $? -eq 0 ; then | |
2366 | ldd_output=`ldd conftest` | |
2367 | for i in $deplibs; do | |
2368 | name="`expr $i : '-l\(.*\)'`" | |
2369 | # If $name is empty we are operating on a -L argument. | |
2370 | if test "$name" != "" ; then | |
2371 | libname=`eval \\$echo \"$libname_spec\"` | |
2372 | deplib_matches=`eval \\$echo \"$library_names_spec\"` | |
2373 | set dummy $deplib_matches | |
2374 | deplib_match=$2 | |
2375 | if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then | |
2376 | newdeplibs="$newdeplibs $i" | |
2377 | else | |
2378 | droppeddeps=yes | |
2379 | echo | |
2380 | echo "*** Warning: This library needs some functionality provided by $i." | |
2381 | echo "*** I have the capability to make that library automatically link in when" | |
2382 | echo "*** you link to this library. But I can only do this if you have a" | |
2383 | echo "*** shared version of the library, which you do not appear to have." | |
2384 | fi | |
2385 | else | |
2386 | newdeplibs="$newdeplibs $i" | |
2387 | fi | |
2388 | done | |
2389 | else | |
2390 | # Error occured in the first compile. Let's try to salvage the situation: | |
2391 | # Compile a seperate program for each library. | |
2392 | for i in $deplibs; do | |
2393 | name="`expr $i : '-l\(.*\)'`" | |
2394 | # If $name is empty we are operating on a -L argument. | |
2395 | if test "$name" != "" ; then | |
2396 | $rm conftest | |
2397 | $CC -o conftest conftest.c $i | |
2398 | # Did it work? | |
2399 | if test $? -eq 0 ; then | |
2400 | ldd_output=`ldd conftest` | |
2401 | libname=`eval \\$echo \"$libname_spec\"` | |
2402 | deplib_matches=`eval \\$echo \"$library_names_spec\"` | |
2403 | set dummy $deplib_matches | |
2404 | deplib_match=$2 | |
2405 | if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then | |
2406 | newdeplibs="$newdeplibs $i" | |
2407 | else | |
2408 | droppeddeps=yes | |
2409 | echo | |
2410 | echo "*** Warning: This library needs some functionality provided by $i." | |
2411 | echo "*** I have the capability to make that library automatically link in when" | |
2412 | echo "*** you link to this library. But I can only do this if you have a" | |
2413 | echo "*** shared version of the library, which you do not appear to have." | |
2414 | fi | |
2415 | else | |
2416 | droppeddeps=yes | |
2417 | echo | |
2418 | echo "*** Warning! Library $i is needed by this library but I was not able to" | |
2419 | echo "*** make it link in! You will probably need to install it or some" | |
2420 | echo "*** library that it depends on before this library will be fully" | |
2421 | echo "*** functional. Installing it before continuing would be even better." | |
2422 | fi | |
2423 | else | |
2424 | newdeplibs="$newdeplibs $i" | |
2425 | fi | |
2426 | done | |
2427 | fi | |
2428 | ;; | |
2429 | file_magic*) | |
2430 | set dummy $deplibs_check_method | |
2431 | file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` | |
2432 | for a_deplib in $deplibs; do | |
2433 | name="`expr $a_deplib : '-l\(.*\)'`" | |
2434 | # If $name is empty we are operating on a -L argument. | |
2435 | if test "$name" != "" ; then | |
2436 | libname=`eval \\$echo \"$libname_spec\"` | |
2437 | for i in $lib_search_path; do | |
2438 | potential_libs=`ls $i/$libname[.-]* 2>/dev/null` | |
2439 | for potent_lib in $potential_libs; do | |
2440 | # Follow soft links. | |
2441 | if ls -lLd "$potent_lib" 2>/dev/null \ | |
2442 | | grep " -> " >/dev/null; then | |
2443 | continue | |
2444 | fi | |
2445 | # The statement above tries to avoid entering an | |
2446 | # endless loop below, in case of cyclic links. | |
2447 | # We might still enter an endless loop, since a link | |
2448 | # loop can be closed while we follow links, | |
2449 | # but so what? | |
2450 | potlib="$potent_lib" | |
2451 | while test -h "$potlib" 2>/dev/null; do | |
2452 | potliblink=`ls -ld $potlib | sed 's/.* -> //'` | |
2453 | case "$potliblink" in | |
2454 | [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; | |
2455 | *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; | |
2456 | esac | |
2457 | done | |
2458 | if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | |
2459 | | sed 10q \ | |
2460 | | egrep "$file_magic_regex" > /dev/null; then | |
2461 | newdeplibs="$newdeplibs $a_deplib" | |
2462 | a_deplib="" | |
2463 | break 2 | |
2464 | fi | |
2465 | done | |
2466 | done | |
2467 | if test -n "$a_deplib" ; then | |
2468 | droppeddeps=yes | |
2469 | echo | |
2470 | echo "*** Warning: This library needs some functionality provided by $a_deplib." | |
2471 | echo "*** I have the capability to make that library automatically link in when" | |
2472 | echo "*** you link to this library. But I can only do this if you have a" | |
2473 | echo "*** shared version of the library, which you do not appear to have." | |
2474 | fi | |
2475 | else | |
2476 | # Add a -L argument. | |
2477 | newdeplibs="$newdeplibs $a_deplib" | |
2478 | fi | |
2479 | done # Gone through all deplibs. | |
2480 | ;; | |
2481 | none | unknown | *) | |
2482 | newdeplibs="" | |
2483 | if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ | |
2484 | -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | | |
2485 | grep . >/dev/null; then | |
2486 | echo | |
2487 | if test "X$deplibs_check_method" = "Xnone"; then | |
2488 | echo "*** Warning: inter-library dependencies are not supported in this platform." | |
2489 | else | |
2490 | echo "*** Warning: inter-library dependencies are not known to be supported." | |
2491 | fi | |
2492 | echo "*** All declared inter-library dependencies are being dropped." | |
2493 | droppeddeps=yes | |
2494 | fi | |
2495 | ;; | |
2496 | esac | |
2497 | versuffix=$versuffix_save | |
2498 | major=$major_save | |
2499 | release=$release_save | |
2500 | libname=$libname_save | |
2501 | name=$name_save | |
2502 | ||
2503 | if test "$droppeddeps" = yes; then | |
2504 | if test "$module" = yes; then | |
2505 | echo | |
2506 | echo "*** Warning: libtool could not satisfy all declared inter-library" | |
2507 | echo "*** dependencies of module $libname. Therefore, libtool will create" | |
2508 | echo "*** a static module, that should work as long as the dlopening" | |
2509 | echo "*** application is linked with the -dlopen flag." | |
2510 | if test -z "$global_symbol_pipe"; then | |
2511 | echo | |
2512 | echo "*** However, this would only work if libtool was able to extract symbol" | |
2513 | echo "*** lists from a program, using \`nm' or equivalent, but libtool could" | |
2514 | echo "*** not find such a program. So, this module is probably useless." | |
2515 | echo "*** \`nm' from GNU binutils and a full rebuild may help." | |
2516 | fi | |
2517 | if test "$build_old_libs" = no; then | |
2518 | oldlibs="$output_objdir/$libname.$libext" | |
2519 | build_libtool_libs=module | |
2520 | build_old_libs=yes | |
2521 | else | |
2522 | build_libtool_libs=no | |
2523 | fi | |
2524 | else | |
2525 | echo "*** The inter-library dependencies that have been dropped here will be" | |
2526 | echo "*** automatically added whenever a program is linked with this library" | |
2527 | echo "*** or is declared to -dlopen it." | |
2528 | fi | |
2529 | fi | |
2530 | # Done checking deplibs! | |
2531 | deplibs=$newdeplibs | |
2532 | fi | |
2533 | ||
2534 | # All the library-specific variables (install_libdir is set above). | |
2535 | library_names= | |
2536 | old_library= | |
2537 | dlname= | |
2538 | ||
2539 | # Test again, we may have decided not to build it any more | |
2540 | if test "$build_libtool_libs" = yes; then | |
2541 | if test "$hardcode_into_libs" != no; then | |
2542 | # Hardcode the library paths | |
2543 | hardcode_libdirs= | |
2544 | dep_rpath= | |
2545 | rpath="$finalize_rpath" | |
2546 | test "$mode" != relink && rpath="$compile_rpath$rpath" | |
2547 | for libdir in $rpath; do | |
2548 | if test -n "$hardcode_libdir_flag_spec"; then | |
2549 | if test -n "$hardcode_libdir_separator"; then | |
2550 | if test -z "$hardcode_libdirs"; then | |
2551 | hardcode_libdirs="$libdir" | |
2552 | else | |
2553 | # Just accumulate the unique libdirs. | |
2554 | case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in | |
2555 | *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) | |
2556 | ;; | |
2557 | *) | |
2558 | hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" | |
2559 | ;; | |
2560 | esac | |
2561 | fi | |
2562 | else | |
2563 | eval flag=\"$hardcode_libdir_flag_spec\" | |
2564 | dep_rpath="$dep_rpath $flag" | |
2565 | fi | |
2566 | elif test -n "$runpath_var"; then | |
2567 | case "$perm_rpath " in | |
2568 | *" $libdir "*) ;; | |
2569 | *) perm_rpath="$perm_rpath $libdir" ;; | |
2570 | esac | |
2571 | fi | |
2572 | done | |
2573 | # Substitute the hardcoded libdirs into the rpath. | |
2574 | if test -n "$hardcode_libdir_separator" && | |
2575 | test -n "$hardcode_libdirs"; then | |
2576 | libdir="$hardcode_libdirs" | |
2577 | eval dep_rpath=\"$hardcode_libdir_flag_spec\" | |
2578 | fi | |
2579 | if test -n "$runpath_var" && test -n "$perm_rpath"; then | |
2580 | # We should set the runpath_var. | |
2581 | rpath= | |
2582 | for dir in $perm_rpath; do | |
2583 | rpath="$rpath$dir:" | |
2584 | done | |
2585 | eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" | |
2586 | fi | |
2587 | test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" | |
2588 | fi | |
2589 | ||
2590 | shlibpath="$finalize_shlibpath" | |
2591 | test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" | |
2592 | if test -n "$shlibpath"; then | |
2593 | eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" | |
2594 | fi | |
2595 | ||
2596 | # Get the real and link names of the library. | |
2597 | eval library_names=\"$library_names_spec\" | |
2598 | set dummy $library_names | |
2599 | realname="$2" | |
2600 | shift; shift | |
2601 | ||
2602 | if test -n "$soname_spec"; then | |
2603 | eval soname=\"$soname_spec\" | |
2604 | else | |
2605 | soname="$realname" | |
2606 | fi | |
2607 | ||
2608 | lib="$output_objdir/$realname" | |
2609 | for link | |
2610 | do | |
2611 | linknames="$linknames $link" | |
2612 | done | |
2613 | ||
2614 | # Ensure that we have .o objects for linkers which dislike .lo | |
2615 | # (e.g. aix) in case we are running --disable-static | |
2616 | for obj in $libobjs; do | |
2617 | xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` | |
2618 | if test "X$xdir" = "X$obj"; then | |
2619 | xdir="." | |
2620 | else | |
2621 | xdir="$xdir" | |
2622 | fi | |
2623 | baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` | |
2624 | oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` | |
2625 | if test ! -f $xdir/$oldobj; then | |
2626 | $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" | |
2627 | $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? | |
2628 | fi | |
2629 | done | |
2630 | ||
2631 | # Use standard objects if they are pic | |
2632 | test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | |
2633 | ||
2634 | # Prepare the list of exported symbols | |
2635 | if test -z "$export_symbols"; then | |
2636 | if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then | |
2637 | $show "generating symbol list for \`$libname.la'" | |
2638 | export_symbols="$output_objdir/$libname.exp" | |
2639 | $run $rm $export_symbols | |
2640 | eval cmds=\"$export_symbols_cmds\" | |
2641 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
2642 | for cmd in $cmds; do | |
2643 | IFS="$save_ifs" | |
2644 | $show "$cmd" | |
2645 | $run eval "$cmd" || exit $? | |
2646 | done | |
2647 | IFS="$save_ifs" | |
2648 | if test -n "$export_symbols_regex"; then | |
2649 | $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" | |
2650 | $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' | |
2651 | $show "$mv \"${export_symbols}T\" \"$export_symbols\"" | |
2652 | $run eval '$mv "${export_symbols}T" "$export_symbols"' | |
2653 | fi | |
2654 | fi | |
2655 | fi | |
2656 | ||
2657 | if test -n "$export_symbols" && test -n "$include_expsyms"; then | |
2658 | $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' | |
2659 | fi | |
2660 | ||
2661 | if test -n "$convenience"; then | |
2662 | if test -n "$whole_archive_flag_spec"; then | |
2663 | eval libobjs=\"\$libobjs $whole_archive_flag_spec\" | |
2664 | else | |
2665 | gentop="$output_objdir/${outputname}x" | |
2666 | $show "${rm}r $gentop" | |
2667 | $run ${rm}r "$gentop" | |
2668 | $show "mkdir $gentop" | |
2669 | $run mkdir "$gentop" | |
2670 | status=$? | |
2671 | if test $status -ne 0 && test ! -d "$gentop"; then | |
2672 | exit $status | |
2673 | fi | |
2674 | generated="$generated $gentop" | |
2675 | ||
2676 | for xlib in $convenience; do | |
2677 | # Extract the objects. | |
2678 | case "$xlib" in | |
2679 | [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; | |
2680 | *) xabs=`pwd`"/$xlib" ;; | |
2681 | esac | |
2682 | xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` | |
2683 | xdir="$gentop/$xlib" | |
2684 | ||
2685 | $show "${rm}r $xdir" | |
2686 | $run ${rm}r "$xdir" | |
2687 | $show "mkdir $xdir" | |
2688 | $run mkdir "$xdir" | |
2689 | status=$? | |
2690 | if test $status -ne 0 && test ! -d "$xdir"; then | |
2691 | exit $status | |
2692 | fi | |
2693 | $show "(cd $xdir && $AR x $xabs)" | |
2694 | $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? | |
2695 | ||
2696 | libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` | |
2697 | done | |
2698 | fi | |
2699 | fi | |
2700 | ||
2701 | if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then | |
2702 | eval flag=\"$thread_safe_flag_spec\" | |
2703 | linker_flags="$linker_flags $flag" | |
2704 | fi | |
2705 | ||
2706 | # Make a backup of the uninstalled library when relinking | |
2707 | if test "$mode" = relink && test "$hardcode_into_libs" = all; then | |
2708 | $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? | |
2709 | fi | |
2710 | ||
2711 | # Do each of the archive commands. | |
2712 | if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then | |
2713 | eval cmds=\"$archive_expsym_cmds\" | |
2714 | else | |
2715 | eval cmds=\"$archive_cmds\" | |
2716 | fi | |
2717 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
2718 | for cmd in $cmds; do | |
2719 | IFS="$save_ifs" | |
2720 | $show "$cmd" | |
2721 | $run eval "$cmd" || exit $? | |
2722 | done | |
2723 | IFS="$save_ifs" | |
2724 | ||
2725 | # Restore the uninstalled library and exit | |
2726 | if test "$mode" = relink && test "$hardcode_into_libs" = all; then | |
2727 | $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? | |
2728 | exit 0 | |
2729 | fi | |
2730 | ||
2731 | # Create links to the real library. | |
2732 | for linkname in $linknames; do | |
2733 | if test "$realname" != "$linkname"; then | |
2734 | $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" | |
2735 | $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? | |
2736 | fi | |
2737 | done | |
2738 | ||
2739 | # If -module or -export-dynamic was specified, set the dlname. | |
2740 | if test "$module" = yes || test "$export_dynamic" = yes; then | |
2741 | # On all known operating systems, these are identical. | |
2742 | dlname="$soname" | |
2743 | fi | |
2744 | fi | |
2745 | ;; | |
2746 | ||
2747 | obj) | |
2748 | if test -n "$deplibs"; then | |
2749 | $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 | |
2750 | fi | |
2751 | ||
2752 | if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | |
2753 | $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 | |
2754 | fi | |
2755 | ||
2756 | if test -n "$rpath"; then | |
2757 | $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 | |
2758 | fi | |
2759 | ||
2760 | if test -n "$xrpath"; then | |
2761 | $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 | |
2762 | fi | |
2763 | ||
2764 | if test -n "$vinfo"; then | |
2765 | $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 | |
2766 | fi | |
2767 | ||
2768 | if test -n "$release"; then | |
2769 | $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 | |
2770 | fi | |
2771 | ||
2772 | case "$output" in | |
2773 | *.lo) | |
2774 | if test -n "$objs$old_deplibs"; then | |
2775 | $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 | |
2776 | exit 1 | |
2777 | fi | |
2778 | libobj="$output" | |
2779 | obj=`$echo "X$output" | $Xsed -e "$lo2o"` | |
2780 | ;; | |
2781 | *) | |
2782 | libobj= | |
2783 | obj="$output" | |
2784 | ;; | |
2785 | esac | |
2786 | ||
2787 | # Delete the old objects. | |
2788 | $run $rm $obj $libobj | |
2789 | ||
2790 | # Objects from convenience libraries. This assumes | |
2791 | # single-version convenience libraries. Whenever we create | |
2792 | # different ones for PIC/non-PIC, this we'll have to duplicate | |
2793 | # the extraction. | |
2794 | reload_conv_objs= | |
2795 | gentop= | |
2796 | # reload_cmds runs $LD directly, so let us get rid of | |
2797 | # -Wl from whole_archive_flag_spec | |
2798 | wl= | |
2799 | ||
2800 | if test -n "$convenience"; then | |
2801 | if test -n "$whole_archive_flag_spec"; then | |
2802 | eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" | |
2803 | else | |
2804 | gentop="$output_objdir/${obj}x" | |
2805 | $show "${rm}r $gentop" | |
2806 | $run ${rm}r "$gentop" | |
2807 | $show "mkdir $gentop" | |
2808 | $run mkdir "$gentop" | |
2809 | status=$? | |
2810 | if test $status -ne 0 && test ! -d "$gentop"; then | |
2811 | exit $status | |
2812 | fi | |
2813 | generated="$generated $gentop" | |
2814 | ||
2815 | for xlib in $convenience; do | |
2816 | # Extract the objects. | |
2817 | case "$xlib" in | |
2818 | [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; | |
2819 | *) xabs=`pwd`"/$xlib" ;; | |
2820 | esac | |
2821 | xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` | |
2822 | xdir="$gentop/$xlib" | |
2823 | ||
2824 | $show "${rm}r $xdir" | |
2825 | $run ${rm}r "$xdir" | |
2826 | $show "mkdir $xdir" | |
2827 | $run mkdir "$xdir" | |
2828 | status=$? | |
2829 | if test $status -ne 0 && test ! -d "$xdir"; then | |
2830 | exit $status | |
2831 | fi | |
2832 | $show "(cd $xdir && $AR x $xabs)" | |
2833 | $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? | |
2834 | ||
2835 | reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` | |
2836 | done | |
2837 | fi | |
2838 | fi | |
2839 | ||
2840 | # Create the old-style object. | |
2841 | reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test | |
2842 | ||
2843 | output="$obj" | |
2844 | eval cmds=\"$reload_cmds\" | |
2845 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
2846 | for cmd in $cmds; do | |
2847 | IFS="$save_ifs" | |
2848 | $show "$cmd" | |
2849 | $run eval "$cmd" || exit $? | |
2850 | done | |
2851 | IFS="$save_ifs" | |
2852 | ||
2853 | # Exit if we aren't doing a library object file. | |
2854 | if test -z "$libobj"; then | |
2855 | if test -n "$gentop"; then | |
2856 | $show "${rm}r $gentop" | |
2857 | $run ${rm}r $gentop | |
2858 | fi | |
2859 | ||
2860 | exit 0 | |
2861 | fi | |
2862 | ||
2863 | if test "$build_libtool_libs" != yes; then | |
2864 | if test -n "$gentop"; then | |
2865 | $show "${rm}r $gentop" | |
2866 | $run ${rm}r $gentop | |
2867 | fi | |
2868 | ||
2869 | # Create an invalid libtool object if no PIC, so that we don't | |
2870 | # accidentally link it into a program. | |
2871 | $show "echo timestamp > $libobj" | |
2872 | $run eval "echo timestamp > $libobj" || exit $? | |
2873 | exit 0 | |
2874 | fi | |
2875 | ||
2876 | if test -n "$pic_flag" || test "$pic_mode" != default; then | |
2877 | # Only do commands if we really have different PIC objects. | |
2878 | reload_objs="$libobjs $reload_conv_objs" | |
2879 | output="$libobj" | |
2880 | eval cmds=\"$reload_cmds\" | |
2881 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
2882 | for cmd in $cmds; do | |
2883 | IFS="$save_ifs" | |
2884 | $show "$cmd" | |
2885 | $run eval "$cmd" || exit $? | |
2886 | done | |
2887 | IFS="$save_ifs" | |
2888 | else | |
2889 | # Just create a symlink. | |
2890 | $show $rm $libobj | |
2891 | $run $rm $libobj | |
2892 | xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` | |
2893 | if test "X$xdir" = "X$libobj"; then | |
2894 | xdir="." | |
2895 | else | |
2896 | xdir="$xdir" | |
2897 | fi | |
2898 | baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` | |
2899 | oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` | |
2900 | $show "(cd $xdir && $LN_S $oldobj $baseobj)" | |
2901 | $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? | |
2902 | fi | |
2903 | ||
2904 | if test -n "$gentop"; then | |
2905 | $show "${rm}r $gentop" | |
2906 | $run ${rm}r $gentop | |
2907 | fi | |
2908 | ||
2909 | exit 0 | |
2910 | ;; | |
2911 | ||
2912 | prog) | |
2913 | if test -n "$vinfo"; then | |
2914 | $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 | |
2915 | fi | |
2916 | ||
2917 | if test -n "$release"; then | |
2918 | $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 | |
2919 | fi | |
2920 | ||
2921 | if test "$preload" = yes; then | |
2922 | if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && | |
2923 | test "$dlopen_self_static" = unknown; then | |
2924 | $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." | |
2925 | fi | |
2926 | fi | |
2927 | ||
2928 | compile_command="$compile_command $compile_deplibs" | |
2929 | finalize_command="$finalize_command $finalize_deplibs" | |
2930 | ||
2931 | if test -n "$rpath$xrpath"; then | |
2932 | # If the user specified any rpath flags, then add them. | |
2933 | for libdir in $rpath $xrpath; do | |
2934 | # This is the magic to use -rpath. | |
2935 | case "$finalize_rpath " in | |
2936 | *" $libdir "*) ;; | |
2937 | *) finalize_rpath="$finalize_rpath $libdir" ;; | |
2938 | esac | |
2939 | done | |
2940 | fi | |
2941 | ||
2942 | # Now hardcode the library paths | |
2943 | rpath= | |
2944 | hardcode_libdirs= | |
2945 | for libdir in $compile_rpath $finalize_rpath; do | |
2946 | if test -n "$hardcode_libdir_flag_spec"; then | |
2947 | if test -n "$hardcode_libdir_separator"; then | |
2948 | if test -z "$hardcode_libdirs"; then | |
2949 | hardcode_libdirs="$libdir" | |
2950 | else | |
2951 | # Just accumulate the unique libdirs. | |
2952 | case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in | |
2953 | *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) | |
2954 | ;; | |
2955 | *) | |
2956 | hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" | |
2957 | ;; | |
2958 | esac | |
2959 | fi | |
2960 | else | |
2961 | eval flag=\"$hardcode_libdir_flag_spec\" | |
2962 | rpath="$rpath $flag" | |
2963 | fi | |
2964 | elif test -n "$runpath_var"; then | |
2965 | case "$perm_rpath " in | |
2966 | *" $libdir "*) ;; | |
2967 | *) perm_rpath="$perm_rpath $libdir" ;; | |
2968 | esac | |
2969 | fi | |
2970 | case "$host" in | |
2971 | *-*-cygwin* | *-*-mingw* | *-*-os2*) | |
2972 | case ":$dllsearchpath:" in | |
2973 | *":$libdir:"*) ;; | |
2974 | *) dllsearchpath="$dllsearchpath:$libdir";; | |
2975 | esac | |
2976 | ;; | |
2977 | esac | |
2978 | done | |
2979 | # Substitute the hardcoded libdirs into the rpath. | |
2980 | if test -n "$hardcode_libdir_separator" && | |
2981 | test -n "$hardcode_libdirs"; then | |
2982 | libdir="$hardcode_libdirs" | |
2983 | eval rpath=\" $hardcode_libdir_flag_spec\" | |
2984 | fi | |
2985 | compile_rpath="$rpath" | |
2986 | ||
2987 | rpath= | |
2988 | hardcode_libdirs= | |
2989 | for libdir in $finalize_rpath; do | |
2990 | if test -n "$hardcode_libdir_flag_spec"; then | |
2991 | if test -n "$hardcode_libdir_separator"; then | |
2992 | if test -z "$hardcode_libdirs"; then | |
2993 | hardcode_libdirs="$libdir" | |
2994 | else | |
2995 | # Just accumulate the unique libdirs. | |
2996 | case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in | |
2997 | *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) | |
2998 | ;; | |
2999 | *) | |
3000 | hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" | |
3001 | ;; | |
3002 | esac | |
3003 | fi | |
3004 | else | |
3005 | eval flag=\"$hardcode_libdir_flag_spec\" | |
3006 | rpath="$rpath $flag" | |
3007 | fi | |
3008 | elif test -n "$runpath_var"; then | |
3009 | case "$finalize_perm_rpath " in | |
3010 | *" $libdir "*) ;; | |
3011 | *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; | |
3012 | esac | |
3013 | fi | |
3014 | done | |
3015 | # Substitute the hardcoded libdirs into the rpath. | |
3016 | if test -n "$hardcode_libdir_separator" && | |
3017 | test -n "$hardcode_libdirs"; then | |
3018 | libdir="$hardcode_libdirs" | |
3019 | eval rpath=\" $hardcode_libdir_flag_spec\" | |
3020 | fi | |
3021 | finalize_rpath="$rpath" | |
3022 | ||
3023 | if test -n "$libobjs" && test "$build_old_libs" = yes; then | |
3024 | # Transform all the library objects into standard objects. | |
3025 | compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | |
3026 | finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | |
3027 | fi | |
3028 | ||
3029 | dlsyms= | |
3030 | if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | |
3031 | if test -n "$NM" && test -n "$global_symbol_pipe"; then | |
3032 | dlsyms="${outputname}S.c" | |
3033 | else | |
3034 | $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 | |
3035 | fi | |
3036 | fi | |
3037 | ||
3038 | if test -n "$dlsyms"; then | |
3039 | case "$dlsyms" in | |
3040 | "") ;; | |
3041 | *.c) | |
3042 | # Discover the nlist of each of the dlfiles. | |
3043 | nlist="$output_objdir/${outputname}.nm" | |
3044 | ||
3045 | $show "$rm $nlist ${nlist}S ${nlist}T" | |
3046 | $run $rm "$nlist" "${nlist}S" "${nlist}T" | |
3047 | ||
3048 | # Parse the name list into a source file. | |
3049 | $show "creating $output_objdir/$dlsyms" | |
3050 | ||
3051 | test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ | |
3052 | /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ | |
3053 | /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ | |
3054 | ||
3055 | #ifdef __cplusplus | |
3056 | extern \"C\" { | |
3057 | #endif | |
3058 | ||
3059 | /* Prevent the only kind of declaration conflicts we can make. */ | |
3060 | #define lt_preloaded_symbols some_other_symbol | |
3061 | ||
3062 | /* External symbol declarations for the compiler. */\ | |
3063 | " | |
3064 | ||
3065 | if test "$dlself" = yes; then | |
3066 | $show "generating symbol list for \`$output'" | |
3067 | ||
3068 | test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" | |
3069 | ||
3070 | # Add our own program objects to the symbol list. | |
3071 | progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | |
3072 | for arg in $progfiles; do | |
3073 | $show "extracting global C symbols from \`$arg'" | |
3074 | $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" | |
3075 | done | |
3076 | ||
3077 | if test -n "$exclude_expsyms"; then | |
3078 | $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' | |
3079 | $run eval '$mv "$nlist"T "$nlist"' | |
3080 | fi | |
3081 | ||
3082 | if test -n "$export_symbols_regex"; then | |
3083 | $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' | |
3084 | $run eval '$mv "$nlist"T "$nlist"' | |
3085 | fi | |
3086 | ||
3087 | # Prepare the list of exported symbols | |
3088 | if test -z "$export_symbols"; then | |
3089 | export_symbols="$output_objdir/$output.exp" | |
3090 | $run $rm $export_symbols | |
3091 | $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' | |
3092 | else | |
3093 | $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' | |
3094 | $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' | |
3095 | $run eval 'mv "$nlist"T "$nlist"' | |
3096 | fi | |
3097 | fi | |
3098 | ||
3099 | for arg in $dlprefiles; do | |
3100 | $show "extracting global C symbols from \`$arg'" | |
3101 | name=`echo "$arg" | sed -e 's%^.*/%%'` | |
3102 | $run eval 'echo ": $name " >> "$nlist"' | |
3103 | $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" | |
3104 | done | |
3105 | ||
3106 | if test -z "$run"; then | |
3107 | # Make sure we have at least an empty file. | |
3108 | test -f "$nlist" || : > "$nlist" | |
3109 | ||
3110 | if test -n "$exclude_expsyms"; then | |
3111 | egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T | |
3112 | $mv "$nlist"T "$nlist" | |
3113 | fi | |
3114 | ||
3115 | # Try sorting and uniquifying the output. | |
3116 | if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then | |
3117 | : | |
3118 | else | |
3119 | grep -v "^: " < "$nlist" > "$nlist"S | |
3120 | fi | |
3121 | ||
3122 | if test -f "$nlist"S; then | |
3123 | eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' | |
3124 | else | |
3125 | echo '/* NONE */' >> "$output_objdir/$dlsyms" | |
3126 | fi | |
3127 | ||
3128 | $echo >> "$output_objdir/$dlsyms" "\ | |
3129 | ||
3130 | #undef lt_preloaded_symbols | |
3131 | ||
3132 | #if defined (__STDC__) && __STDC__ | |
3133 | # define lt_ptr_t void * | |
3134 | #else | |
3135 | # define lt_ptr_t char * | |
3136 | # define const | |
3137 | #endif | |
3138 | ||
3139 | /* The mapping between symbol names and symbols. */ | |
3140 | extern const struct { | |
3141 | const char *name; | |
3142 | lt_ptr_t address; | |
3143 | } | |
3144 | lt_preloaded_symbols[] = | |
3145 | {\ | |
3146 | " | |
3147 | ||
3148 | sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ | |
3149 | -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ | |
3150 | < "$nlist" >> "$output_objdir/$dlsyms" | |
3151 | ||
3152 | $echo >> "$output_objdir/$dlsyms" "\ | |
3153 | {0, (lt_ptr_t) 0} | |
3154 | }; | |
3155 | ||
3156 | /* This works around a problem in FreeBSD linker */ | |
3157 | #ifdef FREEBSD_WORKAROUND | |
3158 | static const void *lt_preloaded_setup() { | |
3159 | return lt_preloaded_symbols; | |
3160 | } | |
3161 | #endif | |
3162 | ||
3163 | #ifdef __cplusplus | |
3164 | } | |
3165 | #endif\ | |
3166 | " | |
3167 | fi | |
3168 | ||
3169 | pic_flag_for_symtable= | |
3170 | case "$host" in | |
3171 | # compiling the symbol table file with pic_flag works around | |
3172 | # a FreeBSD bug that causes programs to crash when -lm is | |
3173 | # linked before any other PIC object. But we must not use | |
3174 | # pic_flag when linking with -static. The problem exists in | |
3175 | # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. | |
3176 | *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) | |
3177 | case "$compile_command " in | |
3178 | *" -static "*) ;; | |
3179 | *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; | |
3180 | esac;; | |
3181 | *-*-hpux*) | |
3182 | case "$compile_command " in | |
3183 | *" -static "*) ;; | |
3184 | *) pic_flag_for_symtable=" $pic_flag -DPIC";; | |
3185 | esac | |
3186 | esac | |
3187 | ||
3188 | # Now compile the dynamic symbol file. | |
3189 | $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" | |
3190 | $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? | |
3191 | ||
3192 | # Clean up the generated files. | |
3193 | $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" | |
3194 | $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" | |
3195 | ||
3196 | # Transform the symbol file into the correct name. | |
3197 | compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` | |
3198 | finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` | |
3199 | ;; | |
3200 | *) | |
3201 | $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 | |
3202 | exit 1 | |
3203 | ;; | |
3204 | esac | |
3205 | else | |
3206 | # We keep going just in case the user didn't refer to | |
3207 | # lt_preloaded_symbols. The linker will fail if global_symbol_pipe | |
3208 | # really was required. | |
3209 | ||
3210 | # Nullify the symbol file. | |
3211 | compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` | |
3212 | finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` | |
3213 | fi | |
3214 | ||
3215 | if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then | |
3216 | # Replace the output file specification. | |
3217 | compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` | |
3218 | link_command="$compile_command$compile_rpath" | |
3219 | ||
3220 | # We have no uninstalled library dependencies, so finalize right now. | |
3221 | $show "$link_command" | |
3222 | $run eval "$link_command" | |
3223 | status=$? | |
3224 | ||
3225 | # Delete the generated files. | |
3226 | if test -n "$dlsyms"; then | |
3227 | $show "$rm $output_objdir/${outputname}S.${objext}" | |
3228 | $run $rm "$output_objdir/${outputname}S.${objext}" | |
3229 | fi | |
3230 | ||
3231 | exit $status | |
3232 | fi | |
3233 | ||
3234 | if test -n "$shlibpath_var"; then | |
3235 | # We should set the shlibpath_var | |
3236 | rpath= | |
3237 | for dir in $temp_rpath; do | |
3238 | case "$dir" in | |
3239 | [\\/]* | [A-Za-z]:[\\/]*) | |
3240 | # Absolute path. | |
3241 | rpath="$rpath$dir:" | |
3242 | ;; | |
3243 | *) | |
3244 | # Relative path: add a thisdir entry. | |
3245 | rpath="$rpath\$thisdir/$dir:" | |
3246 | ;; | |
3247 | esac | |
3248 | done | |
3249 | temp_rpath="$rpath" | |
3250 | fi | |
3251 | ||
3252 | if test -n "$compile_shlibpath$finalize_shlibpath"; then | |
3253 | compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" | |
3254 | fi | |
3255 | if test -n "$finalize_shlibpath"; then | |
3256 | finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" | |
3257 | fi | |
3258 | ||
3259 | compile_var= | |
3260 | finalize_var= | |
3261 | if test -n "$runpath_var"; then | |
3262 | if test -n "$perm_rpath"; then | |
3263 | # We should set the runpath_var. | |
3264 | rpath= | |
3265 | for dir in $perm_rpath; do | |
3266 | rpath="$rpath$dir:" | |
3267 | done | |
3268 | compile_var="$runpath_var=\"$rpath\$$runpath_var\" " | |
3269 | fi | |
3270 | if test -n "$finalize_perm_rpath"; then | |
3271 | # We should set the runpath_var. | |
3272 | rpath= | |
3273 | for dir in $finalize_perm_rpath; do | |
3274 | rpath="$rpath$dir:" | |
3275 | done | |
3276 | finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " | |
3277 | fi | |
3278 | fi | |
3279 | ||
3280 | if test "$no_install" = yes; then | |
3281 | # We don't need to create a wrapper script. | |
3282 | link_command="$compile_var$compile_command$compile_rpath" | |
3283 | # Replace the output file specification. | |
3284 | link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` | |
3285 | # Delete the old output file. | |
3286 | $run $rm $output | |
3287 | # Link the executable and exit | |
3288 | $show "$link_command" | |
3289 | $run eval "$link_command" || exit $? | |
3290 | exit 0 | |
3291 | fi | |
3292 | ||
3293 | if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then | |
3294 | # Fast installation is not supported | |
3295 | link_command="$compile_var$compile_command$compile_rpath" | |
3296 | relink_command="$finalize_var$finalize_command$finalize_rpath" | |
3297 | ||
3298 | $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 | |
3299 | $echo "$modename: \`$output' will be relinked during installation" 1>&2 | |
3300 | else | |
3301 | if test "$fast_install" != no; then | |
3302 | link_command="$finalize_var$compile_command$finalize_rpath" | |
3303 | if test "$fast_install" = yes; then | |
3304 | relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` | |
3305 | else | |
3306 | # fast_install is set to needless | |
3307 | relink_command= | |
3308 | fi | |
3309 | else | |
3310 | link_command="$compile_var$compile_command$compile_rpath" | |
3311 | relink_command="$finalize_var$finalize_command$finalize_rpath" | |
3312 | fi | |
3313 | fi | |
3314 | ||
3315 | # Replace the output file specification. | |
3316 | link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` | |
3317 | ||
3318 | # Delete the old output files. | |
3319 | $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname | |
3320 | ||
3321 | $show "$link_command" | |
3322 | $run eval "$link_command" || exit $? | |
3323 | ||
3324 | # Now create the wrapper script. | |
3325 | $show "creating $output" | |
3326 | ||
3327 | # Quote the relink command for shipping. | |
3328 | if test -n "$relink_command"; then | |
3329 | relink_command="cd `pwd`; $relink_command" | |
3330 | relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` | |
3331 | fi | |
3332 | ||
3333 | # Quote $echo for shipping. | |
3334 | if test "X$echo" = "X$SHELL $0 --fallback-echo"; then | |
3335 | case "$0" in | |
3336 | [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; | |
3337 | *) qecho="$SHELL `pwd`/$0 --fallback-echo";; | |
3338 | esac | |
3339 | qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` | |
3340 | else | |
3341 | qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` | |
3342 | fi | |
3343 | ||
3344 | # Only actually do things if our run command is non-null. | |
3345 | if test -z "$run"; then | |
3346 | # win32 will think the script is a binary if it has | |
3347 | # a .exe suffix, so we strip it off here. | |
3348 | case $output in | |
3349 | *.exe) output=`echo $output|sed 's,.exe$,,'` ;; | |
3350 | esac | |
3351 | $rm $output | |
3352 | trap "$rm $output; exit 1" 1 2 15 | |
3353 | ||
3354 | $echo > $output "\ | |
3355 | #! $SHELL | |
3356 | ||
3357 | # $output - temporary wrapper script for $objdir/$outputname | |
3358 | # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP | |
3359 | # | |
3360 | # The $output program cannot be directly executed until all the libtool | |
3361 | # libraries that it depends on are installed. | |
3362 | # | |
3363 | # This wrapper script should never be moved out of the build directory. | |
3364 | # If it is, it will not operate correctly. | |
3365 | ||
3366 | # Sed substitution that helps us do robust quoting. It backslashifies | |
3367 | # metacharacters that are still active within double-quoted strings. | |
3368 | Xsed='sed -e 1s/^X//' | |
3369 | sed_quote_subst='$sed_quote_subst' | |
3370 | ||
3371 | # The HP-UX ksh and POSIX shell print the target directory to stdout | |
3372 | # if CDPATH is set. | |
3373 | if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi | |
3374 | ||
3375 | relink_command=\"$relink_command\" | |
3376 | ||
3377 | # This environment variable determines our operation mode. | |
3378 | if test \"\$libtool_install_magic\" = \"$magic\"; then | |
3379 | # install mode needs the following variable: | |
3380 | link_against_libtool_libs='$link_against_libtool_libs' | |
3381 | else | |
3382 | # When we are sourced in execute mode, \$file and \$echo are already set. | |
3383 | if test \"\$libtool_execute_magic\" != \"$magic\"; then | |
3384 | echo=\"$qecho\" | |
3385 | file=\"\$0\" | |
3386 | # Make sure echo works. | |
3387 | if test \"X\$1\" = X--no-reexec; then | |
3388 | # Discard the --no-reexec flag, and continue. | |
3389 | shift | |
3390 | elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then | |
3391 | # Yippee, \$echo works! | |
3392 | : | |
3393 | else | |
3394 | # Restart under the correct shell, and then maybe \$echo will work. | |
3395 | exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} | |
3396 | fi | |
3397 | fi\ | |
3398 | " | |
3399 | $echo >> $output "\ | |
3400 | ||
3401 | # Find the directory that this script lives in. | |
3402 | thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` | |
3403 | test \"x\$thisdir\" = \"x\$file\" && thisdir=. | |
3404 | ||
3405 | # Follow symbolic links until we get to the real thisdir. | |
3406 | file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` | |
3407 | while test -n \"\$file\"; do | |
3408 | destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` | |
3409 | ||
3410 | # If there was a directory component, then change thisdir. | |
3411 | if test \"x\$destdir\" != \"x\$file\"; then | |
3412 | case \"\$destdir\" in | |
3413 | [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; | |
3414 | *) thisdir=\"\$thisdir/\$destdir\" ;; | |
3415 | esac | |
3416 | fi | |
3417 | ||
3418 | file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` | |
3419 | file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` | |
3420 | done | |
3421 | ||
3422 | # Try to get the absolute directory name. | |
3423 | absdir=\`cd \"\$thisdir\" && pwd\` | |
3424 | test -n \"\$absdir\" && thisdir=\"\$absdir\" | |
3425 | " | |
3426 | ||
3427 | if test "$fast_install" = yes; then | |
3428 | echo >> $output "\ | |
3429 | program=lt-'$outputname' | |
3430 | progdir=\"\$thisdir/$objdir\" | |
3431 | ||
3432 | if test ! -f \"\$progdir/\$program\" || \\ | |
3433 | { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ | |
3434 | test \"X\$file\" != \"X\$progdir/\$program\"; }; then | |
3435 | ||
3436 | file=\"\$\$-\$program\" | |
3437 | ||
3438 | if test ! -d \"\$progdir\"; then | |
3439 | $mkdir \"\$progdir\" | |
3440 | else | |
3441 | $rm \"\$progdir/\$file\" | |
3442 | fi" | |
3443 | ||
3444 | echo >> $output "\ | |
3445 | ||
3446 | # relink executable if necessary | |
3447 | if test -n \"\$relink_command\"; then | |
3448 | if (eval \$relink_command); then : | |
3449 | else | |
3450 | $rm \"\$progdir/\$file\" | |
3451 | exit 1 | |
3452 | fi | |
3453 | fi | |
3454 | ||
3455 | $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || | |
3456 | { $rm \"\$progdir/\$program\"; | |
3457 | $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } | |
3458 | $rm \"\$progdir/\$file\" | |
3459 | fi" | |
3460 | else | |
3461 | echo >> $output "\ | |
3462 | program='$outputname' | |
3463 | progdir=\"\$thisdir/$objdir\" | |
3464 | " | |
3465 | fi | |
3466 | ||
3467 | echo >> $output "\ | |
3468 | ||
3469 | if test -f \"\$progdir/\$program\"; then" | |
3470 | ||
3471 | # Export our shlibpath_var if we have one. | |
3472 | if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then | |
3473 | $echo >> $output "\ | |
3474 | # Add our own library path to $shlibpath_var | |
3475 | $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" | |
3476 | ||
3477 | # Some systems cannot cope with colon-terminated $shlibpath_var | |
3478 | # The second colon is a workaround for a bug in BeOS R4 sed | |
3479 | $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` | |
3480 | ||
3481 | export $shlibpath_var | |
3482 | " | |
3483 | fi | |
3484 | ||
3485 | # fixup the dll searchpath if we need to. | |
3486 | if test -n "$dllsearchpath"; then | |
3487 | $echo >> $output "\ | |
3488 | # Add the dll search path components to the executable PATH | |
3489 | PATH=$dllsearchpath:\$PATH | |
3490 | " | |
3491 | fi | |
3492 | ||
3493 | $echo >> $output "\ | |
3494 | if test \"\$libtool_execute_magic\" != \"$magic\"; then | |
3495 | # Run the actual program with our arguments. | |
3496 | " | |
3497 | case $host in | |
3498 | *-*-cygwin* | *-*-mingw | *-*-os2*) | |
3499 | # win32 systems need to use the prog path for dll | |
3500 | # lookup to work | |
3501 | $echo >> $output "\ | |
3502 | exec \$progdir\\\\\$program \${1+\"\$@\"} | |
3503 | " | |
3504 | ;; | |
3505 | *) | |
3506 | $echo >> $output "\ | |
3507 | # Export the path to the program. | |
3508 | PATH=\"\$progdir:\$PATH\" | |
3509 | export PATH | |
3510 | ||
3511 | exec \$program \${1+\"\$@\"} | |
3512 | " | |
3513 | ;; | |
3514 | esac | |
3515 | $echo >> $output "\ | |
3516 | \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" | |
3517 | exit 1 | |
3518 | fi | |
3519 | else | |
3520 | # The program doesn't exist. | |
3521 | \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 | |
3522 | \$echo \"This script is just a wrapper for \$program.\" 1>&2 | |
3523 | echo \"See the $PACKAGE documentation for more information.\" 1>&2 | |
3524 | exit 1 | |
3525 | fi | |
3526 | fi\ | |
3527 | " | |
3528 | chmod +x $output | |
3529 | fi | |
3530 | exit 0 | |
3531 | ;; | |
3532 | esac | |
3533 | ||
3534 | # See if we need to build an old-fashioned archive. | |
3535 | for oldlib in $oldlibs; do | |
3536 | ||
3537 | if test "$build_libtool_libs" = convenience; then | |
3538 | oldobjs="$libobjs_save" | |
3539 | addlibs="$convenience" | |
3540 | build_libtool_libs=no | |
3541 | else | |
3542 | if test "$build_libtool_libs" = module; then | |
3543 | oldobjs="$libobjs_save" | |
3544 | build_libtool_libs=no | |
3545 | else | |
3546 | oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` | |
3547 | fi | |
3548 | addlibs="$old_convenience" | |
3549 | fi | |
3550 | ||
3551 | if test -n "$addlibs"; then | |
3552 | gentop="$output_objdir/${outputname}x" | |
3553 | $show "${rm}r $gentop" | |
3554 | $run ${rm}r "$gentop" | |
3555 | $show "mkdir $gentop" | |
3556 | $run mkdir "$gentop" | |
3557 | status=$? | |
3558 | if test $status -ne 0 && test ! -d "$gentop"; then | |
3559 | exit $status | |
3560 | fi | |
3561 | generated="$generated $gentop" | |
3562 | ||
3563 | # Add in members from convenience archives. | |
3564 | for xlib in $addlibs; do | |
3565 | # Extract the objects. | |
3566 | case "$xlib" in | |
3567 | [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; | |
3568 | *) xabs=`pwd`"/$xlib" ;; | |
3569 | esac | |
3570 | xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` | |
3571 | xdir="$gentop/$xlib" | |
3572 | ||
3573 | $show "${rm}r $xdir" | |
3574 | $run ${rm}r "$xdir" | |
3575 | $show "mkdir $xdir" | |
3576 | $run mkdir "$xdir" | |
3577 | status=$? | |
3578 | if test $status -ne 0 && test ! -d "$xdir"; then | |
3579 | exit $status | |
3580 | fi | |
3581 | $show "(cd $xdir && $AR x $xabs)" | |
3582 | $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? | |
3583 | ||
3584 | oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` | |
3585 | done | |
3586 | fi | |
3587 | ||
3588 | # Do each command in the archive commands. | |
3589 | if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then | |
3590 | eval cmds=\"$old_archive_from_new_cmds\" | |
3591 | else | |
3592 | # Ensure that we have .o objects in place in case we decided | |
3593 | # not to build a shared library, and have fallen back to building | |
3594 | # static libs even though --disable-static was passed! | |
3595 | for oldobj in $oldobjs; do | |
3596 | if test ! -f $oldobj; then | |
3597 | xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` | |
3598 | if test "X$xdir" = "X$oldobj"; then | |
3599 | xdir="." | |
3600 | else | |
3601 | xdir="$xdir" | |
3602 | fi | |
3603 | baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` | |
3604 | obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` | |
3605 | $show "(cd $xdir && ${LN_S} $obj $baseobj)" | |
3606 | $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? | |
3607 | fi | |
3608 | done | |
3609 | ||
3610 | eval cmds=\"$old_archive_cmds\" | |
3611 | fi | |
3612 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
3613 | for cmd in $cmds; do | |
3614 | IFS="$save_ifs" | |
3615 | $show "$cmd" | |
3616 | $run eval "$cmd" || exit $? | |
3617 | done | |
3618 | IFS="$save_ifs" | |
3619 | done | |
3620 | ||
3621 | if test -n "$generated"; then | |
3622 | $show "${rm}r$generated" | |
3623 | $run ${rm}r$generated | |
3624 | fi | |
3625 | ||
3626 | # Now create the libtool archive. | |
3627 | case "$output" in | |
3628 | *.la) | |
3629 | old_library= | |
3630 | test "$build_old_libs" = yes && old_library="$libname.$libext" | |
3631 | $show "creating $output" | |
3632 | ||
3633 | # Quote the link command for shipping. | |
3634 | relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" | |
3635 | relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` | |
3636 | ||
3637 | # Only create the output if not a dry run. | |
3638 | if test -z "$run"; then | |
3639 | for installed in no yes; do | |
3640 | if test "$installed" = yes; then | |
3641 | if test -z "$install_libdir"; then | |
3642 | break | |
3643 | fi | |
3644 | output="$output_objdir/$outputname"i | |
3645 | # Replace all uninstalled libtool libraries with the installed ones | |
3646 | newdependency_libs= | |
3647 | for deplib in $dependency_libs; do | |
3648 | case "$deplib" in | |
3649 | *.la) | |
3650 | name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` | |
3651 | eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` | |
3652 | if test -z "$libdir"; then | |
3653 | $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 | |
3654 | exit 1 | |
3655 | fi | |
3656 | newdependency_libs="$newdependency_libs $libdir/$name" | |
3657 | ;; | |
3658 | *) newdependency_libs="$newdependency_libs $deplib" ;; | |
3659 | esac | |
3660 | done | |
3661 | dependency_libs="$newdependency_libs" | |
3662 | newdlfiles= | |
3663 | for lib in $dlfiles; do | |
3664 | name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` | |
3665 | eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` | |
3666 | if test -z "$libdir"; then | |
3667 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | |
3668 | exit 1 | |
3669 | fi | |
3670 | newdlfiles="$newdlfiles $libdir/$name" | |
3671 | done | |
3672 | dlfiles="$newdlfiles" | |
3673 | newdlprefiles= | |
3674 | for lib in $dlprefiles; do | |
3675 | name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` | |
3676 | eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` | |
3677 | if test -z "$libdir"; then | |
3678 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | |
3679 | exit 1 | |
3680 | fi | |
3681 | newdlprefiles="$newdlprefiles $libdir/$name" | |
3682 | done | |
3683 | dlprefiles="$newdlprefiles" | |
3684 | fi | |
3685 | $rm $output | |
3686 | $echo > $output "\ | |
3687 | # $outputname - a libtool library file | |
3688 | # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP | |
3689 | # | |
3690 | # Please DO NOT delete this file! | |
3691 | # It is necessary for linking the library. | |
3692 | ||
3693 | # The name that we can dlopen(3). | |
3694 | dlname='$dlname' | |
3695 | ||
3696 | # Names of this library. | |
3697 | library_names='$library_names' | |
3698 | ||
3699 | # The name of the static archive. | |
3700 | old_library='$old_library' | |
3701 | ||
3702 | # Libraries that this one depends upon. | |
3703 | dependency_libs='$dependency_libs' | |
3704 | ||
3705 | # Version information for $libname. | |
3706 | current=$current | |
3707 | age=$age | |
3708 | revision=$revision | |
3709 | ||
3710 | # Is this an already installed library? | |
3711 | installed=$installed | |
3712 | ||
3713 | # Files to dlopen/dlpreopen | |
3714 | dlopen='$dlfiles' | |
3715 | dlpreopen='$dlprefiles' | |
3716 | ||
3717 | # Directory that this library needs to be installed in: | |
3718 | libdir='$install_libdir'" | |
3719 | if test "$installed" = no; then | |
3720 | $echo >> $output "\ | |
3721 | relink_command=\"$relink_command\"" | |
3722 | fi | |
3723 | done | |
3724 | fi | |
3725 | ||
3726 | # Do a symbolic link so that the libtool archive can be found in | |
3727 | # LD_LIBRARY_PATH before the program is installed. | |
3728 | $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" | |
3729 | $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? | |
3730 | ;; | |
3731 | esac | |
3732 | exit 0 | |
3733 | ;; | |
3734 | ||
3735 | # libtool install mode | |
3736 | install) | |
3737 | modename="$modename: install" | |
3738 | ||
3739 | # There may be an optional sh(1) argument at the beginning of | |
3740 | # install_prog (especially on Windows NT). | |
3741 | if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then | |
3742 | # Aesthetically quote it. | |
3743 | arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` | |
3744 | case "$arg" in | |
3745 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) | |
3746 | arg="\"$arg\"" | |
3747 | ;; | |
3748 | esac | |
3749 | install_prog="$arg " | |
3750 | arg="$1" | |
3751 | shift | |
3752 | else | |
3753 | install_prog= | |
3754 | arg="$nonopt" | |
3755 | fi | |
3756 | ||
3757 | # The real first argument should be the name of the installation program. | |
3758 | # Aesthetically quote it. | |
3759 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | |
3760 | case "$arg" in | |
3761 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) | |
3762 | arg="\"$arg\"" | |
3763 | ;; | |
3764 | esac | |
3765 | install_prog="$install_prog$arg" | |
3766 | ||
3767 | # We need to accept at least all the BSD install flags. | |
3768 | dest= | |
3769 | files= | |
3770 | opts= | |
3771 | prev= | |
3772 | install_type= | |
3773 | isdir=no | |
3774 | stripme= | |
3775 | for arg | |
3776 | do | |
3777 | if test -n "$dest"; then | |
3778 | files="$files $dest" | |
3779 | dest="$arg" | |
3780 | continue | |
3781 | fi | |
3782 | ||
3783 | case "$arg" in | |
3784 | -d) isdir=yes ;; | |
3785 | -f) prev="-f" ;; | |
3786 | -g) prev="-g" ;; | |
3787 | -m) prev="-m" ;; | |
3788 | -o) prev="-o" ;; | |
3789 | -s) | |
3790 | stripme=" -s" | |
3791 | continue | |
3792 | ;; | |
3793 | -*) ;; | |
3794 | ||
3795 | *) | |
3796 | # If the previous option needed an argument, then skip it. | |
3797 | if test -n "$prev"; then | |
3798 | prev= | |
3799 | else | |
3800 | dest="$arg" | |
3801 | continue | |
3802 | fi | |
3803 | ;; | |
3804 | esac | |
3805 | ||
3806 | # Aesthetically quote the argument. | |
3807 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | |
3808 | case "$arg" in | |
3809 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) | |
3810 | arg="\"$arg\"" | |
3811 | ;; | |
3812 | esac | |
3813 | install_prog="$install_prog $arg" | |
3814 | done | |
3815 | ||
3816 | if test -z "$install_prog"; then | |
3817 | $echo "$modename: you must specify an install program" 1>&2 | |
3818 | $echo "$help" 1>&2 | |
3819 | exit 1 | |
3820 | fi | |
3821 | ||
3822 | if test -n "$prev"; then | |
3823 | $echo "$modename: the \`$prev' option requires an argument" 1>&2 | |
3824 | $echo "$help" 1>&2 | |
3825 | exit 1 | |
3826 | fi | |
3827 | ||
3828 | if test -z "$files"; then | |
3829 | if test -z "$dest"; then | |
3830 | $echo "$modename: no file or destination specified" 1>&2 | |
3831 | else | |
3832 | $echo "$modename: you must specify a destination" 1>&2 | |
3833 | fi | |
3834 | $echo "$help" 1>&2 | |
3835 | exit 1 | |
3836 | fi | |
3837 | ||
3838 | # Strip any trailing slash from the destination. | |
3839 | dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` | |
3840 | ||
3841 | # Check to see that the destination is a directory. | |
3842 | test -d "$dest" && isdir=yes | |
3843 | if test "$isdir" = yes; then | |
3844 | destdir="$dest" | |
3845 | destname= | |
3846 | else | |
3847 | destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` | |
3848 | test "X$destdir" = "X$dest" && destdir=. | |
3849 | destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` | |
3850 | ||
3851 | # Not a directory, so check to see that there is only one file specified. | |
3852 | set dummy $files | |
3853 | if test $# -gt 2; then | |
3854 | $echo "$modename: \`$dest' is not a directory" 1>&2 | |
3855 | $echo "$help" 1>&2 | |
3856 | exit 1 | |
3857 | fi | |
3858 | fi | |
3859 | case "$destdir" in | |
3860 | [\\/]* | [A-Za-z]:[\\/]*) ;; | |
3861 | *) | |
3862 | for file in $files; do | |
3863 | case "$file" in | |
3864 | *.lo) ;; | |
3865 | *) | |
3866 | $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 | |
3867 | $echo "$help" 1>&2 | |
3868 | exit 1 | |
3869 | ;; | |
3870 | esac | |
3871 | done | |
3872 | ;; | |
3873 | esac | |
3874 | ||
3875 | # This variable tells wrapper scripts just to set variables rather | |
3876 | # than running their programs. | |
3877 | libtool_install_magic="$magic" | |
3878 | ||
3879 | staticlibs= | |
3880 | future_libdirs= | |
3881 | current_libdirs= | |
3882 | for file in $files; do | |
3883 | ||
3884 | # Do each installation. | |
3885 | case "$file" in | |
3886 | *.$libext) | |
3887 | # Do the static libraries later. | |
3888 | staticlibs="$staticlibs $file" | |
3889 | ;; | |
3890 | ||
3891 | *.la) | |
3892 | # Check to see that this really is a libtool archive. | |
3893 | if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | |
3894 | else | |
3895 | $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 | |
3896 | $echo "$help" 1>&2 | |
3897 | exit 1 | |
3898 | fi | |
3899 | ||
3900 | library_names= | |
3901 | old_library= | |
3902 | relink_command= | |
3903 | # If there is no directory component, then add one. | |
3904 | case "$file" in | |
3905 | */* | *\\*) . $file ;; | |
3906 | *) . ./$file ;; | |
3907 | esac | |
3908 | ||
3909 | # Add the libdir to current_libdirs if it is the destination. | |
3910 | if test "X$destdir" = "X$libdir"; then | |
3911 | case "$current_libdirs " in | |
3912 | *" $libdir "*) ;; | |
3913 | *) current_libdirs="$current_libdirs $libdir" ;; | |
3914 | esac | |
3915 | else | |
3916 | # Note the libdir as a future libdir. | |
3917 | case "$future_libdirs " in | |
3918 | *" $libdir "*) ;; | |
3919 | *) future_libdirs="$future_libdirs $libdir" ;; | |
3920 | esac | |
3921 | fi | |
3922 | ||
3923 | dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ | |
3924 | test "X$dir" = "X$file/" && dir= | |
3925 | dir="$dir$objdir" | |
3926 | ||
3927 | if test "$hardcode_into_libs" = all; then | |
3928 | if test -z "$relink_command"; then | |
3929 | $echo "$modename: invalid libtool pseudo library \`$file'" 1>&2 | |
3930 | exit 1 | |
3931 | fi | |
3932 | $echo "$modename: warning: relinking \`$file'" 1>&2 | |
3933 | $show "$relink_command" | |
3934 | if $run eval "$relink_command"; then : | |
3935 | else | |
3936 | $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 | |
3937 | continue | |
3938 | fi | |
3939 | fi | |
3940 | ||
3941 | # See the names of the shared library. | |
3942 | set dummy $library_names | |
3943 | if test -n "$2"; then | |
3944 | realname="$2" | |
3945 | shift | |
3946 | shift | |
3947 | ||
3948 | srcname="$realname" | |
3949 | test "$hardcode_into_libs" = all && srcname="$realname"T | |
3950 | ||
3951 | # Install the shared library and build the symlinks. | |
3952 | $show "$install_prog $dir/$srcname $destdir/$realname" | |
3953 | $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? | |
3954 | if test -n "$stripme" && test -n "$striplib"; then | |
3955 | $show "$striplib $destdir/$realname" | |
3956 | $run eval "$striplib $destdir/$realname" || exit $? | |
3957 | fi | |
3958 | ||
3959 | if test $# -gt 0; then | |
3960 | # Delete the old symlinks, and create new ones. | |
3961 | for linkname | |
3962 | do | |
3963 | if test "$linkname" != "$realname"; then | |
3964 | $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" | |
3965 | $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" | |
3966 | fi | |
3967 | done | |
3968 | fi | |
3969 | ||
3970 | # Do each command in the postinstall commands. | |
3971 | lib="$destdir/$realname" | |
3972 | eval cmds=\"$postinstall_cmds\" | |
3973 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
3974 | for cmd in $cmds; do | |
3975 | IFS="$save_ifs" | |
3976 | $show "$cmd" | |
3977 | $run eval "$cmd" || exit $? | |
3978 | done | |
3979 | IFS="$save_ifs" | |
3980 | fi | |
3981 | ||
3982 | # Install the pseudo-library for information purposes. | |
3983 | name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | |
3984 | instname="$dir/$name"i | |
3985 | $show "$install_prog $instname $destdir/$name" | |
3986 | $run eval "$install_prog $instname $destdir/$name" || exit $? | |
3987 | ||
3988 | # Maybe install the static library, too. | |
3989 | test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" | |
3990 | ;; | |
3991 | ||
3992 | *.lo) | |
3993 | # Install (i.e. copy) a libtool object. | |
3994 | ||
3995 | # Figure out destination file name, if it wasn't already specified. | |
3996 | if test -n "$destname"; then | |
3997 | destfile="$destdir/$destname" | |
3998 | else | |
3999 | destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | |
4000 | destfile="$destdir/$destfile" | |
4001 | fi | |
4002 | ||
4003 | # Deduce the name of the destination old-style object file. | |
4004 | case "$destfile" in | |
4005 | *.lo) | |
4006 | staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` | |
4007 | ;; | |
4008 | *.$objext) | |
4009 | staticdest="$destfile" | |
4010 | destfile= | |
4011 | ;; | |
4012 | *) | |
4013 | $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 | |
4014 | $echo "$help" 1>&2 | |
4015 | exit 1 | |
4016 | ;; | |
4017 | esac | |
4018 | ||
4019 | # Install the libtool object if requested. | |
4020 | if test -n "$destfile"; then | |
4021 | $show "$install_prog $file $destfile" | |
4022 | $run eval "$install_prog $file $destfile" || exit $? | |
4023 | fi | |
4024 | ||
4025 | # Install the old object if enabled. | |
4026 | if test "$build_old_libs" = yes; then | |
4027 | # Deduce the name of the old-style object file. | |
4028 | staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` | |
4029 | ||
4030 | $show "$install_prog $staticobj $staticdest" | |
4031 | $run eval "$install_prog \$staticobj \$staticdest" || exit $? | |
4032 | fi | |
4033 | exit 0 | |
4034 | ;; | |
4035 | ||
4036 | *) | |
4037 | # Figure out destination file name, if it wasn't already specified. | |
4038 | if test -n "$destname"; then | |
4039 | destfile="$destdir/$destname" | |
4040 | else | |
4041 | destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | |
4042 | destfile="$destdir/$destfile" | |
4043 | fi | |
4044 | ||
4045 | # Do a test to see if this is really a libtool program. | |
4046 | if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | |
4047 | link_against_libtool_libs= | |
4048 | relink_command= | |
4049 | ||
4050 | # If there is no directory component, then add one. | |
4051 | case "$file" in | |
4052 | */* | *\\*) . $file ;; | |
4053 | *) . ./$file ;; | |
4054 | esac | |
4055 | ||
4056 | # Check the variables that should have been set. | |
4057 | if test -z "$link_against_libtool_libs"; then | |
4058 | $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 | |
4059 | exit 1 | |
4060 | fi | |
4061 | ||
4062 | finalize=yes | |
4063 | for lib in $link_against_libtool_libs; do | |
4064 | # Check to see that each library is installed. | |
4065 | libdir= | |
4066 | if test -f "$lib"; then | |
4067 | # If there is no directory component, then add one. | |
4068 | case "$lib" in | |
4069 | */* | *\\*) . $lib ;; | |
4070 | *) . ./$lib ;; | |
4071 | esac | |
4072 | fi | |
4073 | libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test | |
4074 | if test -n "$libdir" && test ! -f "$libfile"; then | |
4075 | $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 | |
4076 | finalize=no | |
4077 | fi | |
4078 | done | |
4079 | ||
4080 | relink_command= | |
4081 | # If there is no directory component, then add one. | |
4082 | case "$file" in | |
4083 | */* | *\\*) . $file ;; | |
4084 | *) . ./$file ;; | |
4085 | esac | |
4086 | ||
4087 | outputname= | |
4088 | if test "$fast_install" = no && test -n "$relink_command"; then | |
4089 | if test "$finalize" = yes && test -z "$run"; then | |
4090 | tmpdir="/tmp" | |
4091 | test -n "$TMPDIR" && tmpdir="$TMPDIR" | |
4092 | tmpdir="$tmpdir/libtool-$$" | |
4093 | if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : | |
4094 | else | |
4095 | $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 | |
4096 | continue | |
4097 | fi | |
4098 | outputname="$tmpdir/$file" | |
4099 | # Replace the output file specification. | |
4100 | relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` | |
4101 | ||
4102 | $show "$relink_command" | |
4103 | if $run eval "$relink_command"; then : | |
4104 | else | |
4105 | $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 | |
4106 | ${rm}r "$tmpdir" | |
4107 | continue | |
4108 | fi | |
4109 | file="$outputname" | |
4110 | else | |
4111 | $echo "$modename: warning: cannot relink \`$file'" 1>&2 | |
4112 | fi | |
4113 | else | |
4114 | # Install the binary that we compiled earlier. | |
4115 | file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` | |
4116 | fi | |
4117 | fi | |
4118 | ||
4119 | $show "$install_prog$stripme $file $destfile" | |
4120 | $run eval "$install_prog\$stripme \$file \$destfile" || exit $? | |
4121 | test -n "$outputname" && ${rm}r "$tmpdir" | |
4122 | ;; | |
4123 | esac | |
4124 | done | |
4125 | ||
4126 | for file in $staticlibs; do | |
4127 | name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | |
4128 | ||
4129 | # Set up the ranlib parameters. | |
4130 | oldlib="$destdir/$name" | |
4131 | ||
4132 | $show "$install_prog $file $oldlib" | |
4133 | $run eval "$install_prog \$file \$oldlib" || exit $? | |
4134 | ||
4135 | if test -n "$stripme" && test -n "$striplib"; then | |
4136 | $show "$old_striplib $oldlib" | |
4137 | $run eval "$old_striplib $oldlib" || exit $? | |
4138 | fi | |
4139 | ||
4140 | # Do each command in the postinstall commands. | |
4141 | eval cmds=\"$old_postinstall_cmds\" | |
4142 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
4143 | for cmd in $cmds; do | |
4144 | IFS="$save_ifs" | |
4145 | $show "$cmd" | |
4146 | $run eval "$cmd" || exit $? | |
4147 | done | |
4148 | IFS="$save_ifs" | |
4149 | done | |
4150 | ||
4151 | if test -n "$future_libdirs"; then | |
4152 | $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 | |
4153 | fi | |
4154 | ||
4155 | if test -n "$current_libdirs"; then | |
4156 | # Maybe just do a dry run. | |
4157 | test -n "$run" && current_libdirs=" -n$current_libdirs" | |
4158 | exec $SHELL $0 --finish$current_libdirs | |
4159 | exit 1 | |
4160 | fi | |
4161 | ||
4162 | exit 0 | |
4163 | ;; | |
4164 | ||
4165 | # libtool finish mode | |
4166 | finish) | |
4167 | modename="$modename: finish" | |
4168 | libdirs="$nonopt" | |
4169 | admincmds= | |
4170 | ||
4171 | if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then | |
4172 | for dir | |
4173 | do | |
4174 | libdirs="$libdirs $dir" | |
4175 | done | |
4176 | ||
4177 | for libdir in $libdirs; do | |
4178 | if test -n "$finish_cmds"; then | |
4179 | # Do each command in the finish commands. | |
4180 | eval cmds=\"$finish_cmds\" | |
4181 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
4182 | for cmd in $cmds; do | |
4183 | IFS="$save_ifs" | |
4184 | $show "$cmd" | |
4185 | $run eval "$cmd" || admincmds="$admincmds | |
4186 | $cmd" | |
4187 | done | |
4188 | IFS="$save_ifs" | |
4189 | fi | |
4190 | if test -n "$finish_eval"; then | |
4191 | # Do the single finish_eval. | |
4192 | eval cmds=\"$finish_eval\" | |
4193 | $run eval "$cmds" || admincmds="$admincmds | |
4194 | $cmds" | |
4195 | fi | |
4196 | done | |
4197 | fi | |
4198 | ||
4199 | # Exit here if they wanted silent mode. | |
4200 | test "$show" = : && exit 0 | |
4201 | ||
4202 | echo "----------------------------------------------------------------------" | |
4203 | echo "Libraries have been installed in:" | |
4204 | for libdir in $libdirs; do | |
4205 | echo " $libdir" | |
4206 | done | |
4207 | echo | |
4208 | echo "If you ever happen to want to link against installed libraries" | |
4209 | echo "in a given directory, LIBDIR, you must either use libtool, and" | |
4210 | echo "specify the full pathname of the library, or use \`-LLIBDIR'" | |
4211 | echo "flag during linking and do at least one of the following:" | |
4212 | if test -n "$shlibpath_var"; then | |
4213 | echo " - add LIBDIR to the \`$shlibpath_var' environment variable" | |
4214 | echo " during execution" | |
4215 | fi | |
4216 | if test -n "$runpath_var"; then | |
4217 | echo " - add LIBDIR to the \`$runpath_var' environment variable" | |
4218 | echo " during linking" | |
4219 | fi | |
4220 | if test -n "$hardcode_libdir_flag_spec"; then | |
4221 | libdir=LIBDIR | |
4222 | eval flag=\"$hardcode_libdir_flag_spec\" | |
4223 | ||
4224 | echo " - use the \`$flag' linker flag" | |
4225 | fi | |
4226 | if test -n "$admincmds"; then | |
4227 | echo " - have your system administrator run these commands:$admincmds" | |
4228 | fi | |
4229 | if test -f /etc/ld.so.conf; then | |
4230 | echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" | |
4231 | fi | |
4232 | echo | |
4233 | echo "See any operating system documentation about shared libraries for" | |
4234 | echo "more information, such as the ld(1) and ld.so(8) manual pages." | |
4235 | echo "----------------------------------------------------------------------" | |
4236 | exit 0 | |
4237 | ;; | |
4238 | ||
4239 | # libtool execute mode | |
4240 | execute) | |
4241 | modename="$modename: execute" | |
4242 | ||
4243 | # The first argument is the command name. | |
4244 | cmd="$nonopt" | |
4245 | if test -z "$cmd"; then | |
4246 | $echo "$modename: you must specify a COMMAND" 1>&2 | |
4247 | $echo "$help" | |
4248 | exit 1 | |
4249 | fi | |
4250 | ||
4251 | # Handle -dlopen flags immediately. | |
4252 | for file in $execute_dlfiles; do | |
4253 | if test ! -f "$file"; then | |
4254 | $echo "$modename: \`$file' is not a file" 1>&2 | |
4255 | $echo "$help" 1>&2 | |
4256 | exit 1 | |
4257 | fi | |
4258 | ||
4259 | dir= | |
4260 | case "$file" in | |
4261 | *.la) | |
4262 | # Check to see that this really is a libtool archive. | |
4263 | if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | |
4264 | else | |
4265 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | |
4266 | $echo "$help" 1>&2 | |
4267 | exit 1 | |
4268 | fi | |
4269 | ||
4270 | # Read the libtool library. | |
4271 | dlname= | |
4272 | library_names= | |
4273 | ||
4274 | # If there is no directory component, then add one. | |
4275 | case "$file" in | |
4276 | */* | *\\*) . $file ;; | |
4277 | *) . ./$file ;; | |
4278 | esac | |
4279 | ||
4280 | # Skip this library if it cannot be dlopened. | |
4281 | if test -z "$dlname"; then | |
4282 | # Warn if it was a shared library. | |
4283 | test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" | |
4284 | continue | |
4285 | fi | |
4286 | ||
4287 | dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` | |
4288 | test "X$dir" = "X$file" && dir=. | |
4289 | ||
4290 | if test -f "$dir/$objdir/$dlname"; then | |
4291 | dir="$dir/$objdir" | |
4292 | else | |
4293 | $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 | |
4294 | exit 1 | |
4295 | fi | |
4296 | ;; | |
4297 | ||
4298 | *.lo) | |
4299 | # Just add the directory containing the .lo file. | |
4300 | dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` | |
4301 | test "X$dir" = "X$file" && dir=. | |
4302 | ;; | |
4303 | ||
4304 | *) | |
4305 | $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 | |
4306 | continue | |
4307 | ;; | |
4308 | esac | |
4309 | ||
4310 | # Get the absolute pathname. | |
4311 | absdir=`cd "$dir" && pwd` | |
4312 | test -n "$absdir" && dir="$absdir" | |
4313 | ||
4314 | # Now add the directory to shlibpath_var. | |
4315 | if eval "test -z \"\$$shlibpath_var\""; then | |
4316 | eval "$shlibpath_var=\"\$dir\"" | |
4317 | else | |
4318 | eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" | |
4319 | fi | |
4320 | done | |
4321 | ||
4322 | # This variable tells wrapper scripts just to set shlibpath_var | |
4323 | # rather than running their programs. | |
4324 | libtool_execute_magic="$magic" | |
4325 | ||
4326 | # Check if any of the arguments is a wrapper script. | |
4327 | args= | |
4328 | for file | |
4329 | do | |
4330 | case "$file" in | |
4331 | -*) ;; | |
4332 | *) | |
4333 | # Do a test to see if this is really a libtool program. | |
4334 | if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | |
4335 | # If there is no directory component, then add one. | |
4336 | case "$file" in | |
4337 | */* | *\\*) . $file ;; | |
4338 | *) . ./$file ;; | |
4339 | esac | |
4340 | ||
4341 | # Transform arg to wrapped name. | |
4342 | file="$progdir/$program" | |
4343 | fi | |
4344 | ;; | |
4345 | esac | |
4346 | # Quote arguments (to preserve shell metacharacters). | |
4347 | file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` | |
4348 | args="$args \"$file\"" | |
4349 | done | |
4350 | ||
4351 | if test -z "$run"; then | |
4352 | if test -n "$shlibpath_var"; then | |
4353 | # Export the shlibpath_var. | |
4354 | eval "export $shlibpath_var" | |
4355 | fi | |
4356 | ||
4357 | # Restore saved enviroment variables | |
4358 | if test "${save_LC_ALL+set}" = set; then | |
4359 | LC_ALL="$save_LC_ALL"; export LC_ALL | |
4360 | fi | |
4361 | if test "${save_LANG+set}" = set; then | |
4362 | LANG="$save_LANG"; export LANG | |
4363 | fi | |
4364 | ||
4365 | # Now actually exec the command. | |
4366 | eval "exec \$cmd$args" | |
4367 | ||
4368 | $echo "$modename: cannot exec \$cmd$args" | |
4369 | exit 1 | |
4370 | else | |
4371 | # Display what would be done. | |
4372 | if test -n "$shlibpath_var"; then | |
4373 | eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" | |
4374 | $echo "export $shlibpath_var" | |
4375 | fi | |
4376 | $echo "$cmd$args" | |
4377 | exit 0 | |
4378 | fi | |
4379 | ;; | |
4380 | ||
4381 | # libtool clean and uninstall mode | |
4382 | clean | uninstall) | |
4383 | modename="$modename: $mode" | |
4384 | rm="$nonopt" | |
4385 | files= | |
4386 | ||
4387 | # This variable tells wrapper scripts just to set variables rather | |
4388 | # than running their programs. | |
4389 | libtool_install_magic="$magic" | |
4390 | ||
4391 | for arg | |
4392 | do | |
4393 | case "$arg" in | |
4394 | -*) rm="$rm $arg" ;; | |
4395 | *) files="$files $arg" ;; | |
4396 | esac | |
4397 | done | |
4398 | ||
4399 | if test -z "$rm"; then | |
4400 | $echo "$modename: you must specify an RM program" 1>&2 | |
4401 | $echo "$help" 1>&2 | |
4402 | exit 1 | |
4403 | fi | |
4404 | ||
4405 | for file in $files; do | |
4406 | dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` | |
4407 | if test "X$dir" = "X$file"; then | |
4408 | dir=. | |
4409 | objdir="$objdir" | |
4410 | else | |
4411 | objdir="$dir/$objdir" | |
4412 | fi | |
4413 | name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | |
4414 | test $mode = uninstall && objdir="$dir" | |
4415 | ||
4416 | rmfiles="$file" | |
4417 | ||
4418 | case "$name" in | |
4419 | *.la) | |
4420 | # Possibly a libtool archive, so verify it. | |
4421 | if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | |
4422 | . $dir/$name | |
4423 | ||
4424 | # Delete the libtool libraries and symlinks. | |
4425 | for n in $library_names; do | |
4426 | rmfiles="$rmfiles $objdir/$n" | |
4427 | done | |
4428 | test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" | |
4429 | test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" | |
4430 | ||
4431 | if test $mode = uninstall; then | |
4432 | if test -n "$library_names"; then | |
4433 | # Do each command in the postuninstall commands. | |
4434 | eval cmds=\"$postuninstall_cmds\" | |
4435 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
4436 | for cmd in $cmds; do | |
4437 | IFS="$save_ifs" | |
4438 | $show "$cmd" | |
4439 | $run eval "$cmd" | |
4440 | done | |
4441 | IFS="$save_ifs" | |
4442 | fi | |
4443 | ||
4444 | if test -n "$old_library"; then | |
4445 | # Do each command in the old_postuninstall commands. | |
4446 | eval cmds=\"$old_postuninstall_cmds\" | |
4447 | IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' | |
4448 | for cmd in $cmds; do | |
4449 | IFS="$save_ifs" | |
4450 | $show "$cmd" | |
4451 | $run eval "$cmd" | |
4452 | done | |
4453 | IFS="$save_ifs" | |
4454 | fi | |
4455 | # FIXME: should reinstall the best remaining shared library. | |
4456 | fi | |
4457 | fi | |
4458 | ;; | |
4459 | ||
4460 | *.lo) | |
4461 | if test "$build_old_libs" = yes; then | |
4462 | oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` | |
4463 | rmfiles="$rmfiles $dir/$oldobj" | |
4464 | fi | |
4465 | ;; | |
4466 | ||
4467 | *) | |
4468 | # Do a test to see if this is a libtool program. | |
4469 | if test $mode = clean && | |
4470 | (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | |
4471 | relink_command= | |
4472 | . $dir/$file | |
4473 | ||
4474 | rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" | |
4475 | if test "$fast_install" = yes && test -n "$relink_command"; then | |
4476 | rmfiles="$rmfiles $objdir/lt-$name" | |
4477 | fi | |
4478 | fi | |
4479 | ;; | |
4480 | esac | |
4481 | $show "$rm $rmfiles" | |
4482 | $run $rm $rmfiles | |
4483 | done | |
4484 | exit 0 | |
4485 | ;; | |
4486 | ||
4487 | "") | |
4488 | $echo "$modename: you must specify a MODE" 1>&2 | |
4489 | $echo "$generic_help" 1>&2 | |
4490 | exit 1 | |
4491 | ;; | |
4492 | esac | |
4493 | ||
4494 | $echo "$modename: invalid operation mode \`$mode'" 1>&2 | |
4495 | $echo "$generic_help" 1>&2 | |
4496 | exit 1 | |
4497 | fi # test -z "$show_help" | |
4498 | ||
4499 | # We need to display help for each of the modes. | |
4500 | case "$mode" in | |
4501 | "") $echo \ | |
4502 | "Usage: $modename [OPTION]... [MODE-ARG]... | |
4503 | ||
4504 | Provide generalized library-building support services. | |
4505 | ||
4506 | --config show all configuration variables | |
4507 | --debug enable verbose shell tracing | |
4508 | -n, --dry-run display commands without modifying any files | |
4509 | --features display basic configuration information and exit | |
4510 | --finish same as \`--mode=finish' | |
4511 | --help display this help message and exit | |
4512 | --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] | |
4513 | --quiet same as \`--silent' | |
4514 | --silent don't print informational messages | |
4515 | --version print version information | |
4516 | ||
4517 | MODE must be one of the following: | |
4518 | ||
4519 | clean remove files from the build directory | |
4520 | compile compile a source file into a libtool object | |
4521 | execute automatically set library path, then run a program | |
4522 | finish complete the installation of libtool libraries | |
4523 | install install libraries or executables | |
4524 | link create a library or an executable | |
4525 | uninstall remove libraries from an installed directory | |
4526 | ||
4527 | MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for | |
4528 | a more detailed description of MODE." | |
4529 | exit 0 | |
4530 | ;; | |
4531 | ||
4532 | clean) | |
4533 | $echo \ | |
4534 | "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... | |
4535 | ||
4536 | Remove files from the build directory. | |
4537 | ||
4538 | RM is the name of the program to use to delete files associated with each FILE | |
4539 | (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed | |
4540 | to RM. | |
4541 | ||
4542 | If FILE is a libtool library, object or program, all the files associated | |
4543 | with it are deleted. Otherwise, only FILE itself is deleted using RM." | |
4544 | ;; | |
4545 | ||
4546 | compile) | |
4547 | $echo \ | |
4548 | "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE | |
4549 | ||
4550 | Compile a source file into a libtool library object. | |
4551 | ||
4552 | This mode accepts the following additional options: | |
4553 | ||
4554 | -o OUTPUT-FILE set the output file name to OUTPUT-FILE | |
4555 | -static always build a \`.o' file suitable for static linking | |
4556 | ||
4557 | COMPILE-COMMAND is a command to be used in creating a \`standard' object file | |
4558 | from the given SOURCEFILE. | |
4559 | ||
4560 | The output file name is determined by removing the directory component from | |
4561 | SOURCEFILE, then substituting the C source code suffix \`.c' with the | |
4562 | library object suffix, \`.lo'." | |
4563 | ;; | |
4564 | ||
4565 | execute) | |
4566 | $echo \ | |
4567 | "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... | |
4568 | ||
4569 | Automatically set library path, then run a program. | |
4570 | ||
4571 | This mode accepts the following additional options: | |
4572 | ||
4573 | -dlopen FILE add the directory containing FILE to the library path | |
4574 | ||
4575 | This mode sets the library path environment variable according to \`-dlopen' | |
4576 | flags. | |
4577 | ||
4578 | If any of the ARGS are libtool executable wrappers, then they are translated | |
4579 | into their corresponding uninstalled binary, and any of their required library | |
4580 | directories are added to the library path. | |
4581 | ||
4582 | Then, COMMAND is executed, with ARGS as arguments." | |
4583 | ;; | |
4584 | ||
4585 | finish) | |
4586 | $echo \ | |
4587 | "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... | |
4588 | ||
4589 | Complete the installation of libtool libraries. | |
4590 | ||
4591 | Each LIBDIR is a directory that contains libtool libraries. | |
4592 | ||
4593 | The commands that this mode executes may require superuser privileges. Use | |
4594 | the \`--dry-run' option if you just want to see what would be executed." | |
4595 | ;; | |
4596 | ||
4597 | install) | |
4598 | $echo \ | |
4599 | "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... | |
4600 | ||
4601 | Install executables or libraries. | |
4602 | ||
4603 | INSTALL-COMMAND is the installation command. The first component should be | |
4604 | either the \`install' or \`cp' program. | |
4605 | ||
4606 | The rest of the components are interpreted as arguments to that command (only | |
4607 | BSD-compatible install options are recognized)." | |
4608 | ;; | |
4609 | ||
4610 | link) | |
4611 | $echo \ | |
4612 | "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... | |
4613 | ||
4614 | Link object files or libraries together to form another library, or to | |
4615 | create an executable program. | |
4616 | ||
4617 | LINK-COMMAND is a command using the C compiler that you would use to create | |
4618 | a program from several object files. | |
4619 | ||
4620 | The following components of LINK-COMMAND are treated specially: | |
4621 | ||
4622 | -all-static do not do any dynamic linking at all | |
4623 | -avoid-version do not add a version suffix if possible | |
4624 | -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime | |
4625 | -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols | |
4626 | -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) | |
4627 | -export-symbols SYMFILE | |
4628 | try to export only the symbols listed in SYMFILE | |
4629 | -export-symbols-regex REGEX | |
4630 | try to export only the symbols matching REGEX | |
4631 | -LLIBDIR search LIBDIR for required installed libraries | |
4632 | -lNAME OUTPUT-FILE requires the installed library libNAME | |
4633 | -module build a library that can dlopened | |
4634 | -no-fast-install disable the fast-install mode | |
4635 | -no-install link a not-installable executable | |
4636 | -no-undefined declare that a library does not refer to external symbols | |
4637 | -o OUTPUT-FILE create OUTPUT-FILE from the specified objects | |
4638 | -release RELEASE specify package release information | |
4639 | -rpath LIBDIR the created library will eventually be installed in LIBDIR | |
4640 | -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries | |
4641 | -static do not do any dynamic linking of libtool libraries | |
4642 | -version-info CURRENT[:REVISION[:AGE]] | |
4643 | specify library version info [each variable defaults to 0] | |
4644 | ||
4645 | All other options (arguments beginning with \`-') are ignored. | |
4646 | ||
4647 | Every other argument is treated as a filename. Files ending in \`.la' are | |
4648 | treated as uninstalled libtool libraries, other files are standard or library | |
4649 | object files. | |
4650 | ||
4651 | If the OUTPUT-FILE ends in \`.la', then a libtool library is created, | |
4652 | only library objects (\`.lo' files) may be specified, and \`-rpath' is | |
4653 | required, except when creating a convenience library. | |
4654 | ||
4655 | If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created | |
4656 | using \`ar' and \`ranlib', or on Windows using \`lib'. | |
4657 | ||
4658 | If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file | |
4659 | is created, otherwise an executable program is created." | |
4660 | ;; | |
4661 | ||
4662 | uninstall) | |
4663 | $echo \ | |
4664 | "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... | |
4665 | ||
4666 | Remove libraries from an installation directory. | |
4667 | ||
4668 | RM is the name of the program to use to delete files associated with each FILE | |
4669 | (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed | |
4670 | to RM. | |
4671 | ||
4672 | If FILE is a libtool library, all the files associated with it are deleted. | |
4673 | Otherwise, only FILE itself is deleted using RM." | |
4674 | ;; | |
4675 | ||
4676 | *) | |
4677 | $echo "$modename: invalid operation mode \`$mode'" 1>&2 | |
4678 | $echo "$help" 1>&2 | |
4679 | exit 1 | |
4680 | ;; | |
4681 | esac | |
4682 | ||
4683 | echo | |
4684 | $echo "Try \`$modename --help' for more information about other modes." | |
4685 | ||
4686 | exit 0 | |
4687 | ||
4688 | # Local Variables: | |
4689 | # mode:shell-script | |
4690 | # sh-indentation:2 | |
4691 | # End: |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
91 | 91 | |
92 | 92 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
93 | 93 | |
94 | TAR = tar | |
94 | TAR = gtar | |
95 | 95 | GZIP_ENV = --best |
96 | 96 | all: all-redirect |
97 | 97 | .SUFFIXES: |
0 | .TH PIPENIGHTDREAMS 6 "23rd May 2002" | |
1 | ||
2 | .SH NAME | |
3 | ||
4 | pipenightdreams \- Just another pipe trip (PipeDream clon). | |
5 | ||
6 | .SH SYNOPSIS | |
7 | ||
8 | \fB pipenightdreams\fP [\--datadir <DATADIR>] [\--fullscreen] | |
9 | ||
10 | .SH DESCRIPTION | |
11 | ||
12 | \fB pipenightdreams\fP is a PipeDream style game. The objetive of the game is to carry | |
13 | liquid from some point to the exit using different kinds of pipes. On each level | |
14 | there is a minimum number of required pipes that should be at least reached for it | |
15 | to be completed. | |
16 | ||
17 | The score is increased by using as many pipes as possible an by collecting various bonus | |
18 | tokens making the liquid pass through their pipes. There are also life bonus and, | |
19 | hopefully soon, "freeze tokens". | |
20 | ||
21 | The game is not exactly a copy of PipeDream. It's based only on the facts | |
22 | I remember and on many other things which have been added, or changed hoping for making | |
23 | it better. | |
24 | ||
25 | .SS KEYS | |
26 | The game is entirely played using the keyboard and the key layout is as follows: | |
27 | .IP SPACE | |
28 | Puts the next pipe where the pointer is. | |
29 | .IP CURSOR\ KEYS | |
30 | Move the pointer. | |
31 | .IP ENTER | |
32 | Speeds up the liquid (Avoids skillful players to get bored). | |
33 | .IP ESC | |
34 | Goes back to the main screen or exits. | |
35 | ||
36 | .SS BONUS TYPES | |
37 | The various types of bonus tokens are the following: | |
38 | ||
39 | .IP LIFE\ BONUS | |
40 | The purple one with a "L" on it. | |
41 | .IP SUPER\ BONUS | |
42 | The red one with a "B" on it. | |
43 | .IP ULTRA\ BONUS | |
44 | The blue one. | |
45 | .IP HYPER\ BONUS | |
46 | The green one. | |
0 | 47 | |
1 | 48 | |
49 | .SH OPTIONS | |
50 | \fB --datadir <CUSTOM DATA DIR> \fP is used when | |
51 | the data directory is not the default one (\fB /usr/share/games/pipenightdreams\fP | |
52 | if installed from a rpm package and \fB /usr/local/share/games/pipenightdreams\fP | |
53 | when installed by compiling the source package). | |
2 | 54 | |
3 | PIPENIGHTDREAMS(6) PIPENIGHTDREAMS(6) | |
55 | \fB --fullscreen \fP switchs to fullscreen mode. | |
4 | 56 | |
57 | .SH BUGS | |
58 | Not known. | |
5 | 59 | |
6 | NNAAMMEE | |
7 | pipenightdreams - Just another pipe trip (PipeDream clon). | |
60 | .SH SEE ALSO | |
61 | Pipenightdreams home page at | |
8 | 62 | |
63 | http://www.libsdl.org/projects/pipenightdreams | |
9 | 64 | |
10 | SSYYNNOOPPSSIISS | |
11 | ppiippeenniigghhttddrreeaammss [--datadir <DATADIR>] | |
65 | .SH AUTHORS | |
12 | 66 | |
67 | Waldemar A. Baraldi <baraldi@lacasilla.com.ar> | |
13 | 68 | |
14 | DDEESSCCRRIIPPTTIIOONN | |
15 | ppiippeenniigghhttddrreeaammss is a PipeDream style game. The objetive | |
16 | of the game is to carry liquid from some point to the exit | |
17 | using different kinds of pipes. On each level there is a | |
18 | minimum number of required pipes that should be at least | |
19 | reached for it to be completed. | |
20 | ||
21 | The score is increased by using as many pipes as possible | |
22 | an by collecting various bonus tokens making the liquid | |
23 | pass through their places. There are also life bonus and, | |
24 | hopefully soon, "freeze tokens". | |
25 | ||
26 | The game is not exactly a copy of PipeDream. It's based | |
27 | only on the facts I remember and in many other things | |
28 | which have been added, or changed hoping for making it | |
29 | better. | |
30 | ||
31 | ||
32 | KKEEYYSS | |
33 | The game is entirely played using the keyboard and the key | |
34 | layout is as follows: | |
35 | ||
36 | SPACE Puts the next pipe where the pointer is. | |
37 | ||
38 | CURSOR KEYS | |
39 | Move the pointer. | |
40 | ||
41 | ENTER Speeds up the liquid (Avoids skillful players to | |
42 | get bored). | |
43 | ||
44 | ESC Goes back to the main screen or exits. | |
45 | ||
46 | ||
47 | BBOONNUUSS TTYYPPEESS | |
48 | The various types of bonus tokens are the following: | |
49 | ||
50 | ||
51 | LIFE BONUS | |
52 | The purple one with a "L" on it. | |
53 | ||
54 | SUPER BONUS | |
55 | The red one with a "B" on it. | |
56 | ||
57 | ULTRA BONUS | |
58 | The blue one. | |
59 | ||
60 | ||
61 | ||
62 | ||
63 | 22 Sep 2001 1 | |
64 | ||
65 | ||
66 | ||
67 | ||
68 | ||
69 | PIPENIGHTDREAMS(6) PIPENIGHTDREAMS(6) | |
70 | ||
71 | ||
72 | HYPER BONUS | |
73 | The green one. | |
74 | ||
75 | ||
76 | ||
77 | OOPPTTIIOONNSS | |
78 | ----ddaattaaddiirr <<CCUUSSTTOOMM DDAATTAA DDIIRR>> is used when the data direc | |
79 | tory is not the default one ( //uussrr//sshhaarree//ggaammeess//ppiippeenniigghhtt | |
80 | ddrreeaammss if installed from a rpm package and | |
81 | //uussrr//llooccaall//sshhaarree//ggaammeess//ppiippeenniigghhttddrreeaammss when installed by | |
82 | compiling the source package). | |
83 | ||
84 | ||
85 | BBUUGGSS | |
86 | Not known. | |
87 | ||
88 | ||
89 | SSEEEE AALLSSOO | |
90 | Pipenightdreams home page at | |
91 | ||
92 | http://www.libsdl.org/projects/pipenightdreams | |
93 | ||
94 | ||
95 | AAUUTTHHOORRSS | |
96 | Waldemar A. Baraldi <baraldi@lacasilla.com.ar> | |
97 | ||
98 | ||
99 | ||
100 | ||
101 | ||
102 | ||
103 | ||
104 | ||
105 | ||
106 | ||
107 | ||
108 | ||
109 | ||
110 | ||
111 | ||
112 | ||
113 | ||
114 | ||
115 | ||
116 | ||
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 | ||
123 | ||
124 | ||
125 | ||
126 | ||
127 | ||
128 | ||
129 | 22 Sep 2001 2 | |
130 | ||
131 |
0 | .TH PIPENIGHTDREAMS 6 "23rd May 2002" | |
1 | ||
2 | .SH NAME | |
3 | ||
4 | pipenightdreams \- Just another pipe trip (PipeDream clon). | |
5 | ||
6 | .SH SYNOPSIS | |
7 | ||
8 | \fB pipenightdreams\fP [\--datadir <DATADIR>] [\--fullscreen] | |
9 | ||
10 | .SH DESCRIPTION | |
11 | ||
12 | \fB pipenightdreams\fP is a PipeDream style game. The objetive of the game is to carry | |
13 | liquid from some point to the exit using different kinds of pipes. On each level | |
14 | there is a minimum number of required pipes that should be at least reached for it | |
15 | to be completed. | |
16 | ||
17 | The score is increased by using as many pipes as possible an by collecting various bonus | |
18 | tokens making the liquid pass through their pipes. There are also life bonus and, | |
19 | hopefully soon, "freeze tokens". | |
20 | ||
21 | The game is not exactly a copy of PipeDream. It's based only on the facts | |
22 | I remember and on many other things which have been added, or changed hoping for making | |
23 | it better. | |
24 | ||
25 | .SS KEYS | |
26 | The game is entirely played using the keyboard and the key layout is as follows: | |
27 | .IP SPACE | |
28 | Puts the next pipe where the pointer is. | |
29 | .IP CURSOR\ KEYS | |
30 | Move the pointer. | |
31 | .IP ENTER | |
32 | Speeds up the liquid (Avoids skillful players to get bored). | |
33 | .IP ESC | |
34 | Goes back to the main screen or exits. | |
35 | ||
36 | .SS BONUS TYPES | |
37 | The various types of bonus tokens are the following: | |
38 | ||
39 | .IP LIFE\ BONUS | |
40 | The purple one with a "L" on it. | |
41 | .IP SUPER\ BONUS | |
42 | The red one with a "B" on it. | |
43 | .IP ULTRA\ BONUS | |
44 | The blue one. | |
45 | .IP HYPER\ BONUS | |
46 | The green one. | |
47 | ||
48 | ||
49 | .SH OPTIONS | |
50 | \fB --datadir <CUSTOM DATA DIR> \fP is used when | |
51 | the data directory is not the default one (\fB /usr/share/games/pipenightdreams\fP | |
52 | if installed from a rpm package and \fB /usr/local/share/games/pipenightdreams\fP | |
53 | when installed by compiling the source package). | |
54 | ||
55 | .SH BUGS | |
56 | At least there are some small memory leaks. | |
57 | ||
58 | .SH SEE ALSO | |
59 | Pipenightdreams home page at http://www.libsdl.org/projects/pipenightdreams | |
60 | ||
61 | .SH AUTHORS | |
62 | ||
63 | Waldemar A. Baraldi <baraldi@lacasilla.com.ar> | |
64 |
0 | 0 | Begin3 |
1 | 1 | Title: PipeNightDreams |
2 | Version: 0.9.0 | |
3 | Entered-date: 02/07/2001 | |
2 | Version: 0.10.0 | |
3 | Entered-date: 23/03/2002 | |
4 | 4 | Description: A PipeDream clon. |
5 | 5 | Keywords: Puzzle Pipe |
6 | 6 | Author: Waldemar A. Baraldi <baraldi@lacasilla.com.ar> |
8 | 8 | Primary-site: http://www.libsdl.org/projects/pipenightdreams |
9 | 9 | Home-page: http://www.libsdl.org/projects/pipenightdreams |
10 | 10 | Original-site: http://www.libsdl.org/projects/pipenightdreams |
11 | Platforms: Linux and other Unices | |
11 | Platforms: Linux and other Unices | |
12 | 12 | Copying-policy: GNU Public License |
13 | 13 | End |
0 | 0 | |
1 | 1 | bin_PROGRAMS = pipenightdreams |
2 | 2 | |
3 | pipenightdreams_SOURCES = object.cpp wallpaper.cpp videomanager.cpp verticalbowl.cpp vertical.cpp tank.cpp surface.cpp str.cpp score.cpp random.cpp pointer.cpp player.cpp pipequeue.cpp pipenightdreams.cpp pipe.cpp mosaic.cpp list.cpp level.ll imagemanager.cpp image.cpp horizontalbowl.cpp horizontal.cpp hash.cpp graphic.cpp exit.cpp eventstream.cpp eventmanager.cpp entry.cpp elbowupright.cpp elbowupleft.cpp elbowdownright.cpp elbowdownleft.cpp cross.cpp canvas.cpp board.cpp main.cpp | |
3 | pipenightdreams_SOURCES = object.cpp wallpaper.cpp videomanager.cpp verticalbowl.cpp vertical.cpp tank.cpp surface.cpp str.cpp score.cpp random.cpp pointer.cpp player.cpp pipequeue.cpp pipenightdreams.cpp pipe.cpp mosaic.cpp list.cpp level.ll imagemanager.cpp image.cpp horizontalbowl.cpp horizontal.cpp hash.cpp graphic.cpp exit.cpp eventstream.cpp eventmanager.cpp entry.cpp elbowupright.cpp elbowupleft.cpp elbowdownright.cpp elbowdownleft.cpp cross.cpp canvas.cpp board.cpp main.cpp sprite.cpp fire.cpp paper.cpp | |
4 | 4 | |
5 | 5 | pipenightdreams_LDADD = |
6 | 6 | |
7 | EXTRA_DIST = main.cpp animatedcanvas.h background.h board.cpp board.h canvas.cpp canvas.h cross.cpp cross.h elbowdownleft.cpp elbowdownleft.h elbowdownright.cpp elbowdownright.h elbowupleft.cpp elbowupleft.h elbowupright.cpp elbowupright.h entry.cpp entry.h eventmanager.cpp eventmanager.h eventstream.cpp eventstream.h exit.cpp exit.h graphic.cpp graphic.h hash.cpp hash.h horizontal.cpp horizontal.h horizontalbowl.cpp horizontalbowl.h image.cpp image.h imagemanager.cpp imagemanager.h level.h level.ll list.cpp list.h mosaic.cpp mosaic.h object.h pipe.cpp pipe.h pipenightdreams.cpp pipenightdreams.h pipequeue.cpp pipequeue.h player.cpp player.h playeronestream.h pointer.cpp pointer.h pointercross.h pointerelbowdownleft.h pointerelbowdownright.h pointerelbowupleft.h pointerelbowupright.h pointerhorizontal.h pointerhorizontalbowl.h pointernone.h pointervertical.h pointerverticalbowl.h random.cpp random.h score.cpp score.h str.cpp str.h surface.cpp surface.h systemstream.h tank.cpp tank.h vertical.cpp vertical.h verticalbowl.cpp verticalbowl.h videomanager.cpp videomanager.h wallpaper.cpp wallpaper.h object.cpp | |
7 | EXTRA_DIST = main.cpp animatedcanvas.h background.h board.cpp board.h canvas.cpp canvas.h cross.cpp cross.h elbowdownleft.cpp elbowdownleft.h elbowdownright.cpp elbowdownright.h elbowupleft.cpp elbowupleft.h elbowupright.cpp elbowupright.h entry.cpp entry.h eventmanager.cpp eventmanager.h eventstream.cpp eventstream.h exit.cpp exit.h graphic.cpp graphic.h hash.cpp hash.h horizontal.cpp horizontal.h horizontalbowl.cpp horizontalbowl.h image.cpp image.h imagemanager.cpp imagemanager.h level.h level.ll list.cpp list.h mosaic.cpp mosaic.h object.h pipe.cpp pipe.h pipenightdreams.cpp pipenightdreams.h pipequeue.cpp pipequeue.h player.cpp player.h playeronestream.h pointer.cpp pointer.h pointercross.h pointerelbowdownleft.h pointerelbowdownright.h pointerelbowupleft.h pointerelbowupright.h pointerhorizontal.h pointerhorizontalbowl.h pointernone.h pointervertical.h pointerverticalbowl.h random.cpp random.h score.cpp score.h str.cpp str.h surface.cpp surface.h systemstream.h tank.cpp tank.h vertical.cpp vertical.h verticalbowl.cpp verticalbowl.h videomanager.cpp videomanager.h wallpaper.cpp wallpaper.h object.cpp sprite.h sprite.cpp fire.h fire.cpp paper.h paper.cpp | |
8 | 8 | |
9 |
0 | ||
1 | bin_PROGRAMS = pipenightdreams | |
2 | ||
3 | pipenightdreams_SOURCES = object.cpp wallpaper.cpp videomanager.cpp verticalbowl.cpp vertical.cpp tank.cpp surface.cpp str.cpp score.cpp random.cpp pointer.cpp player.cpp pipequeue.cpp pipenightdreams.cpp pipe.cpp mosaic.cpp list.cpp level.ll imagemanager.cpp image.cpp horizontalbowl.cpp horizontal.cpp hash.cpp graphic.cpp exit.cpp eventstream.cpp eventmanager.cpp entry.cpp elbowupright.cpp elbowupleft.cpp elbowdownright.cpp elbowdownleft.cpp cross.cpp canvas.cpp board.cpp main.cpp sprite.cpp | |
4 | ||
5 | pipenightdreams_LDADD = | |
6 | ||
7 | EXTRA_DIST = main.cpp animatedcanvas.h background.h board.cpp board.h canvas.cpp canvas.h cross.cpp cross.h elbowdownleft.cpp elbowdownleft.h elbowdownright.cpp elbowdownright.h elbowupleft.cpp elbowupleft.h elbowupright.cpp elbowupright.h entry.cpp entry.h eventmanager.cpp eventmanager.h eventstream.cpp eventstream.h exit.cpp exit.h graphic.cpp graphic.h hash.cpp hash.h horizontal.cpp horizontal.h horizontalbowl.cpp horizontalbowl.h image.cpp image.h imagemanager.cpp imagemanager.h level.h level.ll list.cpp list.h mosaic.cpp mosaic.h object.h pipe.cpp pipe.h pipenightdreams.cpp pipenightdreams.h pipequeue.cpp pipequeue.h player.cpp player.h playeronestream.h pointer.cpp pointer.h pointercross.h pointerelbowdownleft.h pointerelbowdownright.h pointerelbowupleft.h pointerelbowupright.h pointerhorizontal.h pointerhorizontalbowl.h pointernone.h pointervertical.h pointerverticalbowl.h random.cpp random.h score.cpp score.h str.cpp str.h surface.cpp surface.h systemstream.h tank.cpp tank.h vertical.cpp vertical.h verticalbowl.cpp verticalbowl.h videomanager.cpp videomanager.h wallpaper.cpp wallpaper.h object.cpp sprite.h sprite.cpp | |
8 |
0 | # Makefile.in generated automatically by automake 1.4 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
0 | # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am | |
1 | ||
2 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | |
3 | 3 | # This Makefile.in is free software; the Free Software Foundation |
4 | 4 | # gives unlimited permission to copy and/or distribute it, |
5 | 5 | # with or without modifications, as long as this notice is preserved. |
78 | 78 | |
79 | 79 | bin_PROGRAMS = pipenightdreams |
80 | 80 | |
81 | pipenightdreams_SOURCES = object.cpp wallpaper.cpp videomanager.cpp verticalbowl.cpp vertical.cpp tank.cpp surface.cpp str.cpp score.cpp random.cpp pointer.cpp player.cpp pipequeue.cpp pipenightdreams.cpp pipe.cpp mosaic.cpp list.cpp level.ll imagemanager.cpp image.cpp horizontalbowl.cpp horizontal.cpp hash.cpp graphic.cpp exit.cpp eventstream.cpp eventmanager.cpp entry.cpp elbowupright.cpp elbowupleft.cpp elbowdownright.cpp elbowdownleft.cpp cross.cpp canvas.cpp board.cpp main.cpp | |
81 | pipenightdreams_SOURCES = object.cpp wallpaper.cpp videomanager.cpp verticalbowl.cpp vertical.cpp tank.cpp surface.cpp str.cpp score.cpp random.cpp pointer.cpp player.cpp pipequeue.cpp pipenightdreams.cpp pipe.cpp mosaic.cpp list.cpp level.ll imagemanager.cpp image.cpp horizontalbowl.cpp horizontal.cpp hash.cpp graphic.cpp exit.cpp eventstream.cpp eventmanager.cpp entry.cpp elbowupright.cpp elbowupleft.cpp elbowdownright.cpp elbowdownleft.cpp cross.cpp canvas.cpp board.cpp main.cpp sprite.cpp fire.cpp paper.cpp | |
82 | 82 | |
83 | 83 | pipenightdreams_LDADD = |
84 | 84 | |
85 | EXTRA_DIST = main.cpp animatedcanvas.h background.h board.cpp board.h canvas.cpp canvas.h cross.cpp cross.h elbowdownleft.cpp elbowdownleft.h elbowdownright.cpp elbowdownright.h elbowupleft.cpp elbowupleft.h elbowupright.cpp elbowupright.h entry.cpp entry.h eventmanager.cpp eventmanager.h eventstream.cpp eventstream.h exit.cpp exit.h graphic.cpp graphic.h hash.cpp hash.h horizontal.cpp horizontal.h horizontalbowl.cpp horizontalbowl.h image.cpp image.h imagemanager.cpp imagemanager.h level.h level.ll list.cpp list.h mosaic.cpp mosaic.h object.h pipe.cpp pipe.h pipenightdreams.cpp pipenightdreams.h pipequeue.cpp pipequeue.h player.cpp player.h playeronestream.h pointer.cpp pointer.h pointercross.h pointerelbowdownleft.h pointerelbowdownright.h pointerelbowupleft.h pointerelbowupright.h pointerhorizontal.h pointerhorizontalbowl.h pointernone.h pointervertical.h pointerverticalbowl.h random.cpp random.h score.cpp score.h str.cpp str.h surface.cpp surface.h systemstream.h tank.cpp tank.h vertical.cpp vertical.h verticalbowl.cpp verticalbowl.h videomanager.cpp videomanager.h wallpaper.cpp wallpaper.h object.cpp | |
85 | EXTRA_DIST = main.cpp animatedcanvas.h background.h board.cpp board.h canvas.cpp canvas.h cross.cpp cross.h elbowdownleft.cpp elbowdownleft.h elbowdownright.cpp elbowdownright.h elbowupleft.cpp elbowupleft.h elbowupright.cpp elbowupright.h entry.cpp entry.h eventmanager.cpp eventmanager.h eventstream.cpp eventstream.h exit.cpp exit.h graphic.cpp graphic.h hash.cpp hash.h horizontal.cpp horizontal.h horizontalbowl.cpp horizontalbowl.h image.cpp image.h imagemanager.cpp imagemanager.h level.h level.ll list.cpp list.h mosaic.cpp mosaic.h object.h pipe.cpp pipe.h pipenightdreams.cpp pipenightdreams.h pipequeue.cpp pipequeue.h player.cpp player.h playeronestream.h pointer.cpp pointer.h pointercross.h pointerelbowdownleft.h pointerelbowdownright.h pointerelbowupleft.h pointerelbowupright.h pointerhorizontal.h pointerhorizontalbowl.h pointernone.h pointervertical.h pointerverticalbowl.h random.cpp random.h score.cpp score.h str.cpp str.h surface.cpp surface.h systemstream.h tank.cpp tank.h vertical.cpp vertical.h verticalbowl.cpp verticalbowl.h videomanager.cpp videomanager.h wallpaper.cpp wallpaper.h object.cpp sprite.h sprite.cpp fire.h fire.cpp paper.h paper.cpp | |
86 | 86 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs |
87 | 87 | CONFIG_HEADER = config.h |
88 | 88 | CONFIG_CLEAN_FILES = |
99 | 99 | level.o imagemanager.o image.o horizontalbowl.o horizontal.o hash.o \ |
100 | 100 | graphic.o exit.o eventstream.o eventmanager.o entry.o elbowupright.o \ |
101 | 101 | elbowupleft.o elbowdownright.o elbowdownleft.o cross.o canvas.o board.o \ |
102 | main.o | |
102 | main.o sprite.o fire.o paper.o | |
103 | 103 | pipenightdreams_DEPENDENCIES = |
104 | 104 | pipenightdreams_LDFLAGS = |
105 | 105 | CXXFLAGS = @CXXFLAGS@ |
117 | 117 | |
118 | 118 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) |
119 | 119 | |
120 | TAR = tar | |
120 | TAR = gtar | |
121 | 121 | GZIP_ENV = --best |
122 | 122 | DEP_FILES = .deps/board.P .deps/canvas.P .deps/cross.P \ |
123 | 123 | .deps/elbowdownleft.P .deps/elbowdownright.P .deps/elbowupleft.P \ |
124 | 124 | .deps/elbowupright.P .deps/entry.P .deps/eventmanager.P \ |
125 | .deps/eventstream.P .deps/exit.P .deps/graphic.P .deps/hash.P \ | |
126 | .deps/horizontal.P .deps/horizontalbowl.P .deps/image.P \ | |
125 | .deps/eventstream.P .deps/exit.P .deps/fire.P .deps/graphic.P \ | |
126 | .deps/hash.P .deps/horizontal.P .deps/horizontalbowl.P .deps/image.P \ | |
127 | 127 | .deps/imagemanager.P .deps/level.P .deps/list.P .deps/main.P \ |
128 | .deps/mosaic.P .deps/object.P .deps/pipe.P .deps/pipenightdreams.P \ | |
129 | .deps/pipequeue.P .deps/player.P .deps/pointer.P .deps/random.P \ | |
130 | .deps/score.P .deps/str.P .deps/surface.P .deps/tank.P .deps/vertical.P \ | |
131 | .deps/verticalbowl.P .deps/videomanager.P .deps/wallpaper.P | |
128 | .deps/mosaic.P .deps/object.P .deps/paper.P .deps/pipe.P \ | |
129 | .deps/pipenightdreams.P .deps/pipequeue.P .deps/player.P \ | |
130 | .deps/pointer.P .deps/random.P .deps/score.P .deps/sprite.P .deps/str.P \ | |
131 | .deps/surface.P .deps/tank.P .deps/vertical.P .deps/verticalbowl.P \ | |
132 | .deps/videomanager.P .deps/wallpaper.P | |
132 | 133 | SOURCES = $(pipenightdreams_SOURCES) |
133 | 134 | OBJECTS = $(pipenightdreams_OBJECTS) |
134 | 135 |
70 | 70 | setPipe(entry, row, column); |
71 | 71 | entry_row=row; |
72 | 72 | entry_column=column; |
73 | entry->setLast(true); | |
74 | last=entry; | |
75 | last_row=row; | |
76 | last_column=column; | |
73 | 77 | } |
74 | 78 | |
75 | 79 | void Board::setExit(Exit * exit, int row, int column){ |
86 | 90 | required_changed=true; |
87 | 91 | changes[row][column]=true; |
88 | 92 | Pipe * aux=board[row][column]; |
93 | if (aux==last) { | |
94 | last=pipe; | |
95 | pipe->setLast(true); | |
96 | } | |
89 | 97 | if (aux){ |
90 | 98 | if (aux->isRemovable()){ |
91 | 99 | delete aux; |
120 | 128 | int column=entry_column; |
121 | 129 | bool end=false; |
122 | 130 | unsigned int used=0; |
123 | ||
124 | 131 | required_changed=false; |
125 | 132 | |
133 | Pipe * aux_last=board[entry_row][entry_column]; | |
126 | 134 | CardinalPoint con=board[row][column]->getOutput(Void);//Entry output |
135 | changes[last_row][last_column]=true; | |
127 | 136 | while (!end){ |
128 | 137 | used++; |
129 | 138 | end=true; |
134 | 143 | if (board[row][column] != NULL) |
135 | 144 | if (board[row][column]->hasConnection(West)) |
136 | 145 | if (!board[row][column]->isRestrictedAsOutput(West)){ |
137 | end=false; | |
138 | 146 | con=board[row][column]->getOutput(West); |
147 | end=false; | |
139 | 148 | } |
140 | 149 | break; |
141 | 150 | } |
145 | 154 | if (board[row][column] != NULL) |
146 | 155 | if (board[row][column]->hasConnection(North)) |
147 | 156 | if (!board[row][column]->isRestrictedAsOutput(North)){ |
148 | end=false; | |
149 | 157 | con=board[row][column]->getOutput(North); |
150 | } | |
158 | end=false; | |
159 | } | |
151 | 160 | break; |
152 | 161 | } |
153 | 162 | case West:{ |
156 | 165 | if (board[row][column] != NULL) |
157 | 166 | if (board[row][column]->hasConnection(East)) |
158 | 167 | if (!board[row][column]->isRestrictedAsOutput(East)){ |
159 | end=false; | |
160 | 168 | con=board[row][column]->getOutput(East); |
161 | } | |
169 | end=false; | |
170 | } | |
162 | 171 | break; |
163 | 172 | } |
164 | 173 | case North:{ |
167 | 176 | if (board[row][column] != NULL) |
168 | 177 | if (board[row][column]->hasConnection(South)) |
169 | 178 | if (!board[row][column]->isRestrictedAsOutput(South)){ |
170 | end=false; | |
171 | 179 | con=board[row][column]->getOutput(South); |
172 | } | |
180 | end=false; | |
181 | } | |
173 | 182 | break; |
174 | 183 | } |
175 | 184 | default:{ |
177 | 186 | break; |
178 | 187 | } |
179 | 188 | } |
189 | if (!end){ | |
190 | aux_last=board[row][column]; | |
191 | last_row=row; | |
192 | last_column=column; | |
193 | } | |
180 | 194 | }//while |
181 | 195 | used--; //La entrada no se cuenta como usado |
182 | if (used>required) | |
183 | return 0; | |
184 | else return required-used; | |
185 | } | |
186 | ||
196 | if (last != aux_last){ | |
197 | last->setLast(false); | |
198 | last=aux_last; | |
199 | last->setLast(true); | |
200 | } | |
201 | ||
202 | if (used>required) return 0; | |
203 | return required-used; | |
204 | } | |
187 | 205 | |
188 | 206 | void Board::addPointer(Pointer * p){ |
189 | 207 | lps->insert(lps->getFirst(), (Pointer *)p); |
233 | 251 | int aux; |
234 | 252 | |
235 | 253 | tank->tick(); |
254 | last->tick(); | |
255 | ||
256 | for (int i=0;i<BoardRows;i++) | |
257 | for (int j=0;j<BoardColumns;j++) | |
258 | if (board[i][j]) | |
259 | if (board[i][j]->getBonus()!=NormalBonus){ | |
260 | board[i][j]->tick(); | |
261 | changes[i][j]=true; | |
262 | } | |
263 | ||
264 | changes[last_row][last_column]=true; | |
236 | 265 | if (!(tank->isEmpty())){//Descuento del tanque |
237 | 266 | tank->decFullLevel(tick_amount); |
238 | 267 | changes[flow_row][flow_column]=true; |
361 | 390 | } |
362 | 391 | } |
363 | 392 | } |
393 | ||
394 | ||
364 | 395 | /** Pinta y marca los punteros para la proxima entrada.*/ |
365 | 396 | index=lps->getFirst(); |
366 | 397 | for (i=0;i<lps->nObjects();i++){ |
367 | 398 | aux=(Pointer*)lps->getObject(index); |
368 | 399 | pr=aux->getRow(); |
369 | 400 | pc=aux->getColumn(); |
370 | if (aux->moved() || (flow_column==aux->getColumn() && flow_row==aux->getRow())){ | |
401 | if (aux->moved() | |
402 | ||(flow_column==pc && flow_row==pr) | |
403 | ||(last_column==pc && last_row==pr) | |
404 | ||(board[pr][pc] && board[pr][pc]->getBonus()!=NormalBonus)){ | |
371 | 405 | aux->setPos(pc*aux->width+x, pr*aux->height+y); |
372 | 406 | aux->paint(vm); |
373 | 407 | if (aux->moved()) aux->setMoved(false); else aux->setMoved(true); |
34 | 34 | #include "exit.h" |
35 | 35 | #include "tank.h" |
36 | 36 | #include "background.h" |
37 | ||
37 | 38 | |
38 | 39 | class Board: public AnimatedCanvas{ |
39 | 40 | |
129 | 130 | Pipe * entry; |
130 | 131 | Pipe * exit; |
131 | 132 | |
133 | Pipe * last; | |
134 | int last_row, last_column; | |
135 | ||
132 | 136 | int entry_row; |
133 | 137 | int entry_column; |
134 | 138 |
28 | 28 | this->x=x;this->y=y; |
29 | 29 | } |
30 | 30 | |
31 | int Canvas::getX(){ | |
32 | return x; | |
33 | } | |
34 | ||
35 | int Canvas::getY(){ | |
36 | return y; | |
37 | } | |
38 | ||
39 |
37 | 37 | /** Setea la posición.*/ |
38 | 38 | virtual void setPos(int x, int y); |
39 | 39 | |
40 | virtual int getX(); | |
41 | ||
42 | virtual int getY(); | |
43 | ||
40 | 44 | /** Pinta el canvas.*/ |
41 | 45 | virtual void paint(VideoManager * vm)=0; |
42 | 46 |
0 | /* src/config.h. Generated automatically by configure. */ | |
1 | /* src/config.h.in. Generated automatically from configure.in by autoheader. */ | |
0 | /* pipenightdreams/config.h. Generated automatically by configure. */ | |
1 | /* pipenightdreams/config.h.in. Generated automatically from configure.in by autoheader. */ | |
2 | 2 | |
3 | 3 | /* Define if lex declares yytext as a char * by default, not a char[]. */ |
4 | 4 | #define YYTEXT_POINTER 1 |
83 | 83 | return 0; |
84 | 84 | } |
85 | 85 | |
86 | bool Cross::hasLiquid(){ | |
87 | return (full_level>0 || extra_full_level>0); | |
88 | } | |
89 | ||
90 | ||
86 | 91 | Pointer * Cross::getPointer(){ |
87 | 92 | return p; |
88 | 93 | } |
115 | 120 | f=-1; |
116 | 121 | } |
117 | 122 | for (int i=0; i<full_level+1;i+=Gran) |
118 | vm->blit(aux, xof, total+f*(float)i/(float)full()*(float)PipeHeight); | |
123 | vm->blit(aux, xof, (int)(total+f*(float)i/(float)full()*(float)PipeHeight)); | |
119 | 124 | vm->enableClipping(false); |
120 | 125 | } |
121 | 126 | if (extra_full_level>0){ |
133 | 138 | f=-1; |
134 | 139 | } |
135 | 140 | for (int i=0; i<extra_full_level+1;i+=Gran) |
136 | vm->blit(aux, total+f*(float)i/(float)full()*(float)PipeWidth, yof); | |
141 | vm->blit(aux, (int)(total+f*(float)i/(float)full()*(float)PipeWidth), yof); | |
137 | 142 | vm->enableClipping(false); |
138 | 143 | } |
139 | 144 | if (bonus!=NormalBonus) paintBonus(vm, bonus); |
30 | 30 | |
31 | 31 | bool isRemovable(); |
32 | 32 | |
33 | bool hasLiquid(); | |
34 | ||
33 | 35 | void restrictAsOutput(CardinalPoint con); |
34 | 36 | |
35 | 37 | bool isRestrictedAsOutput(CardinalPoint con); |
83 | 83 | int yaux=y+PipeHeight-aux->width()/2; |
84 | 84 | if (used_input==South){ |
85 | 85 | for (int i=0; i<full_level+1;i+=Gran) |
86 | vm->blit(aux, xaux+(float)cos((float)i/(float)full() * nov)*fwidth, | |
87 | yaux-(float)sin((float)i/(float)full() * nov)*fheight); | |
86 | vm->blit(aux, (int)(xaux+(float)cos((float)i/(float)full() * nov)*fwidth), | |
87 | (int)(yaux-(float)sin((float)i/(float)full() * nov)*fheight)); | |
88 | 88 | }else{ |
89 | 89 | for (int i=0; i<full_level+1;i+=Gran) |
90 | vm->blit(aux, xaux+(float)cos((float)(full()-i)/(float)full() * nov)*fwidth, | |
91 | yaux-(float)sin((float)(full()-i)/(float)full() * nov)*fheight); | |
90 | vm->blit(aux, (int)(xaux+(float)cos((float)(full()-i)/(float)full() * nov)*fwidth), | |
91 | (int)(yaux-(float)sin((float)(full()-i)/(float)full() * nov)*fheight)); | |
92 | 92 | } |
93 | 93 | vm->enableClipping(false); |
94 | 94 | } |
84 | 84 | int yaux=y+PipeHeight-aux->width()/2; |
85 | 85 | if (used_input==South){ |
86 | 86 | for (int i=0; i<full_level+1;i+=Gran) |
87 | vm->blit(aux, xaux-(float)cos((float)i/(float)full() * nov)*fwidth, | |
88 | yaux-(float)sin((float)i/(float)full() * nov)*fheight); | |
87 | vm->blit(aux, (int)(xaux-(float)cos((float)i/(float)full() * nov)*fwidth), | |
88 | (int)(yaux-(float)sin((float)i/(float)full() * nov)*fheight)); | |
89 | 89 | }else{ |
90 | 90 | for (int i=0; i<full_level+1;i+=Gran) |
91 | vm->blit(aux, xaux-(float)cos((float)(full()-i)/(float)full() * nov)*fwidth, | |
92 | yaux-(float)sin((float)(full()-i)/(float)full() * nov)*fheight); | |
91 | vm->blit(aux, (int)(xaux-(float)cos((float)(full()-i)/(float)full() * nov)*fwidth), | |
92 | (int)(yaux-(float)sin((float)(full()-i)/(float)full() * nov)*fheight)); | |
93 | 93 | } |
94 | 94 | vm->enableClipping(false); |
95 | 95 | } |
85 | 85 | int yaux=y-aux->width()/2; |
86 | 86 | if (used_input==North){ |
87 | 87 | for (int i=0; i<full_level+1;i+=Gran) |
88 | vm->blit(aux, xaux+(float)cos((float)i/(float)full() * nov)*fwidth, | |
89 | yaux+(float)sin((float)i/(float)full() * nov)*fheight); | |
88 | vm->blit(aux, (int)(xaux+(float)cos((float)i/(float)full() * nov)*fwidth), | |
89 | (int)(yaux+(float)sin((float)i/(float)full() * nov)*fheight)); | |
90 | 90 | }else{ |
91 | 91 | for (int i=0; i<full_level+1;i+=Gran) |
92 | vm->blit(aux, xaux+(float)cos((float)(full()-i)/(float)full() * nov)*fwidth, | |
93 | yaux+(float)sin((float)(full()-i)/(float)full() * nov)*fheight); | |
92 | vm->blit(aux, (int)(xaux+(float)cos((float)(full()-i)/(float)full() * nov)*fwidth), | |
93 | (int)(yaux+(float)sin((float)(full()-i)/(float)full() * nov)*fheight)); | |
94 | 94 | } |
95 | 95 | vm->enableClipping(false); |
96 | 96 | } |
84 | 84 | int yaux=y-aux->width()/2; |
85 | 85 | if (used_input==North){ |
86 | 86 | for (int i=0; i<full_level+1;i+=Gran) |
87 | vm->blit(aux, xaux-(float)cos((float)i/(float)full() * nov)*fwidth, | |
88 | yaux+(float)sin((float)i/(float)full() * nov)*fheight); | |
87 | vm->blit(aux, (int)(xaux-(float)cos((float)i/(float)full() * nov)*fwidth), | |
88 | (int)(yaux+(float)sin((float)i/(float)full() * nov)*fheight)); | |
89 | 89 | }else{ |
90 | 90 | for (int i=0; i<full_level+1;i+=Gran) |
91 | vm->blit(aux, xaux-(float)cos((float)(full()-i)/(float)full() * nov)*fwidth, | |
92 | yaux+(float)sin((float)(full()-i)/(float)full() * nov)*fheight); | |
91 | vm->blit(aux, (int)(xaux-(float)cos((float)(full()-i)/(float)full() * nov)*fwidth), | |
92 | (int)(yaux+(float)sin((float)(full()-i)/(float)full() * nov)*fheight)); | |
93 | 93 | } |
94 | 94 | vm->enableClipping(false); |
95 | 95 | } |
75 | 75 | float factor=0.5*(float)PipeHeight/(float)full(); |
76 | 76 | if (con==North) factor=-factor; |
77 | 77 | for (int i=0;i<full_level+Gran;i+=Gran) |
78 | vm->blit(ima, xof, yof+(float)i*factor); | |
78 | vm->blit(ima, xof, (int)(yof+(float)i*factor)); | |
79 | 79 | break; |
80 | 80 | } |
81 | 81 | case East: case West:{ |
82 | 82 | float factor=0.5*(float)PipeWidth/(float)full(); |
83 | 83 | if (con==West) factor=-factor; |
84 | 84 | for (int i=0;i<full_level+Gran;i+=Gran) |
85 | vm->blit(ima, xof+(float)i*factor, yof); | |
85 | vm->blit(ima, (int)(xof+(float)i*factor), yof); | |
86 | 86 | } |
87 | 87 | default:break; |
88 | 88 | } |
78 | 78 | factor =-factor; |
79 | 79 | } |
80 | 80 | for (int i=0;i<full_level/2+Gran;i+=Gran) |
81 | vm->blit(ima, xof, yof+(float)i*factor); | |
81 | vm->blit(ima, xof, (int)(yof+(float)i*factor)); | |
82 | 82 | break; |
83 | 83 | } |
84 | 84 | case East: case West:{ |
91 | 91 | factor =-factor; |
92 | 92 | } |
93 | 93 | for (int i=0;i<full_level/2+Gran;i+=Gran) |
94 | vm->blit(ima, xof+(float)i*factor, yof); | |
94 | vm->blit(ima, (int)(xof+(float)i*factor), yof); | |
95 | 95 | break; |
96 | 96 | } |
97 | 97 | default:break; |
0 | /*************************************************************************** | |
1 | fire.cpp - description | |
2 | ------------------- | |
3 | begin : Fri Jan 18 2002 | |
4 | copyright : (C) 2002 by Waldemar Baraldi | |
5 | email : baraldi@lacasilla.com.ar | |
6 | ***************************************************************************/ | |
7 | ||
8 | /*************************************************************************** | |
9 | * * | |
10 | * This program is free software; you can redistribute it and/or modify * | |
11 | * it under the terms of the GNU General Public License as published by * | |
12 | * the Free Software Foundation; either version 2 of the License, or * | |
13 | * (at your option) any later version. * | |
14 | * * | |
15 | ***************************************************************************/ | |
16 | ||
17 | #include "fire.h" | |
18 | #include "sprite.h" | |
19 | #include "random.h" | |
20 | ||
21 | const int Fire::NFrames=2; | |
22 | ||
23 | Fire::Fire(ImageManager * im):AnimatedCanvas(){ | |
24 | ||
25 | l_width=8; | |
26 | l_height=14; | |
27 | c=0; | |
28 | frame=0; | |
29 | ||
30 | sprite=new Sprite(new Str("fire"), new Str(".png"), NFrames, im); | |
31 | } | |
32 | ||
33 | Fire::~Fire(){ | |
34 | delete sprite; | |
35 | } | |
36 | ||
37 | int Fire::width(){ | |
38 | return l_width; | |
39 | } | |
40 | ||
41 | int Fire::height(){ | |
42 | return l_height; | |
43 | } | |
44 | ||
45 | ||
46 | void Fire::paint(VideoManager * vm){ | |
47 | vm->blit(sprite->frame(vm->getImageManager(), frame), x, y); | |
48 | } | |
49 | ||
50 | void Fire::tick(){ | |
51 | if (c++%6==0) frame=(frame+1)%NFrames; | |
52 | } |
0 | /*************************************************************************** | |
1 | fire.h - description | |
2 | ------------------- | |
3 | begin : Fri Jan 18 2002 | |
4 | copyright : (C) 2002 by Waldemar Baraldi | |
5 | email : baraldi@lacasilla.com.ar | |
6 | ***************************************************************************/ | |
7 | ||
8 | /*************************************************************************** | |
9 | * * | |
10 | * This program is free software; you can redistribute it and/or modify * | |
11 | * it under the terms of the GNU General Public License as published by * | |
12 | * the Free Software Foundation; either version 2 of the License, or * | |
13 | * (at your option) any later version. * | |
14 | * * | |
15 | ***************************************************************************/ | |
16 | ||
17 | #ifndef FIRE_H | |
18 | #define FIRE_H | |
19 | ||
20 | #include "animatedcanvas.h" | |
21 | ||
22 | class Sprite; | |
23 | class ImageManager; | |
24 | ||
25 | class Fire: public AnimatedCanvas{ | |
26 | ||
27 | public: | |
28 | static const int NFrames; | |
29 | ||
30 | Fire(ImageManager * im); | |
31 | virtual ~Fire(); | |
32 | ||
33 | int width(); | |
34 | ||
35 | int height(); | |
36 | ||
37 | void paint(VideoManager * vm); | |
38 | ||
39 | void tick(); | |
40 | ||
41 | protected: | |
42 | ||
43 | Sprite * sprite; | |
44 | ||
45 | int frame; | |
46 | ||
47 | int maxY; | |
48 | ||
49 | int l_width; | |
50 | ||
51 | int l_height; | |
52 | ||
53 | int c; | |
54 | }; | |
55 | ||
56 | #endif | |
57 |
Binary diff not shown
94 | 94 | f=-1; |
95 | 95 | } |
96 | 96 | for (int i=0; i<full_level+2*Gran;i+=Gran) |
97 | vm->blit(aux, total+f*(float)i/(float)full()*(float)PipeWidth, yof); | |
97 | vm->blit(aux, (int)(total+f*(float)i/(float)full()*(float)PipeWidth), yof); | |
98 | 98 | vm->enableClipping(false); |
99 | 99 | } |
100 | 100 | if (bonus!=NormalBonus) paintBonus(vm, bonus); |
26 | 26 | { |
27 | 27 | Str * data_dir=NULL; |
28 | 28 | int level=1; |
29 | bool fullscreen=false; | |
30 | int i=1; | |
29 | 31 | |
30 | if (argc >1) | |
31 | if (!strcmp("--datadir", argv[1])) | |
32 | data_dir=new Str(argv[2]); | |
33 | 32 | |
34 | if (!data_dir){ | |
35 | if (argc>1){ | |
36 | printf("Invalid Data Dir\nUse pipenightdreams --datadir <DATA DIR>\n"); | |
37 | printf("Using default: %s\n", GAME_DATADIR); | |
38 | } | |
39 | data_dir=new Str(GAME_DATADIR); | |
33 | while (i<argc){ | |
34 | if (!strcmp("--datadir", argv[i])){ | |
35 | if (data_dir) delete data_dir; | |
36 | data_dir=new Str(argv[++i]); | |
37 | }else | |
38 | if (!strcmp("--fullscreen", argv[i])) | |
39 | fullscreen=true; | |
40 | else{ | |
41 | printf("Invalid Data Dir\nUse pipenightdreams [--datadir <DATA DIR>] [--fullscreen]\n"); | |
42 | printf("Using default: %s\n", GAME_DATADIR); | |
43 | } | |
44 | i++; | |
40 | 45 | } |
41 | 46 | |
47 | if (!data_dir) data_dir=new Str(GAME_DATADIR); | |
42 | 48 | |
43 | ||
44 | PipeNightDreams * g = new PipeNightDreams(); | |
49 | PipeNightDreams * g = new PipeNightDreams(fullscreen); | |
45 | 50 | g->setDataDir(data_dir); |
46 | 51 | g->setStartingLevel(level); |
47 | 52 | g->run(); |
24 | 24 | } |
25 | 25 | |
26 | 26 | virtual ~Object(){ |
27 | /* bool ready=false; | |
27 | /* bool ready=false; | |
28 | 28 | for (int i=0;i<DSIZE && !ready;i++){ |
29 | 29 | if (all[i]==this){ |
30 | 30 | all[i]=NULL; |
31 | 31 | ready=true; |
32 | 32 | } |
33 | }*/ | |
33 | } */ | |
34 | 34 | } |
35 | 35 | |
36 | 36 | virtual void reportLeaks(){ |
0 | /*************************************************************************** | |
1 | paper.cpp - description | |
2 | ------------------- | |
3 | begin : Fri Jan 18 2002 | |
4 | copyright : (C) 2002 by Waldemar Baraldi | |
5 | email : baraldi@lacasilla.com.ar | |
6 | ***************************************************************************/ | |
7 | ||
8 | /*************************************************************************** | |
9 | * * | |
10 | * This program is free software; you can redistribute it and/or modify * | |
11 | * it under the terms of the GNU General Public License as published by * | |
12 | * the Free Software Foundation; either version 2 of the License, or * | |
13 | * (at your option) any later version. * | |
14 | * * | |
15 | ***************************************************************************/ | |
16 | ||
17 | #include "paper.h" | |
18 | #include "sprite.h" | |
19 | #include "random.h" | |
20 | ||
21 | const int Paper::DeltaY=5; | |
22 | const int Paper::NFrames=5; | |
23 | ||
24 | Paper::Paper(int maxY, PaperColor color, ImageManager * im):AnimatedCanvas(){ | |
25 | ||
26 | this->maxY=maxY; | |
27 | Random ran=Random(); | |
28 | frame=ran.getRandomNumber(0, NFrames); | |
29 | l_width=20; | |
30 | l_height=12; | |
31 | ||
32 | Str * filenamebase; | |
33 | ||
34 | switch (color){ | |
35 | case Red:{filenamebase =new Str("red_paper");break;} | |
36 | case Blue:{filenamebase =new Str("blue_paper");break;} | |
37 | case Green:{filenamebase =new Str("green_paper");break;} | |
38 | } | |
39 | sprite=new Sprite(filenamebase, new Str(".png"), NFrames, im); | |
40 | } | |
41 | ||
42 | Paper::~Paper(){ | |
43 | delete sprite; | |
44 | } | |
45 | ||
46 | int Paper::width(){ | |
47 | return l_width; | |
48 | } | |
49 | ||
50 | int Paper::height(){ | |
51 | return l_height; | |
52 | } | |
53 | ||
54 | ||
55 | void Paper::paint(VideoManager * vm){ | |
56 | vm->blit(sprite->frame(vm->getImageManager(), frame), x, y); | |
57 | } | |
58 | ||
59 | void Paper::tick(){ | |
60 | frame=(frame+1)%NFrames; | |
61 | y=(y+DeltaY)%maxY; | |
62 | } |
0 | /*************************************************************************** | |
1 | paper.h - description | |
2 | ------------------- | |
3 | begin : Fri Jan 18 2002 | |
4 | copyright : (C) 2002 by Waldemar Baraldi | |
5 | email : baraldi@lacasilla.com.ar | |
6 | ***************************************************************************/ | |
7 | ||
8 | /*************************************************************************** | |
9 | * * | |
10 | * This program is free software; you can redistribute it and/or modify * | |
11 | * it under the terms of the GNU General Public License as published by * | |
12 | * the Free Software Foundation; either version 2 of the License, or * | |
13 | * (at your option) any later version. * | |
14 | * * | |
15 | ***************************************************************************/ | |
16 | ||
17 | #ifndef PAPER_H | |
18 | #define PAPER_H | |
19 | ||
20 | #include "animatedcanvas.h" | |
21 | ||
22 | class Sprite; | |
23 | class ImageManager; | |
24 | ||
25 | class Paper: public AnimatedCanvas{ | |
26 | ||
27 | public: | |
28 | static const int DeltaY; | |
29 | static const int NFrames; | |
30 | ||
31 | enum PaperColor {Red, Green, Blue}; | |
32 | ||
33 | Paper(int maxY, PaperColor color, ImageManager * im); | |
34 | virtual ~Paper(); | |
35 | ||
36 | int width(); | |
37 | ||
38 | int height(); | |
39 | ||
40 | void paint(VideoManager * vm); | |
41 | ||
42 | void tick(); | |
43 | ||
44 | protected: | |
45 | ||
46 | Sprite * sprite; | |
47 | ||
48 | int frame; | |
49 | ||
50 | int maxY; | |
51 | ||
52 | int l_width; | |
53 | ||
54 | int l_height; | |
55 | }; | |
56 | ||
57 | #endif | |
58 |
23 | 23 | fixed=false; |
24 | 24 | bonus=NormalBonus; |
25 | 25 | this->owner=NULL; |
26 | excl=NULL; | |
27 | exclFrame=0; | |
28 | last=false; | |
29 | bonusFrame=0; | |
30 | bonusSprite=NULL; | |
26 | 31 | } |
27 | 32 | |
33 | Pipe::~Pipe(){ | |
34 | if (excl) delete excl; | |
35 | } | |
36 | ||
37 | bool Pipe::hasLiquid(){ | |
38 | return (full_level>0); | |
39 | } | |
28 | 40 | |
29 | 41 | bool Pipe::isRemovable(){ |
30 | 42 | return !(full_level>0) && !fixed; |
48 | 60 | |
49 | 61 | Player * Pipe::getOwner(){ |
50 | 62 | return owner; |
63 | } | |
64 | ||
65 | void Pipe::tick(){ | |
66 | exclFrame = (exclFrame + 1) % 15; | |
67 | bonusFrame = (bonusFrame +1) % 30; | |
51 | 68 | } |
52 | 69 | |
53 | 70 | void Pipe::paintRestriction(VideoManager * vm, CardinalPoint con){ |
79 | 96 | |
80 | 97 | void Pipe::paintBonus(VideoManager * vm, Bonus bonus){ |
81 | 98 | Image * ima; |
82 | switch (bonus){ | |
83 | case SuperBonus:{ | |
84 | ima=(vm->getImageManager())->getImage(new Str("super_bonus.png")); | |
85 | vm->blit(ima, x, y); | |
86 | break; | |
99 | if (!bonusSprite){ | |
100 | switch (bonus){ | |
101 | case SuperBonus:{ | |
102 | bonusSprite= new Sprite(new Str("super_bonus"), new Str(".png"), 30, vm->getImageManager()); | |
103 | break; | |
104 | } | |
105 | case UltraBonus:{ | |
106 | bonusSprite= new Sprite(new Str("ultra_bonus"), new Str(".png"), 30, vm->getImageManager()); | |
107 | break; | |
108 | } | |
109 | case HyperBonus:{ | |
110 | bonusSprite= new Sprite(new Str("hyper_bonus"), new Str(".png"), 30, vm->getImageManager()); | |
111 | break; | |
112 | } | |
113 | case LifeBonus:{ | |
114 | bonusSprite= new Sprite(new Str("life_bonus"), new Str(".png"), 30, vm->getImageManager()); | |
115 | break; | |
116 | } | |
117 | default:break; | |
87 | 118 | } |
88 | case UltraBonus:{ | |
89 | ima=(vm->getImageManager())->getImage(new Str("ultra_bonus.png")); | |
90 | vm->blit(ima, x, y); | |
91 | break; | |
92 | } | |
93 | case HyperBonus:{ | |
94 | ima=(vm->getImageManager())->getImage(new Str("hyper_bonus.png")); | |
95 | vm->blit(ima, x, y); | |
96 | break; | |
97 | } | |
98 | case LifeBonus:{ | |
99 | ima=(vm->getImageManager())->getImage(new Str("life_bonus.png")); | |
100 | vm->blit(ima, x, y); | |
101 | break; | |
102 | } | |
103 | default:break; | |
104 | 119 | } |
120 | if (hasLiquid()>0)vm->blit(bonusSprite->frame(vm->getImageManager(), 0), x+(width()-bonusSprite->frameWidth(vm->getImageManager()))/2, y+(height()-bonusSprite->frameHeight(vm->getImageManager()))/2); | |
121 | else vm->blit(bonusSprite->frame(vm->getImageManager(), bonusFrame), x+(width()-bonusSprite->frameWidth(vm->getImageManager()))/2, y+(height()-bonusSprite->frameHeight(vm->getImageManager()))/2); | |
105 | 122 | } |
106 | 123 | |
124 | void Pipe::paintExclamation(VideoManager * vm){ | |
125 | if (excl==NULL) excl=new Sprite(new Str("exclam"), new Str(".png"), 15, vm->getImageManager()); | |
126 | vm->blit(excl->frame(vm->getImageManager(), exclFrame), x + width()-excl->frameWidth(vm->getImageManager()), y); | |
127 | } | |
107 | 128 | |
129 | void Pipe::setLast(bool flag){ | |
130 | last=flag; | |
131 | } | |
132 | ||
133 | bool Pipe::isLast(){ | |
134 | return last; | |
135 | } |
20 | 20 | #include "animatedcanvas.h" |
21 | 21 | #include "pointer.h" |
22 | 22 | #include "videomanager.h" |
23 | #include "sprite.h" | |
23 | 24 | |
24 | 25 | #define NORMAL_BONUS_VALUE 5 |
25 | 26 | #define SUPER_BONUS_VALUE 10 |
43 | 44 | Pipe(); |
44 | 45 | |
45 | 46 | /** Destructor. */ |
46 | virtual ~Pipe(){} | |
47 | virtual ~Pipe(); | |
47 | 48 | |
48 | 49 | int width(){return PipeWidth;} |
49 | 50 | int height(){return PipeHeight;} |
81 | 82 | si no existe el input.*/ |
82 | 83 | virtual CardinalPoint getOutput(CardinalPoint input)=0; |
83 | 84 | |
85 | virtual bool hasLiquid(); | |
86 | ||
87 | ||
88 | virtual void setLast(bool flag); | |
89 | ||
90 | virtual bool isLast(); | |
91 | ||
84 | 92 | /** Incrementa el nivel de llenado en 1 para la conexión con ese input. |
85 | 93 | El resultado es 0 si no existe input.*/ |
86 | 94 | virtual void incFullLevel(CardinalPoint input, unsigned int amount)=0; |
94 | 102 | |
95 | 103 | /** Para uso futuro. Cambiarla a abstracta e |
96 | 104 | implementarla en cada pipe*/ |
97 | void tick(){}; | |
105 | void tick(); | |
98 | 106 | |
99 | 107 | protected: |
100 | 108 | |
103 | 111 | |
104 | 112 | virtual void paintRestriction(VideoManager * vm, CardinalPoint con); |
105 | 113 | virtual void paintBonus(VideoManager * vm, Bonus bonus); |
114 | virtual void paintExclamation(VideoManager * vm); | |
106 | 115 | |
107 | 116 | int full_level; |
108 | 117 | CardinalPoint used_input; |
111 | 120 | bool fixed; |
112 | 121 | Bonus bonus; |
113 | 122 | Player * owner; |
123 | Sprite * excl; | |
124 | int exclFrame; | |
125 | bool last; | |
126 | ||
127 | int bonusFrame; | |
128 | Sprite * bonusSprite; | |
114 | 129 | }; |
115 | 130 | #endif |
116 | 131 |
22 | 22 | #include "playeronestream.h" |
23 | 23 | #include "level.h" |
24 | 24 | #include "score.h" |
25 | ||
26 | PipeNightDreams::PipeNightDreams(){ | |
25 | #include "sprite.h" | |
26 | #include "paper.h" | |
27 | #include "fire.h" | |
28 | #include "random.h" | |
29 | ||
30 | PipeNightDreams::PipeNightDreams(bool fullscreen){ | |
27 | 31 | SDL_Init(SDL_INIT_VIDEO); |
28 | ||
29 | video_manager=new VideoManager(); | |
32 | VideoManager::VideoFlag fs = VideoManager::None; | |
33 | if (fullscreen) fs=VideoManager::FullScreen; | |
34 | ||
35 | video_manager=new VideoManager(fs); | |
30 | 36 | video_manager->setCaption(new Str("PipeNightDreams")); |
31 | 37 | event_manager=new EventManager(); |
32 | 38 | sys = new SystemStream(); |
34 | 40 | data_dir=new Str(); |
35 | 41 | images_dir=new Str(); |
36 | 42 | starting_level=1; |
43 | fullscreen=false; | |
37 | 44 | } |
38 | 45 | |
39 | 46 | PipeNightDreams::~PipeNightDreams(){ |
43 | 50 | delete event_manager; |
44 | 51 | delete nextlevel; |
45 | 52 | delete tryagain; |
53 | delete pressenter; | |
46 | 54 | SDL_Quit(); |
47 | 55 | reportLeaks(); |
48 | 56 | } |
224 | 232 | Image * main; |
225 | 233 | Image * enter; |
226 | 234 | bool paint=false; |
235 | Random * r=new Random(); | |
236 | int enter_delay=0; | |
237 | ||
238 | Fire * fire= new Fire(video_manager->getImageManager()); | |
239 | fire->setPos(318, 186); | |
240 | ||
241 | const int nPapers=40; | |
242 | ||
243 | Paper * papers[nPapers]; | |
244 | ||
245 | for (int i=0; i<nPapers; i++){ | |
246 | Paper::PaperColor color; | |
247 | ||
248 | switch (r->getRandomNumber(0,2)){ | |
249 | case 0: color=Paper::Red;break; | |
250 | case 1: color=Paper::Green;break; | |
251 | case 2: color=Paper::Blue;break; | |
252 | } | |
253 | papers[i]=new Paper(480, color, video_manager->getImageManager()); | |
254 | papers[i]->setPos(r->getRandomNumber(0,630), r->getRandomNumber(0,480)); | |
255 | } | |
256 | delete r; | |
227 | 257 | |
228 | 258 | aux=new Str(images_dir); |
229 | 259 | aux->concat("start.jpg"); |
235 | 265 | |
236 | 266 | video_manager->setCaption(new Str("PipeNightDreams")); |
237 | 267 | video_manager->blit(main, 0,0); |
268 | ||
238 | 269 | video_manager->flush(); |
239 | 270 | do{ |
240 | SDL_Delay(300); | |
241 | if (paint=!paint) video_manager->blit(enter, 248, 440); | |
242 | else video_manager->blit(main, 248, 440, 248, 440, 143, 15); | |
271 | for (int i=0;i<nPapers;i++){ | |
272 | video_manager->blit(main, | |
273 | papers[i]->getX(), | |
274 | papers[i]->getY(), | |
275 | papers[i]->getX(), | |
276 | papers[i]->getY(), | |
277 | papers[i]->width(), | |
278 | papers[i]->height()); | |
279 | } | |
280 | video_manager->blit(main, 248, 440, 248, 440, 143, 15); | |
281 | video_manager->blit(main, fire->getX(), fire->getY(), | |
282 | fire->getX(), fire->getY(), | |
283 | fire->width(), fire->height()); | |
284 | ||
285 | for (int i=0;i<nPapers;i++){ | |
286 | papers[i]->tick(); | |
287 | papers[i]->paint(video_manager); | |
288 | } | |
289 | ||
290 | if ((enter_delay=(enter_delay+1)%3)==0) paint=!paint; | |
291 | if (paint) video_manager->blit(enter, 248, 440); | |
292 | ||
293 | ||
294 | fire->paint(video_manager); | |
295 | fire->tick(); | |
296 | ||
243 | 297 | video_manager->flush(); |
298 | SDL_Delay(100); | |
244 | 299 | event_manager->pumpEvents(false); |
245 | 300 | event=sys->get(); |
246 | 301 | }while (event!=GO && event!=BACK); |
247 | 302 | delete main; |
248 | 303 | delete enter; |
249 | 304 | |
305 | for (int i=0; i<nPapers; i++) | |
306 | delete papers[i]; | |
307 | ||
308 | delete fire; | |
309 | ||
250 | 310 | if (event==BACK) quit=true; |
251 | 311 | } |
252 | 312 | |
259 | 319 | aux->concat("gameover.png"); |
260 | 320 | gameover=new Image(aux); |
261 | 321 | |
262 | video_manager->blit(gameover, 100+270-gameover->width()/2,240-gameover->height()/2); | |
322 | video_manager->blit(gameover, 100+270-gameover->width()/2,240-gameover->height()); | |
323 | video_manager->blit(pressenter, 100+270-pressenter->width()/2,240); | |
263 | 324 | video_manager->flush(); |
264 | 325 | delete gameover; |
265 | 326 | |
275 | 336 | void PipeNightDreams::showNextLevel(){ |
276 | 337 | Event event; |
277 | 338 | |
278 | video_manager->blit(nextlevel, 100+270-nextlevel->width()/2,240-nextlevel->height()/2); | |
339 | video_manager->blit(nextlevel, 100+270-nextlevel->width()/2,240-nextlevel->height()); | |
340 | video_manager->blit(pressenter, 100+270-pressenter->width()/2,240); | |
279 | 341 | video_manager->flush(); |
280 | 342 | |
281 | 343 | do{ |
286 | 348 | |
287 | 349 | void PipeNightDreams::showTryAgain(){ |
288 | 350 | Event event; |
289 | video_manager->blit(tryagain, 100+270-tryagain->width()/2,240-tryagain->height()/2); | |
351 | video_manager->blit(tryagain, 100+270-tryagain->width()/2,240-tryagain->height()); | |
352 | video_manager->blit(pressenter, 100+270-pressenter->width()/2,240); | |
290 | 353 | video_manager->flush(); |
291 | 354 | |
292 | 355 | do{ |
304 | 367 | aux->concat("alllevelsdone.png"); |
305 | 368 | done=new Image(aux); |
306 | 369 | |
307 | video_manager->blit(done, 100+270-done->width()/2,240-done->height()/2); | |
370 | video_manager->blit(done, 100+270-done->width()/2,240-done->height()); | |
371 | video_manager->blit(pressenter, 100+270-pressenter->width()/2,240); | |
308 | 372 | video_manager->flush(); |
309 | 373 | delete done; |
310 | 374 | |
332 | 396 | aux= new Str(images_dir); |
333 | 397 | aux->concat("nextlevel.png"); |
334 | 398 | nextlevel=new Image(aux); |
335 | } | |
336 | ||
399 | ||
400 | aux= new Str(images_dir); | |
401 | aux->concat("pressenter.png"); | |
402 | pressenter=new Image(aux); | |
403 | } | |
404 |
31 | 31 | |
32 | 32 | public: |
33 | 33 | |
34 | PipeNightDreams(); | |
34 | PipeNightDreams(bool fullscreen); | |
35 | 35 | ~PipeNightDreams(); |
36 | 36 | |
37 | 37 | /** The method to assign the data dir */ |
38 | 38 | void setDataDir(Str * dir_name); |
39 | 39 | |
40 | 40 | void setStartingLevel(int level); |
41 | ||
41 | 42 | |
42 | 43 | /** The method that run the game. */ |
43 | 44 | void run(); |
80 | 81 | Player * player; |
81 | 82 | Image * nextlevel; |
82 | 83 | Image * tryagain; |
84 | Image * pressenter; | |
83 | 85 | int starting_level; |
84 | 86 | }; |
85 | 87 |
0 | /*************************************************************************** | |
1 | sprite.cpp - description | |
2 | ------------------- | |
3 | begin : Thu Jan 17 2002 | |
4 | copyright : (C) 2002 by Waldemar Baraldi | |
5 | email : baraldi@lacasilla.com.ar | |
6 | ***************************************************************************/ | |
7 | ||
8 | /*************************************************************************** | |
9 | * * | |
10 | * This program is free software; you can redistribute it and/or modify * | |
11 | * it under the terms of the GNU General Public License as published by * | |
12 | * the Free Software Foundation; either version 2 of the License, or * | |
13 | * (at your option) any later version. * | |
14 | * * | |
15 | ***************************************************************************/ | |
16 | ||
17 | #include "sprite.h" | |
18 | #include "list.h" | |
19 | #include "surface.h" | |
20 | #include "imagemanager.h" | |
21 | ||
22 | Sprite::Sprite(Str * filenamebase, Str * filenameext, int nFrames, ImageManager * im){ | |
23 | frames = (Image**) malloc(nFrames*(sizeof(Image*))); | |
24 | ||
25 | this->n_frames=nFrames; | |
26 | this->filenamebase=filenamebase; | |
27 | this->filenameext=filenameext; | |
28 | char aux[256]; | |
29 | ||
30 | for (int i=0;i<nFrames;i++){ | |
31 | sprintf(aux, "%s%04i%s", filenamebase->get(), i, filenameext->get()); | |
32 | frames[i]=im->getImage(new Str(aux)); | |
33 | } | |
34 | } | |
35 | ||
36 | Sprite::~Sprite(){ | |
37 | delete frames; | |
38 | if (filenamebase) delete filenamebase; | |
39 | if (filenameext) delete filenameext; | |
40 | } | |
41 | ||
42 | int Sprite::nFrames(){ | |
43 | return n_frames; | |
44 | } | |
45 | ||
46 | int Sprite::frameWidth(ImageManager * im){ | |
47 | return frames[0]->width(); | |
48 | } | |
49 | ||
50 | int Sprite::frameHeight(ImageManager * im){ | |
51 | return frames[0]->height(); | |
52 | } | |
53 | ||
54 | Surface * Sprite::frame(ImageManager * im, int n){ | |
55 | return frames[n]; | |
56 | } |
0 | /*************************************************************************** | |
1 | sprite.h - description | |
2 | ------------------- | |
3 | begin : Thu Jan 17 2002 | |
4 | copyright : (C) 2002 by Waldemar Baraldi | |
5 | email : baraldi@lacasilla.com.ar | |
6 | ***************************************************************************/ | |
7 | ||
8 | /*************************************************************************** | |
9 | * * | |
10 | * This program is free software; you can redistribute it and/or modify * | |
11 | * it under the terms of the GNU General Public License as published by * | |
12 | * the Free Software Foundation; either version 2 of the License, or * | |
13 | * (at your option) any later version. * | |
14 | * * | |
15 | ***************************************************************************/ | |
16 | ||
17 | #ifndef SPRITE_H | |
18 | #define SPRITE_H | |
19 | ||
20 | #include "graphic.h" | |
21 | #include "str.h" | |
22 | #include "SDL.h" | |
23 | ||
24 | class List; | |
25 | class Surface; | |
26 | class ImageManager; | |
27 | class Image; | |
28 | ||
29 | class Sprite: public Graphic{ | |
30 | ||
31 | public: | |
32 | ||
33 | /** Constructor. | |
34 | @param filenamebase El sprite es cargado usando <filenamebase>.spr <filenamebase>.png | |
35 | */ | |
36 | Sprite(Str * filenamebase, Str * filenameext, int nFrames, ImageManager * im); | |
37 | ||
38 | /** Destructor.*/ | |
39 | virtual ~Sprite(); | |
40 | ||
41 | virtual int nFrames(); | |
42 | ||
43 | virtual int frameWidth(ImageManager * im); | |
44 | virtual int frameHeight(ImageManager * im); | |
45 | ||
46 | virtual Surface * frame(ImageManager * im, int n); | |
47 | ||
48 | ||
49 | protected: | |
50 | Image ** frames; | |
51 | int n_frames; | |
52 | Str * filenamebase; | |
53 | Str * filenameext; | |
54 | }; | |
55 | #endif |
30 | 30 | rect.w=width; |
31 | 31 | rect.h=height; |
32 | 32 | |
33 | aux_surface=SDL_CreateRGBSurface(SDL_HWSURFACE, width, height, | |
33 | aux_surface=SDL_CreateRGBSurface(SDL_HWSURFACE|SDL_SRCALPHA, width, height, | |
34 | 34 | 32, 0xff, 0x00ff,0x0000ff,0x000000ff); |
35 | 35 | surface=SDL_DisplayFormatAlpha(aux_surface); |
36 | 36 | SDL_FreeSurface(aux_surface); |
47 | 47 | protected: |
48 | 48 | |
49 | 49 | friend class VideoManager; |
50 | friend class Sprite; | |
50 | 51 | SDL_Surface * surface; |
51 | 52 | |
52 | 53 | }; |
76 | 76 | if (ro!=Void) paintRestriction(vm, ro); |
77 | 77 | |
78 | 78 | paintFlow(vm); |
79 | ||
80 | if (bonus!=NormalBonus) paintBonus(vm, bonus); | |
81 | ||
82 | //if (last) paintExclamation(vm); | |
83 | ||
79 | 84 | } |
80 | 85 | |
81 | 86 | void Vertical::paintFlow(VideoManager * vm){ |
95 | 100 | f=-1; |
96 | 101 | } |
97 | 102 | for (int i=0; i<full_level+Gran;i+=Gran) |
98 | vm->blit(aux, xof, total+f*(float)i/(float)full()*(float)PipeHeight); | |
99 | vm->enableClipping(false); | |
100 | } | |
101 | if (bonus!=NormalBonus) paintBonus(vm, bonus); | |
103 | vm->blit(aux, xof, total+f*(int)((float)i/(float)full()*(float)PipeHeight)); | |
104 | vm->enableClipping(false); } | |
102 | 105 | } |
103 | 106 |
24 | 24 | return (a<b?a:b); |
25 | 25 | } |
26 | 26 | |
27 | VideoManager::VideoManager():Graphic(){ | |
27 | VideoManager::VideoManager(int flags):Graphic(){ | |
28 | 28 | int depth; |
29 | ||
30 | ||
31 | Uint32 video_flags=0; | |
32 | if (flags && FullScreen) video_flags|=SDL_FULLSCREEN; | |
29 | 33 | |
30 | 34 | //Init video in 640x480x16 by default |
31 | 35 | |
32 | 36 | if ((depth=SDL_VideoModeOK(640, 480, 16, 0))) |
33 | surface=SDL_SetVideoMode(640, 480, depth, 0); | |
37 | surface=SDL_SetVideoMode(640, 480, depth, video_flags); | |
34 | 38 | else printf("Modo no soportado\n"); |
35 | 39 | |
36 | 40 | im=new ImageManager(); |