Codebase list libgeotiff / 34b035e
New upstream version 1.4.3~rc1 Bas Couwenberg 5 years ago
52 changed file(s) with 8448 addition(s) and 5815 deletion(s). Raw diff Collapse all Expand all
88
99 SET(GEOTIFF_LIB_NAME geotiff)
1010 SET(GEOTIFF_LIBRARY_TARGET geotiff_library)
11 SET(GEOTIFF_ARCHIVE_TARGET geotiff_archive)
1211
1312 ##############################################################################
1413 # CMake settings
1918 # Version information
2019 set(PROJECT_VERSION_MAJOR 1)
2120 set(PROJECT_VERSION_MINOR 4)
22 set(PROJECT_VERSION_PATCH 2)
21 set(PROJECT_VERSION_PATCH 3)
2322 set(PROJECT_VERSION
2423 "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
2524 set(GeoTIFF_VERSION ${PROJECT_VERSION})
2625
2726 # Set library version to match that of autoconf:
28 # libgeotiff.so -> libgeotiff.so.2.1.1
29 # libgeotiff.so.2 -> libgeotiff.so.2.1.2
30 # libgeotiff.so.2.1.2
27 # libgeotiff.so -> libgeotiff.so.2.2.0
28 # libgeotiff.so.2 -> libgeotiff.so.2.2.0
29 # libgeotiff.so.2.2.0
3130 set(LINK_SOVERSION "2")
32 set(LINK_VERSION "2.1.2")
31 set(LINK_VERSION "2.2.0")
3332
3433 string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
3534 string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
415414
416415 SET(XTIFF_SOURCES libxtiff/xtiff.c)
417416
418 #---
419 # Static libgeotiff archive
420 # NOTE: Did not put XTIFF_SOURCES in static lib because libxtiff.a is written out
421 # currently.
422 #---
423417 if (MSVC OR CMAKE_CONFIGURATION_TYPES)
424418 # For multi-config systems and for Visual Studio, the debug versions
425419 # of the libraries have a _d suffix.
426420 set (CMAKE_DEBUG_POSTFIX _d)
427421 endif ()
428422
429 ADD_LIBRARY(${GEOTIFF_ARCHIVE_TARGET} STATIC
430 ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES})
431 SET_TARGET_PROPERTIES(${GEOTIFF_ARCHIVE_TARGET} PROPERTIES
432 OUTPUT_NAME ${GEOTIFF_LIB_NAME})
433
434 # Shared libgeotiff library
435 ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET} SHARED
423 ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET}
436424 ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES} ${XTIFF_SOURCES})
437
438 # Windows:
439 IF(WIN32 AND MSVC)
440 SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES IMPORT_SUFFIX "_i.lib")
441 ENDIF(WIN32 AND MSVC)
442
443425
444426 # Unix, linux:
445427 IF(UNIX)
477459 # LIBRARY DESTINATION ${GEOTIFF_LIB_DIR}
478460 # ARCHIVE DESTINATION ${GEOTIFF_LIB_DIR})
479461
480 INSTALL( TARGETS ${GEOTIFF_ARCHIVE_TARGET} ${GEOTIFF_LIBRARY_TARGET}
462 INSTALL( TARGETS ${GEOTIFF_LIBRARY_TARGET}
481463 EXPORT depends
482464 RUNTIME DESTINATION bin
483465 LIBRARY DESTINATION lib
0 2018-12-07 Even Rouault <even dot rouault at spatialys dot com>
1
2 * Prepare for 1.4.3RC1
3
4 2018-05-23 Even Rouault <even dot rouault at spatialys dot com>
5
6 * geo_set.c: when rewriting a ASCII key with a string value longer than
7 the original value, do not add a dummy "0 0 0 0" entry in the GeoKeyDirectory
8 (fixes https://github.com/OSGeo/gdal/issues/641)
9
10 2018-05-11 Even Rouault <even dot rouault at spatialys dot com>
11
12 * geo_set.c: remove useless va_end() as spotted by clang-tidy
13
14 2018-02-06 Even Rouault <even dot rouault at spatialys dot com>
15
16 * geo_new.c: reject files where the GTIFF_DOUBLEPARAMS tags has
17 more than MAX_VALUES=1000 values to avoid potential out-of-bounds
18 read overflow. Fixes
19 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6035
20 Credit to OSS Fuzz
21
22 2018-01-26 Even Rouault <even dot rouault at spatialys dot com>
23
24 * geo_normalize.c: use ProjScaleAtCenterGeoKey for CT_Mercator if
25 ProjScaleAtNatOriginGeoKey is not set.
26 Fixes https://github.com/OSGeo/gdal/pull/296
27
28 2018-01-09 Even Rouault <even dot rouault at spatialys dot com>
29
30 * geo_normalize.c: fix potential stack buffer overflow in
31 GTIFAngleToDD()
32 Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5059
33 Credit to OSS Fuzz
34
35 2017-12-17 Even Rouault <even dot rouault at spatialys dot com>
36
37 * csv/*: update to EPSG v9.2
38
39 2017-06-08 Even Rouault <even dot rouault at spatialys dot com>
40
41 * geotiff.h, geo_keyp.h, geo_normalize.c, geo_new.c:
42 add GTIFNewEx() and GTIFNewWithMethodsEx() functions that
43 accept a user-provided error printing callback (only called
44 by geo_normalize right now, instead of fprintf(stderr))
45 and a user data handle. Add GTIFGetUserData().
46 Upgrade LIBGEOTIFF_VERSION to 1430.
47
48 2017-04-14 Even Rouault <even dot rouault at spatialys dot com>
49
50 * *.h, libxtiff/xtiffio.h: replace CPL_DLL by GTIF_DLL
51
52 2017-01-10 Even Rouault <even dot rouault at spatialys dot com>
53
54 * csv/*: update to EPSG v9.0 (#83)
55
56 2017-01-10 Even Rouault <even dot rouault at spatialys dot com>
57
58 * csv/datum_shift_pref.csv: add overrides for PCS 2065
59 (S-JTSK (Ferro) / Krovak)
60 Fixes https://trac.osgeo.org/gdal/ticket/4762 and
61 https://github.com/OSGeo/proj.4/issues/185
62
63 2017-01-10 Even Rouault <even dot rouault at spatialys dot com>
64
65 * csv/datum_shift_pref.csv: add overrides for PCS 2397/2398/2399
66 (Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3,4,5)
67 Fixes https://github.com/OSGeo/proj.4/issues/235
68
69 2017-01-10 Even Rouault <even dot rouault at spatialys dot com>
70
71 * csv/datum_shift_pref.csv: add overrides for PCS 31251,31252,31253
72 (MGI (Ferro) / Austria)
73 Fixes https://github.com/OSGeo/proj.4/issues/254
74
75 2017-01-10 Even Rouault <even dot rouault at spatialys dot com>
76
77 * csv/build_pcs.py, csv/datum_shift_pref.csv: add mechanism to define
78 TOWGS84 parameters per PCS (instead of only relying on the TOWGS84
79 parameters of the underlying GCS).
80 Add override for EPSG:3844 ("Pulkovo 1942(58) / Stereo70" Romania)
81 Fixes https://trac.osgeo.org/geotiff/ticket/52
82
83 2017-01-10 Even Rouault <even dot rouault at spatialys dot com>
84
85 * csv/datum_shift_pref.csv: add override for CH1903 (EPSG:4149)
86 Fixes https://trac.osgeo.org/geotiff/ticket/73
87
88 2016-11-23 Even Rouault <even dot rouault at spatialys dot com>
89
90 * geo_new.c, geo_print.c, geo_set.c, bin/applygeo.c, bin/geotifcp.c,
91 bin/makegeo.c: cppcheck fixes (signed vs unsigned printf/sscanf,
92 redundantAssignment)
93
94 2016-11-21 Even Rouault <even dot rouault at spatialys dot com>
95
96 * geo_print.c: secure sscanf()/fscanf() uses.
97
98 2016-11-20 Even Rouault <even dot rouault at spatialys dot com>
99
100 * geo_simpletags.c: add cppcheck-suppress duplicateBranch annotation.
101
102 2016-09-04 Even Rouault <even dot rouault at spatialys dot com>
103
104 * White space fixes in .h and .c
105
106 2016-09-01 Even Rouault <even dot rouault at spatialys dot com>
107
108 * geotiff.h cpl_serv.h: Partial revert of r2736 to revert back including
109 "geo_config.h" (#81)
110
0111 2016-08-18 Even Rouault <even dot rouault at spatialys dot com>
1112
2113 * Makefile.am: Fix build issue on Windows with cmake by not
109109 csv/unit_of_measure.c
110110 endif
111111
112 libgeotiff_la_LDFLAGS = -version-info 3:2:1
112 libgeotiff_la_LDFLAGS = -version-info 4:0:2
113113
114114 libgeotiff_la_LIBADD = libxtiff/libxtiff.la
115115
0 # Makefile.in generated by automake 1.14.1 from Makefile.am.
0 # Makefile.in generated by automake 1.15 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
4646
4747
4848 VPATH = @srcdir@
49 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
49 am__is_gnu_make = { \
50 if test -z '$(MAKELEVEL)'; then \
51 false; \
52 elif test -n '$(MAKE_HOST)'; then \
53 true; \
54 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
55 true; \
56 else \
57 false; \
58 fi; \
59 }
5060 am__make_running_with_option = \
5161 case $${target_option-} in \
5262 ?) ;; \
109119 POST_UNINSTALL = :
110120 build_triplet = @build@
111121 host_triplet = @host@
112 DIST_COMMON = $(top_srcdir)/m4/doxygen.am INSTALL NEWS README AUTHORS \
113 ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
114 $(top_srcdir)/configure $(am__configure_deps) \
115 $(srcdir)/geo_config.h.in depcomp $(dist_csv_DATA) \
116 $(include_HEADERS) COPYING compile config.guess config.sub \
117 install-sh missing ltmain.sh
118122 @PROJ_IS_CONFIG_TRUE@am__append_1 = @PROJ_INC@ -DHAVE_LIBPROJ=1
119123 @PROJECTS_H_IS_CONFIG_TRUE@am__append_2 = -DHAVE_PROJECTS_H=1
120124 @CSV_IS_CONFIG_TRUE@am__append_3 = csv/datum.c \
133137 $(top_srcdir)/m4/ax_prog_doxygen.m4 $(top_srcdir)/configure.ac
134138 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
135139 $(ACLOCAL_M4)
140 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
141 $(am__configure_deps) $(dist_csv_DATA) $(include_HEADERS) \
142 $(am__DIST_COMMON)
136143 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
137144 configure.lineno config.status.lineno
138145 mkinstalldirs = $(install_sh) -d
275282 CTAGS = ctags
276283 CSCOPE = cscope
277284 DIST_SUBDIRS = $(SUBDIRS)
285 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/geo_config.h.in \
286 $(top_srcdir)/m4/doxygen.am AUTHORS COPYING ChangeLog INSTALL \
287 NEWS README compile config.guess config.sub depcomp install-sh \
288 ltmain.sh missing
278289 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
279290 distdir = $(PACKAGE)-$(VERSION)
280291 top_distdir = $(distdir)
388399 LIPO = @LIPO@
389400 LN_S = @LN_S@
390401 LTLIBOBJS = @LTLIBOBJS@
402 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
391403 MAINT = @MAINT@
392404 MAKEINFO = @MAKEINFO@
393405 MANIFEST_TOOL = @MANIFEST_TOOL@
463475 prefix = @prefix@
464476 program_transform_name = @program_transform_name@
465477 psdir = @psdir@
478 runstatedir = @runstatedir@
466479 sbindir = @sbindir@
467480 sharedstatedir = @sharedstatedir@
468481 srcdir = @srcdir@
566579 geo_get.c geo_names.c geo_new.c geo_normalize.c geo_print.c \
567580 geo_set.c geo_simpletags.c geo_tiffp.c geo_trans.c geo_write.c \
568581 geo_strtod.c geotiff_proj4.c $(am__append_3)
569 libgeotiff_la_LDFLAGS = -version-info 3:2:1
582 libgeotiff_la_LDFLAGS = -version-info 4:0:2
570583 libgeotiff_la_LIBADD = libxtiff/libxtiff.la
571584 lib_LTLIBRARIES = libgeotiff.la
572585 EXTRA_DIST = autogen.sh \
607620 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
608621 $(am__cd) $(top_srcdir) && \
609622 $(AUTOMAKE) --gnu Makefile
610 .PRECIOUS: Makefile
611623 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
612624 @case '$?' in \
613625 *config.status*) \
617629 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
618630 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
619631 esac;
620 $(top_srcdir)/m4/doxygen.am:
632 $(top_srcdir)/m4/doxygen.am $(am__empty):
621633
622634 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
623635 $(SHELL) ./config.status --recheck
10121024 $(am__post_remove_distdir)
10131025
10141026 dist-tarZ: distdir
1015 @echo WARNING: "Support for shar distribution archives is" \
1016 "deprecated." >&2
1027 @echo WARNING: "Support for distribution archives compressed with" \
1028 "legacy program 'compress' is deprecated." >&2
10171029 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
10181030 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
10191031 $(am__post_remove_distdir)
10201032
10211033 dist-shar: distdir
1022 @echo WARNING: "Support for distribution archives compressed with" \
1023 "legacy program 'compress' is deprecated." >&2
1034 @echo WARNING: "Support for shar distribution archives is" \
1035 "deprecated." >&2
10241036 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
10251037 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
10261038 $(am__post_remove_distdir)
10551067 esac
10561068 chmod -R a-w $(distdir)
10571069 chmod u+w $(distdir)
1058 mkdir $(distdir)/_build $(distdir)/_inst
1070 mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
10591071 chmod a-w $(distdir)
10601072 test -d $(distdir)/_build || exit 0; \
10611073 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
10621074 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
10631075 && am__cwd=`pwd` \
1064 && $(am__cd) $(distdir)/_build \
1065 && ../configure \
1076 && $(am__cd) $(distdir)/_build/sub \
1077 && ../../configure \
10661078 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
10671079 $(DISTCHECK_CONFIGURE_FLAGS) \
1068 --srcdir=.. --prefix="$$dc_install_base" \
1080 --srcdir=../.. --prefix="$$dc_install_base" \
10691081 && $(MAKE) $(AM_MAKEFLAGS) \
10701082 && $(MAKE) $(AM_MAKEFLAGS) dvi \
10711083 && $(MAKE) $(AM_MAKEFLAGS) check \
12591271 uninstall-includeHEADERS uninstall-libLTLIBRARIES \
12601272 uninstall-nodist_includeHEADERS
12611273
1274 .PRECIOUS: Makefile
1275
12621276
12631277 @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
12641278
180180 o Many others who contributed before it occured to me to maintain credits.
181181
182182
183
0 # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
0 # generated automatically by aclocal 1.15 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
33
44 # This file is free software; the Free Software Foundation
55 # gives unlimited permission to copy and/or distribute it,
1919 If you have problems, you may need to regenerate the build system entirely.
2020 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2121
22 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
22 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
2323 #
2424 # This file is free software; the Free Software Foundation
2525 # gives unlimited permission to copy and/or distribute it,
3131 # generated from the m4 files accompanying Automake X.Y.
3232 # (This private macro should not be called outside this file.)
3333 AC_DEFUN([AM_AUTOMAKE_VERSION],
34 [am__api_version='1.14'
34 [am__api_version='1.15'
3535 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3636 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.14.1], [],
37 m4_if([$1], [1.15], [],
3838 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3939 ])
4040
5050 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5151 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5252 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.14.1])dnl
53 [AM_AUTOMAKE_VERSION([1.15])dnl
5454 m4_ifndef([AC_AUTOCONF_VERSION],
5555 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5656 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5757
5858 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
5959
60 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
60 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
6161 #
6262 # This file is free software; the Free Software Foundation
6363 # gives unlimited permission to copy and/or distribute it,
102102 # configured tree to be moved without reconfiguration.
103103
104104 AC_DEFUN([AM_AUX_DIR_EXPAND],
105 [dnl Rely on autoconf to set up CDPATH properly.
106 AC_PREREQ([2.50])dnl
107 # expand $ac_aux_dir to an absolute path
108 am_aux_dir=`cd $ac_aux_dir && pwd`
105 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
106 # Expand $ac_aux_dir to an absolute path.
107 am_aux_dir=`cd "$ac_aux_dir" && pwd`
109108 ])
110109
111110 # AM_CONDITIONAL -*- Autoconf -*-
112111
113 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
112 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
114113 #
115114 # This file is free software; the Free Software Foundation
116115 # gives unlimited permission to copy and/or distribute it,
141140 Usually this means the macro was only invoked conditionally.]])
142141 fi])])
143142
144 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
143 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
145144 #
146145 # This file is free software; the Free Software Foundation
147146 # gives unlimited permission to copy and/or distribute it,
332331
333332 # Generate code to set up dependency tracking. -*- Autoconf -*-
334333
335 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
334 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
336335 #
337336 # This file is free software; the Free Software Foundation
338337 # gives unlimited permission to copy and/or distribute it,
408407
409408 # Do all the work for Automake. -*- Autoconf -*-
410409
411 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
410 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
412411 #
413412 # This file is free software; the Free Software Foundation
414413 # gives unlimited permission to copy and/or distribute it,
498497 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
499498 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
500499 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
501 # We need awk for the "check" target. The system "awk" is bad on
502 # some platforms.
500 # We need awk for the "check" target (and possibly the TAP driver). The
501 # system "awk" is bad on some platforms.
503502 AC_REQUIRE([AC_PROG_AWK])dnl
504503 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
505504 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
572571 END
573572 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
574573 fi
575 fi])
574 fi
575 dnl The trailing newline in this macro's definition is deliberate, for
576 dnl backward compatibility and to allow trailing 'dnl'-style comments
577 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
578 ])
576579
577580 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
578581 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
601604 done
602605 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
603606
604 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
607 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
605608 #
606609 # This file is free software; the Free Software Foundation
607610 # gives unlimited permission to copy and/or distribute it,
612615 # Define $install_sh.
613616 AC_DEFUN([AM_PROG_INSTALL_SH],
614617 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
615 if test x"${install_sh}" != xset; then
618 if test x"${install_sh+set}" != xset; then
616619 case $am_aux_dir in
617620 *\ * | *\ *)
618621 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
622625 fi
623626 AC_SUBST([install_sh])])
624627
625 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
628 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
626629 #
627630 # This file is free software; the Free Software Foundation
628631 # gives unlimited permission to copy and/or distribute it,
644647 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
645648 # From Jim Meyering
646649
647 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
650 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
648651 #
649652 # This file is free software; the Free Software Foundation
650653 # gives unlimited permission to copy and/or distribute it,
679682
680683 # Check to see how 'make' treats includes. -*- Autoconf -*-
681684
682 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
685 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
683686 #
684687 # This file is free software; the Free Software Foundation
685688 # gives unlimited permission to copy and/or distribute it,
729732
730733 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
731734
732 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
735 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
733736 #
734737 # This file is free software; the Free Software Foundation
735738 # gives unlimited permission to copy and/or distribute it,
768771
769772 # Helper functions for option handling. -*- Autoconf -*-
770773
771 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
774 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
772775 #
773776 # This file is free software; the Free Software Foundation
774777 # gives unlimited permission to copy and/or distribute it,
797800 AC_DEFUN([_AM_IF_OPTION],
798801 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
799802
800 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
803 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
801804 #
802805 # This file is free software; the Free Software Foundation
803806 # gives unlimited permission to copy and/or distribute it,
844847 # For backward compatibility.
845848 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
846849
847 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
850 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
848851 #
849852 # This file is free software; the Free Software Foundation
850853 # gives unlimited permission to copy and/or distribute it,
863866
864867 # Check to make sure that the build environment is sane. -*- Autoconf -*-
865868
866 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
869 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
867870 #
868871 # This file is free software; the Free Software Foundation
869872 # gives unlimited permission to copy and/or distribute it,
944947 rm -f conftest.file
945948 ])
946949
947 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
950 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
948951 #
949952 # This file is free software; the Free Software Foundation
950953 # gives unlimited permission to copy and/or distribute it,
10041007 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10051008 ])
10061009
1007 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1010 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
10081011 #
10091012 # This file is free software; the Free Software Foundation
10101013 # gives unlimited permission to copy and/or distribute it,
10321035 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10331036 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10341037
1035 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1038 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
10361039 #
10371040 # This file is free software; the Free Software Foundation
10381041 # gives unlimited permission to copy and/or distribute it,
10511054
10521055 # Check how to create a tarball. -*- Autoconf -*-
10531056
1054 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1057 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
10551058 #
10561059 # This file is free software; the Free Software Foundation
10571060 # gives unlimited permission to copy and/or distribute it,
0 # Makefile.in generated by automake 1.14.1 from Makefile.am.
0 # Makefile.in generated by automake 1.15 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
1414 @SET_MAKE@
1515
1616 VPATH = @srcdir@
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
17 am__is_gnu_make = { \
18 if test -z '$(MAKELEVEL)'; then \
19 false; \
20 elif test -n '$(MAKE_HOST)'; then \
21 true; \
22 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
23 true; \
24 else \
25 false; \
26 fi; \
27 }
1828 am__make_running_with_option = \
1929 case $${target_option-} in \
2030 ?) ;; \
8090 bin_PROGRAMS = geotifcp$(EXEEXT) listgeo$(EXEEXT) applygeo$(EXEEXT)
8191 noinst_PROGRAMS = makegeo$(EXEEXT)
8292 subdir = bin
83 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
84 $(top_srcdir)/depcomp
8593 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
8694 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
8795 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
8997 $(top_srcdir)/m4/ax_prog_doxygen.m4 $(top_srcdir)/configure.ac
9098 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
9199 $(ACLOCAL_M4)
100 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
92101 mkinstalldirs = $(install_sh) -d
93102 CONFIG_HEADER = $(top_builddir)/geo_config.h
94103 CONFIG_CLEAN_FILES =
177186 done | $(am__uniquify_input)`
178187 ETAGS = etags
179188 CTAGS = ctags
189 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
180190 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
181191 ACLOCAL = @ACLOCAL@
182192 AMTAR = @AMTAR@
249259 LIPO = @LIPO@
250260 LN_S = @LN_S@
251261 LTLIBOBJS = @LTLIBOBJS@
262 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
252263 MAINT = @MAINT@
253264 MAKEINFO = @MAKEINFO@
254265 MANIFEST_TOOL = @MANIFEST_TOOL@
324335 prefix = @prefix@
325336 program_transform_name = @program_transform_name@
326337 psdir = @psdir@
338 runstatedir = @runstatedir@
327339 sbindir = @sbindir@
328340 sharedstatedir = @sharedstatedir@
329341 srcdir = @srcdir@
356368 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \
357369 $(am__cd) $(top_srcdir) && \
358370 $(AUTOMAKE) --gnu bin/Makefile
359 .PRECIOUS: Makefile
360371 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
361372 @case '$?' in \
362373 *config.status*) \
694705 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
695706 tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
696707
708 .PRECIOUS: Makefile
709
697710
698711 # Tell versions [3.59,3.63) of GNU make to not export all variables.
699712 # Otherwise a system limit (for SysV at least) may be exceeded.
55 static int
66 InstallGeoTIFF(const char *geofile, const char *tiffile)
77 {
8 TIFF *tif = (TIFF*)0; /* TIFF-level descriptor */
9 GTIF *gtif=(GTIF*)0; /* GeoKey-level descriptor */
8 TIFF *tif; /* TIFF-level descriptor */
9 GTIF *gtif; /* GeoKey-level descriptor */
1010 FILE *fp;
1111
1212 uint16 *panVI = NULL;
267267
268268 static void InstallGeoTIFF(TIFF *out)
269269 {
270 GTIF *gtif=(GTIF*)0; /* GeoKey-level descriptor */
270 GTIF *gtif; /* GeoKey-level descriptor */
271271 FILE *fd;
272272
273273 gtif = GTIFNew(out);
308308
309309 static void CopyGeoTIFF(TIFF * in, TIFF *out)
310310 {
311 GTIF *gtif=(GTIF*)0; /* GeoKey-level descriptor */
311 GTIF *gtif; /* GeoKey-level descriptor */
312312 double *d_list = NULL;
313313 int16 d_list_count;
314314
2323 int main()
2424 {
2525 char *fname = "newgeo.tif";
26 TIFF *tif=(TIFF*)0; /* TIFF-level descriptor */
27 GTIF *gtif=(GTIF*)0; /* GeoKey-level descriptor */
26 TIFF *tif; /* TIFF-level descriptor */
27 GTIF *gtif; /* GeoKey-level descriptor */
2828
2929 tif=XTIFFOpen(fname,"w");
3030 if (!tif) goto failure;
0 # Makefile.in generated by automake 1.14.1 from Makefile.am.
0 # Makefile.in generated by automake 1.15 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
1313
1414 @SET_MAKE@
1515 VPATH = @srcdir@
16 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
16 am__is_gnu_make = { \
17 if test -z '$(MAKELEVEL)'; then \
18 false; \
19 elif test -n '$(MAKE_HOST)'; then \
20 true; \
21 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
22 true; \
23 else \
24 false; \
25 fi; \
26 }
1727 am__make_running_with_option = \
1828 case $${target_option-} in \
1929 ?) ;; \
7787 build_triplet = @build@
7888 host_triplet = @host@
7989 subdir = cmake
80 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
8190 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
8291 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
8392 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
8594 $(top_srcdir)/m4/ax_prog_doxygen.m4 $(top_srcdir)/configure.ac
8695 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
8796 $(ACLOCAL_M4)
97 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
8898 mkinstalldirs = $(install_sh) -d
8999 CONFIG_HEADER = $(top_builddir)/geo_config.h
90100 CONFIG_CLEAN_FILES =
109119 *) (install-info --version) >/dev/null 2>&1;; \
110120 esac
111121 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
122 am__DIST_COMMON = $(srcdir)/Makefile.in
112123 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
113124 ACLOCAL = @ACLOCAL@
114125 AMTAR = @AMTAR@
181192 LIPO = @LIPO@
182193 LN_S = @LN_S@
183194 LTLIBOBJS = @LTLIBOBJS@
195 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
184196 MAINT = @MAINT@
185197 MAKEINFO = @MAKEINFO@
186198 MANIFEST_TOOL = @MANIFEST_TOOL@
256268 prefix = @prefix@
257269 program_transform_name = @program_transform_name@
258270 psdir = @psdir@
271 runstatedir = @runstatedir@
259272 sbindir = @sbindir@
260273 sharedstatedir = @sharedstatedir@
261274 srcdir = @srcdir@
286299 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cmake/Makefile'; \
287300 $(am__cd) $(top_srcdir) && \
288301 $(AUTOMAKE) --gnu cmake/Makefile
289 .PRECIOUS: Makefile
290302 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
291303 @case '$?' in \
292304 *config.status*) \
461473 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
462474 tags-am uninstall uninstall-am
463475
476 .PRECIOUS: Makefile
477
464478
465479 # Tell versions [3.59,3.63) of GNU make to not export all variables.
466480 # Otherwise a system limit (for SysV at least) may be exceeded.
3131
3232 message (STATUS " include directory: \${@PROJECT_NAME@_INCLUDE_DIRS}")
3333
34 if(BUILD_SHARED_LIBS)
3435 set (@PROJECT_NAME@_SHARED_LIBRARIES @GEOTIFF_LIBRARY_TARGET@)
35 set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_ARCHIVE_TARGET@)
36 else()
37 set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_LIBRARY_TARGET@)
38 endif()
3639 # Read in the exported definition of the library
3740 include ("${_DIR}/@PROJECT_NAME_LOWER@-depends.cmake")
3841
22
33 scriptversion=2012-10-14.11; # UTC
44
5 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
5 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
66 # Written by Tom Tromey <tromey@cygnus.com>.
77 #
88 # This program is free software; you can redistribute it and/or modify
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
2 # Copyright 1992-2013 Free Software Foundation, Inc.
3
4 timestamp='2013-06-10'
2 # Copyright 1992-2015 Free Software Foundation, Inc.
3
4 timestamp='2015-08-20'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
2323 # program. This Exception is an additional permission under section 7
2424 # of the GNU General Public License, version 3 ("GPLv3").
2525 #
26 # Originally written by Per Bothner.
26 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
2727 #
2828 # You can get the latest version of this script from:
2929 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
3030 #
31 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
31 # Please send patches to <config-patches@gnu.org>.
3232
3333
3434 me=`echo "$0" | sed -e 's,.*/,,'`
4949 GNU config.guess ($timestamp)
5050
5151 Originally written by Per Bothner.
52 Copyright 1992-2013 Free Software Foundation, Inc.
52 Copyright 1992-2015 Free Software Foundation, Inc.
5353
5454 This is free software; see the source for copying conditions. There is NO
5555 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
148148 LIBC=gnu
149149 #endif
150150 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
152152 ;;
153153 esac
154154
167167 # Note: NetBSD doesn't particularly care about the vendor
168168 # portion of the name. We always set it to "unknown".
169169 sysctl="sysctl -n hw.machine_arch"
170 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
171 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
170 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
171 /sbin/$sysctl 2>/dev/null || \
172 /usr/sbin/$sysctl 2>/dev/null || \
173 echo unknown)`
172174 case "${UNAME_MACHINE_ARCH}" in
173175 armeb) machine=armeb-unknown ;;
174176 arm*) machine=arm-unknown ;;
175177 sh3el) machine=shl-unknown ;;
176178 sh3eb) machine=sh-unknown ;;
177179 sh5el) machine=sh5le-unknown ;;
180 earmv*)
181 arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
182 endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
183 machine=${arch}${endian}-unknown
184 ;;
178185 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
179186 esac
180187 # The Operating System including object format, if it has switched
181188 # to ELF recently, or will in the future.
182189 case "${UNAME_MACHINE_ARCH}" in
183 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
190 arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
184191 eval $set_cc_for_build
185192 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
186193 | grep -q __ELF__
196203 os=netbsd
197204 ;;
198205 esac
206 # Determine ABI tags.
207 case "${UNAME_MACHINE_ARCH}" in
208 earm*)
209 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
210 abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
211 ;;
212 esac
199213 # The OS release
200214 # Debian GNU/NetBSD machines have a different userland, and
201215 # thus, need a distinct triplet. However, they do not need
206220 release='-gnu'
207221 ;;
208222 *)
209 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
223 release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
210224 ;;
211225 esac
212226 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
213227 # contains redundant information, the shorter form:
214228 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
215 echo "${machine}-${os}${release}"
229 echo "${machine}-${os}${release}${abi}"
216230 exit ;;
217231 *:Bitrig:*:*)
218232 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
233247 exit ;;
234248 *:MirBSD:*:*)
235249 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
250 exit ;;
251 *:Sortix:*:*)
252 echo ${UNAME_MACHINE}-unknown-sortix
236253 exit ;;
237254 alpha:OSF1:*:*)
238255 case $UNAME_RELEASE in
578595 else
579596 IBM_ARCH=powerpc
580597 fi
581 if [ -x /usr/bin/oslevel ] ; then
582 IBM_REV=`/usr/bin/oslevel`
598 if [ -x /usr/bin/lslpp ] ; then
599 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
600 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
583601 else
584602 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
585603 fi
825843 *:MINGW*:*)
826844 echo ${UNAME_MACHINE}-pc-mingw32
827845 exit ;;
828 i*:MSYS*:*)
846 *:MSYS*:*)
829847 echo ${UNAME_MACHINE}-pc-msys
830848 exit ;;
831849 i*:windows32*:*)
930948 exit ;;
931949 crisv32:Linux:*:*)
932950 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
951 exit ;;
952 e2k:Linux:*:*)
953 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
933954 exit ;;
934955 frv:Linux:*:*)
935956 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
968989 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
969990 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
970991 ;;
971 or1k:Linux:*:*)
972 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
973 exit ;;
974 or32:Linux:*:*)
992 openrisc*:Linux:*:*)
993 echo or1k-unknown-linux-${LIBC}
994 exit ;;
995 or32:Linux:*:* | or1k*:Linux:*:*)
975996 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
976997 exit ;;
977998 padre:Linux:*:*)
10191040 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
10201041 exit ;;
10211042 x86_64:Linux:*:*)
1022 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1043 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
10231044 exit ;;
10241045 xtensa*:Linux:*:*)
10251046 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
12591280 if test "$UNAME_PROCESSOR" = unknown ; then
12601281 UNAME_PROCESSOR=powerpc
12611282 fi
1262 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1263 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1264 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1265 grep IS_64BIT_ARCH >/dev/null
1266 then
1267 case $UNAME_PROCESSOR in
1268 i386) UNAME_PROCESSOR=x86_64 ;;
1269 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1270 esac
1283 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1284 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1285 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1286 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1287 grep IS_64BIT_ARCH >/dev/null
1288 then
1289 case $UNAME_PROCESSOR in
1290 i386) UNAME_PROCESSOR=x86_64 ;;
1291 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1292 esac
1293 fi
12711294 fi
1295 elif test "$UNAME_PROCESSOR" = i386 ; then
1296 # Avoid executing cc on OS X 10.9, as it ships with a stub
1297 # that puts up a graphical alert prompting to install
1298 # developer tools. Any system running Mac OS X 10.7 or
1299 # later (Darwin 11 and later) is required to have a 64-bit
1300 # processor. This is not true of the ARM version of Darwin
1301 # that Apple uses in portable devices.
1302 UNAME_PROCESSOR=x86_64
12721303 fi
12731304 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
12741305 exit ;;
13601391 exit ;;
13611392 esac
13621393
1363 eval $set_cc_for_build
1364 cat >$dummy.c <<EOF
1365 #ifdef _SEQUENT_
1366 # include <sys/types.h>
1367 # include <sys/utsname.h>
1368 #endif
1369 main ()
1370 {
1371 #if defined (sony)
1372 #if defined (MIPSEB)
1373 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1374 I don't know.... */
1375 printf ("mips-sony-bsd\n"); exit (0);
1376 #else
1377 #include <sys/param.h>
1378 printf ("m68k-sony-newsos%s\n",
1379 #ifdef NEWSOS4
1380 "4"
1381 #else
1382 ""
1383 #endif
1384 ); exit (0);
1385 #endif
1386 #endif
1387
1388 #if defined (__arm) && defined (__acorn) && defined (__unix)
1389 printf ("arm-acorn-riscix\n"); exit (0);
1390 #endif
1391
1392 #if defined (hp300) && !defined (hpux)
1393 printf ("m68k-hp-bsd\n"); exit (0);
1394 #endif
1395
1396 #if defined (NeXT)
1397 #if !defined (__ARCHITECTURE__)
1398 #define __ARCHITECTURE__ "m68k"
1399 #endif
1400 int version;
1401 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1402 if (version < 4)
1403 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1404 else
1405 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1406 exit (0);
1407 #endif
1408
1409 #if defined (MULTIMAX) || defined (n16)
1410 #if defined (UMAXV)
1411 printf ("ns32k-encore-sysv\n"); exit (0);
1412 #else
1413 #if defined (CMU)
1414 printf ("ns32k-encore-mach\n"); exit (0);
1415 #else
1416 printf ("ns32k-encore-bsd\n"); exit (0);
1417 #endif
1418 #endif
1419 #endif
1420
1421 #if defined (__386BSD__)
1422 printf ("i386-pc-bsd\n"); exit (0);
1423 #endif
1424
1425 #if defined (sequent)
1426 #if defined (i386)
1427 printf ("i386-sequent-dynix\n"); exit (0);
1428 #endif
1429 #if defined (ns32000)
1430 printf ("ns32k-sequent-dynix\n"); exit (0);
1431 #endif
1432 #endif
1433
1434 #if defined (_SEQUENT_)
1435 struct utsname un;
1436
1437 uname(&un);
1438
1439 if (strncmp(un.version, "V2", 2) == 0) {
1440 printf ("i386-sequent-ptx2\n"); exit (0);
1441 }
1442 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1443 printf ("i386-sequent-ptx1\n"); exit (0);
1444 }
1445 printf ("i386-sequent-ptx\n"); exit (0);
1446
1447 #endif
1448
1449 #if defined (vax)
1450 # if !defined (ultrix)
1451 # include <sys/param.h>
1452 # if defined (BSD)
1453 # if BSD == 43
1454 printf ("vax-dec-bsd4.3\n"); exit (0);
1455 # else
1456 # if BSD == 199006
1457 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1458 # else
1459 printf ("vax-dec-bsd\n"); exit (0);
1460 # endif
1461 # endif
1462 # else
1463 printf ("vax-dec-bsd\n"); exit (0);
1464 # endif
1465 # else
1466 printf ("vax-dec-ultrix\n"); exit (0);
1467 # endif
1468 #endif
1469
1470 #if defined (alliant) && defined (i860)
1471 printf ("i860-alliant-bsd\n"); exit (0);
1472 #endif
1473
1474 exit (1);
1475 }
1476 EOF
1477
1478 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1479 { echo "$SYSTEM_NAME"; exit; }
1480
1481 # Apollos put the system type in the environment.
1482
1483 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1484
1485 # Convex versions that predate uname can use getsysinfo(1)
1486
1487 if [ -x /usr/convex/getsysinfo ]
1488 then
1489 case `getsysinfo -f cpu_type` in
1490 c1*)
1491 echo c1-convex-bsd
1492 exit ;;
1493 c2*)
1494 if getsysinfo -f scalar_acc
1495 then echo c32-convex-bsd
1496 else echo c2-convex-bsd
1497 fi
1498 exit ;;
1499 c34*)
1500 echo c34-convex-bsd
1501 exit ;;
1502 c38*)
1503 echo c38-convex-bsd
1504 exit ;;
1505 c4*)
1506 echo c4-convex-bsd
1507 exit ;;
1508 esac
1509 fi
1510
15111394 cat >&2 <<EOF
15121395 $0: unable to guess system type
15131396
00 #! /bin/sh
11 # Configuration validation subroutine script.
2 # Copyright 1992-2013 Free Software Foundation, Inc.
3
4 timestamp='2013-08-10'
2 # Copyright 1992-2015 Free Software Foundation, Inc.
3
4 timestamp='2015-08-20'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
2424 # of the GNU General Public License, version 3 ("GPLv3").
2525
2626
27 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
27 # Please send patches to <config-patches@gnu.org>.
2828 #
2929 # Configuration subroutine to validate and canonicalize a configuration type.
3030 # Supply the specified configuration type as an argument.
6767 version="\
6868 GNU config.sub ($timestamp)
6969
70 Copyright 1992-2013 Free Software Foundation, Inc.
70 Copyright 1992-2015 Free Software Foundation, Inc.
7171
7272 This is free software; see the source for copying conditions. There is NO
7373 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
116116 case $maybe_os in
117117 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
118118 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119 knetbsd*-gnu* | netbsd*-gnu* | \
119 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
120120 kopensolaris*-gnu* | \
121121 storm-chaos* | os2-emx* | rtmk-nova*)
122122 os=-$maybe_os
254254 | arc | arceb \
255255 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
256256 | avr | avr32 \
257 | ba \
257258 | be32 | be64 \
258259 | bfin \
259260 | c4x | c8051 | clipper \
260261 | d10v | d30v | dlx | dsp16xx \
261 | epiphany \
262 | fido | fr30 | frv \
262 | e2k | epiphany \
263 | fido | fr30 | frv | ft32 \
263264 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
264265 | hexagon \
265266 | i370 | i860 | i960 | ia64 \
266267 | ip2k | iq2000 \
268 | k1om \
267269 | le32 | le64 \
268270 | lm32 \
269271 | m32c | m32r | m32rle | m68000 | m68k | m88k \
281283 | mips64vr5900 | mips64vr5900el \
282284 | mipsisa32 | mipsisa32el \
283285 | mipsisa32r2 | mipsisa32r2el \
286 | mipsisa32r6 | mipsisa32r6el \
284287 | mipsisa64 | mipsisa64el \
285288 | mipsisa64r2 | mipsisa64r2el \
289 | mipsisa64r6 | mipsisa64r6el \
286290 | mipsisa64sb1 | mipsisa64sb1el \
287291 | mipsisa64sr71k | mipsisa64sr71kel \
288292 | mipsr5900 | mipsr5900el \
294298 | nds32 | nds32le | nds32be \
295299 | nios | nios2 | nios2eb | nios2el \
296300 | ns16k | ns32k \
297 | open8 \
298 | or1k | or32 \
301 | open8 | or1k | or1knd | or32 \
299302 | pdp10 | pdp11 | pj | pjl \
300303 | powerpc | powerpc64 | powerpc64le | powerpcle \
301304 | pyramid \
305 | riscv32 | riscv64 \
302306 | rl78 | rx \
303307 | score \
304 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
308 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
305309 | sh64 | sh64le \
306310 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
307311 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
309313 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
310314 | ubicom32 \
311315 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
316 | visium \
312317 | we32k \
313318 | x86 | xc16x | xstormy16 | xtensa \
314319 | z8k | z80)
323328 c6x)
324329 basic_machine=tic6x-unknown
325330 ;;
326 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
331 leon|leon[3-9])
332 basic_machine=sparc-$basic_machine
333 ;;
334 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
327335 basic_machine=$basic_machine-unknown
328336 os=-none
329337 ;;
368376 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
369377 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
370378 | avr-* | avr32-* \
379 | ba-* \
371380 | be32-* | be64-* \
372381 | bfin-* | bs2000-* \
373382 | c[123]* | c30-* | [cjt]90-* | c4x-* \
374383 | c8051-* | clipper-* | craynv-* | cydra-* \
375384 | d10v-* | d30v-* | dlx-* \
376 | elxsi-* \
385 | e2k-* | elxsi-* \
377386 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
378387 | h8300-* | h8500-* \
379388 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
380389 | hexagon-* \
381390 | i*86-* | i860-* | i960-* | ia64-* \
382391 | ip2k-* | iq2000-* \
392 | k1om-* \
383393 | le32-* | le64-* \
384394 | lm32-* \
385395 | m32c-* | m32r-* | m32rle-* \
399409 | mips64vr5900-* | mips64vr5900el-* \
400410 | mipsisa32-* | mipsisa32el-* \
401411 | mipsisa32r2-* | mipsisa32r2el-* \
412 | mipsisa32r6-* | mipsisa32r6el-* \
402413 | mipsisa64-* | mipsisa64el-* \
403414 | mipsisa64r2-* | mipsisa64r2el-* \
415 | mipsisa64r6-* | mipsisa64r6el-* \
404416 | mipsisa64sb1-* | mipsisa64sb1el-* \
405417 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
406418 | mipsr5900-* | mipsr5900el-* \
412424 | nios-* | nios2-* | nios2eb-* | nios2el-* \
413425 | none-* | np1-* | ns16k-* | ns32k-* \
414426 | open8-* \
427 | or1k*-* \
415428 | orion-* \
416429 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
417430 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
418431 | pyramid-* \
432 | riscv32-* | riscv64-* \
419433 | rl78-* | romp-* | rs6000-* | rx-* \
420434 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
421435 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
422436 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
423437 | sparclite-* \
424 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
438 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
425439 | tahoe-* \
426440 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
427441 | tile*-* \
429443 | ubicom32-* \
430444 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
431445 | vax-* \
446 | visium-* \
432447 | we32k-* \
433448 | x86-* | x86_64-* | xc16x-* | xps100-* \
434449 | xstormy16-* | xtensa*-* \
504519 aros)
505520 basic_machine=i386-pc
506521 os=-aros
522 ;;
523 asmjs)
524 basic_machine=asmjs-unknown
507525 ;;
508526 aux)
509527 basic_machine=m68k-apple
766784 basic_machine=m68k-isi
767785 os=-sysv
768786 ;;
787 leon-*|leon[3-9]-*)
788 basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
789 ;;
769790 m68knommu)
770791 basic_machine=m68k-unknown
771792 os=-linux
820841 morphos)
821842 basic_machine=powerpc-unknown
822843 os=-morphos
844 ;;
845 moxiebox)
846 basic_machine=moxie-unknown
847 os=-moxiebox
823848 ;;
824849 msdos)
825850 basic_machine=i386-pc
13531378 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
13541379 | -sym* | -kopensolaris* | -plan9* \
13551380 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1356 | -aos* | -aros* \
1381 | -aos* | -aros* | -cloudabi* | -sortix* \
13571382 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
13581383 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
13591384 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
13661391 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
13671392 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
13681393 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1369 | -uxpv* | -beos* | -mpeix* | -udk* \
1394 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
13701395 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
13711396 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
13721397 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
13731398 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
13741399 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
13751400 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1376 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1401 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
13771402 # Remember, each alternative MUST END IN *, to match a version number.
13781403 ;;
13791404 -qnx*)
15911616 mips*-*)
15921617 os=-elf
15931618 ;;
1594 or1k-*)
1595 os=-elf
1596 ;;
15971619 or32-*)
15981620 os=-coff
15991621 ;;
+1892
-1334
configure less more
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for libgeotiff 1.4.2.
2 # Generated by GNU Autoconf 2.69 for libgeotiff 1.4.3.
33 #
44 # Report bugs to <warmerdam@pobox.com>.
55 #
589589 # Identity of this package.
590590 PACKAGE_NAME='libgeotiff'
591591 PACKAGE_TARNAME='libgeotiff'
592 PACKAGE_VERSION='1.4.2'
593 PACKAGE_STRING='libgeotiff 1.4.2'
592 PACKAGE_VERSION='1.4.3'
593 PACKAGE_STRING='libgeotiff 1.4.3'
594594 PACKAGE_BUGREPORT='warmerdam@pobox.com'
595595 PACKAGE_URL=''
596596
702702 ZIP_PREFIX
703703 ZIP_INC
704704 CPP
705 LT_SYS_LIBRARY_PATH
705706 OTOOL64
706707 OTOOL
707708 LIPO
805806 docdir
806807 oldincludedir
807808 includedir
809 runstatedir
808810 localstatedir
809811 sharedstatedir
810812 sysconfdir
834836 enable_static
835837 with_pic
836838 enable_fast_install
839 with_aix_soname
837840 with_gnu_ld
838841 with_sysroot
839842 enable_libtool_lock
869872 CXXFLAGS
870873 CCC
871874 CXXCPP
875 LT_SYS_LIBRARY_PATH
872876 CPP
873877 DOXYGEN_PAPER_SIZE'
874878
909913 sysconfdir='${prefix}/etc'
910914 sharedstatedir='${prefix}/com'
911915 localstatedir='${prefix}/var'
916 runstatedir='${localstatedir}/run'
912917 includedir='${prefix}/include'
913918 oldincludedir='/usr/include'
914919 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
11611166 | -silent | --silent | --silen | --sile | --sil)
11621167 silent=yes ;;
11631168
1169 -runstatedir | --runstatedir | --runstatedi | --runstated \
1170 | --runstate | --runstat | --runsta | --runst | --runs \
1171 | --run | --ru | --r)
1172 ac_prev=runstatedir ;;
1173 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1174 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1175 | --run=* | --ru=* | --r=*)
1176 runstatedir=$ac_optarg ;;
1177
11641178 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
11651179 ac_prev=sbindir ;;
11661180 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
12981312 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
12991313 datadir sysconfdir sharedstatedir localstatedir includedir \
13001314 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1301 libdir localedir mandir
1315 libdir localedir mandir runstatedir
13021316 do
13031317 eval ac_val=\$$ac_var
13041318 # Remove trailing slashes.
14111425 # Omit some internal or obsolete options to make the list less imposing.
14121426 # This message is too long to be a string in the A/UX 3.1 sh.
14131427 cat <<_ACEOF
1414 \`configure' configures libgeotiff 1.4.2 to adapt to many kinds of systems.
1428 \`configure' configures libgeotiff 1.4.3 to adapt to many kinds of systems.
14151429
14161430 Usage: $0 [OPTION]... [VAR=VALUE]...
14171431
14511465 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
14521466 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
14531467 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1468 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
14541469 --libdir=DIR object code libraries [EPREFIX/lib]
14551470 --includedir=DIR C header files [PREFIX/include]
14561471 --oldincludedir=DIR C header files for non-gcc [/usr/include]
14811496
14821497 if test -n "$ac_init_help"; then
14831498 case $ac_init_help in
1484 short | recursive ) echo "Configuration of libgeotiff 1.4.2:";;
1499 short | recursive ) echo "Configuration of libgeotiff 1.4.3:";;
14851500 esac
14861501 cat <<\_ACEOF
14871502
15241539 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
15251540 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
15261541 both]
1542 --with-aix-soname=aix|svr4|both
1543 shared library versioning (aka "SONAME") variant to
1544 provide on AIX, [default=aix].
15271545 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1528 --with-sysroot=DIR Search for dependent libraries within DIR
1529 (or the compiler's sysroot if not specified).
1546 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
1547 compiler's sysroot if not specified).
15301548 --with-zip=ARG zlib library to use (yes or path)
15311549 --with-zlib=ARG alias for --with-zip
15321550 --with-libz=ARG alias for --with-zip
15451563 CXX C++ compiler command
15461564 CXXFLAGS C++ compiler flags
15471565 CXXCPP C++ preprocessor
1566 LT_SYS_LIBRARY_PATH
1567 User-defined run-time library search path.
15481568 CPP C preprocessor
15491569 DOXYGEN_PAPER_SIZE
15501570 a4wide (default), a4, letter, legal or executive
16151635 test -n "$ac_init_help" && exit $ac_status
16161636 if $ac_init_version; then
16171637 cat <<\_ACEOF
1618 libgeotiff configure 1.4.2
1638 libgeotiff configure 1.4.3
16191639 generated by GNU Autoconf 2.69
16201640
16211641 Copyright (C) 2012 Free Software Foundation, Inc.
21052125 This file contains any messages produced by compilers while
21062126 running configure, to aid debugging if configure makes a mistake.
21072127
2108 It was created by libgeotiff $as_me 1.4.2, which was
2128 It was created by libgeotiff $as_me 1.4.3, which was
21092129 generated by GNU Autoconf 2.69. Invocation command line was
21102130
21112131 $ $0 $@
25232543
25242544
25252545
2526 RELEASE_VERSION=1.4.2
2546 RELEASE_VERSION=1.4.3
25272547
25282548 ac_config_headers="$ac_config_headers geo_config.h"
25292549
25302550
25312551
2532 am__api_version='1.14'
2552 am__api_version='1.15'
25332553
25342554 # Find a good install program. We prefer a C program (faster),
25352555 # so one script is as good as another. But avoid the broken or
27012721 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
27022722 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
27032723
2704 # expand $ac_aux_dir to an absolute path
2705 am_aux_dir=`cd $ac_aux_dir && pwd`
2724 # Expand $ac_aux_dir to an absolute path.
2725 am_aux_dir=`cd "$ac_aux_dir" && pwd`
27062726
27072727 if test x"${MISSING+set}" != xset; then
27082728 case $am_aux_dir in
27212741 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
27222742 fi
27232743
2724 if test x"${install_sh}" != xset; then
2744 if test x"${install_sh+set}" != xset; then
27252745 case $am_aux_dir in
27262746 *\ * | *\ *)
27272747 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
30153035
30163036 # Define the identity of the package.
30173037 PACKAGE='libgeotiff'
3018 VERSION='1.4.2'
3038 VERSION='1.4.3'
30193039
30203040
30213041 cat >>confdefs.h <<_ACEOF
30493069 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
30503070 mkdir_p='$(MKDIR_P)'
30513071
3052 # We need awk for the "check" target. The system "awk" is bad on
3053 # some platforms.
3072 # We need awk for the "check" target (and possibly the TAP driver). The
3073 # system "awk" is bad on some platforms.
30543074 # Always define AMTAR for backward compatibility. Yes, it's still used
30553075 # in the wild :-( We should find a proper way to deprecate it ...
30563076 AMTAR='$${TAR-tar}'
31073127 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
31083128 fi
31093129 fi
3130
31103131
31113132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
31123133 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
47384759
47394760
47404761
4741 macro_version='2.4.2'
4742 macro_revision='1.3337'
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756 ltmain="$ac_aux_dir/ltmain.sh"
4762 macro_version='2.4.6'
4763 macro_revision='2.4.6'
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777 ltmain=$ac_aux_dir/ltmain.sh
47574778
47584779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
47594780 $as_echo_n "checking host system type... " >&6; }
48354856 $ECHO ""
48364857 }
48374858
4838 case "$ECHO" in
4859 case $ECHO in
48394860 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
48404861 $as_echo "printf" >&6; } ;;
48414862 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
51585179
51595180 # Check whether --with-gnu-ld was given.
51605181 if test "${with_gnu_ld+set}" = set; then :
5161 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5182 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
51625183 else
51635184 with_gnu_ld=no
51645185 fi
51655186
51665187 ac_prog=ld
5167 if test "$GCC" = yes; then
5188 if test yes = "$GCC"; then
51685189 # Check if gcc -print-prog-name=ld gives a path.
51695190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
51705191 $as_echo_n "checking for ld used by $CC... " >&6; }
51715192 case $host in
51725193 *-*-mingw*)
5173 # gcc leaves a trailing carriage return which upsets mingw
5194 # gcc leaves a trailing carriage return, which upsets mingw
51745195 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
51755196 *)
51765197 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
51845205 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
51855206 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
51865207 done
5187 test -z "$LD" && LD="$ac_prog"
5208 test -z "$LD" && LD=$ac_prog
51885209 ;;
51895210 "")
51905211 # If it fails, then pretend we aren't using GCC.
51955216 with_gnu_ld=unknown
51965217 ;;
51975218 esac
5198 elif test "$with_gnu_ld" = yes; then
5219 elif test yes = "$with_gnu_ld"; then
51995220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
52005221 $as_echo_n "checking for GNU ld... " >&6; }
52015222 else
52065227 $as_echo_n "(cached) " >&6
52075228 else
52085229 if test -z "$LD"; then
5209 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5230 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
52105231 for ac_dir in $PATH; do
5211 IFS="$lt_save_ifs"
5232 IFS=$lt_save_ifs
52125233 test -z "$ac_dir" && ac_dir=.
52135234 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5214 lt_cv_path_LD="$ac_dir/$ac_prog"
5235 lt_cv_path_LD=$ac_dir/$ac_prog
52155236 # Check to see if the program is GNU ld. I'd rather use --version,
52165237 # but apparently some variants of GNU ld only accept -v.
52175238 # Break only if it was the GNU/non-GNU ld that we prefer.
52185239 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
52195240 *GNU* | *'with BFD'*)
5220 test "$with_gnu_ld" != no && break
5241 test no != "$with_gnu_ld" && break
52215242 ;;
52225243 *)
5223 test "$with_gnu_ld" != yes && break
5244 test yes != "$with_gnu_ld" && break
52245245 ;;
52255246 esac
52265247 fi
52275248 done
5228 IFS="$lt_save_ifs"
5229 else
5230 lt_cv_path_LD="$LD" # Let the user override the test with a path.
5231 fi
5232 fi
5233
5234 LD="$lt_cv_path_LD"
5249 IFS=$lt_save_ifs
5250 else
5251 lt_cv_path_LD=$LD # Let the user override the test with a path.
5252 fi
5253 fi
5254
5255 LD=$lt_cv_path_LD
52355256 if test -n "$LD"; then
52365257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
52375258 $as_echo "$LD" >&6; }
52745295 else
52755296 if test -n "$NM"; then
52765297 # Let the user override the test.
5277 lt_cv_path_NM="$NM"
5278 else
5279 lt_nm_to_check="${ac_tool_prefix}nm"
5298 lt_cv_path_NM=$NM
5299 else
5300 lt_nm_to_check=${ac_tool_prefix}nm
52805301 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
52815302 lt_nm_to_check="$lt_nm_to_check nm"
52825303 fi
52835304 for lt_tmp_nm in $lt_nm_to_check; do
5284 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5305 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
52855306 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5286 IFS="$lt_save_ifs"
5307 IFS=$lt_save_ifs
52875308 test -z "$ac_dir" && ac_dir=.
5288 tmp_nm="$ac_dir/$lt_tmp_nm"
5289 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5309 tmp_nm=$ac_dir/$lt_tmp_nm
5310 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
52905311 # Check to see if the nm accepts a BSD-compat flag.
5291 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5312 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
52925313 # nm: unknown option "B" ignored
52935314 # Tru64's nm complains that /dev/null is an invalid object file
5294 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5295 */dev/null* | *'Invalid file or object type'*)
5315 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
5316 case $build_os in
5317 mingw*) lt_bad_file=conftest.nm/nofile ;;
5318 *) lt_bad_file=/dev/null ;;
5319 esac
5320 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
5321 *$lt_bad_file* | *'Invalid file or object type'*)
52965322 lt_cv_path_NM="$tmp_nm -B"
5297 break
5323 break 2
52985324 ;;
52995325 *)
53005326 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
53015327 */dev/null*)
53025328 lt_cv_path_NM="$tmp_nm -p"
5303 break
5329 break 2
53045330 ;;
53055331 *)
53065332 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
53115337 esac
53125338 fi
53135339 done
5314 IFS="$lt_save_ifs"
5340 IFS=$lt_save_ifs
53155341 done
53165342 : ${lt_cv_path_NM=no}
53175343 fi
53185344 fi
53195345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
53205346 $as_echo "$lt_cv_path_NM" >&6; }
5321 if test "$lt_cv_path_NM" != "no"; then
5322 NM="$lt_cv_path_NM"
5347 if test no != "$lt_cv_path_NM"; then
5348 NM=$lt_cv_path_NM
53235349 else
53245350 # Didn't find any BSD compatible name lister, look for dumpbin.
53255351 if test -n "$DUMPBIN"; then :
54255451 fi
54265452 fi
54275453
5428 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5454 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
54295455 *COFF*)
5430 DUMPBIN="$DUMPBIN -symbols"
5456 DUMPBIN="$DUMPBIN -symbols -headers"
54315457 ;;
54325458 *)
54335459 DUMPBIN=:
54355461 esac
54365462 fi
54375463
5438 if test "$DUMPBIN" != ":"; then
5439 NM="$DUMPBIN"
5464 if test : != "$DUMPBIN"; then
5465 NM=$DUMPBIN
54405466 fi
54415467 fi
54425468 test -z "$NM" && NM=nm
54765502 $as_echo_n "(cached) " >&6
54775503 else
54785504 i=0
5479 teststring="ABCD"
5505 teststring=ABCD
54805506
54815507 case $build_os in
54825508 msdosdjgpp*)
55165542 lt_cv_sys_max_cmd_len=8192;
55175543 ;;
55185544
5519 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
5545 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
55205546 # This has been around since 386BSD, at least. Likely further.
55215547 if test -x /sbin/sysctl; then
55225548 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
55675593 *)
55685594 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
55695595 if test -n "$lt_cv_sys_max_cmd_len" && \
5570 test undefined != "$lt_cv_sys_max_cmd_len"; then
5596 test undefined != "$lt_cv_sys_max_cmd_len"; then
55715597 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
55725598 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
55735599 else
55745600 # Make teststring a little bigger before we do anything with it.
55755601 # a 1K string should be a reasonable start.
5576 for i in 1 2 3 4 5 6 7 8 ; do
5602 for i in 1 2 3 4 5 6 7 8; do
55775603 teststring=$teststring$teststring
55785604 done
55795605 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
55805606 # If test is not a shell built-in, we'll probably end up computing a
55815607 # maximum length that is only half of the actual maximum length, but
55825608 # we can't tell.
5583 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
5609 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
55845610 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
5585 test $i != 17 # 1/2 MB should be enough
5611 test 17 != "$i" # 1/2 MB should be enough
55865612 do
55875613 i=`expr $i + 1`
55885614 teststring=$teststring$teststring
56005626
56015627 fi
56025628
5603 if test -n $lt_cv_sys_max_cmd_len ; then
5629 if test -n "$lt_cv_sys_max_cmd_len"; then
56045630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
56055631 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
56065632 else
56175643 : ${CP="cp -f"}
56185644 : ${MV="mv -f"}
56195645 : ${RM="rm -f"}
5620
5621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
5622 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
5623 # Try some XSI features
5624 xsi_shell=no
5625 ( _lt_dummy="a/b/c"
5626 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
5627 = c,a/b,b/c, \
5628 && eval 'test $(( 1 + 1 )) -eq 2 \
5629 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
5630 && xsi_shell=yes
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
5632 $as_echo "$xsi_shell" >&6; }
5633
5634
5635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
5636 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
5637 lt_shell_append=no
5638 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
5639 >/dev/null 2>&1 \
5640 && lt_shell_append=yes
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
5642 $as_echo "$lt_shell_append" >&6; }
5643
56445646
56455647 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
56465648 lt_unset=unset
57645766 reload_cmds='$LD$reload_flag -o $output$reload_objs'
57655767 case $host_os in
57665768 cygwin* | mingw* | pw32* | cegcc*)
5767 if test "$GCC" != yes; then
5769 if test yes != "$GCC"; then
57685770 reload_cmds=false
57695771 fi
57705772 ;;
57715773 darwin*)
5772 if test "$GCC" = yes; then
5773 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5774 if test yes = "$GCC"; then
5775 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
57745776 else
57755777 reload_cmds='$LD$reload_flag -o $output$reload_objs'
57765778 fi
58985900 # Need to set the preceding variable on all platforms that support
58995901 # interlibrary dependencies.
59005902 # 'none' -- dependencies not supported.
5901 # `unknown' -- same as none, but documents that we really don't know.
5903 # 'unknown' -- same as none, but documents that we really don't know.
59025904 # 'pass_all' -- all dependencies passed with no checks.
59035905 # 'test_compile' -- check by making test program.
59045906 # 'file_magic [[regex]]' -- check by looking for files in library path
5905 # which responds to the $file_magic_cmd with a given extended regex.
5906 # If you have `file' or equivalent on your system and you're not sure
5907 # whether `pass_all' will *always* work, you probably want this one.
5907 # that responds to the $file_magic_cmd with a given extended regex.
5908 # If you have 'file' or equivalent on your system and you're not sure
5909 # whether 'pass_all' will *always* work, you probably want this one.
59085910
59095911 case $host_os in
59105912 aix[4-9]*)
59315933 # Base MSYS/MinGW do not provide the 'file' command needed by
59325934 # func_win32_libid shell function, so use a weaker test based on 'objdump',
59335935 # unless we find 'file', for example because we are cross-compiling.
5934 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
5935 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
5936 if ( file / ) >/dev/null 2>&1; then
59365937 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
59375938 lt_cv_file_magic_cmd='func_win32_libid'
59385939 else
60286029 lt_cv_deplibs_check_method=pass_all
60296030 ;;
60306031
6031 openbsd*)
6032 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6032 openbsd* | bitrig*)
6033 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
60336034 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
60346035 else
60356036 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
60826083 tpf*)
60836084 lt_cv_deplibs_check_method=pass_all
60846085 ;;
6086 os2*)
6087 lt_cv_deplibs_check_method=pass_all
6088 ;;
60856089 esac
60866090
60876091 fi
62396243
62406244 case $host_os in
62416245 cygwin* | mingw* | pw32* | cegcc*)
6242 # two different shell functions defined in ltmain.sh
6243 # decide which to use based on capabilities of $DLLTOOL
6246 # two different shell functions defined in ltmain.sh;
6247 # decide which one to use based on capabilities of $DLLTOOL
62446248 case `$DLLTOOL --help 2>&1` in
62456249 *--identify-strict*)
62466250 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
62526256 ;;
62536257 *)
62546258 # fallback: assume linklib IS sharedlib
6255 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
6259 lt_cv_sharedlib_from_linklib_cmd=$ECHO
62566260 ;;
62576261 esac
62586262
64076411 ac_status=$?
64086412 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64096413 test $ac_status = 0; }
6410 if test "$ac_status" -eq 0; then
6414 if test 0 -eq "$ac_status"; then
64116415 # Ensure the archiver fails upon bogus file names.
64126416 rm -f conftest.$ac_objext libconftest.a
64136417 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
64156419 ac_status=$?
64166420 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64176421 test $ac_status = 0; }
6418 if test "$ac_status" -ne 0; then
6422 if test 0 -ne "$ac_status"; then
64196423 lt_cv_ar_at_file=@
64206424 fi
64216425 fi
64286432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
64296433 $as_echo "$lt_cv_ar_at_file" >&6; }
64306434
6431 if test "x$lt_cv_ar_at_file" = xno; then
6435 if test no = "$lt_cv_ar_at_file"; then
64326436 archiver_list_spec=
64336437 else
64346438 archiver_list_spec=$lt_cv_ar_at_file
66456649
66466650 if test -n "$RANLIB"; then
66476651 case $host_os in
6648 openbsd*)
6652 bitrig* | openbsd*)
66496653 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
66506654 ;;
66516655 *)
67356739 symcode='[ABCDGISTW]'
67366740 ;;
67376741 hpux*)
6738 if test "$host_cpu" = ia64; then
6742 if test ia64 = "$host_cpu"; then
67396743 symcode='[ABCDEGRST]'
67406744 fi
67416745 ;;
67686772 symcode='[ABCDGIRSTW]' ;;
67696773 esac
67706774
6775 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6776 # Gets list of data symbols to import.
6777 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
6778 # Adjust the below global symbol transforms to fixup imported variables.
6779 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
6780 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
6781 lt_c_name_lib_hook="\
6782 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
6783 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
6784 else
6785 # Disable hooks by default.
6786 lt_cv_sys_global_symbol_to_import=
6787 lt_cdecl_hook=
6788 lt_c_name_hook=
6789 lt_c_name_lib_hook=
6790 fi
6791
67716792 # Transform an extracted symbol line into a proper C declaration.
67726793 # Some systems (esp. on ia64) link data and code symbols differently,
67736794 # so use this general approach.
6774 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6795 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
6796 $lt_cdecl_hook\
6797 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
6798 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
67756799
67766800 # Transform an extracted symbol line into symbol name and symbol address
6777 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
6778 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
6801 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
6802 $lt_c_name_hook\
6803 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
6804 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
6805
6806 # Transform an extracted symbol line into symbol name with lib prefix and
6807 # symbol address.
6808 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
6809 $lt_c_name_lib_hook\
6810 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
6811 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
6812 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
67796813
67806814 # Handle CRLF in mingw tool chain
67816815 opt_cr=
67936827
67946828 # Write the raw and C identifiers.
67956829 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6796 # Fake it for dumpbin and say T for any non-static function
6797 # and D for any global variable.
6830 # Fake it for dumpbin and say T for any non-static function,
6831 # D for any global variable and I for any imported variable.
67986832 # Also find C++ and __fastcall symbols from MSVC++,
67996833 # which start with @ or ?.
68006834 lt_cv_sys_global_symbol_pipe="$AWK '"\
68016835 " {last_section=section; section=\$ 3};"\
68026836 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
68036837 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
6838 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
6839 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
6840 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
68046841 " \$ 0!~/External *\|/{next};"\
68056842 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
68066843 " {if(hide[section]) next};"\
6807 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
6808 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
6809 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
6810 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
6844 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
6845 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
6846 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
6847 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
68116848 " ' prfx=^$ac_symprfx"
68126849 else
68136850 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
68556892 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
68566893 cat <<_LT_EOF > conftest.$ac_ext
68576894 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
6858 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
6859 /* DATA imports from DLLs on WIN32 con't be const, because runtime
6895 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
6896 /* DATA imports from DLLs on WIN32 can't be const, because runtime
68606897 relocations are performed -- see ld's documentation on pseudo-relocs. */
68616898 # define LT_DLSYM_CONST
6862 #elif defined(__osf__)
6899 #elif defined __osf__
68636900 /* This system does not cope well with relocations in const data. */
68646901 # define LT_DLSYM_CONST
68656902 #else
68856922 {
68866923 { "@PROGRAM@", (void *) 0 },
68876924 _LT_EOF
6888 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
6925 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
68896926 cat <<\_LT_EOF >> conftest.$ac_ext
68906927 {0, (void *) 0}
68916928 };
69056942 mv conftest.$ac_objext conftstm.$ac_objext
69066943 lt_globsym_save_LIBS=$LIBS
69076944 lt_globsym_save_CFLAGS=$CFLAGS
6908 LIBS="conftstm.$ac_objext"
6945 LIBS=conftstm.$ac_objext
69096946 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
69106947 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
69116948 (eval $ac_link) 2>&5
69126949 ac_status=$?
69136950 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6914 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
6951 test $ac_status = 0; } && test -s conftest$ac_exeext; then
69156952 pipe_works=yes
69166953 fi
69176954 LIBS=$lt_globsym_save_LIBS
69326969 rm -rf conftest* conftst*
69336970
69346971 # Do not use the global_symbol_pipe unless it works.
6935 if test "$pipe_works" = yes; then
6972 if test yes = "$pipe_works"; then
69366973 break
69376974 else
69386975 lt_cv_sys_global_symbol_pipe=
69857022
69867023
69877024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
69887035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
69897036 $as_echo_n "checking for sysroot... " >&6; }
69907037
69977044
69987045
69997046 lt_sysroot=
7000 case ${with_sysroot} in #(
7047 case $with_sysroot in #(
70017048 yes)
7002 if test "$GCC" = yes; then
7049 if test yes = "$GCC"; then
70037050 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
70047051 fi
70057052 ;; #(
70097056 no|'')
70107057 ;; #(
70117058 *)
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
7013 $as_echo "${with_sysroot}" >&6; }
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
7060 $as_echo "$with_sysroot" >&6; }
70147061 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
70157062 ;;
70167063 esac
70227069
70237070
70247071
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
7073 $as_echo_n "checking for a working dd... " >&6; }
7074 if ${ac_cv_path_lt_DD+:} false; then :
7075 $as_echo_n "(cached) " >&6
7076 else
7077 printf 0123456789abcdef0123456789abcdef >conftest.i
7078 cat conftest.i conftest.i >conftest2.i
7079 : ${lt_DD:=$DD}
7080 if test -z "$lt_DD"; then
7081 ac_path_lt_DD_found=false
7082 # Loop through the user's path and test for each of PROGNAME-LIST
7083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7084 for as_dir in $PATH
7085 do
7086 IFS=$as_save_IFS
7087 test -z "$as_dir" && as_dir=.
7088 for ac_prog in dd; do
7089 for ac_exec_ext in '' $ac_executable_extensions; do
7090 ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
7091 as_fn_executable_p "$ac_path_lt_DD" || continue
7092 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
7093 cmp -s conftest.i conftest.out \
7094 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
7095 fi
7096 $ac_path_lt_DD_found && break 3
7097 done
7098 done
7099 done
7100 IFS=$as_save_IFS
7101 if test -z "$ac_cv_path_lt_DD"; then
7102 :
7103 fi
7104 else
7105 ac_cv_path_lt_DD=$lt_DD
7106 fi
7107
7108 rm -f conftest.i conftest2.i conftest.out
7109 fi
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
7111 $as_echo "$ac_cv_path_lt_DD" >&6; }
7112
7113
7114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
7115 $as_echo_n "checking how to truncate binary pipes... " >&6; }
7116 if ${lt_cv_truncate_bin+:} false; then :
7117 $as_echo_n "(cached) " >&6
7118 else
7119 printf 0123456789abcdef0123456789abcdef >conftest.i
7120 cat conftest.i conftest.i >conftest2.i
7121 lt_cv_truncate_bin=
7122 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
7123 cmp -s conftest.i conftest.out \
7124 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
7125 fi
7126 rm -f conftest.i conftest2.i conftest.out
7127 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
7128 fi
7129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
7130 $as_echo "$lt_cv_truncate_bin" >&6; }
7131
7132
7133
7134
7135
7136
7137
7138 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
7139 func_cc_basename ()
7140 {
7141 for cc_temp in $*""; do
7142 case $cc_temp in
7143 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7144 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7145 \-*) ;;
7146 *) break;;
7147 esac
7148 done
7149 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
7150 }
7151
70257152 # Check whether --enable-libtool-lock was given.
70267153 if test "${enable_libtool_lock+set}" = set; then :
70277154 enableval=$enable_libtool_lock;
70287155 fi
70297156
7030 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7157 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
70317158
70327159 # Some flags need to be propagated to the compiler or linker for good
70337160 # libtool support.
70347161 case $host in
70357162 ia64-*-hpux*)
7036 # Find out which ABI we are using.
7163 # Find out what ABI is being produced by ac_compile, and set mode
7164 # options accordingly.
70377165 echo 'int i;' > conftest.$ac_ext
70387166 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
70397167 (eval $ac_compile) 2>&5
70427170 test $ac_status = 0; }; then
70437171 case `/usr/bin/file conftest.$ac_objext` in
70447172 *ELF-32*)
7045 HPUX_IA64_MODE="32"
7173 HPUX_IA64_MODE=32
70467174 ;;
70477175 *ELF-64*)
7048 HPUX_IA64_MODE="64"
7176 HPUX_IA64_MODE=64
70497177 ;;
70507178 esac
70517179 fi
70527180 rm -rf conftest*
70537181 ;;
70547182 *-*-irix6*)
7055 # Find out which ABI we are using.
7183 # Find out what ABI is being produced by ac_compile, and set linker
7184 # options accordingly.
70567185 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
70577186 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
70587187 (eval $ac_compile) 2>&5
70597188 ac_status=$?
70607189 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
70617190 test $ac_status = 0; }; then
7062 if test "$lt_cv_prog_gnu_ld" = yes; then
7191 if test yes = "$lt_cv_prog_gnu_ld"; then
70637192 case `/usr/bin/file conftest.$ac_objext` in
70647193 *32-bit*)
70657194 LD="${LD-ld} -melf32bsmip"
70887217 rm -rf conftest*
70897218 ;;
70907219
7220 mips64*-*linux*)
7221 # Find out what ABI is being produced by ac_compile, and set linker
7222 # options accordingly.
7223 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
7224 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7225 (eval $ac_compile) 2>&5
7226 ac_status=$?
7227 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7228 test $ac_status = 0; }; then
7229 emul=elf
7230 case `/usr/bin/file conftest.$ac_objext` in
7231 *32-bit*)
7232 emul="${emul}32"
7233 ;;
7234 *64-bit*)
7235 emul="${emul}64"
7236 ;;
7237 esac
7238 case `/usr/bin/file conftest.$ac_objext` in
7239 *MSB*)
7240 emul="${emul}btsmip"
7241 ;;
7242 *LSB*)
7243 emul="${emul}ltsmip"
7244 ;;
7245 esac
7246 case `/usr/bin/file conftest.$ac_objext` in
7247 *N32*)
7248 emul="${emul}n32"
7249 ;;
7250 esac
7251 LD="${LD-ld} -m $emul"
7252 fi
7253 rm -rf conftest*
7254 ;;
7255
70917256 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
70927257 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
7093 # Find out which ABI we are using.
7258 # Find out what ABI is being produced by ac_compile, and set linker
7259 # options accordingly. Note that the listed cases only cover the
7260 # situations where additional linker options are needed (such as when
7261 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
7262 # vice versa); the common cases where no linker options are needed do
7263 # not appear in the list.
70947264 echo 'int i;' > conftest.$ac_ext
70957265 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
70967266 (eval $ac_compile) 2>&5
71137283 ;;
71147284 esac
71157285 ;;
7116 powerpc64le-*)
7286 powerpc64le-*linux*)
71177287 LD="${LD-ld} -m elf32lppclinux"
71187288 ;;
7119 powerpc64-*)
7289 powerpc64-*linux*)
71207290 LD="${LD-ld} -m elf32ppclinux"
71217291 ;;
71227292 s390x-*linux*)
71357305 x86_64-*linux*)
71367306 LD="${LD-ld} -m elf_x86_64"
71377307 ;;
7138 powerpcle-*)
7308 powerpcle-*linux*)
71397309 LD="${LD-ld} -m elf64lppc"
71407310 ;;
7141 powerpc-*)
7311 powerpc-*linux*)
71427312 LD="${LD-ld} -m elf64ppc"
71437313 ;;
71447314 s390*-*linux*|s390*-*tpf*)
71567326
71577327 *-*-sco3.2v5*)
71587328 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
7159 SAVE_CFLAGS="$CFLAGS"
7329 SAVE_CFLAGS=$CFLAGS
71607330 CFLAGS="$CFLAGS -belf"
71617331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
71627332 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
71967366 fi
71977367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
71987368 $as_echo "$lt_cv_cc_needs_belf" >&6; }
7199 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7369 if test yes != "$lt_cv_cc_needs_belf"; then
72007370 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7201 CFLAGS="$SAVE_CFLAGS"
7371 CFLAGS=$SAVE_CFLAGS
72027372 fi
72037373 ;;
72047374 *-*solaris*)
7205 # Find out which ABI we are using.
7375 # Find out what ABI is being produced by ac_compile, and set linker
7376 # options accordingly.
72067377 echo 'int i;' > conftest.$ac_ext
72077378 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
72087379 (eval $ac_compile) 2>&5
72147385 case $lt_cv_prog_gnu_ld in
72157386 yes*)
72167387 case $host in
7217 i?86-*-solaris*)
7388 i?86-*-solaris*|x86_64-*-solaris*)
72187389 LD="${LD-ld} -m elf_x86_64"
72197390 ;;
72207391 sparc*-*-solaris*)
72237394 esac
72247395 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
72257396 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
7226 LD="${LD-ld}_sol2"
7397 LD=${LD-ld}_sol2
72277398 fi
72287399 ;;
72297400 *)
72397410 ;;
72407411 esac
72417412
7242 need_locks="$enable_libtool_lock"
7413 need_locks=$enable_libtool_lock
72437414
72447415 if test -n "$ac_tool_prefix"; then
72457416 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
73507521 fi
73517522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
73527523 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
7353 if test "x$lt_cv_path_mainfest_tool" != xyes; then
7524 if test yes != "$lt_cv_path_mainfest_tool"; then
73547525 MANIFEST_TOOL=:
73557526 fi
73567527
78538024 $as_echo_n "(cached) " >&6
78548025 else
78558026 lt_cv_apple_cc_single_mod=no
7856 if test -z "${LT_MULTI_MODULE}"; then
8027 if test -z "$LT_MULTI_MODULE"; then
78578028 # By default we will add the -single_module flag. You can override
78588029 # by either setting the environment variable LT_MULTI_MODULE
78598030 # non-empty at configure time, or by adding -multi_module to the
78718042 cat conftest.err >&5
78728043 # Otherwise, if the output was created with a 0 exit code from
78738044 # the compiler, it worked.
7874 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
8045 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
78758046 lt_cv_apple_cc_single_mod=yes
78768047 else
78778048 cat conftest.err >&5
79108081 fi
79118082 rm -f core conftest.err conftest.$ac_objext \
79128083 conftest$ac_exeext conftest.$ac_ext
7913 LDFLAGS="$save_LDFLAGS"
8084 LDFLAGS=$save_LDFLAGS
79148085
79158086 fi
79168087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
79398110 _lt_result=$?
79408111 if test -s conftest.err && $GREP force_load conftest.err; then
79418112 cat conftest.err >&5
7942 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
8113 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
79438114 lt_cv_ld_force_load=yes
79448115 else
79458116 cat conftest.err >&5
79528123 $as_echo "$lt_cv_ld_force_load" >&6; }
79538124 case $host_os in
79548125 rhapsody* | darwin1.[012])
7955 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
8126 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
79568127 darwin1.*)
7957 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
8128 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
79588129 darwin*) # darwin 5.x on
79598130 # if running on 10.5 or later, the deployment target defaults
79608131 # to the OS version, if on x86, and 10.4, the deployment
79618132 # target defaults to 10.4. Don't you love it?
79628133 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
79638134 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
7964 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
7965 10.[012]*)
7966 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
8135 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
8136 10.[012][,.]*)
8137 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
79678138 10.*)
7968 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
8139 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
79698140 esac
79708141 ;;
79718142 esac
7972 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
8143 if test yes = "$lt_cv_apple_cc_single_mod"; then
79738144 _lt_dar_single_mod='$single_module'
79748145 fi
7975 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
7976 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
8146 if test yes = "$lt_cv_ld_exported_symbols_list"; then
8147 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
79778148 else
7978 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
8149 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
79798150 fi
7980 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
8151 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
79818152 _lt_dsymutil='~$DSYMUTIL $lib || :'
79828153 else
79838154 _lt_dsymutil=
79848155 fi
79858156 ;;
79868157 esac
8158
8159 # func_munge_path_list VARIABLE PATH
8160 # -----------------------------------
8161 # VARIABLE is name of variable containing _space_ separated list of
8162 # directories to be munged by the contents of PATH, which is string
8163 # having a format:
8164 # "DIR[:DIR]:"
8165 # string "DIR[ DIR]" will be prepended to VARIABLE
8166 # ":DIR[:DIR]"
8167 # string "DIR[ DIR]" will be appended to VARIABLE
8168 # "DIRP[:DIRP]::[DIRA:]DIRA"
8169 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
8170 # "DIRA[ DIRA]" will be appended to VARIABLE
8171 # "DIR[:DIR]"
8172 # VARIABLE will be replaced by "DIR[ DIR]"
8173 func_munge_path_list ()
8174 {
8175 case x$2 in
8176 x)
8177 ;;
8178 *:)
8179 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
8180 ;;
8181 x:*)
8182 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
8183 ;;
8184 *::*)
8185 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
8186 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
8187 ;;
8188 *)
8189 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
8190 ;;
8191 esac
8192 }
79878193
79888194 ac_ext=c
79898195 ac_cpp='$CPP $CPPFLAGS'
82708476
82718477 func_stripname_cnf ()
82728478 {
8273 case ${2} in
8274 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8275 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8479 case $2 in
8480 .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
8481 *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
82768482 esac
82778483 } # func_stripname_cnf
82788484
82998505 *)
83008506 enable_shared=no
83018507 # Look at the argument we got. We use all the common list separators.
8302 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8508 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
83038509 for pkg in $enableval; do
8304 IFS="$lt_save_ifs"
8510 IFS=$lt_save_ifs
83058511 if test "X$pkg" = "X$p"; then
83068512 enable_shared=yes
83078513 fi
83088514 done
8309 IFS="$lt_save_ifs"
8515 IFS=$lt_save_ifs
83108516 ;;
83118517 esac
83128518 else
83308536 *)
83318537 enable_static=no
83328538 # Look at the argument we got. We use all the common list separators.
8333 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8539 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
83348540 for pkg in $enableval; do
8335 IFS="$lt_save_ifs"
8541 IFS=$lt_save_ifs
83368542 if test "X$pkg" = "X$p"; then
83378543 enable_static=yes
83388544 fi
83398545 done
8340 IFS="$lt_save_ifs"
8546 IFS=$lt_save_ifs
83418547 ;;
83428548 esac
83438549 else
83618567 *)
83628568 pic_mode=default
83638569 # Look at the argument we got. We use all the common list separators.
8364 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8570 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
83658571 for lt_pkg in $withval; do
8366 IFS="$lt_save_ifs"
8572 IFS=$lt_save_ifs
83678573 if test "X$lt_pkg" = "X$lt_p"; then
83688574 pic_mode=yes
83698575 fi
83708576 done
8371 IFS="$lt_save_ifs"
8577 IFS=$lt_save_ifs
83728578 ;;
83738579 esac
83748580 else
83758581 pic_mode=default
83768582 fi
83778583
8378
8379 test -z "$pic_mode" && pic_mode=default
83808584
83818585
83828586
83938597 *)
83948598 enable_fast_install=no
83958599 # Look at the argument we got. We use all the common list separators.
8396 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8600 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
83978601 for pkg in $enableval; do
8398 IFS="$lt_save_ifs"
8602 IFS=$lt_save_ifs
83998603 if test "X$pkg" = "X$p"; then
84008604 enable_fast_install=yes
84018605 fi
84028606 done
8403 IFS="$lt_save_ifs"
8607 IFS=$lt_save_ifs
84048608 ;;
84058609 esac
84068610 else
84148618
84158619
84168620
8621 shared_archive_member_spec=
8622 case $host,$enable_shared in
8623 power*-*-aix[5-9]*,yes)
8624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
8625 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
8626
8627 # Check whether --with-aix-soname was given.
8628 if test "${with_aix_soname+set}" = set; then :
8629 withval=$with_aix_soname; case $withval in
8630 aix|svr4|both)
8631 ;;
8632 *)
8633 as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
8634 ;;
8635 esac
8636 lt_cv_with_aix_soname=$with_aix_soname
8637 else
8638 if ${lt_cv_with_aix_soname+:} false; then :
8639 $as_echo_n "(cached) " >&6
8640 else
8641 lt_cv_with_aix_soname=aix
8642 fi
8643
8644 with_aix_soname=$lt_cv_with_aix_soname
8645 fi
8646
8647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
8648 $as_echo "$with_aix_soname" >&6; }
8649 if test aix != "$with_aix_soname"; then
8650 # For the AIX way of multilib, we name the shared archive member
8651 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
8652 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
8653 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
8654 # the AIX toolchain works better with OBJECT_MODE set (default 32).
8655 if test 64 = "${OBJECT_MODE-32}"; then
8656 shared_archive_member_spec=shr_64
8657 else
8658 shared_archive_member_spec=shr
8659 fi
8660 fi
8661 ;;
8662 *)
8663 with_aix_soname=aix
8664 ;;
8665 esac
8666
8667
8668
8669
8670
8671
8672
84178673
84188674
84198675
84208676 # This can be used to rebuild libtool when needed
8421 LIBTOOL_DEPS="$ltmain"
8677 LIBTOOL_DEPS=$ltmain
84228678
84238679 # Always use our own libtool.
84248680 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
84678723
84688724
84698725
8470 if test -n "${ZSH_VERSION+set}" ; then
8726 if test -n "${ZSH_VERSION+set}"; then
84718727 setopt NO_GLOB_SUBST
84728728 fi
84738729
85068762 # AIX sometimes has problems with the GCC collect2 program. For some
85078763 # reason, if we set the COLLECT_NAMES environment variable, the problems
85088764 # vanish in a puff of smoke.
8509 if test "X${COLLECT_NAMES+set}" != Xset; then
8765 if test set != "${COLLECT_NAMES+set}"; then
85108766 COLLECT_NAMES=
85118767 export COLLECT_NAMES
85128768 fi
85178773 ofile=libtool
85188774 can_build_shared=yes
85198775
8520 # All known linkers require a `.a' archive for static linking (except MSVC,
8776 # All known linkers require a '.a' archive for static linking (except MSVC,
85218777 # which needs '.lib').
85228778 libext=a
85238779
8524 with_gnu_ld="$lt_cv_prog_gnu_ld"
8525
8526 old_CC="$CC"
8527 old_CFLAGS="$CFLAGS"
8780 with_gnu_ld=$lt_cv_prog_gnu_ld
8781
8782 old_CC=$CC
8783 old_CFLAGS=$CFLAGS
85288784
85298785 # Set sane defaults for various variables
85308786 test -z "$CC" && CC=cc
85338789 test -z "$LD" && LD=ld
85348790 test -z "$ac_objext" && ac_objext=o
85358791
8536 for cc_temp in $compiler""; do
8537 case $cc_temp in
8538 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8539 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8540 \-*) ;;
8541 *) break;;
8542 esac
8543 done
8544 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
8792 func_cc_basename $compiler
8793 cc_basename=$func_cc_basename_result
85458794
85468795
85478796 # Only perform the check for file, if the check method requires it
85568805 else
85578806 case $MAGIC_CMD in
85588807 [\\/*] | ?:[\\/]*)
8559 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8808 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
85608809 ;;
85618810 *)
8562 lt_save_MAGIC_CMD="$MAGIC_CMD"
8563 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8811 lt_save_MAGIC_CMD=$MAGIC_CMD
8812 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
85648813 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
85658814 for ac_dir in $ac_dummy; do
8566 IFS="$lt_save_ifs"
8815 IFS=$lt_save_ifs
85678816 test -z "$ac_dir" && ac_dir=.
8568 if test -f $ac_dir/${ac_tool_prefix}file; then
8569 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8817 if test -f "$ac_dir/${ac_tool_prefix}file"; then
8818 lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
85708819 if test -n "$file_magic_test_file"; then
85718820 case $deplibs_check_method in
85728821 "file_magic "*)
85738822 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8574 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8823 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
85758824 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
85768825 $EGREP "$file_magic_regex" > /dev/null; then
85778826 :
85948843 break
85958844 fi
85968845 done
8597 IFS="$lt_save_ifs"
8598 MAGIC_CMD="$lt_save_MAGIC_CMD"
8846 IFS=$lt_save_ifs
8847 MAGIC_CMD=$lt_save_MAGIC_CMD
85998848 ;;
86008849 esac
86018850 fi
86028851
8603 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8852 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
86048853 if test -n "$MAGIC_CMD"; then
86058854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
86068855 $as_echo "$MAGIC_CMD" >&6; }
86228871 else
86238872 case $MAGIC_CMD in
86248873 [\\/*] | ?:[\\/]*)
8625 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8874 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
86268875 ;;
86278876 *)
8628 lt_save_MAGIC_CMD="$MAGIC_CMD"
8629 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8877 lt_save_MAGIC_CMD=$MAGIC_CMD
8878 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
86308879 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
86318880 for ac_dir in $ac_dummy; do
8632 IFS="$lt_save_ifs"
8881 IFS=$lt_save_ifs
86338882 test -z "$ac_dir" && ac_dir=.
8634 if test -f $ac_dir/file; then
8635 lt_cv_path_MAGIC_CMD="$ac_dir/file"
8883 if test -f "$ac_dir/file"; then
8884 lt_cv_path_MAGIC_CMD=$ac_dir/"file"
86368885 if test -n "$file_magic_test_file"; then
86378886 case $deplibs_check_method in
86388887 "file_magic "*)
86398888 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8640 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8889 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
86418890 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
86428891 $EGREP "$file_magic_regex" > /dev/null; then
86438892 :
86608909 break
86618910 fi
86628911 done
8663 IFS="$lt_save_ifs"
8664 MAGIC_CMD="$lt_save_MAGIC_CMD"
8912 IFS=$lt_save_ifs
8913 MAGIC_CMD=$lt_save_MAGIC_CMD
86658914 ;;
86668915 esac
86678916 fi
86688917
8669 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8918 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
86708919 if test -n "$MAGIC_CMD"; then
86718920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
86728921 $as_echo "$MAGIC_CMD" >&6; }
86878936
86888937 # Use C for the default configuration in the libtool script
86898938
8690 lt_save_CC="$CC"
8939 lt_save_CC=$CC
86918940 ac_ext=c
86928941 ac_cpp='$CPP $CPPFLAGS'
86938942 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
87498998
87508999 lt_prog_compiler_no_builtin_flag=
87519000
8752 if test "$GCC" = yes; then
9001 if test yes = "$GCC"; then
87539002 case $cc_basename in
87549003 nvcc*)
87559004 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
87659014 lt_cv_prog_compiler_rtti_exceptions=no
87669015 ac_outfile=conftest.$ac_objext
87679016 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8768 lt_compiler_flag="-fno-rtti -fno-exceptions"
9017 lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
87699018 # Insert the option either (1) after the last *FLAGS variable, or
87709019 # (2) before a word containing "conftest.", or (3) at the end.
87719020 # Note that $ac_compile itself does not contain backslashes and begins
87959044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
87969045 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
87979046
8798 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
9047 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
87999048 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
88009049 else
88019050 :
88139062 lt_prog_compiler_static=
88149063
88159064
8816 if test "$GCC" = yes; then
9065 if test yes = "$GCC"; then
88179066 lt_prog_compiler_wl='-Wl,'
88189067 lt_prog_compiler_static='-static'
88199068
88209069 case $host_os in
88219070 aix*)
88229071 # All AIX code is PIC.
8823 if test "$host_cpu" = ia64; then
9072 if test ia64 = "$host_cpu"; then
88249073 # AIX 5 now supports IA64 processor
88259074 lt_prog_compiler_static='-Bstatic'
88269075 fi
9076 lt_prog_compiler_pic='-fPIC'
88279077 ;;
88289078
88299079 amigaos*)
88349084 ;;
88359085 m68k)
88369086 # FIXME: we need at least 68020 code to build shared libraries, but
8837 # adding the `-m68020' flag to GCC prevents building anything better,
8838 # like `-m68040'.
9087 # adding the '-m68020' flag to GCC prevents building anything better,
9088 # like '-m68040'.
88399089 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
88409090 ;;
88419091 esac
88519101 # Although the cygwin gcc ignores -fPIC, still need this for old-style
88529102 # (--disable-auto-import) libraries
88539103 lt_prog_compiler_pic='-DDLL_EXPORT'
9104 case $host_os in
9105 os2*)
9106 lt_prog_compiler_static='$wl-static'
9107 ;;
9108 esac
88549109 ;;
88559110
88569111 darwin* | rhapsody*)
89219176 case $host_os in
89229177 aix*)
89239178 lt_prog_compiler_wl='-Wl,'
8924 if test "$host_cpu" = ia64; then
9179 if test ia64 = "$host_cpu"; then
89259180 # AIX 5 now supports IA64 processor
89269181 lt_prog_compiler_static='-Bstatic'
89279182 else
89299184 fi
89309185 ;;
89319186
9187 darwin* | rhapsody*)
9188 # PIC is the default on this platform
9189 # Common symbols not allowed in MH_DYLIB files
9190 lt_prog_compiler_pic='-fno-common'
9191 case $cc_basename in
9192 nagfor*)
9193 # NAG Fortran compiler
9194 lt_prog_compiler_wl='-Wl,-Wl,,'
9195 lt_prog_compiler_pic='-PIC'
9196 lt_prog_compiler_static='-Bstatic'
9197 ;;
9198 esac
9199 ;;
9200
89329201 mingw* | cygwin* | pw32* | os2* | cegcc*)
89339202 # This hack is so that the source file can tell whether it is being
89349203 # built for inclusion in a dll (and should export symbols for example).
89359204 lt_prog_compiler_pic='-DDLL_EXPORT'
9205 case $host_os in
9206 os2*)
9207 lt_prog_compiler_static='$wl-static'
9208 ;;
9209 esac
89369210 ;;
89379211
89389212 hpux9* | hpux10* | hpux11*)
89489222 ;;
89499223 esac
89509224 # Is there a better lt_prog_compiler_static that works with the bundled CC?
8951 lt_prog_compiler_static='${wl}-a ${wl}archive'
9225 lt_prog_compiler_static='$wl-a ${wl}archive'
89529226 ;;
89539227
89549228 irix5* | irix6* | nonstopux*)
89599233
89609234 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
89619235 case $cc_basename in
8962 # old Intel for x86_64 which still supported -KPIC.
9236 # old Intel for x86_64, which still supported -KPIC.
89639237 ecc*)
89649238 lt_prog_compiler_wl='-Wl,'
89659239 lt_prog_compiler_pic='-KPIC'
89839257 lt_prog_compiler_wl='-Wl,-Wl,,'
89849258 lt_prog_compiler_pic='-PIC'
89859259 lt_prog_compiler_static='-Bstatic'
9260 ;;
9261 tcc*)
9262 # Fabrice Bellard et al's Tiny C Compiler
9263 lt_prog_compiler_wl='-Wl,'
9264 lt_prog_compiler_pic='-fPIC'
9265 lt_prog_compiler_static='-static'
89869266 ;;
89879267 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
89889268 # Portland Group compilers (*not* the Pentium gcc compiler,
90819361 ;;
90829362
90839363 sysv4*MP*)
9084 if test -d /usr/nec ;then
9364 if test -d /usr/nec; then
90859365 lt_prog_compiler_pic='-Kconform_pic'
90869366 lt_prog_compiler_static='-Bstatic'
90879367 fi
91109390 fi
91119391
91129392 case $host_os in
9113 # For platforms which do not support PIC, -DPIC is meaningless:
9393 # For platforms that do not support PIC, -DPIC is meaningless:
91149394 *djgpp*)
91159395 lt_prog_compiler_pic=
91169396 ;;
91429422 lt_cv_prog_compiler_pic_works=no
91439423 ac_outfile=conftest.$ac_objext
91449424 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9145 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
9425 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
91469426 # Insert the option either (1) after the last *FLAGS variable, or
91479427 # (2) before a word containing "conftest.", or (3) at the end.
91489428 # Note that $ac_compile itself does not contain backslashes and begins
91729452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
91739453 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
91749454
9175 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
9455 if test yes = "$lt_cv_prog_compiler_pic_works"; then
91769456 case $lt_prog_compiler_pic in
91779457 "" | " "*) ;;
91789458 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
92049484 $as_echo_n "(cached) " >&6
92059485 else
92069486 lt_cv_prog_compiler_static_works=no
9207 save_LDFLAGS="$LDFLAGS"
9487 save_LDFLAGS=$LDFLAGS
92089488 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
92099489 echo "$lt_simple_link_test_code" > conftest.$ac_ext
92109490 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
92239503 fi
92249504 fi
92259505 $RM -r conftest*
9226 LDFLAGS="$save_LDFLAGS"
9506 LDFLAGS=$save_LDFLAGS
92279507
92289508 fi
92299509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
92309510 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
92319511
9232 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
9512 if test yes = "$lt_cv_prog_compiler_static_works"; then
92339513 :
92349514 else
92359515 lt_prog_compiler_static=
93499629
93509630
93519631
9352 hard_links="nottested"
9353 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
9632 hard_links=nottested
9633 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
93549634 # do not overwrite the value of need_locks provided by the user
93559635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
93569636 $as_echo_n "checking if we can lock with hard links... " >&6; }
93629642 ln conftest.a conftest.b 2>/dev/null && hard_links=no
93639643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
93649644 $as_echo "$hard_links" >&6; }
9365 if test "$hard_links" = no; then
9366 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
9367 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
9645 if test no = "$hard_links"; then
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
9647 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
93689648 need_locks=warn
93699649 fi
93709650 else
94079687 # included in the symbol list
94089688 include_expsyms=
94099689 # exclude_expsyms can be an extended regexp of symbols to exclude
9410 # it will be wrapped by ` (' and `)$', so one must not match beginning or
9411 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9412 # as well as any symbol that contains `d'.
9690 # it will be wrapped by ' (' and ')$', so one must not match beginning or
9691 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
9692 # as well as any symbol that contains 'd'.
94139693 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
94149694 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
94159695 # platforms (ab)use it in PIC code, but their linkers get confused if
94249704 # FIXME: the MSVC++ port hasn't been tested in a loooong time
94259705 # When not using gcc, we currently assume that we are using
94269706 # Microsoft Visual C++.
9427 if test "$GCC" != yes; then
9707 if test yes != "$GCC"; then
94289708 with_gnu_ld=no
94299709 fi
94309710 ;;
94329712 # we just hope/assume this is gcc and not c89 (= MSVC++)
94339713 with_gnu_ld=yes
94349714 ;;
9435 openbsd*)
9715 openbsd* | bitrig*)
94369716 with_gnu_ld=no
94379717 ;;
94389718 linux* | k*bsd*-gnu | gnu*)
94459725 # On some targets, GNU ld is compatible enough with the native linker
94469726 # that we're better off using the native interface for both.
94479727 lt_use_gnu_ld_interface=no
9448 if test "$with_gnu_ld" = yes; then
9728 if test yes = "$with_gnu_ld"; then
94499729 case $host_os in
94509730 aix*)
94519731 # The AIX port of GNU ld has always aspired to compatibility
94679747 esac
94689748 fi
94699749
9470 if test "$lt_use_gnu_ld_interface" = yes; then
9750 if test yes = "$lt_use_gnu_ld_interface"; then
94719751 # If archive_cmds runs LD, not CC, wlarc should be empty
9472 wlarc='${wl}'
9752 wlarc='$wl'
94739753
94749754 # Set some defaults for GNU ld with shared library support. These
94759755 # are reset later if shared libraries are not supported. Putting them
94769756 # here allows them to be overridden if necessary.
94779757 runpath_var=LD_RUN_PATH
9478 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9479 export_dynamic_flag_spec='${wl}--export-dynamic'
9758 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
9759 export_dynamic_flag_spec='$wl--export-dynamic'
94809760 # ancient GNU ld didn't support --whole-archive et. al.
94819761 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
9482 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9762 whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
94839763 else
94849764 whole_archive_flag_spec=
94859765 fi
94869766 supports_anon_versioning=no
9487 case `$LD -v 2>&1` in
9767 case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
94889768 *GNU\ gold*) supports_anon_versioning=yes ;;
94899769 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
94909770 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
94979777 case $host_os in
94989778 aix[3-9]*)
94999779 # On AIX/PPC, the GNU linker is very broken
9500 if test "$host_cpu" != ia64; then
9780 if test ia64 != "$host_cpu"; then
95019781 ld_shlibs=no
95029782 cat <<_LT_EOF 1>&2
95039783
95169796 case $host_cpu in
95179797 powerpc)
95189798 # see comment about AmigaOS4 .so support
9519 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9799 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
95209800 archive_expsym_cmds=''
95219801 ;;
95229802 m68k)
95329812 allow_undefined_flag=unsupported
95339813 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
95349814 # support --undefined. This deserves some investigation. FIXME
9535 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9815 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
95369816 else
95379817 ld_shlibs=no
95389818 fi
95429822 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
95439823 # as there is no search path for DLLs.
95449824 hardcode_libdir_flag_spec='-L$libdir'
9545 export_dynamic_flag_spec='${wl}--export-all-symbols'
9825 export_dynamic_flag_spec='$wl--export-all-symbols'
95469826 allow_undefined_flag=unsupported
95479827 always_export_symbols=no
95489828 enable_shared_with_static_runtimes=yes
95509830 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
95519831
95529832 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
9553 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9554 # If the export-symbols file already is a .def file (1st line
9555 # is EXPORTS), use it as is; otherwise, prepend...
9556 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9557 cp $export_symbols $output_objdir/$soname.def;
9558 else
9559 echo EXPORTS > $output_objdir/$soname.def;
9560 cat $export_symbols >> $output_objdir/$soname.def;
9561 fi~
9562 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9833 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9834 # If the export-symbols file already is a .def file, use it as
9835 # is; otherwise, prepend EXPORTS...
9836 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
9837 cp $export_symbols $output_objdir/$soname.def;
9838 else
9839 echo EXPORTS > $output_objdir/$soname.def;
9840 cat $export_symbols >> $output_objdir/$soname.def;
9841 fi~
9842 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
95639843 else
95649844 ld_shlibs=no
95659845 fi
95669846 ;;
95679847
95689848 haiku*)
9569 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9849 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
95709850 link_all_deplibs=yes
9851 ;;
9852
9853 os2*)
9854 hardcode_libdir_flag_spec='-L$libdir'
9855 hardcode_minus_L=yes
9856 allow_undefined_flag=unsupported
9857 shrext_cmds=.dll
9858 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9859 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9860 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9861 $ECHO EXPORTS >> $output_objdir/$libname.def~
9862 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
9863 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9864 emximp -o $lib $output_objdir/$libname.def'
9865 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9866 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9867 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9868 $ECHO EXPORTS >> $output_objdir/$libname.def~
9869 prefix_cmds="$SED"~
9870 if test EXPORTS = "`$SED 1q $export_symbols`"; then
9871 prefix_cmds="$prefix_cmds -e 1d";
9872 fi~
9873 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
9874 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
9875 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9876 emximp -o $lib $output_objdir/$libname.def'
9877 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
9878 enable_shared_with_static_runtimes=yes
95719879 ;;
95729880
95739881 interix[3-9]*)
95749882 hardcode_direct=no
95759883 hardcode_shlibpath_var=no
9576 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9577 export_dynamic_flag_spec='${wl}-E'
9884 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
9885 export_dynamic_flag_spec='$wl-E'
95789886 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
95799887 # Instead, shared libraries are loaded at an image base (0x10000000 by
95809888 # default) and relocated if they conflict, which is a slow very memory
95819889 # consuming and fragmenting process. To avoid this, we pick a random,
95829890 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
95839891 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
9584 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9585 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9892 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9893 archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
95869894 ;;
95879895
95889896 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
95899897 tmp_diet=no
9590 if test "$host_os" = linux-dietlibc; then
9898 if test linux-dietlibc = "$host_os"; then
95919899 case $cc_basename in
95929900 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
95939901 esac
95949902 fi
95959903 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
9596 && test "$tmp_diet" = no
9904 && test no = "$tmp_diet"
95979905 then
95989906 tmp_addflag=' $pic_flag'
95999907 tmp_sharedflag='-shared'
96009908 case $cc_basename,$host_cpu in
96019909 pgcc*) # Portland Group C compiler
9602 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9910 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
96039911 tmp_addflag=' $pic_flag'
96049912 ;;
96059913 pgf77* | pgf90* | pgf95* | pgfortran*)
96069914 # Portland Group f77 and f90 compilers
9607 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9915 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
96089916 tmp_addflag=' $pic_flag -Mnomain' ;;
96099917 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
96109918 tmp_addflag=' -i_dynamic' ;;
96159923 lf95*) # Lahey Fortran 8.1
96169924 whole_archive_flag_spec=
96179925 tmp_sharedflag='--shared' ;;
9926 nagfor*) # NAGFOR 5.3
9927 tmp_sharedflag='-Wl,-shared' ;;
96189928 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
96199929 tmp_sharedflag='-qmkshrobj'
96209930 tmp_addflag= ;;
96219931 nvcc*) # Cuda Compiler Driver 2.2
9622 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9932 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
96239933 compiler_needs_object=yes
96249934 ;;
96259935 esac
96269936 case `$CC -V 2>&1 | sed 5q` in
96279937 *Sun\ C*) # Sun C 5.9
9628 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9938 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
96299939 compiler_needs_object=yes
96309940 tmp_sharedflag='-G' ;;
96319941 *Sun\ F*) # Sun Fortran 8.3
96329942 tmp_sharedflag='-G' ;;
96339943 esac
9634 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9635
9636 if test "x$supports_anon_versioning" = xyes; then
9944 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9945
9946 if test yes = "$supports_anon_versioning"; then
96379947 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9638 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9639 echo "local: *; };" >> $output_objdir/$libname.ver~
9640 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9948 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9949 echo "local: *; };" >> $output_objdir/$libname.ver~
9950 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
96419951 fi
96429952
96439953 case $cc_basename in
9954 tcc*)
9955 export_dynamic_flag_spec='-rdynamic'
9956 ;;
96449957 xlf* | bgf* | bgxlf* | mpixlf*)
96459958 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
96469959 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
9647 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9960 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
96489961 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
9649 if test "x$supports_anon_versioning" = xyes; then
9962 if test yes = "$supports_anon_versioning"; then
96509963 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9651 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9652 echo "local: *; };" >> $output_objdir/$libname.ver~
9653 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
9964 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9965 echo "local: *; };" >> $output_objdir/$libname.ver~
9966 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
96549967 fi
96559968 ;;
96569969 esac
96649977 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
96659978 wlarc=
96669979 else
9667 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9668 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9980 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9981 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
96699982 fi
96709983 ;;
96719984
96839996
96849997 _LT_EOF
96859998 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9686 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9687 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9999 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10000 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
968810001 else
968910002 ld_shlibs=no
969010003 fi
969610009 ld_shlibs=no
969710010 cat <<_LT_EOF 1>&2
969810011
9699 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
10012 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
970010013 *** reliably create shared libraries on SCO systems. Therefore, libtool
970110014 *** is disabling shared libraries support. We urge you to upgrade GNU
970210015 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
971110024 # DT_RUNPATH tag from executables and libraries. But doing so
971210025 # requires that you compile everything twice, which is a pain.
971310026 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9714 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9715 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9716 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10027 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10028 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10029 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
971710030 else
971810031 ld_shlibs=no
971910032 fi
973010043
973110044 *)
973210045 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9733 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9734 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10046 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10047 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
973510048 else
973610049 ld_shlibs=no
973710050 fi
973810051 ;;
973910052 esac
974010053
9741 if test "$ld_shlibs" = no; then
10054 if test no = "$ld_shlibs"; then
974210055 runpath_var=
974310056 hardcode_libdir_flag_spec=
974410057 export_dynamic_flag_spec=
975410067 # Note: this linker hardcodes the directories in LIBPATH if there
975510068 # are no directories specified by -L.
975610069 hardcode_minus_L=yes
9757 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
10070 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
975810071 # Neither direct hardcoding nor static linking is supported with a
975910072 # broken collect2.
976010073 hardcode_direct=unsupported
976210075 ;;
976310076
976410077 aix[4-9]*)
9765 if test "$host_cpu" = ia64; then
10078 if test ia64 = "$host_cpu"; then
976610079 # On IA64, the linker does run time linking by default, so we don't
976710080 # have to do anything special.
976810081 aix_use_runtimelinking=no
976910082 exp_sym_flag='-Bexport'
9770 no_entry_flag=""
10083 no_entry_flag=
977110084 else
977210085 # If we're using GNU nm, then we don't want the "-C" option.
9773 # -C means demangle to AIX nm, but means don't demangle with GNU nm
9774 # Also, AIX nm treats weak defined symbols like other global
9775 # defined symbols, whereas GNU nm marks them as "W".
10086 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
10087 # Without the "-l" option, or with the "-B" option, AIX nm treats
10088 # weak defined symbols like other global defined symbols, whereas
10089 # GNU nm marks them as "W".
10090 # While the 'weak' keyword is ignored in the Export File, we need
10091 # it in the Import File for the 'aix-soname' feature, so we have
10092 # to replace the "-B" option with "-P" for AIX nm.
977610093 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
9777 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
10094 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
977810095 else
9779 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
10096 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
978010097 fi
978110098 aix_use_runtimelinking=no
978210099
978310100 # Test if we are trying to use run time linking or normal
978410101 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9785 # need to do runtime linking.
10102 # have runtime linking enabled, and use it for executables.
10103 # For shared libraries, we enable/disable runtime linking
10104 # depending on the kind of the shared library created -
10105 # when "with_aix_soname,aix_use_runtimelinking" is:
10106 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
10107 # "aix,yes" lib.so shared, rtl:yes, for executables
10108 # lib.a static archive
10109 # "both,no" lib.so.V(shr.o) shared, rtl:yes
10110 # lib.a(lib.so.V) shared, rtl:no, for executables
10111 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
10112 # lib.a(lib.so.V) shared, rtl:no
10113 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
10114 # lib.a static archive
978610115 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
978710116 for ld_flag in $LDFLAGS; do
9788 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
10117 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
978910118 aix_use_runtimelinking=yes
979010119 break
979110120 fi
979210121 done
10122 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
10123 # With aix-soname=svr4, we create the lib.so.V shared archives only,
10124 # so we don't have lib.a shared libs to link our executables.
10125 # We have to force runtime linking in this case.
10126 aix_use_runtimelinking=yes
10127 LDFLAGS="$LDFLAGS -Wl,-brtl"
10128 fi
979310129 ;;
979410130 esac
979510131
980810144 hardcode_direct_absolute=yes
980910145 hardcode_libdir_separator=':'
981010146 link_all_deplibs=yes
9811 file_list_spec='${wl}-f,'
9812
9813 if test "$GCC" = yes; then
10147 file_list_spec='$wl-f,'
10148 case $with_aix_soname,$aix_use_runtimelinking in
10149 aix,*) ;; # traditional, no import file
10150 svr4,* | *,yes) # use import file
10151 # The Import File defines what to hardcode.
10152 hardcode_direct=no
10153 hardcode_direct_absolute=no
10154 ;;
10155 esac
10156
10157 if test yes = "$GCC"; then
981410158 case $host_os in aix4.[012]|aix4.[012].*)
981510159 # We only want to do this on AIX 4.2 and lower, the check
981610160 # below for broken collect2 doesn't work under 4.3+
9817 collect2name=`${CC} -print-prog-name=collect2`
10161 collect2name=`$CC -print-prog-name=collect2`
981810162 if test -f "$collect2name" &&
981910163 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
982010164 then
983310177 ;;
983410178 esac
983510179 shared_flag='-shared'
9836 if test "$aix_use_runtimelinking" = yes; then
9837 shared_flag="$shared_flag "'${wl}-G'
10180 if test yes = "$aix_use_runtimelinking"; then
10181 shared_flag="$shared_flag "'$wl-G'
983810182 fi
9839 link_all_deplibs=no
10183 # Need to ensure runtime linking is disabled for the traditional
10184 # shared library, or the linker may eventually find shared libraries
10185 # /with/ Import File - we do not want to mix them.
10186 shared_flag_aix='-shared'
10187 shared_flag_svr4='-shared $wl-G'
984010188 else
984110189 # not using gcc
9842 if test "$host_cpu" = ia64; then
10190 if test ia64 = "$host_cpu"; then
984310191 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
984410192 # chokes on -Wl,-G. The following line is correct:
984510193 shared_flag='-G'
984610194 else
9847 if test "$aix_use_runtimelinking" = yes; then
9848 shared_flag='${wl}-G'
10195 if test yes = "$aix_use_runtimelinking"; then
10196 shared_flag='$wl-G'
984910197 else
9850 shared_flag='${wl}-bM:SRE'
10198 shared_flag='$wl-bM:SRE'
985110199 fi
10200 shared_flag_aix='$wl-bM:SRE'
10201 shared_flag_svr4='$wl-G'
985210202 fi
985310203 fi
985410204
9855 export_dynamic_flag_spec='${wl}-bexpall'
10205 export_dynamic_flag_spec='$wl-bexpall'
985610206 # It seems that -bexpall does not export symbols beginning with
985710207 # underscore (_), so it is better to generate a list of symbols to export.
985810208 always_export_symbols=yes
9859 if test "$aix_use_runtimelinking" = yes; then
10209 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
986010210 # Warning - without using the other runtime loading flags (-brtl),
986110211 # -berok will link without error, but may produce a broken library.
986210212 allow_undefined_flag='-berok'
986310213 # Determine the default libpath from the value encoded in an
986410214 # empty executable.
9865 if test "${lt_cv_aix_libpath+set}" = set; then
10215 if test set = "${lt_cv_aix_libpath+set}"; then
986610216 aix_libpath=$lt_cv_aix_libpath
986710217 else
986810218 if ${lt_cv_aix_libpath_+:} false; then :
989710247 rm -f core conftest.err conftest.$ac_objext \
989810248 conftest$ac_exeext conftest.$ac_ext
989910249 if test -z "$lt_cv_aix_libpath_"; then
9900 lt_cv_aix_libpath_="/usr/lib:/lib"
10250 lt_cv_aix_libpath_=/usr/lib:/lib
990110251 fi
990210252
990310253 fi
990510255 aix_libpath=$lt_cv_aix_libpath_
990610256 fi
990710257
9908 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9909 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10258 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
10259 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
991010260 else
9911 if test "$host_cpu" = ia64; then
9912 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
10261 if test ia64 = "$host_cpu"; then
10262 hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
991310263 allow_undefined_flag="-z nodefs"
9914 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
10264 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
991510265 else
991610266 # Determine the default libpath from the value encoded in an
991710267 # empty executable.
9918 if test "${lt_cv_aix_libpath+set}" = set; then
10268 if test set = "${lt_cv_aix_libpath+set}"; then
991910269 aix_libpath=$lt_cv_aix_libpath
992010270 else
992110271 if ${lt_cv_aix_libpath_+:} false; then :
995010300 rm -f core conftest.err conftest.$ac_objext \
995110301 conftest$ac_exeext conftest.$ac_ext
995210302 if test -z "$lt_cv_aix_libpath_"; then
9953 lt_cv_aix_libpath_="/usr/lib:/lib"
10303 lt_cv_aix_libpath_=/usr/lib:/lib
995410304 fi
995510305
995610306 fi
995810308 aix_libpath=$lt_cv_aix_libpath_
995910309 fi
996010310
9961 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
10311 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
996210312 # Warning - without using the other run time loading flags,
996310313 # -berok will link without error, but may produce a broken library.
9964 no_undefined_flag=' ${wl}-bernotok'
9965 allow_undefined_flag=' ${wl}-berok'
9966 if test "$with_gnu_ld" = yes; then
10314 no_undefined_flag=' $wl-bernotok'
10315 allow_undefined_flag=' $wl-berok'
10316 if test yes = "$with_gnu_ld"; then
996710317 # We only use this code for GNU lds that support --whole-archive.
9968 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
10318 whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
996910319 else
997010320 # Exported symbols can be pulled into shared objects from archives
997110321 whole_archive_flag_spec='$convenience'
997210322 fi
997310323 archive_cmds_need_lc=yes
9974 # This is similar to how AIX traditionally builds its shared libraries.
9975 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10324 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
10325 # -brtl affects multiple linker settings, -berok does not and is overridden later
10326 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
10327 if test svr4 != "$with_aix_soname"; then
10328 # This is similar to how AIX traditionally builds its shared libraries.
10329 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
10330 fi
10331 if test aix != "$with_aix_soname"; then
10332 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
10333 else
10334 # used by -dlpreopen to get the symbols
10335 archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
10336 fi
10337 archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
997610338 fi
997710339 fi
997810340 ;;
998110343 case $host_cpu in
998210344 powerpc)
998310345 # see comment about AmigaOS4 .so support
9984 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10346 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
998510347 archive_expsym_cmds=''
998610348 ;;
998710349 m68k)
1001110373 # Tell ltmain to make .lib files, not .a files.
1001210374 libext=lib
1001310375 # Tell ltmain to make .dll files, not .so files.
10014 shrext_cmds=".dll"
10376 shrext_cmds=.dll
1001510377 # FIXME: Setting linknames here is a bad hack.
10016 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
10017 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10018 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
10019 else
10020 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
10021 fi~
10022 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
10023 linknames='
10378 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
10379 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
10380 cp "$export_symbols" "$output_objdir/$soname.def";
10381 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
10382 else
10383 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
10384 fi~
10385 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
10386 linknames='
1002410387 # The linker will not automatically build a static lib if we build a DLL.
1002510388 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
1002610389 enable_shared_with_static_runtimes=yes
1002910392 # Don't use ranlib
1003010393 old_postinstall_cmds='chmod 644 $oldlib'
1003110394 postlink_cmds='lt_outputfile="@OUTPUT@"~
10032 lt_tool_outputfile="@TOOL_OUTPUT@"~
10033 case $lt_outputfile in
10034 *.exe|*.EXE) ;;
10035 *)
10036 lt_outputfile="$lt_outputfile.exe"
10037 lt_tool_outputfile="$lt_tool_outputfile.exe"
10038 ;;
10039 esac~
10040 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
10041 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
10042 $RM "$lt_outputfile.manifest";
10043 fi'
10395 lt_tool_outputfile="@TOOL_OUTPUT@"~
10396 case $lt_outputfile in
10397 *.exe|*.EXE) ;;
10398 *)
10399 lt_outputfile=$lt_outputfile.exe
10400 lt_tool_outputfile=$lt_tool_outputfile.exe
10401 ;;
10402 esac~
10403 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
10404 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
10405 $RM "$lt_outputfile.manifest";
10406 fi'
1004410407 ;;
1004510408 *)
1004610409 # Assume MSVC wrapper
1004910412 # Tell ltmain to make .lib files, not .a files.
1005010413 libext=lib
1005110414 # Tell ltmain to make .dll files, not .so files.
10052 shrext_cmds=".dll"
10415 shrext_cmds=.dll
1005310416 # FIXME: Setting linknames here is a bad hack.
1005410417 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
1005510418 # The linker will automatically build a .lib file if we build a DLL.
1006810431 hardcode_direct=no
1006910432 hardcode_automatic=yes
1007010433 hardcode_shlibpath_var=unsupported
10071 if test "$lt_cv_ld_force_load" = "yes"; then
10072 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
10434 if test yes = "$lt_cv_ld_force_load"; then
10435 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1007310436
1007410437 else
1007510438 whole_archive_flag_spec=''
1007610439 fi
1007710440 link_all_deplibs=yes
10078 allow_undefined_flag="$_lt_dar_allow_undefined"
10441 allow_undefined_flag=$_lt_dar_allow_undefined
1007910442 case $cc_basename in
10080 ifort*) _lt_dar_can_shared=yes ;;
10443 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1008110444 *) _lt_dar_can_shared=$GCC ;;
1008210445 esac
10083 if test "$_lt_dar_can_shared" = "yes"; then
10446 if test yes = "$_lt_dar_can_shared"; then
1008410447 output_verbose_link_cmd=func_echo_all
10085 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
10086 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
10087 archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
10088 module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
10448 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
10449 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
10450 archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
10451 module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
1008910452
1009010453 else
1009110454 ld_shlibs=no
1012710490 ;;
1012810491
1012910492 hpux9*)
10130 if test "$GCC" = yes; then
10131 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10493 if test yes = "$GCC"; then
10494 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
1013210495 else
10133 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'
10496 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
1013410497 fi
10135 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10498 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
1013610499 hardcode_libdir_separator=:
1013710500 hardcode_direct=yes
1013810501
1013910502 # hardcode_minus_L: Not really in the search PATH,
1014010503 # but as the default location of the library.
1014110504 hardcode_minus_L=yes
10142 export_dynamic_flag_spec='${wl}-E'
10505 export_dynamic_flag_spec='$wl-E'
1014310506 ;;
1014410507
1014510508 hpux10*)
10146 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
10147 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10509 if test yes,no = "$GCC,$with_gnu_ld"; then
10510 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1014810511 else
1014910512 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
1015010513 fi
10151 if test "$with_gnu_ld" = no; then
10152 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10514 if test no = "$with_gnu_ld"; then
10515 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
1015310516 hardcode_libdir_separator=:
1015410517 hardcode_direct=yes
1015510518 hardcode_direct_absolute=yes
10156 export_dynamic_flag_spec='${wl}-E'
10519 export_dynamic_flag_spec='$wl-E'
1015710520 # hardcode_minus_L: Not really in the search PATH,
1015810521 # but as the default location of the library.
1015910522 hardcode_minus_L=yes
1016110524 ;;
1016210525
1016310526 hpux11*)
10164 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
10527 if test yes,no = "$GCC,$with_gnu_ld"; then
1016510528 case $host_cpu in
1016610529 hppa*64*)
10167 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10530 archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
1016810531 ;;
1016910532 ia64*)
10170 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10533 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
1017110534 ;;
1017210535 *)
10173 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10536 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1017410537 ;;
1017510538 esac
1017610539 else
1017710540 case $host_cpu in
1017810541 hppa*64*)
10179 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10542 archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
1018010543 ;;
1018110544 ia64*)
10182 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10545 archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
1018310546 ;;
1018410547 *)
1018510548
1019110554 $as_echo_n "(cached) " >&6
1019210555 else
1019310556 lt_cv_prog_compiler__b=no
10194 save_LDFLAGS="$LDFLAGS"
10557 save_LDFLAGS=$LDFLAGS
1019510558 LDFLAGS="$LDFLAGS -b"
1019610559 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1019710560 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1021010573 fi
1021110574 fi
1021210575 $RM -r conftest*
10213 LDFLAGS="$save_LDFLAGS"
10576 LDFLAGS=$save_LDFLAGS
1021410577
1021510578 fi
1021610579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
1021710580 $as_echo "$lt_cv_prog_compiler__b" >&6; }
1021810581
10219 if test x"$lt_cv_prog_compiler__b" = xyes; then
10220 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10582 if test yes = "$lt_cv_prog_compiler__b"; then
10583 archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1022110584 else
1022210585 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
1022310586 fi
1022510588 ;;
1022610589 esac
1022710590 fi
10228 if test "$with_gnu_ld" = no; then
10229 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10591 if test no = "$with_gnu_ld"; then
10592 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
1023010593 hardcode_libdir_separator=:
1023110594
1023210595 case $host_cpu in
1023710600 *)
1023810601 hardcode_direct=yes
1023910602 hardcode_direct_absolute=yes
10240 export_dynamic_flag_spec='${wl}-E'
10603 export_dynamic_flag_spec='$wl-E'
1024110604
1024210605 # hardcode_minus_L: Not really in the search PATH,
1024310606 # but as the default location of the library.
1024810611 ;;
1024910612
1025010613 irix5* | irix6* | nonstopux*)
10251 if test "$GCC" = yes; then
10252 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10614 if test yes = "$GCC"; then
10615 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
1025310616 # Try to use the -exported_symbol ld option, if it does not
1025410617 # work, assume that -exports_file does not work either and
1025510618 # implicitly export all symbols.
1025910622 if ${lt_cv_irix_exported_symbol+:} false; then :
1026010623 $as_echo_n "(cached) " >&6
1026110624 else
10262 save_LDFLAGS="$LDFLAGS"
10263 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
10625 save_LDFLAGS=$LDFLAGS
10626 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
1026410627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1026510628 /* end confdefs.h. */
1026610629 int foo (void) { return 0; }
1027210635 fi
1027310636 rm -f core conftest.err conftest.$ac_objext \
1027410637 conftest$ac_exeext conftest.$ac_ext
10275 LDFLAGS="$save_LDFLAGS"
10638 LDFLAGS=$save_LDFLAGS
1027610639 fi
1027710640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
1027810641 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
10279 if test "$lt_cv_irix_exported_symbol" = yes; then
10280 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
10642 if test yes = "$lt_cv_irix_exported_symbol"; then
10643 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
1028110644 fi
10645 link_all_deplibs=no
1028210646 else
10283 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
10284 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
10647 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
10648 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
1028510649 fi
1028610650 archive_cmds_need_lc='no'
10287 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10651 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1028810652 hardcode_libdir_separator=:
1028910653 inherit_rpath=yes
1029010654 link_all_deplibs=yes
10655 ;;
10656
10657 linux*)
10658 case $cc_basename in
10659 tcc*)
10660 # Fabrice Bellard et al's Tiny C Compiler
10661 ld_shlibs=yes
10662 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10663 ;;
10664 esac
1029110665 ;;
1029210666
1029310667 netbsd* | netbsdelf*-gnu)
1030410678 newsos6)
1030510679 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1030610680 hardcode_direct=yes
10307 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10681 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1030810682 hardcode_libdir_separator=:
1030910683 hardcode_shlibpath_var=no
1031010684 ;;
1031210686 *nto* | *qnx*)
1031310687 ;;
1031410688
10315 openbsd*)
10689 openbsd* | bitrig*)
1031610690 if test -f /usr/libexec/ld.so; then
1031710691 hardcode_direct=yes
1031810692 hardcode_shlibpath_var=no
1031910693 hardcode_direct_absolute=yes
10320 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10694 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
1032110695 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10322 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
10323 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
10324 export_dynamic_flag_spec='${wl}-E'
10696 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
10697 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
10698 export_dynamic_flag_spec='$wl-E'
1032510699 else
10326 case $host_os in
10327 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
10328 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10329 hardcode_libdir_flag_spec='-R$libdir'
10330 ;;
10331 *)
10332 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10333 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
10334 ;;
10335 esac
10700 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10701 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
1033610702 fi
1033710703 else
1033810704 ld_shlibs=no
1034310709 hardcode_libdir_flag_spec='-L$libdir'
1034410710 hardcode_minus_L=yes
1034510711 allow_undefined_flag=unsupported
10346 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'
10347 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10712 shrext_cmds=.dll
10713 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10714 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10715 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10716 $ECHO EXPORTS >> $output_objdir/$libname.def~
10717 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
10718 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10719 emximp -o $lib $output_objdir/$libname.def'
10720 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10721 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10722 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10723 $ECHO EXPORTS >> $output_objdir/$libname.def~
10724 prefix_cmds="$SED"~
10725 if test EXPORTS = "`$SED 1q $export_symbols`"; then
10726 prefix_cmds="$prefix_cmds -e 1d";
10727 fi~
10728 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
10729 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
10730 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10731 emximp -o $lib $output_objdir/$libname.def'
10732 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
10733 enable_shared_with_static_runtimes=yes
1034810734 ;;
1034910735
1035010736 osf3*)
10351 if test "$GCC" = yes; then
10352 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
10353 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10737 if test yes = "$GCC"; then
10738 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
10739 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
1035410740 else
1035510741 allow_undefined_flag=' -expect_unresolved \*'
10356 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
10742 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
1035710743 fi
1035810744 archive_cmds_need_lc='no'
10359 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10745 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1036010746 hardcode_libdir_separator=:
1036110747 ;;
1036210748
1036310749 osf4* | osf5*) # as osf3* with the addition of -msym flag
10364 if test "$GCC" = yes; then
10365 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
10366 archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10367 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10750 if test yes = "$GCC"; then
10751 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
10752 archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
10753 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1036810754 else
1036910755 allow_undefined_flag=' -expect_unresolved \*'
10370 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
10756 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
1037110757 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
10372 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
10758 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
1037310759
1037410760 # Both c and cxx compiler support -rpath directly
1037510761 hardcode_libdir_flag_spec='-rpath $libdir'
1038010766
1038110767 solaris*)
1038210768 no_undefined_flag=' -z defs'
10383 if test "$GCC" = yes; then
10384 wlarc='${wl}'
10385 archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10769 if test yes = "$GCC"; then
10770 wlarc='$wl'
10771 archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
1038610772 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10387 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
10773 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
1038810774 else
1038910775 case `$CC -V 2>&1` in
1039010776 *"Compilers 5.0"*)
1039110777 wlarc=''
10392 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10778 archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
1039310779 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10394 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
10780 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
1039510781 ;;
1039610782 *)
10397 wlarc='${wl}'
10398 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
10783 wlarc='$wl'
10784 archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
1039910785 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10400 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
10786 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
1040110787 ;;
1040210788 esac
1040310789 fi
1040710793 solaris2.[0-5] | solaris2.[0-5].*) ;;
1040810794 *)
1040910795 # The compiler driver will combine and reorder linker options,
10410 # but understands `-z linker_flag'. GCC discards it without `$wl',
10796 # but understands '-z linker_flag'. GCC discards it without '$wl',
1041110797 # but is careful enough not to reorder.
1041210798 # Supported since Solaris 2.6 (maybe 2.5.1?)
10413 if test "$GCC" = yes; then
10414 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
10799 if test yes = "$GCC"; then
10800 whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
1041510801 else
1041610802 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
1041710803 fi
1042110807 ;;
1042210808
1042310809 sunos4*)
10424 if test "x$host_vendor" = xsequent; then
10810 if test sequent = "$host_vendor"; then
1042510811 # Use $CC to link under sequent, because it throws in some extra .o
1042610812 # files that make .init and .fini sections work.
10427 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10813 archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
1042810814 else
1042910815 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1043010816 fi
1047310859 ;;
1047410860
1047510861 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
10476 no_undefined_flag='${wl}-z,text'
10862 no_undefined_flag='$wl-z,text'
1047710863 archive_cmds_need_lc=no
1047810864 hardcode_shlibpath_var=no
1047910865 runpath_var='LD_RUN_PATH'
1048010866
10481 if test "$GCC" = yes; then
10482 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10483 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10867 if test yes = "$GCC"; then
10868 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10869 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1048410870 else
10485 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10486 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10871 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10872 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1048710873 fi
1048810874 ;;
1048910875
1049010876 sysv5* | sco3.2v5* | sco5v6*)
10491 # Note: We can NOT use -z defs as we might desire, because we do not
10877 # Note: We CANNOT use -z defs as we might desire, because we do not
1049210878 # link with -lc, and that would cause any symbols used from libc to
1049310879 # always be unresolved, which means just about no library would
1049410880 # ever link correctly. If we're not using GNU ld we use -z text
1049510881 # though, which does catch some bad symbols but isn't as heavy-handed
1049610882 # as -z defs.
10497 no_undefined_flag='${wl}-z,text'
10498 allow_undefined_flag='${wl}-z,nodefs'
10883 no_undefined_flag='$wl-z,text'
10884 allow_undefined_flag='$wl-z,nodefs'
1049910885 archive_cmds_need_lc=no
1050010886 hardcode_shlibpath_var=no
10501 hardcode_libdir_flag_spec='${wl}-R,$libdir'
10887 hardcode_libdir_flag_spec='$wl-R,$libdir'
1050210888 hardcode_libdir_separator=':'
1050310889 link_all_deplibs=yes
10504 export_dynamic_flag_spec='${wl}-Bexport'
10890 export_dynamic_flag_spec='$wl-Bexport'
1050510891 runpath_var='LD_RUN_PATH'
1050610892
10507 if test "$GCC" = yes; then
10508 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10509 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10893 if test yes = "$GCC"; then
10894 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10895 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1051010896 else
10511 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10512 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10897 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10898 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1051310899 fi
1051410900 ;;
1051510901
1052410910 ;;
1052510911 esac
1052610912
10527 if test x$host_vendor = xsni; then
10913 if test sni = "$host_vendor"; then
1052810914 case $host in
1052910915 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10530 export_dynamic_flag_spec='${wl}-Blargedynsym'
10916 export_dynamic_flag_spec='$wl-Blargedynsym'
1053110917 ;;
1053210918 esac
1053310919 fi
1053510921
1053610922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
1053710923 $as_echo "$ld_shlibs" >&6; }
10538 test "$ld_shlibs" = no && can_build_shared=no
10924 test no = "$ld_shlibs" && can_build_shared=no
1053910925
1054010926 with_gnu_ld=$with_gnu_ld
1054110927
1056110947 # Assume -lc should be added
1056210948 archive_cmds_need_lc=yes
1056310949
10564 if test "$enable_shared" = yes && test "$GCC" = yes; then
10950 if test yes,yes = "$GCC,$enable_shared"; then
1056510951 case $archive_cmds in
1056610952 *'~'*)
1056710953 # FIXME: we may have to deal with multi-command sequences.
1077611162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
1077711163 $as_echo_n "checking dynamic linker characteristics... " >&6; }
1077811164
10779 if test "$GCC" = yes; then
11165 if test yes = "$GCC"; then
1078011166 case $host_os in
10781 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
10782 *) lt_awk_arg="/^libraries:/" ;;
11167 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
11168 *) lt_awk_arg='/^libraries:/' ;;
1078311169 esac
1078411170 case $host_os in
10785 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
10786 *) lt_sed_strip_eq="s,=/,/,g" ;;
11171 mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
11172 *) lt_sed_strip_eq='s|=/|/|g' ;;
1078711173 esac
1078811174 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
1078911175 case $lt_search_path_spec in
1079911185 ;;
1080011186 esac
1080111187 # Ok, now we have the path, separated by spaces, we can step through it
10802 # and add multilib dir if necessary.
11188 # and add multilib dir if necessary...
1080311189 lt_tmp_lt_search_path_spec=
10804 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
11190 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
11191 # ...but if some path component already ends with the multilib dir we assume
11192 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
11193 case "$lt_multi_os_dir; $lt_search_path_spec " in
11194 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
11195 lt_multi_os_dir=
11196 ;;
11197 esac
1080511198 for lt_sys_path in $lt_search_path_spec; do
10806 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
10807 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
10808 else
11199 if test -d "$lt_sys_path$lt_multi_os_dir"; then
11200 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
11201 elif test -n "$lt_multi_os_dir"; then
1080911202 test -d "$lt_sys_path" && \
1081011203 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1081111204 fi
1081211205 done
1081311206 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
10814 BEGIN {RS=" "; FS="/|\n";} {
10815 lt_foo="";
10816 lt_count=0;
11207 BEGIN {RS = " "; FS = "/|\n";} {
11208 lt_foo = "";
11209 lt_count = 0;
1081711210 for (lt_i = NF; lt_i > 0; lt_i--) {
1081811211 if ($lt_i != "" && $lt_i != ".") {
1081911212 if ($lt_i == "..") {
1082011213 lt_count++;
1082111214 } else {
1082211215 if (lt_count == 0) {
10823 lt_foo="/" $lt_i lt_foo;
11216 lt_foo = "/" $lt_i lt_foo;
1082411217 } else {
1082511218 lt_count--;
1082611219 }
1083411227 # for these hosts.
1083511228 case $host_os in
1083611229 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
10837 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
11230 $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
1083811231 esac
1083911232 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
1084011233 else
1084311236 library_names_spec=
1084411237 libname_spec='lib$name'
1084511238 soname_spec=
10846 shrext_cmds=".so"
11239 shrext_cmds=.so
1084711240 postinstall_cmds=
1084811241 postuninstall_cmds=
1084911242 finish_cmds=
1086011253 # flags to be left without arguments
1086111254 need_version=unknown
1086211255
11256
11257
1086311258 case $host_os in
1086411259 aix3*)
1086511260 version_type=linux # correct to gnu/linux during the next big refactor
10866 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
11261 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
1086711262 shlibpath_var=LIBPATH
1086811263
1086911264 # AIX 3 has no versioning support, so we append a major version to the name.
10870 soname_spec='${libname}${release}${shared_ext}$major'
11265 soname_spec='$libname$release$shared_ext$major'
1087111266 ;;
1087211267
1087311268 aix[4-9]*)
1087511270 need_lib_prefix=no
1087611271 need_version=no
1087711272 hardcode_into_libs=yes
10878 if test "$host_cpu" = ia64; then
11273 if test ia64 = "$host_cpu"; then
1087911274 # AIX 5 supports IA64
10880 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
11275 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
1088111276 shlibpath_var=LD_LIBRARY_PATH
1088211277 else
1088311278 # With GCC up to 2.95.x, collect2 would create an import file
1088411279 # for dependence libraries. The import file would start with
10885 # the line `#! .'. This would cause the generated library to
10886 # depend on `.', always an invalid library. This was fixed in
11280 # the line '#! .'. This would cause the generated library to
11281 # depend on '.', always an invalid library. This was fixed in
1088711282 # development snapshots of GCC prior to 3.0.
1088811283 case $host_os in
1088911284 aix4 | aix4.[01] | aix4.[01].*)
1089011285 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1089111286 echo ' yes '
10892 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
11287 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
1089311288 :
1089411289 else
1089511290 can_build_shared=no
1089611291 fi
1089711292 ;;
1089811293 esac
10899 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
11294 # Using Import Files as archive members, it is possible to support
11295 # filename-based versioning of shared library archives on AIX. While
11296 # this would work for both with and without runtime linking, it will
11297 # prevent static linking of such archives. So we do filename-based
11298 # shared library versioning with .so extension only, which is used
11299 # when both runtime linking and shared linking is enabled.
11300 # Unfortunately, runtime linking may impact performance, so we do
11301 # not want this to be the default eventually. Also, we use the
11302 # versioned .so libs for executables only if there is the -brtl
11303 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
11304 # To allow for filename-based versioning support, we need to create
11305 # libNAME.so.V as an archive file, containing:
11306 # *) an Import File, referring to the versioned filename of the
11307 # archive as well as the shared archive member, telling the
11308 # bitwidth (32 or 64) of that shared object, and providing the
11309 # list of exported symbols of that shared object, eventually
11310 # decorated with the 'weak' keyword
11311 # *) the shared object with the F_LOADONLY flag set, to really avoid
11312 # it being seen by the linker.
11313 # At run time we better use the real file rather than another symlink,
11314 # but for link time we create the symlink libNAME.so -> libNAME.so.V
11315
11316 case $with_aix_soname,$aix_use_runtimelinking in
11317 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
1090011318 # soname into executable. Probably we can add versioning support to
1090111319 # collect2, so additional links can be useful in future.
10902 if test "$aix_use_runtimelinking" = yes; then
11320 aix,yes) # traditional libtool
11321 dynamic_linker='AIX unversionable lib.so'
1090311322 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1090411323 # instead of lib<name>.a to let people know that these are not
1090511324 # typical AIX shared libraries.
10906 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10907 else
11325 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11326 ;;
11327 aix,no) # traditional AIX only
11328 dynamic_linker='AIX lib.a(lib.so.V)'
1090811329 # We preserve .a as extension for shared libraries through AIX4.2
1090911330 # and later when we are not doing run time linking.
10910 library_names_spec='${libname}${release}.a $libname.a'
10911 soname_spec='${libname}${release}${shared_ext}$major'
10912 fi
11331 library_names_spec='$libname$release.a $libname.a'
11332 soname_spec='$libname$release$shared_ext$major'
11333 ;;
11334 svr4,*) # full svr4 only
11335 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
11336 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
11337 # We do not specify a path in Import Files, so LIBPATH fires.
11338 shlibpath_overrides_runpath=yes
11339 ;;
11340 *,yes) # both, prefer svr4
11341 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
11342 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
11343 # unpreferred sharedlib libNAME.a needs extra handling
11344 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
11345 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
11346 # We do not specify a path in Import Files, so LIBPATH fires.
11347 shlibpath_overrides_runpath=yes
11348 ;;
11349 *,no) # both, prefer aix
11350 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
11351 library_names_spec='$libname$release.a $libname.a'
11352 soname_spec='$libname$release$shared_ext$major'
11353 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
11354 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
11355 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
11356 ;;
11357 esac
1091311358 shlibpath_var=LIBPATH
1091411359 fi
1091511360 ;;
1091911364 powerpc)
1092011365 # Since July 2007 AmigaOS4 officially supports .so libraries.
1092111366 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
10922 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11367 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1092311368 ;;
1092411369 m68k)
1092511370 library_names_spec='$libname.ixlibrary $libname.a'
1092611371 # Create ${libname}_ixlibrary.a entries in /sys/libs.
10927 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
11372 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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'
1092811373 ;;
1092911374 esac
1093011375 ;;
1093111376
1093211377 beos*)
10933 library_names_spec='${libname}${shared_ext}'
11378 library_names_spec='$libname$shared_ext'
1093411379 dynamic_linker="$host_os ld.so"
1093511380 shlibpath_var=LIBRARY_PATH
1093611381 ;;
1093811383 bsdi[45]*)
1093911384 version_type=linux # correct to gnu/linux during the next big refactor
1094011385 need_version=no
10941 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10942 soname_spec='${libname}${release}${shared_ext}$major'
11386 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11387 soname_spec='$libname$release$shared_ext$major'
1094311388 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1094411389 shlibpath_var=LD_LIBRARY_PATH
1094511390 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1095111396
1095211397 cygwin* | mingw* | pw32* | cegcc*)
1095311398 version_type=windows
10954 shrext_cmds=".dll"
11399 shrext_cmds=.dll
1095511400 need_version=no
1095611401 need_lib_prefix=no
1095711402
1096011405 # gcc
1096111406 library_names_spec='$libname.dll.a'
1096211407 # DLL is installed to $(libdir)/../bin by postinstall_cmds
10963 postinstall_cmds='base_file=`basename \${file}`~
10964 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
11408 postinstall_cmds='base_file=`basename \$file`~
11409 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
1096511410 dldir=$destdir/`dirname \$dlpath`~
1096611411 test -d \$dldir || mkdir -p \$dldir~
1096711412 $install_prog $dir/$dlname \$dldir/$dlname~
1097711422 case $host_os in
1097811423 cygwin*)
1097911424 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
10980 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11425 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1098111426
1098211427 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
1098311428 ;;
1098411429 mingw* | cegcc*)
1098511430 # MinGW DLLs use traditional 'lib' prefix
10986 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11431 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1098711432 ;;
1098811433 pw32*)
1098911434 # pw32 DLLs use 'pw' prefix rather than 'lib'
10990 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11435 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1099111436 ;;
1099211437 esac
1099311438 dynamic_linker='Win32 ld.exe'
1099611441 *,cl*)
1099711442 # Native MSVC
1099811443 libname_spec='$name'
10999 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11000 library_names_spec='${libname}.dll.lib'
11444 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
11445 library_names_spec='$libname.dll.lib'
1100111446
1100211447 case $build_os in
1100311448 mingw*)
1102411469 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1102511470 ;;
1102611471 *)
11027 sys_lib_search_path_spec="$LIB"
11472 sys_lib_search_path_spec=$LIB
1102811473 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
1102911474 # It is most probably a Windows format PATH.
1103011475 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1103711482 esac
1103811483
1103911484 # DLL is installed to $(libdir)/../bin by postinstall_cmds
11040 postinstall_cmds='base_file=`basename \${file}`~
11041 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
11485 postinstall_cmds='base_file=`basename \$file`~
11486 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
1104211487 dldir=$destdir/`dirname \$dlpath`~
1104311488 test -d \$dldir || mkdir -p \$dldir~
1104411489 $install_prog $dir/$dlname \$dldir/$dlname'
1105111496
1105211497 *)
1105311498 # Assume MSVC wrapper
11054 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
11499 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
1105511500 dynamic_linker='Win32 ld.exe'
1105611501 ;;
1105711502 esac
1106411509 version_type=darwin
1106511510 need_lib_prefix=no
1106611511 need_version=no
11067 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
11068 soname_spec='${libname}${release}${major}$shared_ext'
11512 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
11513 soname_spec='$libname$release$major$shared_ext'
1106911514 shlibpath_overrides_runpath=yes
1107011515 shlibpath_var=DYLD_LIBRARY_PATH
1107111516 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1107811523 version_type=linux # correct to gnu/linux during the next big refactor
1107911524 need_lib_prefix=no
1108011525 need_version=no
11081 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
11082 soname_spec='${libname}${release}${shared_ext}$major'
11526 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11527 soname_spec='$libname$release$shared_ext$major'
1108311528 shlibpath_var=LD_LIBRARY_PATH
1108411529 ;;
1108511530
1109711542 version_type=freebsd-$objformat
1109811543 case $version_type in
1109911544 freebsd-elf*)
11100 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
11545 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11546 soname_spec='$libname$release$shared_ext$major'
1110111547 need_version=no
1110211548 need_lib_prefix=no
1110311549 ;;
1110411550 freebsd-*)
11105 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
11551 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1110611552 need_version=yes
1110711553 ;;
1110811554 esac
1113211578 need_lib_prefix=no
1113311579 need_version=no
1113411580 dynamic_linker="$host_os runtime_loader"
11135 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
11136 soname_spec='${libname}${release}${shared_ext}$major'
11581 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11582 soname_spec='$libname$release$shared_ext$major'
1113711583 shlibpath_var=LIBRARY_PATH
11138 shlibpath_overrides_runpath=yes
11584 shlibpath_overrides_runpath=no
1113911585 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
1114011586 hardcode_into_libs=yes
1114111587 ;;
1115311599 dynamic_linker="$host_os dld.so"
1115411600 shlibpath_var=LD_LIBRARY_PATH
1115511601 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
11156 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11157 soname_spec='${libname}${release}${shared_ext}$major'
11158 if test "X$HPUX_IA64_MODE" = X32; then
11602 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11603 soname_spec='$libname$release$shared_ext$major'
11604 if test 32 = "$HPUX_IA64_MODE"; then
1115911605 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
11606 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
1116011607 else
1116111608 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
11609 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
1116211610 fi
11163 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1116411611 ;;
1116511612 hppa*64*)
1116611613 shrext_cmds='.sl'
1116811615 dynamic_linker="$host_os dld.sl"
1116911616 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1117011617 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
11171 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11172 soname_spec='${libname}${release}${shared_ext}$major'
11618 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11619 soname_spec='$libname$release$shared_ext$major'
1117311620 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1117411621 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1117511622 ;;
1117811625 dynamic_linker="$host_os dld.sl"
1117911626 shlibpath_var=SHLIB_PATH
1118011627 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
11181 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11182 soname_spec='${libname}${release}${shared_ext}$major'
11628 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11629 soname_spec='$libname$release$shared_ext$major'
1118311630 ;;
1118411631 esac
1118511632 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
1119211639 version_type=linux # correct to gnu/linux during the next big refactor
1119311640 need_lib_prefix=no
1119411641 need_version=no
11195 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11196 soname_spec='${libname}${release}${shared_ext}$major'
11642 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11643 soname_spec='$libname$release$shared_ext$major'
1119711644 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1119811645 shlibpath_var=LD_LIBRARY_PATH
1119911646 shlibpath_overrides_runpath=no
1120411651 case $host_os in
1120511652 nonstopux*) version_type=nonstopux ;;
1120611653 *)
11207 if test "$lt_cv_prog_gnu_ld" = yes; then
11654 if test yes = "$lt_cv_prog_gnu_ld"; then
1120811655 version_type=linux # correct to gnu/linux during the next big refactor
1120911656 else
1121011657 version_type=irix
1121211659 esac
1121311660 need_lib_prefix=no
1121411661 need_version=no
11215 soname_spec='${libname}${release}${shared_ext}$major'
11216 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
11662 soname_spec='$libname$release$shared_ext$major'
11663 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
1121711664 case $host_os in
1121811665 irix5* | nonstopux*)
1121911666 libsuff= shlibsuff=
1123211679 esac
1123311680 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1123411681 shlibpath_overrides_runpath=no
11235 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
11236 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
11682 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
11683 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
1123711684 hardcode_into_libs=yes
1123811685 ;;
1123911686
1124011687 # No shared lib support for Linux oldld, aout, or coff.
1124111688 linux*oldld* | linux*aout* | linux*coff*)
1124211689 dynamic_linker=no
11690 ;;
11691
11692 linux*android*)
11693 version_type=none # Android doesn't support versioned libraries.
11694 need_lib_prefix=no
11695 need_version=no
11696 library_names_spec='$libname$release$shared_ext'
11697 soname_spec='$libname$release$shared_ext'
11698 finish_cmds=
11699 shlibpath_var=LD_LIBRARY_PATH
11700 shlibpath_overrides_runpath=yes
11701
11702 # This implies no fast_install, which is unacceptable.
11703 # Some rework will be needed to allow for fast_install
11704 # before this can be enabled.
11705 hardcode_into_libs=yes
11706
11707 dynamic_linker='Android linker'
11708 # Don't embed -rpath directories since the linker doesn't support them.
11709 hardcode_libdir_flag_spec='-L$libdir'
1124311710 ;;
1124411711
1124511712 # This must be glibc/ELF.
1124711714 version_type=linux # correct to gnu/linux during the next big refactor
1124811715 need_lib_prefix=no
1124911716 need_version=no
11250 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11251 soname_spec='${libname}${release}${shared_ext}$major'
11717 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11718 soname_spec='$libname$release$shared_ext$major'
1125211719 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1125311720 shlibpath_var=LD_LIBRARY_PATH
1125411721 shlibpath_overrides_runpath=no
1129211759 # before this can be enabled.
1129311760 hardcode_into_libs=yes
1129411761
11295 # Append ld.so.conf contents to the search path
11762 # Ideally, we could use ldconfig to report *all* directores which are
11763 # searched for libraries, however this is still not possible. Aside from not
11764 # being certain /sbin/ldconfig is available, command
11765 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
11766 # even though it is searched at run-time. Try to do the best guess by
11767 # appending ld.so.conf contents (and includes) to the search path.
1129611768 if test -f /etc/ld.so.conf; then
1129711769 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
1129811770 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1132411796 need_lib_prefix=no
1132511797 need_version=no
1132611798 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11327 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11799 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1132811800 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1132911801 dynamic_linker='NetBSD (a.out) ld.so'
1133011802 else
11331 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11332 soname_spec='${libname}${release}${shared_ext}$major'
11803 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11804 soname_spec='$libname$release$shared_ext$major'
1133311805 dynamic_linker='NetBSD ld.elf_so'
1133411806 fi
1133511807 shlibpath_var=LD_LIBRARY_PATH
1133911811
1134011812 newsos6)
1134111813 version_type=linux # correct to gnu/linux during the next big refactor
11342 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11814 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1134311815 shlibpath_var=LD_LIBRARY_PATH
1134411816 shlibpath_overrides_runpath=yes
1134511817 ;;
1134811820 version_type=qnx
1134911821 need_lib_prefix=no
1135011822 need_version=no
11351 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11352 soname_spec='${libname}${release}${shared_ext}$major'
11823 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11824 soname_spec='$libname$release$shared_ext$major'
1135311825 shlibpath_var=LD_LIBRARY_PATH
1135411826 shlibpath_overrides_runpath=no
1135511827 hardcode_into_libs=yes
1135611828 dynamic_linker='ldqnx.so'
1135711829 ;;
1135811830
11359 openbsd*)
11831 openbsd* | bitrig*)
1136011832 version_type=sunos
11361 sys_lib_dlsearch_path_spec="/usr/lib"
11833 sys_lib_dlsearch_path_spec=/usr/lib
1136211834 need_lib_prefix=no
11363 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
11364 case $host_os in
11365 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
11366 *) need_version=no ;;
11367 esac
11368 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11835 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
11836 need_version=no
11837 else
11838 need_version=yes
11839 fi
11840 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1136911841 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1137011842 shlibpath_var=LD_LIBRARY_PATH
11371 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11372 case $host_os in
11373 openbsd2.[89] | openbsd2.[89].*)
11374 shlibpath_overrides_runpath=no
11375 ;;
11376 *)
11377 shlibpath_overrides_runpath=yes
11378 ;;
11379 esac
11380 else
11381 shlibpath_overrides_runpath=yes
11382 fi
11843 shlibpath_overrides_runpath=yes
1138311844 ;;
1138411845
1138511846 os2*)
1138611847 libname_spec='$name'
11387 shrext_cmds=".dll"
11848 version_type=windows
11849 shrext_cmds=.dll
11850 need_version=no
1138811851 need_lib_prefix=no
11389 library_names_spec='$libname${shared_ext} $libname.a'
11852 # OS/2 can only load a DLL with a base name of 8 characters or less.
11853 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
11854 v=$($ECHO $release$versuffix | tr -d .-);
11855 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
11856 $ECHO $n$v`$shared_ext'
11857 library_names_spec='${libname}_dll.$libext'
1139011858 dynamic_linker='OS/2 ld.exe'
11391 shlibpath_var=LIBPATH
11859 shlibpath_var=BEGINLIBPATH
11860 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
11861 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
11862 postinstall_cmds='base_file=`basename \$file`~
11863 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
11864 dldir=$destdir/`dirname \$dlpath`~
11865 test -d \$dldir || mkdir -p \$dldir~
11866 $install_prog $dir/$dlname \$dldir/$dlname~
11867 chmod a+x \$dldir/$dlname~
11868 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
11869 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
11870 fi'
11871 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
11872 dlpath=$dir/\$dldll~
11873 $RM \$dlpath'
1139211874 ;;
1139311875
1139411876 osf3* | osf4* | osf5*)
1139511877 version_type=osf
1139611878 need_lib_prefix=no
1139711879 need_version=no
11398 soname_spec='${libname}${release}${shared_ext}$major'
11399 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11880 soname_spec='$libname$release$shared_ext$major'
11881 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1140011882 shlibpath_var=LD_LIBRARY_PATH
1140111883 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
11402 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
11884 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1140311885 ;;
1140411886
1140511887 rdos*)
1141011892 version_type=linux # correct to gnu/linux during the next big refactor
1141111893 need_lib_prefix=no
1141211894 need_version=no
11413 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11414 soname_spec='${libname}${release}${shared_ext}$major'
11895 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11896 soname_spec='$libname$release$shared_ext$major'
1141511897 shlibpath_var=LD_LIBRARY_PATH
1141611898 shlibpath_overrides_runpath=yes
1141711899 hardcode_into_libs=yes
1142111903
1142211904 sunos4*)
1142311905 version_type=sunos
11424 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11906 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1142511907 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1142611908 shlibpath_var=LD_LIBRARY_PATH
1142711909 shlibpath_overrides_runpath=yes
11428 if test "$with_gnu_ld" = yes; then
11910 if test yes = "$with_gnu_ld"; then
1142911911 need_lib_prefix=no
1143011912 fi
1143111913 need_version=yes
1143311915
1143411916 sysv4 | sysv4.3*)
1143511917 version_type=linux # correct to gnu/linux during the next big refactor
11436 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11437 soname_spec='${libname}${release}${shared_ext}$major'
11918 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11919 soname_spec='$libname$release$shared_ext$major'
1143811920 shlibpath_var=LD_LIBRARY_PATH
1143911921 case $host_vendor in
1144011922 sni)
1145511937 ;;
1145611938
1145711939 sysv4*MP*)
11458 if test -d /usr/nec ;then
11940 if test -d /usr/nec; then
1145911941 version_type=linux # correct to gnu/linux during the next big refactor
11460 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
11461 soname_spec='$libname${shared_ext}.$major'
11942 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
11943 soname_spec='$libname$shared_ext.$major'
1146211944 shlibpath_var=LD_LIBRARY_PATH
1146311945 fi
1146411946 ;;
1146511947
1146611948 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
11467 version_type=freebsd-elf
11949 version_type=sco
1146811950 need_lib_prefix=no
1146911951 need_version=no
11470 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
11471 soname_spec='${libname}${release}${shared_ext}$major'
11952 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
11953 soname_spec='$libname$release$shared_ext$major'
1147211954 shlibpath_var=LD_LIBRARY_PATH
1147311955 shlibpath_overrides_runpath=yes
1147411956 hardcode_into_libs=yes
11475 if test "$with_gnu_ld" = yes; then
11957 if test yes = "$with_gnu_ld"; then
1147611958 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1147711959 else
1147811960 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1149011972 version_type=linux # correct to gnu/linux during the next big refactor
1149111973 need_lib_prefix=no
1149211974 need_version=no
11493 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11975 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1149411976 shlibpath_var=LD_LIBRARY_PATH
1149511977 shlibpath_overrides_runpath=no
1149611978 hardcode_into_libs=yes
1149811980
1149911981 uts4*)
1150011982 version_type=linux # correct to gnu/linux during the next big refactor
11501 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11502 soname_spec='${libname}${release}${shared_ext}$major'
11983 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11984 soname_spec='$libname$release$shared_ext$major'
1150311985 shlibpath_var=LD_LIBRARY_PATH
1150411986 ;;
1150511987
1150911991 esac
1151011992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
1151111993 $as_echo "$dynamic_linker" >&6; }
11512 test "$dynamic_linker" = no && can_build_shared=no
11994 test no = "$dynamic_linker" && can_build_shared=no
1151311995
1151411996 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11515 if test "$GCC" = yes; then
11997 if test yes = "$GCC"; then
1151611998 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1151711999 fi
1151812000
11519 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
11520 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
11521 fi
11522 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
11523 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
11524 fi
12001 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
12002 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
12003 fi
12004
12005 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
12006 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
12007 fi
12008
12009 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
12010 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
12011
12012 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
12013 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
12014
12015 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
12016 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
12017
12018
12019
12020
12021
1152512022
1152612023
1152712024
1161912116 hardcode_action=
1162012117 if test -n "$hardcode_libdir_flag_spec" ||
1162112118 test -n "$runpath_var" ||
11622 test "X$hardcode_automatic" = "Xyes" ; then
12119 test yes = "$hardcode_automatic"; then
1162312120
1162412121 # We can hardcode non-existent directories.
11625 if test "$hardcode_direct" != no &&
12122 if test no != "$hardcode_direct" &&
1162612123 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1162712124 # have to relink, otherwise we might link with an installed library
1162812125 # when we should be linking with a yet-to-be-installed one
11629 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
11630 test "$hardcode_minus_L" != no; then
12126 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
12127 test no != "$hardcode_minus_L"; then
1163112128 # Linking always hardcodes the temporary library directory.
1163212129 hardcode_action=relink
1163312130 else
1164212139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
1164312140 $as_echo "$hardcode_action" >&6; }
1164412141
11645 if test "$hardcode_action" = relink ||
11646 test "$inherit_rpath" = yes; then
12142 if test relink = "$hardcode_action" ||
12143 test yes = "$inherit_rpath"; then
1164712144 # Fast installation is not supported
1164812145 enable_fast_install=no
11649 elif test "$shlibpath_overrides_runpath" = yes ||
11650 test "$enable_shared" = no; then
12146 elif test yes = "$shlibpath_overrides_runpath" ||
12147 test no = "$enable_shared"; then
1165112148 # Fast installation is not necessary
1165212149 enable_fast_install=needless
1165312150 fi
1165712154
1165812155
1165912156
11660 if test "x$enable_dlopen" != xyes; then
12157 if test yes != "$enable_dlopen"; then
1166112158 enable_dlopen=unknown
1166212159 enable_dlopen_self=unknown
1166312160 enable_dlopen_self_static=unknown
1166712164
1166812165 case $host_os in
1166912166 beos*)
11670 lt_cv_dlopen="load_add_on"
12167 lt_cv_dlopen=load_add_on
1167112168 lt_cv_dlopen_libs=
1167212169 lt_cv_dlopen_self=yes
1167312170 ;;
1167412171
1167512172 mingw* | pw32* | cegcc*)
11676 lt_cv_dlopen="LoadLibrary"
12173 lt_cv_dlopen=LoadLibrary
1167712174 lt_cv_dlopen_libs=
1167812175 ;;
1167912176
1168012177 cygwin*)
11681 lt_cv_dlopen="dlopen"
12178 lt_cv_dlopen=dlopen
1168212179 lt_cv_dlopen_libs=
1168312180 ;;
1168412181
1168512182 darwin*)
11686 # if libdl is installed we need to link against it
12183 # if libdl is installed we need to link against it
1168712184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
1168812185 $as_echo_n "checking for dlopen in -ldl... " >&6; }
1168912186 if ${ac_cv_lib_dl_dlopen+:} false; then :
1172112218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
1172212219 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
1172312220 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11724 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
11725 else
11726
11727 lt_cv_dlopen="dyld"
12221 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
12222 else
12223
12224 lt_cv_dlopen=dyld
1172812225 lt_cv_dlopen_libs=
1172912226 lt_cv_dlopen_self=yes
1173012227
1173112228 fi
1173212229
12230 ;;
12231
12232 tpf*)
12233 # Don't try to run any link tests for TPF. We know it's impossible
12234 # because TPF is a cross-compiler, and we know how we open DSOs.
12235 lt_cv_dlopen=dlopen
12236 lt_cv_dlopen_libs=
12237 lt_cv_dlopen_self=no
1173312238 ;;
1173412239
1173512240 *)
1173612241 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
1173712242 if test "x$ac_cv_func_shl_load" = xyes; then :
11738 lt_cv_dlopen="shl_load"
12243 lt_cv_dlopen=shl_load
1173912244 else
1174012245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
1174112246 $as_echo_n "checking for shl_load in -ldld... " >&6; }
1177412279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
1177512280 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
1177612281 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
11777 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
12282 lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
1177812283 else
1177912284 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
1178012285 if test "x$ac_cv_func_dlopen" = xyes; then :
11781 lt_cv_dlopen="dlopen"
12286 lt_cv_dlopen=dlopen
1178212287 else
1178312288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
1178412289 $as_echo_n "checking for dlopen in -ldl... " >&6; }
1181712322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
1181812323 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
1181912324 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11820 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
12325 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
1182112326 else
1182212327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
1182312328 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
1185612361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
1185712362 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
1185812363 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
11859 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
12364 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
1186012365 else
1186112366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
1186212367 $as_echo_n "checking for dld_link in -ldld... " >&6; }
1189512400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
1189612401 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
1189712402 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
11898 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
12403 lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
1189912404 fi
1190012405
1190112406
1191612421 ;;
1191712422 esac
1191812423
11919 if test "x$lt_cv_dlopen" != xno; then
12424 if test no = "$lt_cv_dlopen"; then
12425 enable_dlopen=no
12426 else
1192012427 enable_dlopen=yes
11921 else
11922 enable_dlopen=no
1192312428 fi
1192412429
1192512430 case $lt_cv_dlopen in
1192612431 dlopen)
11927 save_CPPFLAGS="$CPPFLAGS"
11928 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
11929
11930 save_LDFLAGS="$LDFLAGS"
12432 save_CPPFLAGS=$CPPFLAGS
12433 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
12434
12435 save_LDFLAGS=$LDFLAGS
1193112436 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1193212437
11933 save_LIBS="$LIBS"
12438 save_LIBS=$LIBS
1193412439 LIBS="$lt_cv_dlopen_libs $LIBS"
1193512440
1193612441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
1193812443 if ${lt_cv_dlopen_self+:} false; then :
1193912444 $as_echo_n "(cached) " >&6
1194012445 else
11941 if test "$cross_compiling" = yes; then :
12446 if test yes = "$cross_compiling"; then :
1194212447 lt_cv_dlopen_self=cross
1194312448 else
1194412449 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1198512490 # endif
1198612491 #endif
1198712492
11988 /* When -fvisbility=hidden is used, assume the code has been annotated
12493 /* When -fvisibility=hidden is used, assume the code has been annotated
1198912494 correspondingly for the symbols needed. */
11990 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12495 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1199112496 int fnord () __attribute__((visibility("default")));
1199212497 #endif
1199312498
1201712522 (eval $ac_link) 2>&5
1201812523 ac_status=$?
1201912524 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12020 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
12525 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
1202112526 (./conftest; exit; ) >&5 2>/dev/null
1202212527 lt_status=$?
1202312528 case x$lt_status in
1203712542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
1203812543 $as_echo "$lt_cv_dlopen_self" >&6; }
1203912544
12040 if test "x$lt_cv_dlopen_self" = xyes; then
12545 if test yes = "$lt_cv_dlopen_self"; then
1204112546 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1204212547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
1204312548 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
1204412549 if ${lt_cv_dlopen_self_static+:} false; then :
1204512550 $as_echo_n "(cached) " >&6
1204612551 else
12047 if test "$cross_compiling" = yes; then :
12552 if test yes = "$cross_compiling"; then :
1204812553 lt_cv_dlopen_self_static=cross
1204912554 else
1205012555 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1209112596 # endif
1209212597 #endif
1209312598
12094 /* When -fvisbility=hidden is used, assume the code has been annotated
12599 /* When -fvisibility=hidden is used, assume the code has been annotated
1209512600 correspondingly for the symbols needed. */
12096 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12601 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1209712602 int fnord () __attribute__((visibility("default")));
1209812603 #endif
1209912604
1212312628 (eval $ac_link) 2>&5
1212412629 ac_status=$?
1212512630 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12126 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
12631 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
1212712632 (./conftest; exit; ) >&5 2>/dev/null
1212812633 lt_status=$?
1212912634 case x$lt_status in
1214412649 $as_echo "$lt_cv_dlopen_self_static" >&6; }
1214512650 fi
1214612651
12147 CPPFLAGS="$save_CPPFLAGS"
12148 LDFLAGS="$save_LDFLAGS"
12149 LIBS="$save_LIBS"
12652 CPPFLAGS=$save_CPPFLAGS
12653 LDFLAGS=$save_LDFLAGS
12654 LIBS=$save_LIBS
1215012655 ;;
1215112656 esac
1215212657
1219012695 # FIXME - insert some real tests, host_os isn't really good enough
1219112696 case $host_os in
1219212697 darwin*)
12193 if test -n "$STRIP" ; then
12698 if test -n "$STRIP"; then
1219412699 striplib="$STRIP -x"
1219512700 old_striplib="$STRIP -S"
1219612701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1221812723
1221912724
1222012725
12221 # Report which library types will actually be built
12726 # Report what library types will actually be built
1222212727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
1222312728 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
1222412729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
1222612731
1222712732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
1222812733 $as_echo_n "checking whether to build shared libraries... " >&6; }
12229 test "$can_build_shared" = "no" && enable_shared=no
12734 test no = "$can_build_shared" && enable_shared=no
1223012735
1223112736 # On AIX, shared libraries and static libraries use the same namespace, and
1223212737 # are all built from PIC.
1223312738 case $host_os in
1223412739 aix3*)
12235 test "$enable_shared" = yes && enable_static=no
12740 test yes = "$enable_shared" && enable_static=no
1223612741 if test -n "$RANLIB"; then
1223712742 archive_cmds="$archive_cmds~\$RANLIB \$lib"
1223812743 postinstall_cmds='$RANLIB $lib'
1224012745 ;;
1224112746
1224212747 aix[4-9]*)
12243 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
12244 test "$enable_shared" = yes && enable_static=no
12748 if test ia64 != "$host_cpu"; then
12749 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
12750 yes,aix,yes) ;; # shared object as lib.so file only
12751 yes,svr4,*) ;; # shared object as lib.so archive member only
12752 yes,*) enable_static=no ;; # shared object in lib.a archive as well
12753 esac
1224512754 fi
1224612755 ;;
1224712756 esac
1225112760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
1225212761 $as_echo_n "checking whether to build static libraries... " >&6; }
1225312762 # Make sure either enable_shared or enable_static is yes.
12254 test "$enable_shared" = yes || enable_static=yes
12763 test yes = "$enable_shared" || enable_static=yes
1225512764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
1225612765 $as_echo "$enable_static" >&6; }
1225712766
1226512774 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1226612775 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1226712776
12268 CC="$lt_save_CC"
12269
12270 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
12271 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
12272 (test "X$CXX" != "Xg++"))) ; then
12777 CC=$lt_save_CC
12778
12779 if test -n "$CXX" && ( test no != "$CXX" &&
12780 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
12781 (test g++ != "$CXX"))); then
1227312782 ac_ext=cpp
1227412783 ac_cpp='$CXXCPP $CPPFLAGS'
1227512784 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1244812957 # the CXX compiler isn't working. Some variables (like enable_shared)
1244912958 # are currently assumed to apply to all compilers on this platform,
1245012959 # and will be corrupted by setting them based on a non-working compiler.
12451 if test "$_lt_caught_CXX_error" != yes; then
12960 if test yes != "$_lt_caught_CXX_error"; then
1245212961 # Code to be used in simple compile tests
1245312962 lt_simple_compile_test_code="int some_variable = 0;"
1245412963
1250913018 CFLAGS=$CXXFLAGS
1251013019 compiler=$CC
1251113020 compiler_CXX=$CC
12512 for cc_temp in $compiler""; do
12513 case $cc_temp in
12514 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
12515 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
12516 \-*) ;;
12517 *) break;;
12518 esac
12519 done
12520 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
13021 func_cc_basename $compiler
13022 cc_basename=$func_cc_basename_result
1252113023
1252213024
1252313025 if test -n "$compiler"; then
1252413026 # We don't want -fno-exception when compiling C++ code, so set the
1252513027 # no_builtin_flag separately
12526 if test "$GXX" = yes; then
13028 if test yes = "$GXX"; then
1252713029 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
1252813030 else
1252913031 lt_prog_compiler_no_builtin_flag_CXX=
1253013032 fi
1253113033
12532 if test "$GXX" = yes; then
13034 if test yes = "$GXX"; then
1253313035 # Set up default GNU C++ configuration
1253413036
1253513037
1253613038
1253713039 # Check whether --with-gnu-ld was given.
1253813040 if test "${with_gnu_ld+set}" = set; then :
12539 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
13041 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
1254013042 else
1254113043 with_gnu_ld=no
1254213044 fi
1254313045
1254413046 ac_prog=ld
12545 if test "$GCC" = yes; then
13047 if test yes = "$GCC"; then
1254613048 # Check if gcc -print-prog-name=ld gives a path.
1254713049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
1254813050 $as_echo_n "checking for ld used by $CC... " >&6; }
1254913051 case $host in
1255013052 *-*-mingw*)
12551 # gcc leaves a trailing carriage return which upsets mingw
13053 # gcc leaves a trailing carriage return, which upsets mingw
1255213054 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1255313055 *)
1255413056 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1256213064 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
1256313065 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
1256413066 done
12565 test -z "$LD" && LD="$ac_prog"
13067 test -z "$LD" && LD=$ac_prog
1256613068 ;;
1256713069 "")
1256813070 # If it fails, then pretend we aren't using GCC.
1257313075 with_gnu_ld=unknown
1257413076 ;;
1257513077 esac
12576 elif test "$with_gnu_ld" = yes; then
13078 elif test yes = "$with_gnu_ld"; then
1257713079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
1257813080 $as_echo_n "checking for GNU ld... " >&6; }
1257913081 else
1258413086 $as_echo_n "(cached) " >&6
1258513087 else
1258613088 if test -z "$LD"; then
12587 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13089 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
1258813090 for ac_dir in $PATH; do
12589 IFS="$lt_save_ifs"
13091 IFS=$lt_save_ifs
1259013092 test -z "$ac_dir" && ac_dir=.
1259113093 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
12592 lt_cv_path_LD="$ac_dir/$ac_prog"
13094 lt_cv_path_LD=$ac_dir/$ac_prog
1259313095 # Check to see if the program is GNU ld. I'd rather use --version,
1259413096 # but apparently some variants of GNU ld only accept -v.
1259513097 # Break only if it was the GNU/non-GNU ld that we prefer.
1259613098 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
1259713099 *GNU* | *'with BFD'*)
12598 test "$with_gnu_ld" != no && break
13100 test no != "$with_gnu_ld" && break
1259913101 ;;
1260013102 *)
12601 test "$with_gnu_ld" != yes && break
13103 test yes != "$with_gnu_ld" && break
1260213104 ;;
1260313105 esac
1260413106 fi
1260513107 done
12606 IFS="$lt_save_ifs"
12607 else
12608 lt_cv_path_LD="$LD" # Let the user override the test with a path.
12609 fi
12610 fi
12611
12612 LD="$lt_cv_path_LD"
13108 IFS=$lt_save_ifs
13109 else
13110 lt_cv_path_LD=$LD # Let the user override the test with a path.
13111 fi
13112 fi
13113
13114 LD=$lt_cv_path_LD
1261313115 if test -n "$LD"; then
1261413116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
1261513117 $as_echo "$LD" >&6; }
1264513147
1264613148 # Check if GNU C++ uses GNU ld as the underlying linker, since the
1264713149 # archiving commands below assume that GNU ld is being used.
12648 if test "$with_gnu_ld" = yes; then
12649 archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
12650 archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
12651
12652 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12653 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
13150 if test yes = "$with_gnu_ld"; then
13151 archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
13152 archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13153
13154 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
13155 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
1265413156
1265513157 # If archive_cmds runs LD, not CC, wlarc should be empty
1265613158 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
1265713159 # investigate it a little bit more. (MM)
12658 wlarc='${wl}'
13160 wlarc='$wl'
1265913161
1266013162 # ancient GNU ld didn't support --whole-archive et. al.
1266113163 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
1266213164 $GREP 'no-whole-archive' > /dev/null; then
12663 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
13165 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
1266413166 else
1266513167 whole_archive_flag_spec_CXX=
1266613168 fi
1269713199 ld_shlibs_CXX=no
1269813200 ;;
1269913201 aix[4-9]*)
12700 if test "$host_cpu" = ia64; then
13202 if test ia64 = "$host_cpu"; then
1270113203 # On IA64, the linker does run time linking by default, so we don't
1270213204 # have to do anything special.
1270313205 aix_use_runtimelinking=no
1270413206 exp_sym_flag='-Bexport'
12705 no_entry_flag=""
13207 no_entry_flag=
1270613208 else
1270713209 aix_use_runtimelinking=no
1270813210
1270913211 # Test if we are trying to use run time linking or normal
1271013212 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
12711 # need to do runtime linking.
13213 # have runtime linking enabled, and use it for executables.
13214 # For shared libraries, we enable/disable runtime linking
13215 # depending on the kind of the shared library created -
13216 # when "with_aix_soname,aix_use_runtimelinking" is:
13217 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
13218 # "aix,yes" lib.so shared, rtl:yes, for executables
13219 # lib.a static archive
13220 # "both,no" lib.so.V(shr.o) shared, rtl:yes
13221 # lib.a(lib.so.V) shared, rtl:no, for executables
13222 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
13223 # lib.a(lib.so.V) shared, rtl:no
13224 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
13225 # lib.a static archive
1271213226 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
1271313227 for ld_flag in $LDFLAGS; do
1271413228 case $ld_flag in
1271813232 ;;
1271913233 esac
1272013234 done
13235 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
13236 # With aix-soname=svr4, we create the lib.so.V shared archives only,
13237 # so we don't have lib.a shared libs to link our executables.
13238 # We have to force runtime linking in this case.
13239 aix_use_runtimelinking=yes
13240 LDFLAGS="$LDFLAGS -Wl,-brtl"
13241 fi
1272113242 ;;
1272213243 esac
1272313244
1273613257 hardcode_direct_absolute_CXX=yes
1273713258 hardcode_libdir_separator_CXX=':'
1273813259 link_all_deplibs_CXX=yes
12739 file_list_spec_CXX='${wl}-f,'
12740
12741 if test "$GXX" = yes; then
13260 file_list_spec_CXX='$wl-f,'
13261 case $with_aix_soname,$aix_use_runtimelinking in
13262 aix,*) ;; # no import file
13263 svr4,* | *,yes) # use import file
13264 # The Import File defines what to hardcode.
13265 hardcode_direct_CXX=no
13266 hardcode_direct_absolute_CXX=no
13267 ;;
13268 esac
13269
13270 if test yes = "$GXX"; then
1274213271 case $host_os in aix4.[012]|aix4.[012].*)
1274313272 # We only want to do this on AIX 4.2 and lower, the check
1274413273 # below for broken collect2 doesn't work under 4.3+
12745 collect2name=`${CC} -print-prog-name=collect2`
13274 collect2name=`$CC -print-prog-name=collect2`
1274613275 if test -f "$collect2name" &&
1274713276 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
1274813277 then
1276013289 fi
1276113290 esac
1276213291 shared_flag='-shared'
12763 if test "$aix_use_runtimelinking" = yes; then
12764 shared_flag="$shared_flag "'${wl}-G'
13292 if test yes = "$aix_use_runtimelinking"; then
13293 shared_flag=$shared_flag' $wl-G'
1276513294 fi
13295 # Need to ensure runtime linking is disabled for the traditional
13296 # shared library, or the linker may eventually find shared libraries
13297 # /with/ Import File - we do not want to mix them.
13298 shared_flag_aix='-shared'
13299 shared_flag_svr4='-shared $wl-G'
1276613300 else
1276713301 # not using gcc
12768 if test "$host_cpu" = ia64; then
13302 if test ia64 = "$host_cpu"; then
1276913303 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
1277013304 # chokes on -Wl,-G. The following line is correct:
1277113305 shared_flag='-G'
1277213306 else
12773 if test "$aix_use_runtimelinking" = yes; then
12774 shared_flag='${wl}-G'
13307 if test yes = "$aix_use_runtimelinking"; then
13308 shared_flag='$wl-G'
1277513309 else
12776 shared_flag='${wl}-bM:SRE'
13310 shared_flag='$wl-bM:SRE'
1277713311 fi
13312 shared_flag_aix='$wl-bM:SRE'
13313 shared_flag_svr4='$wl-G'
1277813314 fi
1277913315 fi
1278013316
12781 export_dynamic_flag_spec_CXX='${wl}-bexpall'
13317 export_dynamic_flag_spec_CXX='$wl-bexpall'
1278213318 # It seems that -bexpall does not export symbols beginning with
1278313319 # underscore (_), so it is better to generate a list of symbols to
1278413320 # export.
1278513321 always_export_symbols_CXX=yes
12786 if test "$aix_use_runtimelinking" = yes; then
13322 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
1278713323 # Warning - without using the other runtime loading flags (-brtl),
1278813324 # -berok will link without error, but may produce a broken library.
12789 allow_undefined_flag_CXX='-berok'
13325 # The "-G" linker flag allows undefined symbols.
13326 no_undefined_flag_CXX='-bernotok'
1279013327 # Determine the default libpath from the value encoded in an empty
1279113328 # executable.
12792 if test "${lt_cv_aix_libpath+set}" = set; then
13329 if test set = "${lt_cv_aix_libpath+set}"; then
1279313330 aix_libpath=$lt_cv_aix_libpath
1279413331 else
1279513332 if ${lt_cv_aix_libpath__CXX+:} false; then :
1282413361 rm -f core conftest.err conftest.$ac_objext \
1282513362 conftest$ac_exeext conftest.$ac_ext
1282613363 if test -z "$lt_cv_aix_libpath__CXX"; then
12827 lt_cv_aix_libpath__CXX="/usr/lib:/lib"
13364 lt_cv_aix_libpath__CXX=/usr/lib:/lib
1282813365 fi
1282913366
1283013367 fi
1283213369 aix_libpath=$lt_cv_aix_libpath__CXX
1283313370 fi
1283413371
12835 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
12836
12837 archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
13372 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
13373
13374 archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
1283813375 else
12839 if test "$host_cpu" = ia64; then
12840 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
13376 if test ia64 = "$host_cpu"; then
13377 hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
1284113378 allow_undefined_flag_CXX="-z nodefs"
12842 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
13379 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
1284313380 else
1284413381 # Determine the default libpath from the value encoded in an
1284513382 # empty executable.
12846 if test "${lt_cv_aix_libpath+set}" = set; then
13383 if test set = "${lt_cv_aix_libpath+set}"; then
1284713384 aix_libpath=$lt_cv_aix_libpath
1284813385 else
1284913386 if ${lt_cv_aix_libpath__CXX+:} false; then :
1287813415 rm -f core conftest.err conftest.$ac_objext \
1287913416 conftest$ac_exeext conftest.$ac_ext
1288013417 if test -z "$lt_cv_aix_libpath__CXX"; then
12881 lt_cv_aix_libpath__CXX="/usr/lib:/lib"
13418 lt_cv_aix_libpath__CXX=/usr/lib:/lib
1288213419 fi
1288313420
1288413421 fi
1288613423 aix_libpath=$lt_cv_aix_libpath__CXX
1288713424 fi
1288813425
12889 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
13426 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
1289013427 # Warning - without using the other run time loading flags,
1289113428 # -berok will link without error, but may produce a broken library.
12892 no_undefined_flag_CXX=' ${wl}-bernotok'
12893 allow_undefined_flag_CXX=' ${wl}-berok'
12894 if test "$with_gnu_ld" = yes; then
13429 no_undefined_flag_CXX=' $wl-bernotok'
13430 allow_undefined_flag_CXX=' $wl-berok'
13431 if test yes = "$with_gnu_ld"; then
1289513432 # We only use this code for GNU lds that support --whole-archive.
12896 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
13433 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
1289713434 else
1289813435 # Exported symbols can be pulled into shared objects from archives
1289913436 whole_archive_flag_spec_CXX='$convenience'
1290013437 fi
1290113438 archive_cmds_need_lc_CXX=yes
12902 # This is similar to how AIX traditionally builds its shared
12903 # libraries.
12904 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
13439 archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
13440 # -brtl affects multiple linker settings, -berok does not and is overridden later
13441 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
13442 if test svr4 != "$with_aix_soname"; then
13443 # This is similar to how AIX traditionally builds its shared
13444 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
13445 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
13446 fi
13447 if test aix != "$with_aix_soname"; then
13448 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
13449 else
13450 # used by -dlpreopen to get the symbols
13451 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
13452 fi
13453 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
1290513454 fi
1290613455 fi
1290713456 ;;
1291113460 allow_undefined_flag_CXX=unsupported
1291213461 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1291313462 # support --undefined. This deserves some investigation. FIXME
12914 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13463 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
1291513464 else
1291613465 ld_shlibs_CXX=no
1291713466 fi
1293913488 # Tell ltmain to make .lib files, not .a files.
1294013489 libext=lib
1294113490 # Tell ltmain to make .dll files, not .so files.
12942 shrext_cmds=".dll"
13491 shrext_cmds=.dll
1294313492 # FIXME: Setting linknames here is a bad hack.
12944 archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
12945 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
12946 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
12947 else
12948 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
12949 fi~
12950 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12951 linknames='
13493 archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
13494 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
13495 cp "$export_symbols" "$output_objdir/$soname.def";
13496 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
13497 else
13498 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
13499 fi~
13500 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13501 linknames='
1295213502 # The linker will not automatically build a static lib if we build a DLL.
1295313503 # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
1295413504 enable_shared_with_static_runtimes_CXX=yes
1295513505 # Don't use ranlib
1295613506 old_postinstall_cmds_CXX='chmod 644 $oldlib'
1295713507 postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
12958 lt_tool_outputfile="@TOOL_OUTPUT@"~
12959 case $lt_outputfile in
12960 *.exe|*.EXE) ;;
12961 *)
12962 lt_outputfile="$lt_outputfile.exe"
12963 lt_tool_outputfile="$lt_tool_outputfile.exe"
12964 ;;
12965 esac~
12966 func_to_tool_file "$lt_outputfile"~
12967 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
12968 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12969 $RM "$lt_outputfile.manifest";
12970 fi'
13508 lt_tool_outputfile="@TOOL_OUTPUT@"~
13509 case $lt_outputfile in
13510 *.exe|*.EXE) ;;
13511 *)
13512 lt_outputfile=$lt_outputfile.exe
13513 lt_tool_outputfile=$lt_tool_outputfile.exe
13514 ;;
13515 esac~
13516 func_to_tool_file "$lt_outputfile"~
13517 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
13518 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13519 $RM "$lt_outputfile.manifest";
13520 fi'
1297113521 ;;
1297213522 *)
1297313523 # g++
1297413524 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
1297513525 # as there is no search path for DLLs.
1297613526 hardcode_libdir_flag_spec_CXX='-L$libdir'
12977 export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
13527 export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
1297813528 allow_undefined_flag_CXX=unsupported
1297913529 always_export_symbols_CXX=no
1298013530 enable_shared_with_static_runtimes_CXX=yes
1298113531
1298213532 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
12983 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
12984 # If the export-symbols file already is a .def file (1st line
12985 # is EXPORTS), use it as is; otherwise, prepend...
12986 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
12987 cp $export_symbols $output_objdir/$soname.def;
12988 else
12989 echo EXPORTS > $output_objdir/$soname.def;
12990 cat $export_symbols >> $output_objdir/$soname.def;
12991 fi~
12992 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13533 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13534 # If the export-symbols file already is a .def file, use it as
13535 # is; otherwise, prepend EXPORTS...
13536 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
13537 cp $export_symbols $output_objdir/$soname.def;
13538 else
13539 echo EXPORTS > $output_objdir/$soname.def;
13540 cat $export_symbols >> $output_objdir/$soname.def;
13541 fi~
13542 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1299313543 else
1299413544 ld_shlibs_CXX=no
1299513545 fi
1300313553 hardcode_direct_CXX=no
1300413554 hardcode_automatic_CXX=yes
1300513555 hardcode_shlibpath_var_CXX=unsupported
13006 if test "$lt_cv_ld_force_load" = "yes"; then
13007 whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
13556 if test yes = "$lt_cv_ld_force_load"; then
13557 whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1300813558
1300913559 else
1301013560 whole_archive_flag_spec_CXX=''
1301113561 fi
1301213562 link_all_deplibs_CXX=yes
13013 allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
13563 allow_undefined_flag_CXX=$_lt_dar_allow_undefined
1301413564 case $cc_basename in
13015 ifort*) _lt_dar_can_shared=yes ;;
13565 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1301613566 *) _lt_dar_can_shared=$GCC ;;
1301713567 esac
13018 if test "$_lt_dar_can_shared" = "yes"; then
13568 if test yes = "$_lt_dar_can_shared"; then
1301913569 output_verbose_link_cmd=func_echo_all
13020 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
13021 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
13022 archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
13023 module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
13024 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
13025 archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
13026 archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
13570 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
13571 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
13572 archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
13573 module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
13574 if test yes != "$lt_cv_apple_cc_single_mod"; then
13575 archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
13576 archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
1302713577 fi
1302813578
1302913579 else
1303013580 ld_shlibs_CXX=no
1303113581 fi
1303213582
13583 ;;
13584
13585 os2*)
13586 hardcode_libdir_flag_spec_CXX='-L$libdir'
13587 hardcode_minus_L_CXX=yes
13588 allow_undefined_flag_CXX=unsupported
13589 shrext_cmds=.dll
13590 archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13591 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13592 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13593 $ECHO EXPORTS >> $output_objdir/$libname.def~
13594 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
13595 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13596 emximp -o $lib $output_objdir/$libname.def'
13597 archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13598 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13599 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13600 $ECHO EXPORTS >> $output_objdir/$libname.def~
13601 prefix_cmds="$SED"~
13602 if test EXPORTS = "`$SED 1q $export_symbols`"; then
13603 prefix_cmds="$prefix_cmds -e 1d";
13604 fi~
13605 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
13606 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
13607 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13608 emximp -o $lib $output_objdir/$libname.def'
13609 old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
13610 enable_shared_with_static_runtimes_CXX=yes
1303313611 ;;
1303413612
1303513613 dgux*)
1306713645 ;;
1306813646
1306913647 haiku*)
13070 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13648 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
1307113649 link_all_deplibs_CXX=yes
1307213650 ;;
1307313651
1307413652 hpux9*)
13075 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
13653 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
1307613654 hardcode_libdir_separator_CXX=:
13077 export_dynamic_flag_spec_CXX='${wl}-E'
13655 export_dynamic_flag_spec_CXX='$wl-E'
1307813656 hardcode_direct_CXX=yes
1307913657 hardcode_minus_L_CXX=yes # Not in the search PATH,
1308013658 # but as the default
1308613664 ld_shlibs_CXX=no
1308713665 ;;
1308813666 aCC*)
13089 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
13667 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
1309013668 # Commands to make compiler produce verbose output that lists
1309113669 # what "hidden" libraries, object files and flags are used when
1309213670 # linking a shared library.
1309513673 # explicitly linking system object files so we need to strip them
1309613674 # from the output so that they don't get included in the library
1309713675 # dependencies.
13098 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
13676 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
1309913677 ;;
1310013678 *)
13101 if test "$GXX" = yes; then
13102 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
13679 if test yes = "$GXX"; then
13680 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
1310313681 else
1310413682 # FIXME: insert proper C++ library support
1310513683 ld_shlibs_CXX=no
1310913687 ;;
1311013688
1311113689 hpux10*|hpux11*)
13112 if test $with_gnu_ld = no; then
13113 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
13690 if test no = "$with_gnu_ld"; then
13691 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
1311413692 hardcode_libdir_separator_CXX=:
1311513693
1311613694 case $host_cpu in
1311713695 hppa*64*|ia64*)
1311813696 ;;
1311913697 *)
13120 export_dynamic_flag_spec_CXX='${wl}-E'
13698 export_dynamic_flag_spec_CXX='$wl-E'
1312113699 ;;
1312213700 esac
1312313701 fi
1314313721 aCC*)
1314413722 case $host_cpu in
1314513723 hppa*64*)
13146 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13724 archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1314713725 ;;
1314813726 ia64*)
13149 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13727 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1315013728 ;;
1315113729 *)
13152 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13730 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1315313731 ;;
1315413732 esac
1315513733 # Commands to make compiler produce verbose output that lists
1316013738 # explicitly linking system object files so we need to strip them
1316113739 # from the output so that they don't get included in the library
1316213740 # dependencies.
13163 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
13741 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
1316413742 ;;
1316513743 *)
13166 if test "$GXX" = yes; then
13167 if test $with_gnu_ld = no; then
13744 if test yes = "$GXX"; then
13745 if test no = "$with_gnu_ld"; then
1316813746 case $host_cpu in
1316913747 hppa*64*)
13170 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13748 archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1317113749 ;;
1317213750 ia64*)
13173 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13751 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1317413752 ;;
1317513753 *)
13176 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13754 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1317713755 ;;
1317813756 esac
1317913757 fi
1318813766 interix[3-9]*)
1318913767 hardcode_direct_CXX=no
1319013768 hardcode_shlibpath_var_CXX=no
13191 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
13192 export_dynamic_flag_spec_CXX='${wl}-E'
13769 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
13770 export_dynamic_flag_spec_CXX='$wl-E'
1319313771 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
1319413772 # Instead, shared libraries are loaded at an image base (0x10000000 by
1319513773 # default) and relocated if they conflict, which is a slow very memory
1319613774 # consuming and fragmenting process. To avoid this, we pick a random,
1319713775 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
1319813776 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
13199 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13200 archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13777 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13778 archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
1320113779 ;;
1320213780 irix5* | irix6*)
1320313781 case $cc_basename in
1320413782 CC*)
1320513783 # SGI C++
13206 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
13784 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
1320713785
1320813786 # Archives containing C++ object files must be created using
1320913787 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
1321213790 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
1321313791 ;;
1321413792 *)
13215 if test "$GXX" = yes; then
13216 if test "$with_gnu_ld" = no; then
13217 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
13793 if test yes = "$GXX"; then
13794 if test no = "$with_gnu_ld"; then
13795 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
1321813796 else
13219 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
13797 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
1322013798 fi
1322113799 fi
1322213800 link_all_deplibs_CXX=yes
1322313801 ;;
1322413802 esac
13225 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
13803 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
1322613804 hardcode_libdir_separator_CXX=:
1322713805 inherit_rpath_CXX=yes
1322813806 ;;
1323513813 # KCC will only create a shared library if the output file
1323613814 # ends with ".so" (or ".sl" for HP-UX), so rename the library
1323713815 # to its proper name (with version) after linking.
13238 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
13239 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
13816 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
13817 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
1324013818 # Commands to make compiler produce verbose output that lists
1324113819 # what "hidden" libraries, object files and flags are used when
1324213820 # linking a shared library.
1324513823 # explicitly linking system object files so we need to strip them
1324613824 # from the output so that they don't get included in the library
1324713825 # dependencies.
13248 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
13249
13250 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
13251 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
13826 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
13827
13828 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
13829 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
1325213830
1325313831 # Archives containing C++ object files must be created using
1325413832 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
1326213840 # earlier do not add the objects themselves.
1326313841 case `$CC -V 2>&1` in
1326413842 *"Version 7."*)
13265 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
13266 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
13843 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
13844 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
1326713845 ;;
1326813846 *) # Version 8.0 or newer
1326913847 tmp_idyn=
1327013848 case $host_cpu in
1327113849 ia64*) tmp_idyn=' -i_dynamic';;
1327213850 esac
13273 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13274 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
13851 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13852 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
1327513853 ;;
1327613854 esac
1327713855 archive_cmds_need_lc_CXX=no
13278 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
13279 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
13280 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
13856 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
13857 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
13858 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
1328113859 ;;
1328213860 pgCC* | pgcpp*)
1328313861 # Portland Group C++ compiler
1328413862 case `$CC -V` in
1328513863 *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
1328613864 prelink_cmds_CXX='tpldir=Template.dir~
13287 rm -rf $tpldir~
13288 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
13289 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
13865 rm -rf $tpldir~
13866 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
13867 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
1329013868 old_archive_cmds_CXX='tpldir=Template.dir~
13291 rm -rf $tpldir~
13292 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
13293 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
13294 $RANLIB $oldlib'
13869 rm -rf $tpldir~
13870 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
13871 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
13872 $RANLIB $oldlib'
1329513873 archive_cmds_CXX='tpldir=Template.dir~
13296 rm -rf $tpldir~
13297 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
13298 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
13874 rm -rf $tpldir~
13875 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
13876 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
1329913877 archive_expsym_cmds_CXX='tpldir=Template.dir~
13300 rm -rf $tpldir~
13301 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
13302 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
13878 rm -rf $tpldir~
13879 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
13880 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
1330313881 ;;
1330413882 *) # Version 6 and above use weak symbols
13305 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
13306 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
13883 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
13884 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
1330713885 ;;
1330813886 esac
1330913887
13310 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
13311 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
13312 whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
13888 hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
13889 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
13890 whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
1331313891 ;;
1331413892 cxx*)
1331513893 # Compaq C++
13316 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
13317 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
13894 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
13895 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
1331813896
1331913897 runpath_var=LD_RUN_PATH
1332013898 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
1332813906 # explicitly linking system object files so we need to strip them
1332913907 # from the output so that they don't get included in the library
1333013908 # dependencies.
13331 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
13909 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
1333213910 ;;
1333313911 xl* | mpixl* | bgxl*)
1333413912 # IBM XL 8.0 on PPC, with GNU ld
13335 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
13336 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
13337 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13338 if test "x$supports_anon_versioning" = xyes; then
13913 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
13914 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
13915 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13916 if test yes = "$supports_anon_versioning"; then
1333913917 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
13340 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13341 echo "local: *; };" >> $output_objdir/$libname.ver~
13342 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
13918 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13919 echo "local: *; };" >> $output_objdir/$libname.ver~
13920 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
1334313921 fi
1334413922 ;;
1334513923 *)
1334713925 *Sun\ C*)
1334813926 # Sun C++ 5.9
1334913927 no_undefined_flag_CXX=' -zdefs'
13350 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13351 archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
13928 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13929 archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
1335213930 hardcode_libdir_flag_spec_CXX='-R$libdir'
13353 whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
13931 whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
1335413932 compiler_needs_object_CXX=yes
1335513933
1335613934 # Not sure whether something based on
1340813986 ld_shlibs_CXX=yes
1340913987 ;;
1341013988
13411 openbsd2*)
13412 # C++ shared libraries are fairly broken
13413 ld_shlibs_CXX=no
13414 ;;
13415
13416 openbsd*)
13989 openbsd* | bitrig*)
1341713990 if test -f /usr/libexec/ld.so; then
1341813991 hardcode_direct_CXX=yes
1341913992 hardcode_shlibpath_var_CXX=no
1342013993 hardcode_direct_absolute_CXX=yes
1342113994 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
13422 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
13423 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
13424 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
13425 export_dynamic_flag_spec_CXX='${wl}-E'
13426 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
13995 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
13996 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
13997 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
13998 export_dynamic_flag_spec_CXX='$wl-E'
13999 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
1342714000 fi
1342814001 output_verbose_link_cmd=func_echo_all
1342914002 else
1343914012 # KCC will only create a shared library if the output file
1344014013 # ends with ".so" (or ".sl" for HP-UX), so rename the library
1344114014 # to its proper name (with version) after linking.
13442 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
13443
13444 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
14015 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
14016
14017 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
1344514018 hardcode_libdir_separator_CXX=:
1344614019
1344714020 # Archives containing C++ object files must be created using
1345914032 cxx*)
1346014033 case $host in
1346114034 osf3*)
13462 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
13463 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
13464 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
14035 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
14036 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14037 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
1346514038 ;;
1346614039 *)
1346714040 allow_undefined_flag_CXX=' -expect_unresolved \*'
13468 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
14041 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
1346914042 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
13470 echo "-hidden">> $lib.exp~
13471 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
13472 $RM $lib.exp'
14043 echo "-hidden">> $lib.exp~
14044 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
14045 $RM $lib.exp'
1347314046 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
1347414047 ;;
1347514048 esac
1348414057 # explicitly linking system object files so we need to strip them
1348514058 # from the output so that they don't get included in the library
1348614059 # dependencies.
13487 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
14060 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
1348814061 ;;
1348914062 *)
13490 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
13491 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
14063 if test yes,no = "$GXX,$with_gnu_ld"; then
14064 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
1349214065 case $host in
1349314066 osf3*)
13494 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
14067 archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
1349514068 ;;
1349614069 *)
13497 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
14070 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
1349814071 ;;
1349914072 esac
1350014073
13501 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
14074 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
1350214075 hardcode_libdir_separator_CXX=:
1350314076
1350414077 # Commands to make compiler produce verbose output that lists
1354414117 # Sun C++ 4.2, 5.x and Centerline C++
1354514118 archive_cmds_need_lc_CXX=yes
1354614119 no_undefined_flag_CXX=' -zdefs'
13547 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14120 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1354814121 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13549 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
14122 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
1355014123
1355114124 hardcode_libdir_flag_spec_CXX='-R$libdir'
1355214125 hardcode_shlibpath_var_CXX=no
1355414127 solaris2.[0-5] | solaris2.[0-5].*) ;;
1355514128 *)
1355614129 # The compiler driver will combine and reorder linker options,
13557 # but understands `-z linker_flag'.
14130 # but understands '-z linker_flag'.
1355814131 # Supported since Solaris 2.6 (maybe 2.5.1?)
1355914132 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
1356014133 ;;
1357114144 ;;
1357214145 gcx*)
1357314146 # Green Hills C++ Compiler
13574 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
14147 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
1357514148
1357614149 # The C++ compiler must be used to create the archive.
1357714150 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
1357814151 ;;
1357914152 *)
1358014153 # GNU C++ compiler with Solaris linker
13581 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
13582 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
14154 if test yes,no = "$GXX,$with_gnu_ld"; then
14155 no_undefined_flag_CXX=' $wl-z ${wl}defs'
1358314156 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
13584 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
14157 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
1358514158 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13586 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
14159 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
1358714160
1358814161 # Commands to make compiler produce verbose output that lists
1358914162 # what "hidden" libraries, object files and flags are used when
1359014163 # linking a shared library.
1359114164 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
1359214165 else
13593 # g++ 2.7 appears to require `-G' NOT `-shared' on this
14166 # g++ 2.7 appears to require '-G' NOT '-shared' on this
1359414167 # platform.
13595 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
14168 archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
1359614169 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13597 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
14170 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
1359814171
1359914172 # Commands to make compiler produce verbose output that lists
1360014173 # what "hidden" libraries, object files and flags are used when
1360214175 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
1360314176 fi
1360414177
13605 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
14178 hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
1360614179 case $host_os in
1360714180 solaris2.[0-5] | solaris2.[0-5].*) ;;
1360814181 *)
13609 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
14182 whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
1361014183 ;;
1361114184 esac
1361214185 fi
1361514188 ;;
1361614189
1361714190 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
13618 no_undefined_flag_CXX='${wl}-z,text'
14191 no_undefined_flag_CXX='$wl-z,text'
1361914192 archive_cmds_need_lc_CXX=no
1362014193 hardcode_shlibpath_var_CXX=no
1362114194 runpath_var='LD_RUN_PATH'
1362214195
1362314196 case $cc_basename in
1362414197 CC*)
13625 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13626 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14198 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14199 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1362714200 ;;
1362814201 *)
13629 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13630 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14202 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14203 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1363114204 ;;
1363214205 esac
1363314206 ;;
1363414207
1363514208 sysv5* | sco3.2v5* | sco5v6*)
13636 # Note: We can NOT use -z defs as we might desire, because we do not
14209 # Note: We CANNOT use -z defs as we might desire, because we do not
1363714210 # link with -lc, and that would cause any symbols used from libc to
1363814211 # always be unresolved, which means just about no library would
1363914212 # ever link correctly. If we're not using GNU ld we use -z text
1364014213 # though, which does catch some bad symbols but isn't as heavy-handed
1364114214 # as -z defs.
13642 no_undefined_flag_CXX='${wl}-z,text'
13643 allow_undefined_flag_CXX='${wl}-z,nodefs'
14215 no_undefined_flag_CXX='$wl-z,text'
14216 allow_undefined_flag_CXX='$wl-z,nodefs'
1364414217 archive_cmds_need_lc_CXX=no
1364514218 hardcode_shlibpath_var_CXX=no
13646 hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
14219 hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
1364714220 hardcode_libdir_separator_CXX=':'
1364814221 link_all_deplibs_CXX=yes
13649 export_dynamic_flag_spec_CXX='${wl}-Bexport'
14222 export_dynamic_flag_spec_CXX='$wl-Bexport'
1365014223 runpath_var='LD_RUN_PATH'
1365114224
1365214225 case $cc_basename in
1365314226 CC*)
13654 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13655 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14227 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14228 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1365614229 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
13657 '"$old_archive_cmds_CXX"
14230 '"$old_archive_cmds_CXX"
1365814231 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
13659 '"$reload_cmds_CXX"
14232 '"$reload_cmds_CXX"
1366014233 ;;
1366114234 *)
13662 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
13663 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14235 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14236 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1366414237 ;;
1366514238 esac
1366614239 ;;
1369214265
1369314266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
1369414267 $as_echo "$ld_shlibs_CXX" >&6; }
13695 test "$ld_shlibs_CXX" = no && can_build_shared=no
13696
13697 GCC_CXX="$GXX"
13698 LD_CXX="$LD"
14268 test no = "$ld_shlibs_CXX" && can_build_shared=no
14269
14270 GCC_CXX=$GXX
14271 LD_CXX=$LD
1369914272
1370014273 ## CAVEAT EMPTOR:
1370114274 ## There is no encapsulation within the following macros, do not change
1373914312 pre_test_object_deps_done=no
1374014313
1374114314 for p in `eval "$output_verbose_link_cmd"`; do
13742 case ${prev}${p} in
14315 case $prev$p in
1374314316
1374414317 -L* | -R* | -l*)
1374514318 # Some compilers place space between "-{L,R}" and the path.
1374614319 # Remove the space.
13747 if test $p = "-L" ||
13748 test $p = "-R"; then
14320 if test x-L = "$p" ||
14321 test x-R = "$p"; then
1374914322 prev=$p
1375014323 continue
1375114324 fi
1376114334 case $p in
1376214335 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
1376314336 esac
13764 if test "$pre_test_object_deps_done" = no; then
13765 case ${prev} in
14337 if test no = "$pre_test_object_deps_done"; then
14338 case $prev in
1376614339 -L | -R)
1376714340 # Internal compiler library paths should come after those
1376814341 # provided the user. The postdeps already come after the
1376914342 # user supplied libs so there is no need to process them.
1377014343 if test -z "$compiler_lib_search_path_CXX"; then
13771 compiler_lib_search_path_CXX="${prev}${p}"
14344 compiler_lib_search_path_CXX=$prev$p
1377214345 else
13773 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
14346 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
1377414347 fi
1377514348 ;;
1377614349 # The "-l" case would never come before the object being
1377814351 esac
1377914352 else
1378014353 if test -z "$postdeps_CXX"; then
13781 postdeps_CXX="${prev}${p}"
14354 postdeps_CXX=$prev$p
1378214355 else
13783 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
14356 postdeps_CXX="${postdeps_CXX} $prev$p"
1378414357 fi
1378514358 fi
1378614359 prev=
1379514368 continue
1379614369 fi
1379714370
13798 if test "$pre_test_object_deps_done" = no; then
14371 if test no = "$pre_test_object_deps_done"; then
1379914372 if test -z "$predep_objects_CXX"; then
13800 predep_objects_CXX="$p"
14373 predep_objects_CXX=$p
1380114374 else
1380214375 predep_objects_CXX="$predep_objects_CXX $p"
1380314376 fi
1380414377 else
1380514378 if test -z "$postdep_objects_CXX"; then
13806 postdep_objects_CXX="$p"
14379 postdep_objects_CXX=$p
1380714380 else
1380814381 postdep_objects_CXX="$postdep_objects_CXX $p"
1380914382 fi
1383314406 postdep_objects_CXX=
1383414407 postdeps_CXX=
1383514408 ;;
13836
13837 linux*)
13838 case `$CC -V 2>&1 | sed 5q` in
13839 *Sun\ C*)
13840 # Sun C++ 5.9
13841
13842 # The more standards-conforming stlport4 library is
13843 # incompatible with the Cstd library. Avoid specifying
13844 # it if it's in CXXFLAGS. Ignore libCrun as
13845 # -library=stlport4 depends on it.
13846 case " $CXX $CXXFLAGS " in
13847 *" -library=stlport4 "*)
13848 solaris_use_stlport4=yes
13849 ;;
13850 esac
13851
13852 if test "$solaris_use_stlport4" != yes; then
13853 postdeps_CXX='-library=Cstd -library=Crun'
13854 fi
13855 ;;
13856 esac
13857 ;;
13858
13859 solaris*)
13860 case $cc_basename in
13861 CC* | sunCC*)
13862 # The more standards-conforming stlport4 library is
13863 # incompatible with the Cstd library. Avoid specifying
13864 # it if it's in CXXFLAGS. Ignore libCrun as
13865 # -library=stlport4 depends on it.
13866 case " $CXX $CXXFLAGS " in
13867 *" -library=stlport4 "*)
13868 solaris_use_stlport4=yes
13869 ;;
13870 esac
13871
13872 # Adding this requires a known-good setup of shared libraries for
13873 # Sun compiler versions before 5.6, else PIC objects from an old
13874 # archive will be linked into the output, leading to subtle bugs.
13875 if test "$solaris_use_stlport4" != yes; then
13876 postdeps_CXX='-library=Cstd -library=Crun'
13877 fi
13878 ;;
13879 esac
13880 ;;
1388114409 esac
1388214410
1388314411
1388614414 esac
1388714415 compiler_lib_search_dirs_CXX=
1388814416 if test -n "${compiler_lib_search_path_CXX}"; then
13889 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
14417 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
1389014418 fi
1389114419
1389214420
1392514453
1392614454
1392714455 # C++ specific cases for pic, static, wl, etc.
13928 if test "$GXX" = yes; then
14456 if test yes = "$GXX"; then
1392914457 lt_prog_compiler_wl_CXX='-Wl,'
1393014458 lt_prog_compiler_static_CXX='-static'
1393114459
1393214460 case $host_os in
1393314461 aix*)
1393414462 # All AIX code is PIC.
13935 if test "$host_cpu" = ia64; then
14463 if test ia64 = "$host_cpu"; then
1393614464 # AIX 5 now supports IA64 processor
1393714465 lt_prog_compiler_static_CXX='-Bstatic'
1393814466 fi
14467 lt_prog_compiler_pic_CXX='-fPIC'
1393914468 ;;
1394014469
1394114470 amigaos*)
1394614475 ;;
1394714476 m68k)
1394814477 # FIXME: we need at least 68020 code to build shared libraries, but
13949 # adding the `-m68020' flag to GCC prevents building anything better,
13950 # like `-m68040'.
14478 # adding the '-m68020' flag to GCC prevents building anything better,
14479 # like '-m68040'.
1395114480 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
1395214481 ;;
1395314482 esac
1396214491 # Although the cygwin gcc ignores -fPIC, still need this for old-style
1396314492 # (--disable-auto-import) libraries
1396414493 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
14494 case $host_os in
14495 os2*)
14496 lt_prog_compiler_static_CXX='$wl-static'
14497 ;;
14498 esac
1396514499 ;;
1396614500 darwin* | rhapsody*)
1396714501 # PIC is the default on this platform
1401114545 case $host_os in
1401214546 aix[4-9]*)
1401314547 # All AIX code is PIC.
14014 if test "$host_cpu" = ia64; then
14548 if test ia64 = "$host_cpu"; then
1401514549 # AIX 5 now supports IA64 processor
1401614550 lt_prog_compiler_static_CXX='-Bstatic'
1401714551 else
1405114585 case $cc_basename in
1405214586 CC*)
1405314587 lt_prog_compiler_wl_CXX='-Wl,'
14054 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
14055 if test "$host_cpu" != ia64; then
14588 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
14589 if test ia64 != "$host_cpu"; then
1405614590 lt_prog_compiler_pic_CXX='+Z'
1405714591 fi
1405814592 ;;
1405914593 aCC*)
1406014594 lt_prog_compiler_wl_CXX='-Wl,'
14061 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
14595 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
1406214596 case $host_cpu in
1406314597 hppa*64*|ia64*)
1406414598 # +Z the default
1409514629 lt_prog_compiler_pic_CXX='-fPIC'
1409614630 ;;
1409714631 ecpc* )
14098 # old Intel C++ for x86_64 which still supported -KPIC.
14632 # old Intel C++ for x86_64, which still supported -KPIC.
1409914633 lt_prog_compiler_wl_CXX='-Wl,'
1410014634 lt_prog_compiler_pic_CXX='-KPIC'
1410114635 lt_prog_compiler_static_CXX='-static'
1424014774 fi
1424114775
1424214776 case $host_os in
14243 # For platforms which do not support PIC, -DPIC is meaningless:
14777 # For platforms that do not support PIC, -DPIC is meaningless:
1424414778 *djgpp*)
1424514779 lt_prog_compiler_pic_CXX=
1424614780 ;;
1427214806 lt_cv_prog_compiler_pic_works_CXX=no
1427314807 ac_outfile=conftest.$ac_objext
1427414808 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14275 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
14809 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
1427614810 # Insert the option either (1) after the last *FLAGS variable, or
1427714811 # (2) before a word containing "conftest.", or (3) at the end.
1427814812 # Note that $ac_compile itself does not contain backslashes and begins
1430214836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
1430314837 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
1430414838
14305 if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
14839 if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
1430614840 case $lt_prog_compiler_pic_CXX in
1430714841 "" | " "*) ;;
1430814842 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
1432814862 $as_echo_n "(cached) " >&6
1432914863 else
1433014864 lt_cv_prog_compiler_static_works_CXX=no
14331 save_LDFLAGS="$LDFLAGS"
14865 save_LDFLAGS=$LDFLAGS
1433214866 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
1433314867 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1433414868 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1434714881 fi
1434814882 fi
1434914883 $RM -r conftest*
14350 LDFLAGS="$save_LDFLAGS"
14884 LDFLAGS=$save_LDFLAGS
1435114885
1435214886 fi
1435314887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
1435414888 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
1435514889
14356 if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
14890 if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
1435714891 :
1435814892 else
1435914893 lt_prog_compiler_static_CXX=
1446715001
1446815002
1446915003
14470 hard_links="nottested"
14471 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
15004 hard_links=nottested
15005 if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
1447215006 # do not overwrite the value of need_locks provided by the user
1447315007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
1447415008 $as_echo_n "checking if we can lock with hard links... " >&6; }
1448015014 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1448115015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
1448215016 $as_echo "$hard_links" >&6; }
14483 if test "$hard_links" = no; then
14484 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
14485 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
15017 if test no = "$hard_links"; then
15018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
15019 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
1448615020 need_locks=warn
1448715021 fi
1448815022 else
1449915033 case $host_os in
1450015034 aix[4-9]*)
1450115035 # If we're using GNU nm, then we don't want the "-C" option.
14502 # -C means demangle to AIX nm, but means don't demangle with GNU nm
14503 # Also, AIX nm treats weak defined symbols like other global defined
14504 # symbols, whereas GNU nm marks them as "W".
15036 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
15037 # Without the "-l" option, or with the "-B" option, AIX nm treats
15038 # weak defined symbols like other global defined symbols, whereas
15039 # GNU nm marks them as "W".
15040 # While the 'weak' keyword is ignored in the Export File, we need
15041 # it in the Import File for the 'aix-soname' feature, so we have
15042 # to replace the "-B" option with "-P" for AIX nm.
1450515043 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
14506 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
15044 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
1450715045 else
14508 export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
15046 export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
1450915047 fi
1451015048 ;;
1451115049 pw32*)
14512 export_symbols_cmds_CXX="$ltdll_cmds"
15050 export_symbols_cmds_CXX=$ltdll_cmds
1451315051 ;;
1451415052 cygwin* | mingw* | cegcc*)
1451515053 case $cc_basename in
1453215070
1453315071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
1453415072 $as_echo "$ld_shlibs_CXX" >&6; }
14535 test "$ld_shlibs_CXX" = no && can_build_shared=no
15073 test no = "$ld_shlibs_CXX" && can_build_shared=no
1453615074
1453715075 with_gnu_ld_CXX=$with_gnu_ld
1453815076
1454915087 # Assume -lc should be added
1455015088 archive_cmds_need_lc_CXX=yes
1455115089
14552 if test "$enable_shared" = yes && test "$GCC" = yes; then
15090 if test yes,yes = "$GCC,$enable_shared"; then
1455315091 case $archive_cmds_CXX in
1455415092 *'~'*)
1455515093 # FIXME: we may have to deal with multi-command sequences.
1467715215 library_names_spec=
1467815216 libname_spec='lib$name'
1467915217 soname_spec=
14680 shrext_cmds=".so"
15218 shrext_cmds=.so
1468115219 postinstall_cmds=
1468215220 postuninstall_cmds=
1468315221 finish_cmds=
1469415232 # flags to be left without arguments
1469515233 need_version=unknown
1469615234
15235
15236
1469715237 case $host_os in
1469815238 aix3*)
1469915239 version_type=linux # correct to gnu/linux during the next big refactor
14700 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
15240 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
1470115241 shlibpath_var=LIBPATH
1470215242
1470315243 # AIX 3 has no versioning support, so we append a major version to the name.
14704 soname_spec='${libname}${release}${shared_ext}$major'
15244 soname_spec='$libname$release$shared_ext$major'
1470515245 ;;
1470615246
1470715247 aix[4-9]*)
1470915249 need_lib_prefix=no
1471015250 need_version=no
1471115251 hardcode_into_libs=yes
14712 if test "$host_cpu" = ia64; then
15252 if test ia64 = "$host_cpu"; then
1471315253 # AIX 5 supports IA64
14714 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
15254 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
1471515255 shlibpath_var=LD_LIBRARY_PATH
1471615256 else
1471715257 # With GCC up to 2.95.x, collect2 would create an import file
1471815258 # for dependence libraries. The import file would start with
14719 # the line `#! .'. This would cause the generated library to
14720 # depend on `.', always an invalid library. This was fixed in
15259 # the line '#! .'. This would cause the generated library to
15260 # depend on '.', always an invalid library. This was fixed in
1472115261 # development snapshots of GCC prior to 3.0.
1472215262 case $host_os in
1472315263 aix4 | aix4.[01] | aix4.[01].*)
1472415264 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1472515265 echo ' yes '
14726 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
15266 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
1472715267 :
1472815268 else
1472915269 can_build_shared=no
1473015270 fi
1473115271 ;;
1473215272 esac
14733 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
15273 # Using Import Files as archive members, it is possible to support
15274 # filename-based versioning of shared library archives on AIX. While
15275 # this would work for both with and without runtime linking, it will
15276 # prevent static linking of such archives. So we do filename-based
15277 # shared library versioning with .so extension only, which is used
15278 # when both runtime linking and shared linking is enabled.
15279 # Unfortunately, runtime linking may impact performance, so we do
15280 # not want this to be the default eventually. Also, we use the
15281 # versioned .so libs for executables only if there is the -brtl
15282 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
15283 # To allow for filename-based versioning support, we need to create
15284 # libNAME.so.V as an archive file, containing:
15285 # *) an Import File, referring to the versioned filename of the
15286 # archive as well as the shared archive member, telling the
15287 # bitwidth (32 or 64) of that shared object, and providing the
15288 # list of exported symbols of that shared object, eventually
15289 # decorated with the 'weak' keyword
15290 # *) the shared object with the F_LOADONLY flag set, to really avoid
15291 # it being seen by the linker.
15292 # At run time we better use the real file rather than another symlink,
15293 # but for link time we create the symlink libNAME.so -> libNAME.so.V
15294
15295 case $with_aix_soname,$aix_use_runtimelinking in
15296 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
1473415297 # soname into executable. Probably we can add versioning support to
1473515298 # collect2, so additional links can be useful in future.
14736 if test "$aix_use_runtimelinking" = yes; then
15299 aix,yes) # traditional libtool
15300 dynamic_linker='AIX unversionable lib.so'
1473715301 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1473815302 # instead of lib<name>.a to let people know that these are not
1473915303 # typical AIX shared libraries.
14740 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14741 else
15304 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15305 ;;
15306 aix,no) # traditional AIX only
15307 dynamic_linker='AIX lib.a(lib.so.V)'
1474215308 # We preserve .a as extension for shared libraries through AIX4.2
1474315309 # and later when we are not doing run time linking.
14744 library_names_spec='${libname}${release}.a $libname.a'
14745 soname_spec='${libname}${release}${shared_ext}$major'
14746 fi
15310 library_names_spec='$libname$release.a $libname.a'
15311 soname_spec='$libname$release$shared_ext$major'
15312 ;;
15313 svr4,*) # full svr4 only
15314 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
15315 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
15316 # We do not specify a path in Import Files, so LIBPATH fires.
15317 shlibpath_overrides_runpath=yes
15318 ;;
15319 *,yes) # both, prefer svr4
15320 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
15321 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
15322 # unpreferred sharedlib libNAME.a needs extra handling
15323 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
15324 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
15325 # We do not specify a path in Import Files, so LIBPATH fires.
15326 shlibpath_overrides_runpath=yes
15327 ;;
15328 *,no) # both, prefer aix
15329 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
15330 library_names_spec='$libname$release.a $libname.a'
15331 soname_spec='$libname$release$shared_ext$major'
15332 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
15333 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
15334 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
15335 ;;
15336 esac
1474715337 shlibpath_var=LIBPATH
1474815338 fi
1474915339 ;;
1475315343 powerpc)
1475415344 # Since July 2007 AmigaOS4 officially supports .so libraries.
1475515345 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
14756 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15346 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1475715347 ;;
1475815348 m68k)
1475915349 library_names_spec='$libname.ixlibrary $libname.a'
1476015350 # Create ${libname}_ixlibrary.a entries in /sys/libs.
14761 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
15351 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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'
1476215352 ;;
1476315353 esac
1476415354 ;;
1476515355
1476615356 beos*)
14767 library_names_spec='${libname}${shared_ext}'
15357 library_names_spec='$libname$shared_ext'
1476815358 dynamic_linker="$host_os ld.so"
1476915359 shlibpath_var=LIBRARY_PATH
1477015360 ;;
1477215362 bsdi[45]*)
1477315363 version_type=linux # correct to gnu/linux during the next big refactor
1477415364 need_version=no
14775 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14776 soname_spec='${libname}${release}${shared_ext}$major'
15365 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15366 soname_spec='$libname$release$shared_ext$major'
1477715367 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1477815368 shlibpath_var=LD_LIBRARY_PATH
1477915369 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1478515375
1478615376 cygwin* | mingw* | pw32* | cegcc*)
1478715377 version_type=windows
14788 shrext_cmds=".dll"
15378 shrext_cmds=.dll
1478915379 need_version=no
1479015380 need_lib_prefix=no
1479115381
1479415384 # gcc
1479515385 library_names_spec='$libname.dll.a'
1479615386 # DLL is installed to $(libdir)/../bin by postinstall_cmds
14797 postinstall_cmds='base_file=`basename \${file}`~
14798 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
15387 postinstall_cmds='base_file=`basename \$file`~
15388 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
1479915389 dldir=$destdir/`dirname \$dlpath`~
1480015390 test -d \$dldir || mkdir -p \$dldir~
1480115391 $install_prog $dir/$dlname \$dldir/$dlname~
1481115401 case $host_os in
1481215402 cygwin*)
1481315403 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14814 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15404 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1481515405
1481615406 ;;
1481715407 mingw* | cegcc*)
1481815408 # MinGW DLLs use traditional 'lib' prefix
14819 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15409 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1482015410 ;;
1482115411 pw32*)
1482215412 # pw32 DLLs use 'pw' prefix rather than 'lib'
14823 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15413 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1482415414 ;;
1482515415 esac
1482615416 dynamic_linker='Win32 ld.exe'
1482915419 *,cl*)
1483015420 # Native MSVC
1483115421 libname_spec='$name'
14832 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
14833 library_names_spec='${libname}.dll.lib'
15422 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15423 library_names_spec='$libname.dll.lib'
1483415424
1483515425 case $build_os in
1483615426 mingw*)
1485715447 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1485815448 ;;
1485915449 *)
14860 sys_lib_search_path_spec="$LIB"
15450 sys_lib_search_path_spec=$LIB
1486115451 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
1486215452 # It is most probably a Windows format PATH.
1486315453 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1487015460 esac
1487115461
1487215462 # DLL is installed to $(libdir)/../bin by postinstall_cmds
14873 postinstall_cmds='base_file=`basename \${file}`~
14874 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
15463 postinstall_cmds='base_file=`basename \$file`~
15464 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
1487515465 dldir=$destdir/`dirname \$dlpath`~
1487615466 test -d \$dldir || mkdir -p \$dldir~
1487715467 $install_prog $dir/$dlname \$dldir/$dlname'
1488415474
1488515475 *)
1488615476 # Assume MSVC wrapper
14887 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
15477 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
1488815478 dynamic_linker='Win32 ld.exe'
1488915479 ;;
1489015480 esac
1489715487 version_type=darwin
1489815488 need_lib_prefix=no
1489915489 need_version=no
14900 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
14901 soname_spec='${libname}${release}${major}$shared_ext'
15490 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
15491 soname_spec='$libname$release$major$shared_ext'
1490215492 shlibpath_overrides_runpath=yes
1490315493 shlibpath_var=DYLD_LIBRARY_PATH
1490415494 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1491015500 version_type=linux # correct to gnu/linux during the next big refactor
1491115501 need_lib_prefix=no
1491215502 need_version=no
14913 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
14914 soname_spec='${libname}${release}${shared_ext}$major'
15503 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15504 soname_spec='$libname$release$shared_ext$major'
1491515505 shlibpath_var=LD_LIBRARY_PATH
1491615506 ;;
1491715507
1492915519 version_type=freebsd-$objformat
1493015520 case $version_type in
1493115521 freebsd-elf*)
14932 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
15522 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15523 soname_spec='$libname$release$shared_ext$major'
1493315524 need_version=no
1493415525 need_lib_prefix=no
1493515526 ;;
1493615527 freebsd-*)
14937 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
15528 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1493815529 need_version=yes
1493915530 ;;
1494015531 esac
1496415555 need_lib_prefix=no
1496515556 need_version=no
1496615557 dynamic_linker="$host_os runtime_loader"
14967 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
14968 soname_spec='${libname}${release}${shared_ext}$major'
15558 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15559 soname_spec='$libname$release$shared_ext$major'
1496915560 shlibpath_var=LIBRARY_PATH
14970 shlibpath_overrides_runpath=yes
15561 shlibpath_overrides_runpath=no
1497115562 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
1497215563 hardcode_into_libs=yes
1497315564 ;;
1498515576 dynamic_linker="$host_os dld.so"
1498615577 shlibpath_var=LD_LIBRARY_PATH
1498715578 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
14988 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14989 soname_spec='${libname}${release}${shared_ext}$major'
14990 if test "X$HPUX_IA64_MODE" = X32; then
15579 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15580 soname_spec='$libname$release$shared_ext$major'
15581 if test 32 = "$HPUX_IA64_MODE"; then
1499115582 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
15583 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
1499215584 else
1499315585 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
15586 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
1499415587 fi
14995 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1499615588 ;;
1499715589 hppa*64*)
1499815590 shrext_cmds='.sl'
1500015592 dynamic_linker="$host_os dld.sl"
1500115593 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1500215594 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15003 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15004 soname_spec='${libname}${release}${shared_ext}$major'
15595 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15596 soname_spec='$libname$release$shared_ext$major'
1500515597 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1500615598 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1500715599 ;;
1501015602 dynamic_linker="$host_os dld.sl"
1501115603 shlibpath_var=SHLIB_PATH
1501215604 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
15013 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15014 soname_spec='${libname}${release}${shared_ext}$major'
15605 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15606 soname_spec='$libname$release$shared_ext$major'
1501515607 ;;
1501615608 esac
1501715609 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
1502415616 version_type=linux # correct to gnu/linux during the next big refactor
1502515617 need_lib_prefix=no
1502615618 need_version=no
15027 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15028 soname_spec='${libname}${release}${shared_ext}$major'
15619 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15620 soname_spec='$libname$release$shared_ext$major'
1502915621 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1503015622 shlibpath_var=LD_LIBRARY_PATH
1503115623 shlibpath_overrides_runpath=no
1503615628 case $host_os in
1503715629 nonstopux*) version_type=nonstopux ;;
1503815630 *)
15039 if test "$lt_cv_prog_gnu_ld" = yes; then
15631 if test yes = "$lt_cv_prog_gnu_ld"; then
1504015632 version_type=linux # correct to gnu/linux during the next big refactor
1504115633 else
1504215634 version_type=irix
1504415636 esac
1504515637 need_lib_prefix=no
1504615638 need_version=no
15047 soname_spec='${libname}${release}${shared_ext}$major'
15048 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
15639 soname_spec='$libname$release$shared_ext$major'
15640 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
1504915641 case $host_os in
1505015642 irix5* | nonstopux*)
1505115643 libsuff= shlibsuff=
1506415656 esac
1506515657 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1506615658 shlibpath_overrides_runpath=no
15067 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
15068 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
15659 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
15660 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
1506915661 hardcode_into_libs=yes
1507015662 ;;
1507115663
1507215664 # No shared lib support for Linux oldld, aout, or coff.
1507315665 linux*oldld* | linux*aout* | linux*coff*)
1507415666 dynamic_linker=no
15667 ;;
15668
15669 linux*android*)
15670 version_type=none # Android doesn't support versioned libraries.
15671 need_lib_prefix=no
15672 need_version=no
15673 library_names_spec='$libname$release$shared_ext'
15674 soname_spec='$libname$release$shared_ext'
15675 finish_cmds=
15676 shlibpath_var=LD_LIBRARY_PATH
15677 shlibpath_overrides_runpath=yes
15678
15679 # This implies no fast_install, which is unacceptable.
15680 # Some rework will be needed to allow for fast_install
15681 # before this can be enabled.
15682 hardcode_into_libs=yes
15683
15684 dynamic_linker='Android linker'
15685 # Don't embed -rpath directories since the linker doesn't support them.
15686 hardcode_libdir_flag_spec_CXX='-L$libdir'
1507515687 ;;
1507615688
1507715689 # This must be glibc/ELF.
1507915691 version_type=linux # correct to gnu/linux during the next big refactor
1508015692 need_lib_prefix=no
1508115693 need_version=no
15082 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15083 soname_spec='${libname}${release}${shared_ext}$major'
15694 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15695 soname_spec='$libname$release$shared_ext$major'
1508415696 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1508515697 shlibpath_var=LD_LIBRARY_PATH
1508615698 shlibpath_overrides_runpath=no
1512415736 # before this can be enabled.
1512515737 hardcode_into_libs=yes
1512615738
15127 # Append ld.so.conf contents to the search path
15739 # Ideally, we could use ldconfig to report *all* directores which are
15740 # searched for libraries, however this is still not possible. Aside from not
15741 # being certain /sbin/ldconfig is available, command
15742 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
15743 # even though it is searched at run-time. Try to do the best guess by
15744 # appending ld.so.conf contents (and includes) to the search path.
1512815745 if test -f /etc/ld.so.conf; then
1512915746 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
1513015747 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1515615773 need_lib_prefix=no
1515715774 need_version=no
1515815775 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15159 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15776 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1516015777 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1516115778 dynamic_linker='NetBSD (a.out) ld.so'
1516215779 else
15163 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15164 soname_spec='${libname}${release}${shared_ext}$major'
15780 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15781 soname_spec='$libname$release$shared_ext$major'
1516515782 dynamic_linker='NetBSD ld.elf_so'
1516615783 fi
1516715784 shlibpath_var=LD_LIBRARY_PATH
1517115788
1517215789 newsos6)
1517315790 version_type=linux # correct to gnu/linux during the next big refactor
15174 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15791 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1517515792 shlibpath_var=LD_LIBRARY_PATH
1517615793 shlibpath_overrides_runpath=yes
1517715794 ;;
1518015797 version_type=qnx
1518115798 need_lib_prefix=no
1518215799 need_version=no
15183 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15184 soname_spec='${libname}${release}${shared_ext}$major'
15800 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15801 soname_spec='$libname$release$shared_ext$major'
1518515802 shlibpath_var=LD_LIBRARY_PATH
1518615803 shlibpath_overrides_runpath=no
1518715804 hardcode_into_libs=yes
1518815805 dynamic_linker='ldqnx.so'
1518915806 ;;
1519015807
15191 openbsd*)
15808 openbsd* | bitrig*)
1519215809 version_type=sunos
15193 sys_lib_dlsearch_path_spec="/usr/lib"
15810 sys_lib_dlsearch_path_spec=/usr/lib
1519415811 need_lib_prefix=no
15195 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
15196 case $host_os in
15197 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
15198 *) need_version=no ;;
15199 esac
15200 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15812 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
15813 need_version=no
15814 else
15815 need_version=yes
15816 fi
15817 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1520115818 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1520215819 shlibpath_var=LD_LIBRARY_PATH
15203 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15204 case $host_os in
15205 openbsd2.[89] | openbsd2.[89].*)
15206 shlibpath_overrides_runpath=no
15207 ;;
15208 *)
15209 shlibpath_overrides_runpath=yes
15210 ;;
15211 esac
15212 else
15213 shlibpath_overrides_runpath=yes
15214 fi
15820 shlibpath_overrides_runpath=yes
1521515821 ;;
1521615822
1521715823 os2*)
1521815824 libname_spec='$name'
15219 shrext_cmds=".dll"
15825 version_type=windows
15826 shrext_cmds=.dll
15827 need_version=no
1522015828 need_lib_prefix=no
15221 library_names_spec='$libname${shared_ext} $libname.a'
15829 # OS/2 can only load a DLL with a base name of 8 characters or less.
15830 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
15831 v=$($ECHO $release$versuffix | tr -d .-);
15832 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
15833 $ECHO $n$v`$shared_ext'
15834 library_names_spec='${libname}_dll.$libext'
1522215835 dynamic_linker='OS/2 ld.exe'
15223 shlibpath_var=LIBPATH
15836 shlibpath_var=BEGINLIBPATH
15837 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
15838 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15839 postinstall_cmds='base_file=`basename \$file`~
15840 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
15841 dldir=$destdir/`dirname \$dlpath`~
15842 test -d \$dldir || mkdir -p \$dldir~
15843 $install_prog $dir/$dlname \$dldir/$dlname~
15844 chmod a+x \$dldir/$dlname~
15845 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
15846 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
15847 fi'
15848 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
15849 dlpath=$dir/\$dldll~
15850 $RM \$dlpath'
1522415851 ;;
1522515852
1522615853 osf3* | osf4* | osf5*)
1522715854 version_type=osf
1522815855 need_lib_prefix=no
1522915856 need_version=no
15230 soname_spec='${libname}${release}${shared_ext}$major'
15231 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15857 soname_spec='$libname$release$shared_ext$major'
15858 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1523215859 shlibpath_var=LD_LIBRARY_PATH
1523315860 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15234 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
15861 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1523515862 ;;
1523615863
1523715864 rdos*)
1524215869 version_type=linux # correct to gnu/linux during the next big refactor
1524315870 need_lib_prefix=no
1524415871 need_version=no
15245 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15246 soname_spec='${libname}${release}${shared_ext}$major'
15872 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15873 soname_spec='$libname$release$shared_ext$major'
1524715874 shlibpath_var=LD_LIBRARY_PATH
1524815875 shlibpath_overrides_runpath=yes
1524915876 hardcode_into_libs=yes
1525315880
1525415881 sunos4*)
1525515882 version_type=sunos
15256 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15883 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1525715884 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1525815885 shlibpath_var=LD_LIBRARY_PATH
1525915886 shlibpath_overrides_runpath=yes
15260 if test "$with_gnu_ld" = yes; then
15887 if test yes = "$with_gnu_ld"; then
1526115888 need_lib_prefix=no
1526215889 fi
1526315890 need_version=yes
1526515892
1526615893 sysv4 | sysv4.3*)
1526715894 version_type=linux # correct to gnu/linux during the next big refactor
15268 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15269 soname_spec='${libname}${release}${shared_ext}$major'
15895 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15896 soname_spec='$libname$release$shared_ext$major'
1527015897 shlibpath_var=LD_LIBRARY_PATH
1527115898 case $host_vendor in
1527215899 sni)
1528715914 ;;
1528815915
1528915916 sysv4*MP*)
15290 if test -d /usr/nec ;then
15917 if test -d /usr/nec; then
1529115918 version_type=linux # correct to gnu/linux during the next big refactor
15292 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
15293 soname_spec='$libname${shared_ext}.$major'
15919 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
15920 soname_spec='$libname$shared_ext.$major'
1529415921 shlibpath_var=LD_LIBRARY_PATH
1529515922 fi
1529615923 ;;
1529715924
1529815925 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15299 version_type=freebsd-elf
15926 version_type=sco
1530015927 need_lib_prefix=no
1530115928 need_version=no
15302 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
15303 soname_spec='${libname}${release}${shared_ext}$major'
15929 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
15930 soname_spec='$libname$release$shared_ext$major'
1530415931 shlibpath_var=LD_LIBRARY_PATH
1530515932 shlibpath_overrides_runpath=yes
1530615933 hardcode_into_libs=yes
15307 if test "$with_gnu_ld" = yes; then
15934 if test yes = "$with_gnu_ld"; then
1530815935 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1530915936 else
1531015937 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1532215949 version_type=linux # correct to gnu/linux during the next big refactor
1532315950 need_lib_prefix=no
1532415951 need_version=no
15325 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15952 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1532615953 shlibpath_var=LD_LIBRARY_PATH
1532715954 shlibpath_overrides_runpath=no
1532815955 hardcode_into_libs=yes
1533015957
1533115958 uts4*)
1533215959 version_type=linux # correct to gnu/linux during the next big refactor
15333 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15334 soname_spec='${libname}${release}${shared_ext}$major'
15960 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15961 soname_spec='$libname$release$shared_ext$major'
1533515962 shlibpath_var=LD_LIBRARY_PATH
1533615963 ;;
1533715964
1534115968 esac
1534215969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
1534315970 $as_echo "$dynamic_linker" >&6; }
15344 test "$dynamic_linker" = no && can_build_shared=no
15971 test no = "$dynamic_linker" && can_build_shared=no
1534515972
1534615973 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
15347 if test "$GCC" = yes; then
15974 if test yes = "$GCC"; then
1534815975 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1534915976 fi
1535015977
15351 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
15352 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
15353 fi
15354 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
15355 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
15356 fi
15978 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
15979 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
15980 fi
15981
15982 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
15983 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
15984 fi
15985
15986 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
15987 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
15988
15989 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
15990 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
15991
15992 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
15993 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
15994
15995
1535715996
1535815997
1535915998
1539716036 hardcode_action_CXX=
1539816037 if test -n "$hardcode_libdir_flag_spec_CXX" ||
1539916038 test -n "$runpath_var_CXX" ||
15400 test "X$hardcode_automatic_CXX" = "Xyes" ; then
16039 test yes = "$hardcode_automatic_CXX"; then
1540116040
1540216041 # We can hardcode non-existent directories.
15403 if test "$hardcode_direct_CXX" != no &&
16042 if test no != "$hardcode_direct_CXX" &&
1540416043 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1540516044 # have to relink, otherwise we might link with an installed library
1540616045 # when we should be linking with a yet-to-be-installed one
15407 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
15408 test "$hardcode_minus_L_CXX" != no; then
16046 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
16047 test no != "$hardcode_minus_L_CXX"; then
1540916048 # Linking always hardcodes the temporary library directory.
1541016049 hardcode_action_CXX=relink
1541116050 else
1542016059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
1542116060 $as_echo "$hardcode_action_CXX" >&6; }
1542216061
15423 if test "$hardcode_action_CXX" = relink ||
15424 test "$inherit_rpath_CXX" = yes; then
16062 if test relink = "$hardcode_action_CXX" ||
16063 test yes = "$inherit_rpath_CXX"; then
1542516064 # Fast installation is not supported
1542616065 enable_fast_install=no
15427 elif test "$shlibpath_overrides_runpath" = yes ||
15428 test "$enable_shared" = no; then
16066 elif test yes = "$shlibpath_overrides_runpath" ||
16067 test no = "$enable_shared"; then
1542916068 # Fast installation is not necessary
1543016069 enable_fast_install=needless
1543116070 fi
1544816087 lt_cv_path_LD=$lt_save_path_LD
1544916088 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
1545016089 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
15451 fi # test "$_lt_caught_CXX_error" != yes
16090 fi # test yes != "$_lt_caught_CXX_error"
1545216091
1545316092 ac_ext=c
1545416093 ac_cpp='$CPP $CPPFLAGS'
1884919488 # report actual input values of CONFIG_FILES etc. instead of their
1885019489 # values after options handling.
1885119490 ac_log="
18852 This file was extended by libgeotiff $as_me 1.4.2, which was
19491 This file was extended by libgeotiff $as_me 1.4.3, which was
1885319492 generated by GNU Autoconf 2.69. Invocation command line was
1885419493
1885519494 CONFIG_FILES = $CONFIG_FILES
1891519554 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1891619555 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1891719556 ac_cs_version="\\
18918 libgeotiff config.status 1.4.2
19557 libgeotiff config.status 1.4.3
1891919558 configured by $0, generated by GNU Autoconf 2.69,
1892019559 with options \\"\$ac_cs_config\\"
1892119560
1905019689 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
1905119690 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
1905219691 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
19692 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
1905319693 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
1905419694 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
1905519695 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
1909919739 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
1910019740 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
1910119741 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
19742 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
1910219743 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
1910319744 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
19745 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
1910419746 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
1910519747 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
19748 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
1910619749 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
1910719750 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
1910819751 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
1916719810 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
1916819811 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
1916919812 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
19170 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
19813 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
19814 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
1917119815 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
1917219816 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
1917319817 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
1927219916 compiler \
1927319917 lt_cv_sys_global_symbol_pipe \
1927419918 lt_cv_sys_global_symbol_to_cdecl \
19919 lt_cv_sys_global_symbol_to_import \
1927519920 lt_cv_sys_global_symbol_to_c_name_address \
1927619921 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
19922 lt_cv_nm_interface \
1927719923 nm_file_list_spec \
19924 lt_cv_truncate_bin \
1927819925 lt_prog_compiler_no_builtin_flag \
1927919926 lt_prog_compiler_pic \
1928019927 lt_prog_compiler_wl \
1934019987 compiler_lib_search_path_CXX; do
1934119988 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1934219989 *[\\\\\\\`\\"\\\$]*)
19343 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
19990 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
1934419991 ;;
1934519992 *)
1934619993 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1936720014 postuninstall_cmds \
1936820015 finish_cmds \
1936920016 sys_lib_search_path_spec \
19370 sys_lib_dlsearch_path_spec \
20017 configure_time_dlsearch_path \
20018 configure_time_lt_sys_library_path \
1937120019 reload_cmds_CXX \
1937220020 old_archive_cmds_CXX \
1937320021 old_archive_from_new_cmds_CXX \
1938120029 postlink_cmds_CXX; do
1938220030 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1938320031 *[\\\\\\\`\\"\\\$]*)
19384 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
20032 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
1938520033 ;;
1938620034 *)
1938720035 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1939020038 done
1939120039
1939220040 ac_aux_dir='$ac_aux_dir'
19393 xsi_shell='$xsi_shell'
19394 lt_shell_append='$lt_shell_append'
19395
19396 # See if we are running on zsh, and set the options which allow our
20041
20042 # See if we are running on zsh, and set the options that allow our
1939720043 # commands through without removal of \ escapes INIT.
19398 if test -n "\${ZSH_VERSION+set}" ; then
20044 if test -n "\${ZSH_VERSION+set}"; then
1939920045 setopt NO_GLOB_SUBST
1940020046 fi
1940120047
1940220048
1940320049 PACKAGE='$PACKAGE'
1940420050 VERSION='$VERSION'
19405 TIMESTAMP='$TIMESTAMP'
1940620051 RM='$RM'
1940720052 ofile='$ofile'
1940820053
2011820763 ;;
2011920764 "libtool":C)
2012020765
20121 # See if we are running on zsh, and set the options which allow our
20766 # See if we are running on zsh, and set the options that allow our
2012220767 # commands through without removal of \ escapes.
20123 if test -n "${ZSH_VERSION+set}" ; then
20768 if test -n "${ZSH_VERSION+set}"; then
2012420769 setopt NO_GLOB_SUBST
2012520770 fi
2012620771
20127 cfgfile="${ofile}T"
20772 cfgfile=${ofile}T
2012820773 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2012920774 $RM "$cfgfile"
2013020775
2013120776 cat <<_LT_EOF >> "$cfgfile"
2013220777 #! $SHELL
20133
20134 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
20135 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
20778 # Generated automatically by $as_me ($PACKAGE) $VERSION
2013620779 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2013720780 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
20781
20782 # Provide generalized library-building support services.
20783 # Written by Gordon Matzigkeit, 1996
20784
20785 # Copyright (C) 2014 Free Software Foundation, Inc.
20786 # This is free software; see the source for copying conditions. There is NO
20787 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20788
20789 # GNU Libtool is free software; you can redistribute it and/or modify
20790 # it under the terms of the GNU General Public License as published by
20791 # the Free Software Foundation; either version 2 of of the License, or
20792 # (at your option) any later version.
2013820793 #
20139 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
20140 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
20141 # Foundation, Inc.
20142 # Written by Gordon Matzigkeit, 1996
20794 # As a special exception to the GNU General Public License, if you
20795 # distribute this file as part of a program or library that is built
20796 # using GNU Libtool, you may include this file under the same
20797 # distribution terms that you use for the rest of that program.
2014320798 #
20144 # This file is part of GNU Libtool.
20145 #
20146 # GNU Libtool is free software; you can redistribute it and/or
20147 # modify it under the terms of the GNU General Public License as
20148 # published by the Free Software Foundation; either version 2 of
20149 # the License, or (at your option) any later version.
20150 #
20151 # As a special exception to the GNU General Public License,
20152 # if you distribute this file as part of a program or library that
20153 # is built using GNU Libtool, you may include this file under the
20154 # same distribution terms that you use for the rest of that program.
20155 #
20156 # GNU Libtool is distributed in the hope that it will be useful,
20157 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20799 # GNU Libtool is distributed in the hope that it will be useful, but
20800 # WITHOUT ANY WARRANTY; without even the implied warranty of
2015820801 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2015920802 # GNU General Public License for more details.
2016020803 #
2016120804 # You should have received a copy of the GNU General Public License
20162 # along with GNU Libtool; see the file COPYING. If not, a copy
20163 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
20164 # obtained by writing to the Free Software Foundation, Inc.,
20165 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20805 # along with this program. If not, see <http://www.gnu.org/licenses/>.
2016620806
2016720807
2016820808 # The names of the tagged configurations supported by this script.
20169 available_tags="CXX "
20809 available_tags='CXX '
20810
20811 # Configured defaults for sys_lib_dlsearch_path munging.
20812 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
2017020813
2017120814 # ### BEGIN LIBTOOL CONFIG
2017220815
2018520828
2018620829 # Whether or not to optimize for fast installation.
2018720830 fast_install=$enable_fast_install
20831
20832 # Shared archive member basename,for filename based shared library versioning on AIX.
20833 shared_archive_member_spec=$shared_archive_member_spec
2018820834
2018920835 # Shell to use when invoking shell scripts.
2019020836 SHELL=$lt_SHELL
2030320949 # Transform the output of nm in a proper C declaration.
2030420950 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
2030520951
20952 # Transform the output of nm into a list of symbols to manually relocate.
20953 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
20954
2030620955 # Transform the output of nm in a C name address pair.
2030720956 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
2030820957
2030920958 # Transform the output of nm in a C name address pair when lib prefix is needed.
2031020959 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
2031120960
20961 # The name lister interface.
20962 nm_interface=$lt_lt_cv_nm_interface
20963
2031220964 # Specify filename containing input files for \$NM.
2031320965 nm_file_list_spec=$lt_nm_file_list_spec
2031420966
20315 # The root where to search for dependent libraries,and in which our libraries should be installed.
20967 # The root where to search for dependent libraries,and where our libraries should be installed.
2031620968 lt_sysroot=$lt_sysroot
20969
20970 # Command to truncate a binary pipe.
20971 lt_truncate_bin=$lt_lt_cv_truncate_bin
2031720972
2031820973 # The name of the directory that contains temporary libtool files.
2031920974 objdir=$objdir
2040521060 # Compile-time system search path for libraries.
2040621061 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
2040721062
20408 # Run-time system search path for libraries.
20409 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
21063 # Detected run-time system search path for libraries.
21064 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
21065
21066 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
21067 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
2041021068
2041121069 # Whether dlopen is supported.
2041221070 dlopen_support=$enable_dlopen
2049921157 # Whether we need a single "-rpath" flag with a separated argument.
2050021158 hardcode_libdir_separator=$lt_hardcode_libdir_separator
2050121159
20502 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
21160 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
2050321161 # DIR into the resulting binary.
2050421162 hardcode_direct=$hardcode_direct
2050521163
20506 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
21164 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
2050721165 # DIR into the resulting binary and the resulting library dependency is
20508 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
21166 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
2050921167 # library is relocated.
2051021168 hardcode_direct_absolute=$hardcode_direct_absolute
2051121169
2057121229
2057221230 _LT_EOF
2057321231
21232 cat <<'_LT_EOF' >> "$cfgfile"
21233
21234 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
21235
21236 # func_munge_path_list VARIABLE PATH
21237 # -----------------------------------
21238 # VARIABLE is name of variable containing _space_ separated list of
21239 # directories to be munged by the contents of PATH, which is string
21240 # having a format:
21241 # "DIR[:DIR]:"
21242 # string "DIR[ DIR]" will be prepended to VARIABLE
21243 # ":DIR[:DIR]"
21244 # string "DIR[ DIR]" will be appended to VARIABLE
21245 # "DIRP[:DIRP]::[DIRA:]DIRA"
21246 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
21247 # "DIRA[ DIRA]" will be appended to VARIABLE
21248 # "DIR[:DIR]"
21249 # VARIABLE will be replaced by "DIR[ DIR]"
21250 func_munge_path_list ()
21251 {
21252 case x$2 in
21253 x)
21254 ;;
21255 *:)
21256 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
21257 ;;
21258 x:*)
21259 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
21260 ;;
21261 *::*)
21262 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
21263 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
21264 ;;
21265 *)
21266 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
21267 ;;
21268 esac
21269 }
21270
21271
21272 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
21273 func_cc_basename ()
21274 {
21275 for cc_temp in $*""; do
21276 case $cc_temp in
21277 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
21278 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
21279 \-*) ;;
21280 *) break;;
21281 esac
21282 done
21283 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
21284 }
21285
21286
21287 # ### END FUNCTIONS SHARED WITH CONFIGURE
21288
21289 _LT_EOF
21290
2057421291 case $host_os in
2057521292 aix3*)
2057621293 cat <<\_LT_EOF >> "$cfgfile"
2057721294 # AIX sometimes has problems with the GCC collect2 program. For some
2057821295 # reason, if we set the COLLECT_NAMES environment variable, the problems
2057921296 # vanish in a puff of smoke.
20580 if test "X${COLLECT_NAMES+set}" != Xset; then
21297 if test set != "${COLLECT_NAMES+set}"; then
2058121298 COLLECT_NAMES=
2058221299 export COLLECT_NAMES
2058321300 fi
2058621303 esac
2058721304
2058821305
20589 ltmain="$ac_aux_dir/ltmain.sh"
21306 ltmain=$ac_aux_dir/ltmain.sh
2059021307
2059121308
2059221309 # We use sed instead of cat because bash on DJGPP gets confused if
2059621313 sed '$q' "$ltmain" >> "$cfgfile" \
2059721314 || (rm -f "$cfgfile"; exit 1)
2059821315
20599 if test x"$xsi_shell" = xyes; then
20600 sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
20601 func_dirname ()\
20602 {\
20603 \ case ${1} in\
20604 \ */*) func_dirname_result="${1%/*}${2}" ;;\
20605 \ * ) func_dirname_result="${3}" ;;\
20606 \ esac\
20607 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
20608 && mv -f "$cfgfile.tmp" "$cfgfile" \
20609 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20610 test 0 -eq $? || _lt_function_replace_fail=:
20611
20612
20613 sed -e '/^func_basename ()$/,/^} # func_basename /c\
20614 func_basename ()\
20615 {\
20616 \ func_basename_result="${1##*/}"\
20617 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
20618 && mv -f "$cfgfile.tmp" "$cfgfile" \
20619 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20620 test 0 -eq $? || _lt_function_replace_fail=:
20621
20622
20623 sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
20624 func_dirname_and_basename ()\
20625 {\
20626 \ case ${1} in\
20627 \ */*) func_dirname_result="${1%/*}${2}" ;;\
20628 \ * ) func_dirname_result="${3}" ;;\
20629 \ esac\
20630 \ func_basename_result="${1##*/}"\
20631 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
20632 && mv -f "$cfgfile.tmp" "$cfgfile" \
20633 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20634 test 0 -eq $? || _lt_function_replace_fail=:
20635
20636
20637 sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
20638 func_stripname ()\
20639 {\
20640 \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
20641 \ # positional parameters, so assign one to ordinary parameter first.\
20642 \ func_stripname_result=${3}\
20643 \ func_stripname_result=${func_stripname_result#"${1}"}\
20644 \ func_stripname_result=${func_stripname_result%"${2}"}\
20645 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
20646 && mv -f "$cfgfile.tmp" "$cfgfile" \
20647 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20648 test 0 -eq $? || _lt_function_replace_fail=:
20649
20650
20651 sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
20652 func_split_long_opt ()\
20653 {\
20654 \ func_split_long_opt_name=${1%%=*}\
20655 \ func_split_long_opt_arg=${1#*=}\
20656 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
20657 && mv -f "$cfgfile.tmp" "$cfgfile" \
20658 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20659 test 0 -eq $? || _lt_function_replace_fail=:
20660
20661
20662 sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
20663 func_split_short_opt ()\
20664 {\
20665 \ func_split_short_opt_arg=${1#??}\
20666 \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
20667 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
20668 && mv -f "$cfgfile.tmp" "$cfgfile" \
20669 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20670 test 0 -eq $? || _lt_function_replace_fail=:
20671
20672
20673 sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
20674 func_lo2o ()\
20675 {\
20676 \ case ${1} in\
20677 \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
20678 \ *) func_lo2o_result=${1} ;;\
20679 \ esac\
20680 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
20681 && mv -f "$cfgfile.tmp" "$cfgfile" \
20682 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20683 test 0 -eq $? || _lt_function_replace_fail=:
20684
20685
20686 sed -e '/^func_xform ()$/,/^} # func_xform /c\
20687 func_xform ()\
20688 {\
20689 func_xform_result=${1%.*}.lo\
20690 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
20691 && mv -f "$cfgfile.tmp" "$cfgfile" \
20692 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20693 test 0 -eq $? || _lt_function_replace_fail=:
20694
20695
20696 sed -e '/^func_arith ()$/,/^} # func_arith /c\
20697 func_arith ()\
20698 {\
20699 func_arith_result=$(( $* ))\
20700 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
20701 && mv -f "$cfgfile.tmp" "$cfgfile" \
20702 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20703 test 0 -eq $? || _lt_function_replace_fail=:
20704
20705
20706 sed -e '/^func_len ()$/,/^} # func_len /c\
20707 func_len ()\
20708 {\
20709 func_len_result=${#1}\
20710 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
20711 && mv -f "$cfgfile.tmp" "$cfgfile" \
20712 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20713 test 0 -eq $? || _lt_function_replace_fail=:
20714
20715 fi
20716
20717 if test x"$lt_shell_append" = xyes; then
20718 sed -e '/^func_append ()$/,/^} # func_append /c\
20719 func_append ()\
20720 {\
20721 eval "${1}+=\\${2}"\
20722 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
20723 && mv -f "$cfgfile.tmp" "$cfgfile" \
20724 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20725 test 0 -eq $? || _lt_function_replace_fail=:
20726
20727
20728 sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
20729 func_append_quoted ()\
20730 {\
20731 \ func_quote_for_eval "${2}"\
20732 \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
20733 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
20734 && mv -f "$cfgfile.tmp" "$cfgfile" \
20735 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20736 test 0 -eq $? || _lt_function_replace_fail=:
20737
20738
20739 # Save a `func_append' function call where possible by direct use of '+='
20740 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
20741 && mv -f "$cfgfile.tmp" "$cfgfile" \
20742 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20743 test 0 -eq $? || _lt_function_replace_fail=:
20744 else
20745 # Save a `func_append' function call even when '+=' is not available
20746 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
20747 && mv -f "$cfgfile.tmp" "$cfgfile" \
20748 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
20749 test 0 -eq $? || _lt_function_replace_fail=:
20750 fi
20751
20752 if test x"$_lt_function_replace_fail" = x":"; then
20753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
20754 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
20755 fi
20756
20757
2075821316 mv -f "$cfgfile" "$ofile" ||
2075921317 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2076021318 chmod +x "$ofile"
2084121399 # Whether we need a single "-rpath" flag with a separated argument.
2084221400 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
2084321401
20844 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
21402 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
2084521403 # DIR into the resulting binary.
2084621404 hardcode_direct=$hardcode_direct_CXX
2084721405
20848 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
21406 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
2084921407 # DIR into the resulting binary and the resulting library dependency is
20850 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
21408 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
2085121409 # library is relocated.
2085221410 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
2085321411
11
22 m4_define([VERSION_MAJOR], [1])
33 m4_define([VERSION_MINOR], [4])
4 m4_define([VERSION_POINT], [2])
4 m4_define([VERSION_POINT], [3])
55 m4_define([GEOTIFF_VERSION],
66 [VERSION_MAJOR.VERSION_MINOR.VERSION_POINT])
77
3232 /* Standard include files. */
3333 /* ==================================================================== */
3434
35 #include <geo_config.h>
35 #include "geo_config.h"
3636 #include <stdio.h>
3737
3838 #include <math.h>
5050 /**********************************************************************
5151 * Do we want to build as a DLL on windows?
5252 **********************************************************************/
53 #if !defined(CPL_DLL)
53 #if !defined(GTIF_DLL)
5454 # if defined(_WIN32) && defined(BUILD_AS_DLL)
55 # define CPL_DLL __declspec(dllexport)
55 # define GTIF_DLL __declspec(dllexport)
5656 # else
57 # define CPL_DLL
57 # define GTIF_DLL
5858 # endif
5959 #endif
6060
154154 #define CPLRealloc gtCPLRealloc
155155 #define CPLStrdup gtCPLStrdup
156156
157 void CPL_DLL *CPLMalloc( int );
158 void CPL_DLL *CPLCalloc( int, int );
159 void CPL_DLL *CPLRealloc( void *, int );
160 char CPL_DLL *CPLStrdup( const char * );
157 void GTIF_DLL *CPLMalloc( int );
158 void GTIF_DLL *CPLCalloc( int, int );
159 void GTIF_DLL *CPLRealloc( void *, int );
160 char GTIF_DLL *CPLStrdup( const char * );
161161
162162 #define CPLFree(x) { if( x != NULL ) VSIFree(x); }
163163
173173
174174 #define CPLReadLine gtCPLReadLine
175175
176 const char CPL_DLL *CPLReadLine( FILE * );
176 const char GTIF_DLL *CPLReadLine( FILE * );
177177
178178 /*=====================================================================
179179 Error handling functions (cpl_error.c)
195195 #define CPLSetErrorHandler gtCPLSetErrorHandler
196196 #define _CPLAssert gt_CPLAssert
197197
198 void CPL_DLL CPLError(CPLErr eErrClass, int err_no, const char *fmt, ...);
199 void CPL_DLL CPLErrorReset();
200 int CPL_DLL CPLGetLastErrorNo();
201 const char CPL_DLL * CPLGetLastErrorMsg();
202 void CPL_DLL CPLSetErrorHandler(void(*pfnErrorHandler)(CPLErr,int,
198 void GTIF_DLL CPLError(CPLErr eErrClass, int err_no, const char *fmt, ...);
199 void GTIF_DLL CPLErrorReset();
200 int GTIF_DLL CPLGetLastErrorNo();
201 const char GTIF_DLL * CPLGetLastErrorMsg();
202 void GTIF_DLL CPLSetErrorHandler(void(*pfnErrorHandler)(CPLErr,int,
203203 const char *));
204 void CPL_DLL _CPLAssert( const char *, const char *, int );
204 void GTIF_DLL _CPLAssert( const char *, const char *, int );
205205
206206 #ifdef DEBUG
207207 # define CPLAssert(expr) ((expr) ? (void)(0) : _CPLAssert(#expr,__FILE__,__LINE__))
237237 #define CSLTokenizeString gtCSLTokenizeString
238238 #define CSLTokenizeStringComplex gtCSLTokenizeStringComplex
239239
240 char CPL_DLL **CSLAddString(char **papszStrList, const char *pszNewString);
241 int CPL_DLL CSLCount(char **papszStrList);
242 const char CPL_DLL *CSLGetField( char **, int );
243 void CPL_DLL CSLDestroy(char **papszStrList);
244 char CPL_DLL **CSLDuplicate(char **papszStrList);
245
246 char CPL_DLL **CSLTokenizeString(const char *pszString );
247 char CPL_DLL **CSLTokenizeStringComplex(const char *pszString,
240 char GTIF_DLL **CSLAddString(char **papszStrList, const char *pszNewString);
241 int GTIF_DLL CSLCount(char **papszStrList);
242 const char GTIF_DLL *CSLGetField( char **, int );
243 void GTIF_DLL CSLDestroy(char **papszStrList);
244 char GTIF_DLL **CSLDuplicate(char **papszStrList);
245
246 char GTIF_DLL **CSLTokenizeString(const char *pszString );
247 char GTIF_DLL **CSLTokenizeStringComplex(const char *pszString,
248248 const char *pszDelimiter,
249249 int bHonourStrings, int bAllowEmptyTokens );
250250
269269 #define SetCSVFilenameHook gtSetCSVFilenameHook
270270 #define CSVGetFileFieldId gtCSVGetFileFieldId
271271
272 const char CPL_DLL *CSVFilename( const char * );
273
274 char CPL_DLL **CSVReadParseLine( FILE * );
275 char CPL_DLL **CSVScanLines( FILE *, int, const char *, CSVCompareCriteria );
276 char CPL_DLL **CSVScanFile( const char *, int, const char *,
272 const char GTIF_DLL *CSVFilename( const char * );
273
274 char GTIF_DLL **CSVReadParseLine( FILE * );
275 char GTIF_DLL **CSVScanLines( FILE *, int, const char *, CSVCompareCriteria );
276 char GTIF_DLL **CSVScanFile( const char *, int, const char *,
277277 CSVCompareCriteria );
278 char CPL_DLL **CSVScanFileByName( const char *, const char *, const char *,
278 char GTIF_DLL **CSVScanFileByName( const char *, const char *, const char *,
279279 CSVCompareCriteria );
280 int CPL_DLL CSVGetFieldId( FILE *, const char * );
281 int CPL_DLL CSVGetFileFieldId( const char *, const char * );
282
283 void CPL_DLL CSVDeaccess( const char * );
284
285 const char CPL_DLL *CSVGetField( const char *, const char *, const char *,
280 int GTIF_DLL CSVGetFieldId( FILE *, const char * );
281 int GTIF_DLL CSVGetFileFieldId( const char *, const char * );
282
283 void GTIF_DLL CSVDeaccess( const char * );
284
285 const char GTIF_DLL *CSVGetField( const char *, const char *, const char *,
286286 CSVCompareCriteria, const char * );
287287
288 void CPL_DLL SetCSVFilenameHook( const char *(*)(const char *) );
288 void GTIF_DLL SetCSVFilenameHook( const char *(*)(const char *) );
289289
290290 CPL_C_END
291291
22
33 scriptversion=2013-05-30.07; # UTC
44
5 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
5 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
66
77 # This program is free software; you can redistribute it and/or modify
88 # it under the terms of the GNU General Public License as published by
00 /******************************************************************************
1 * $Id: geo_extra.c 2691 2015-12-06 21:54:31Z rouault $
1 * $Id: geo_extra.c 2741 2016-09-04 18:50:49Z rouault $
22 *
33 * Project: libgeotiff
44 * Purpose: Code to normalize a few common PCS values without use of CSV
3636 #include "geo_normalize.h"
3737 #include "geovalues.h"
3838
39 static const int StatePlaneTable[] =
39 static const int StatePlaneTable[] =
4040 {
4141 PCS_NAD83_Alabama_East, Proj_Alabama_CS83_East,
4242 PCS_NAD83_Alabama_West, Proj_Alabama_CS83_West,
208208 PCS_NAD83_Wyoming_E_Cen, Proj_Wyoming_CS83_East_Central,
209209 PCS_NAD83_Wyoming_W_Cen, Proj_Wyoming_CS83_West_Central,
210210 PCS_NAD83_Wyoming_West, Proj_Wyoming_CS83_West,
211
211
212212 PCS_NAD83_Puerto_Rico_Virgin_Is, Proj_Puerto_Rico_Virgin_Is,
213213
214214 PCS_NAD27_Alabama_East, Proj_Alabama_CS27_East,
386386 PCS_NAD27_Wyoming_E_Cen, Proj_Wyoming_CS27_East_Central,
387387 PCS_NAD27_Wyoming_W_Cen, Proj_Wyoming_CS27_West_Central,
388388 PCS_NAD27_Wyoming_West, Proj_Wyoming_CS27_West,
389
389
390390 PCS_NAD27_Puerto_Rico, Proj_Puerto_Rico_CS27,
391391
392392 KvUserDefined
458458 PCSCode = 2205;
459459 }
460460
461 return( PCSCode );
461 return PCSCode;
462462 }
463463
464464 /************************************************************************/
498498 ProjCode = 15303;
499499 }
500500
501 return( ProjCode );
501 return ProjCode;
502502 }
503503
504504 /************************************************************************/
533533 * This function is useful to recognise (most) UTM and State Plane coordinate
534534 * systems, even if CSV files aren't available to translate them automatically.
535535 * It is used as a fallback mechanism by GTIFGetDefn() for normalization when
536 * CSV files aren't found.
536 * CSV files aren't found.
537537 */
538538
539539 int GTIFPCSToMapSys( int PCSCode, int * pDatum, int * pZone )
552552 Proj = MapSys_UTM_North;
553553 nZone = PCSCode - PCS_NAD27_UTM_zone_3N + 3;
554554 }
555 else if( PCSCode >= PCS_NAD83_UTM_zone_3N
555 else if( PCSCode >= PCS_NAD83_UTM_zone_3N
556556 && PCSCode <= PCS_NAD83_UTM_zone_23N )
557557 {
558558 Datum = GCS_NAD83;
604604 Proj = MapSys_UTM_South;
605605 nZone = PCSCode - PCS_WGS84_UTM_zone_1S + 1;
606606 }
607 else if( PCSCode >= PCS_SAD69_UTM_zone_18N
607 else if( PCSCode >= PCS_SAD69_UTM_zone_18N
608608 && PCSCode <= PCS_SAD69_UTM_zone_22N )
609609 {
610610 Datum = KvUserDefined;
641641 Proj = MapSys_State_Plane_27;
642642 Datum = GCS_NAD27;
643643 }
644
644
645645 nZone = PCSCode - 10000;
646646 if( Datum == GCS_NAD83 )
647647 nZone -= 30;
653653 if( pZone != NULL )
654654 *pZone = nZone;
655655
656 return( Proj );
656 return Proj;
657657 }
658658
659659 /************************************************************************/
722722 nZone = ProjCode - 10000;
723723 }
724724 }
725
725
726726 if( pZone != NULL )
727727 *pZone = nZone;
728728
729 return( MapSys );
729 return MapSys;
730730 }
731
2222 **********************************************************************/
2323
2424 /**
25
25
2626 This function deallocates an existing GeoTIFF access handle previously
2727 created with GTIFNew(). If the handle was
28 used to write GeoTIFF keys to the TIFF file, the
28 used to write GeoTIFF keys to the TIFF file, the
2929 GTIFWriteKeys() function should be used
3030 to flush results to the file before calling GTIFFree(). GTIFFree()
3131 should be called before XTIFFClose() is
3636 void GTIFFree(GTIF* gtif)
3737 {
3838 int i;
39
39
4040 if (!gtif) return;
41
41
4242 /* Free parameter arrays */
4343 if (gtif->gt_double) _GTIFFree (gtif->gt_double);
4444 if (gtif->gt_short) _GTIFFree (gtif->gt_short);
45
45
4646 /* Free GeoKey arrays */
4747 if (gtif->gt_keys)
4848 {
5656 _GTIFFree (gtif->gt_keys);
5757 }
5858 if (gtif->gt_keyindex) _GTIFFree (gtif->gt_keyindex);
59
59
6060 _GTIFFree (gtif);
6161 }
4848 return (int)keyptr->gk_count;
4949 }
5050
51 /**
51 /**
5252
5353 This function reads the value of a single GeoKey from a GeoTIFF file.
5454
6767 integer values as they will be shorts, and the int's may not be properly
6868 initialized (and will be grossly wrong on MSB systems).
6969
70 @param index Indicates how far into the list of values
70 @param nIndex Indicates how far into the list of values
7171 for this geokey to offset. Should normally be zero.
7272
7373 @param count Indicates how many values
7474 to read. At this time all keys except for strings have only one value,
75 so <b>index</b> should be zero, and <b>count</b> should be one.
75 so <b>nIndex</b> should be zero, and <b>count</b> should be one.
7676
7777 @return The GTIFKeyGet() function returns the number of values read. Normally
7878 this would be one if successful or zero if the key doesn't exist for this
137137 ValuePair( ProjAzimuthAngleGeoKey, 3094) -- GeogAzimuthUnit --
138138 ValuePair( ProjStraightVertPoleLongGeoKey, 3095) -- GeogAngularUnit --
139139
140 6.2.4 Vertical CS Keys
141
140 6.2.4 Vertical CS Keys
141
142142 ValuePair( VerticalCSTypeGeoKey, 4096) -- Section 6.3.4.1 codes --
143143 ValuePair( VerticalCitationGeoKey, 4097) -- documentation --
144144 ValuePair( VerticalDatumGeoKey, 4098) -- Section 6.3.4.2 codes --
6666 };
6767 typedef struct TempKeyData TempKeyData;
6868
69 struct gtiff;
70
71 #ifndef GTIF_PRINT_FUNC_FORMAT
72 #if defined(__GNUC__) && __GNUC__ >= 3
73 #define GTIF_PRINT_FUNC_FORMAT( format_idx, arg_idx ) __attribute__((__format__ (__printf__, format_idx, arg_idx)))
74 #else
75 #define GTIF_PRINT_FUNC_FORMAT( format_idx, arg_idx )
76 #endif
77 #endif
78
79 #ifndef GTERRORCALLBACK_DEFINED
80 #define GTERRORCALLBACK_DEFINED
81 /* Defined in both geotiff.h and geo_kep.h */
82 typedef void (*GTErrorCallback) (struct gtiff*,
83 int level,
84 const char* msg, ...) GTIF_PRINT_FUNC_FORMAT(3,4);
85 #endif
6986
7087 struct gtiff {
7188 tiff_t* gt_tif; /* TIFF file descriptor */
7289 struct _TIFFMethod gt_methods; /* TIFF i/o methods */
7390 int gt_flags; /* file flags */
74
91
7592 pinfo_t gt_version; /* GeoTIFF Version */
7693 pinfo_t gt_rev_major;/* GeoKey Key Revision */
7794 pinfo_t gt_rev_minor;/* GeoKey Code Revision */
78
95
7996 int gt_num_keys; /* number of keys */
8097 GeoKey* gt_keys; /* array of keys */
8198 int* gt_keyindex; /* index of a key, if set*/
8299 int gt_keymin; /* smallest key set */
83100 int gt_keymax; /* largest key set */
84
101
85102 pinfo_t* gt_short; /* array of SHORT vals */
86103 double* gt_double; /* array of DOUBLE vals */
87104 int gt_nshorts; /* number of SHORT vals */
88105 int gt_ndoubles; /* number of DOUBLE vals */
89 };
106
107 GTErrorCallback gt_error_callback;
108 void* gt_user_data;
109 };
90110
91111 typedef enum {
92112 FLAG_FILE_OPEN=1,
98118 #define MAX_VALUES 1000 /* maximum values in a tag */
99119
100120 #endif /* LIBGEOTIFF_GEO_KEYP_H_ */
101
00 /*
11 * geo_names.c
22 *
3 * This encapsulates all of the value-naming mechanism of
4 * libgeotiff.
3 * This encapsulates all of the value-naming mechanism of
4 * libgeotiff.
55 *
66 * Written By: Niles Ritter
77 *
4343 static char *FindName(const KeyInfo *info,int key)
4444 {
4545 static char errmsg[80];
46
46
4747 while (info->ki_key>=0 && info->ki_key != key) info++;
4848
4949 if (info->ki_key<0)
7272 char *GTIFValueName(geokey_t key, int value)
7373 {
7474 const KeyInfo *info;
75
75
7676 switch (key)
7777 {
7878 /* All codes using linear/angular/whatever units */
79 case GeogLinearUnitsGeoKey:
80 case ProjLinearUnitsGeoKey:
81 case GeogAngularUnitsGeoKey:
82 case GeogAzimuthUnitsGeoKey:
79 case GeogLinearUnitsGeoKey:
80 case ProjLinearUnitsGeoKey:
81 case GeogAngularUnitsGeoKey:
82 case GeogAzimuthUnitsGeoKey:
8383 case VerticalUnitsGeoKey:
8484 info=_geounitsValue; break;
8585
9999 /* And if all else fails... */
100100 default: info = _csdefaultValue;break;
101101 }
102
102
103103 return FindName( info,value);
104104 }
105105
106 /*
107 * Inverse Utilities (name->code)
106 /*
107 * Inverse Utilities (name->code)
108108 */
109109
110110
149149 int GTIFValueCode(geokey_t key, char *name)
150150 {
151151 const KeyInfo *info;
152
152
153153 switch (key)
154154 {
155155 /* All codes using linear/angular/whatever units */
156 case GeogLinearUnitsGeoKey:
157 case ProjLinearUnitsGeoKey:
158 case GeogAngularUnitsGeoKey:
156 case GeogLinearUnitsGeoKey:
157 case ProjLinearUnitsGeoKey:
158 case GeogAngularUnitsGeoKey:
159159 case GeogAzimuthUnitsGeoKey:
160 case VerticalUnitsGeoKey:
160 case VerticalUnitsGeoKey:
161161 info=_geounitsValue; break;
162162
163163 /* put other key-dependent lists here */
176176 /* And if all else fails... */
177177 default: info = _csdefaultValue;break;
178178 }
179
179
180180 return FindCode( info,name);
181181 }
182
1212 * 7 July, 1995 Greg Martin Fix index
1313 *
1414 **********************************************************************/
15
16 #include <stdarg.h>
1517
1618 #include "geotiffio.h" /* public interface */
1719 #include "geo_tiffp.h" /* external TIFF interface */
1820 #include "geo_keyp.h" /* private interface */
19 #include "geo_simpletags.h"
21 #include "geo_simpletags.h"
2022
2123 /* private local routines */
2224 static int ReadKey(GTIF* gt, TempKeyData* tempData,
2325 KeyEntry* entptr, GeoKey* keyptr);
2426
2527
28 static void GTIFErrorFunction(GTIF* gt, int level, const char* msg, ...)
29 {
30 va_list list;
31 (void)gt;
32
33 va_start(list, msg);
34 if( level == LIBGEOTIFF_WARNING )
35 fprintf(stderr, "Warning :");
36 else if( level == LIBGEOTIFF_ERROR )
37 fprintf(stderr, "Error :");
38 vfprintf(stderr, msg, list);
39 fprintf(stderr, "\n");
40 va_end(list);
41 }
42
2643 /**********************************************************************
2744 *
2845 * Public Routines
3148
3249
3350 /**
34 * Given an open TIFF file, look for GTIF keys and
51 * Given an open TIFF file, look for GTIF keys and
3552 * values and return GTIF structure.
3653
3754 This function creates a GeoTIFF information interpretation handle
38 (GTIF *) based on a passed in TIFF handle originally from
39 XTIFFOpen(). Even though the argument
55 (GTIF *) based on a passed in TIFF handle originally from
56 XTIFFOpen(). Even though the argument
4057 (<b>tif</b>) is shown as type <tt>void *</tt>, it is really normally
4158 of type <tt>TIFF *</tt>.<p>
4259
43 The returned GTIF handle can be used to read or write GeoTIFF tags
60 The returned GTIF handle can be used to read or write GeoTIFF tags
4461 using the various GTIF functions. The handle should be destroyed using
4562 GTIFFree() before the file is closed with TIFFClose().<p>
4663
5370 GTIF* GTIFNew(void *tif)
5471
5572 {
73 return GTIFNewEx( tif, GTIFErrorFunction, NULL );
74 }
75
76 GTIF* GTIFNewEx(void *tif,
77 GTErrorCallback error_callback, void* user_data)
78
79 {
5680 TIFFMethod default_methods;
5781 _GTIFSetDefaultTIFF( &default_methods );
5882
59 return GTIFNewWithMethods( tif, &default_methods );
83 return GTIFNewWithMethodsEx( tif, &default_methods,
84 error_callback, user_data );
6085 }
6186
6287 GTIF *GTIFNewSimpleTags( void *tif )
78103
79104 GTIF* GTIFNewWithMethods(void *tif, TIFFMethod* methods)
80105 {
81 GTIF* gt=(GTIF*)0;
106 return GTIFNewWithMethodsEx(tif, methods, GTIFErrorFunction, NULL);
107 }
108
109 GTIF* GTIFNewWithMethodsEx(void *tif, TIFFMethod* methods,
110 GTErrorCallback error_callback, void* user_data)
111 {
112 GTIF* gt;
82113 int count,bufcount,nIndex;
83114 GeoKey *keyptr;
84115 pinfo_t *data;
88119
89120 memset( &tempData, 0, sizeof(tempData) );
90121 gt = (GTIF*)_GTIFcalloc( sizeof(GTIF));
91 if (!gt) goto failure;
92
122 if (!gt) goto failure;
123 gt->gt_error_callback = error_callback;
124 gt->gt_user_data = user_data;
125
93126 /* install TIFF file and I/O methods */
94127 gt->gt_tif = (tiff_t *)tif;
95128 memcpy( &gt->gt_methods, methods, sizeof(TIFFMethod) );
96129
97130 /* since this is an array, GTIF will allocate the memory */
98 if ( tif == NULL
131 if ( tif == NULL
99132 || !(gt->gt_methods.get)(tif, GTIFF_GEOKEYDIRECTORY, &gt->gt_nshorts, &data ))
100133 {
101134 /* No ProjectionInfo, create a blank one */
102135 data=(pinfo_t*)_GTIFcalloc((4+MAX_VALUES)*sizeof(pinfo_t));
103 if (!data) goto failure;
136 if (!data) goto failure;
104137 header = (KeyHeader *)data;
105138 header->hdr_version = GvCurrentVersion;
106139 header->hdr_rev_major = GvCurrentRevision;
114147 }
115148 gt->gt_short = data;
116149 header = (KeyHeader *)data;
117
150
118151 if (header->hdr_version > GvCurrentVersion) goto failure;
119152 if (header->hdr_rev_major > GvCurrentRevision)
120153 {
121154 /* issue warning */
122155 }
123
156
124157 /* If we got here, then the geokey can be parsed */
125158 count = header->hdr_num_keys;
126159
127 if (count * sizeof(KeyEntry) >= (4 + MAX_VALUES) * sizeof(pinfo_t))
128 goto failure;
160 if (count * sizeof(KeyEntry) >= (4 + MAX_VALUES) * sizeof(pinfo_t))
161 goto failure;
129162
130163 gt->gt_num_keys = count;
131164 gt->gt_version = header->hdr_version;
140173 &gt->gt_ndoubles, &gt->gt_double ))
141174 {
142175 gt->gt_double=(double*)_GTIFcalloc(MAX_VALUES*sizeof(double));
143 if (!gt->gt_double) goto failure;
176 if (!gt->gt_double) goto failure;
144177 }
145178 else
146179 {
180 if( gt->gt_ndoubles > MAX_VALUES )
181 goto failure;
147182 /* resize data array so it can be extended if needed */
148183 gt->gt_double = (double*) _GTIFrealloc(gt->gt_double,
149184 (MAX_VALUES)*sizeof(double));
159194 else
160195 {
161196 /* last NULL doesn't count; "|" used for delimiter */
162 if( tempData.tk_asciiParamsLength > 0
197 if( tempData.tk_asciiParamsLength > 0
163198 && tempData.tk_asciiParams[tempData.tk_asciiParamsLength-1] == '\0')
164199 {
165200 --tempData.tk_asciiParamsLength;
171206 if (!gt->gt_keys) goto failure;
172207 gt->gt_keyindex = (int *)_GTIFcalloc( sizeof(int)*(MAX_KEYINDEX+1));
173208 if (!gt->gt_keyindex) goto failure;
174
209
175210 /* Loop to get all GeoKeys */
176211 entptr = ((KeyEntry *)data) + 1;
177212 keyptr = gt->gt_keys;
181216 {
182217 if (!ReadKey(gt, &tempData, entptr, ++keyptr))
183218 goto failure;
184
219
185220 /* Set up the index (start at 1, since 0=unset) */
186 gt->gt_keyindex[entptr->ent_key] = nIndex;
221 gt->gt_keyindex[entptr->ent_key] = nIndex;
187222 }
188223
189224 if( tempData.tk_asciiParams != NULL )
190225 _GTIFFree( tempData.tk_asciiParams );
191
226
192227 return gt;
193
228
194229 failure:
195230 /* Notify of error */
196231 if( tempData.tk_asciiParams != NULL )
197 _GTIFFree( tempData.tk_asciiParams );
232 _GTIFFree( tempData.tk_asciiParams );
198233 GTIFFree (gt);
199234 return (GTIF *)0;
200235 }
246281 case GTIFF_ASCIIPARAMS:
247282 if( tempData->tk_asciiParams == NULL )
248283 return 0;
249 if( offset + count == tempData->tk_asciiParamsLength + 1
284 if( offset + count == tempData->tk_asciiParamsLength + 1
250285 && count > 0 )
251286 {
252 /* some vendors seem to feel they should not use the
287 /* some vendors seem to feel they should not use the
253288 terminating '|' char, but do include a terminating '\0'
254 which we lose in the low level reading code.
289 which we lose in the low level reading code.
255290 If this is the case, drop the extra character */
256291 count--;
257292 }
262297 /* issue warning... if we could */
263298 }
264299 else if (offset + count > tempData->tk_asciiParamsLength)
265 return (0);
300 return 0;
266301
267302 keyptr->gk_count = MAX(1,count+1);
268303 keyptr->gk_data = (char *) _GTIFcalloc (keyptr->gk_count);
281316 return 0; /* failure */
282317 }
283318 keyptr->gk_size = _gtiff_size[keyptr->gk_type];
284
319
285320 return 1; /* success */
286321 }
322
323 void *GTIFGetUserData(GTIF *gtif)
324 {
325 return gtif->gt_user_data;
326 }
00 /******************************************************************************
1 * $Id: geo_normalize.c 2712 2016-01-11 11:36:59Z rouault $
1 * $Id: geo_normalize.c 2807 2018-01-26 12:55:19Z rouault $
22 *
33 * Project: libgeotiff
44 * Purpose: Code to normalize PCS and other composite codes in a GeoTIFF file.
2525 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2626 * DEALINGS IN THE SOFTWARE.
2727 *****************************************************************************/
28
28
2929 #include "cpl_serv.h"
3030 #include "geo_tiffp.h"
3131 #include "geovalues.h"
3232 #include "geo_normalize.h"
33 #include "geo_keyp.h"
3334
3435 #ifndef KvUserDefined
3536 # define KvUserDefined 32767
7576 #define CT_Ext_Mercator_2SP -CT_Mercator
7677
7778 #ifndef CPL_INLINE
78 #if (defined(__GNUC__) && !defined(__NO_INLINE__)) || defined(_MSC_VER)
79 #define HAS_CPL_INLINE 1
80 #define CPL_INLINE __inline
81 #elif defined(__SUNPRO_CC)
82 #define HAS_CPL_INLINE 1
83 #define CPL_INLINE inline
84 #else
85 #define CPL_INLINE
86 #endif
79 # if (defined(__GNUC__) && !defined(__NO_INLINE__)) || defined(_MSC_VER)
80 # define HAS_CPL_INLINE 1
81 # define CPL_INLINE __inline
82 # elif defined(__SUNPRO_CC)
83 # define HAS_CPL_INLINE 1
84 # define CPL_INLINE inline
85 # else
86 # define CPL_INLINE
87 # endif
8788 #endif
8889
8990 #ifndef CPL_UNUSED
101102 /* GTIFGetPCSInfo() */
102103 /************************************************************************/
103104
104 int GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
105 short *pnProjOp, short *pnUOMLengthCode,
105 int GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
106 short *pnProjOp, short *pnUOMLengthCode,
106107 short *pnGeogCS )
107108
108109 {
164165 if( papszRecord == NULL )
165166 {
166167 pszFilename = CSVFilename( "pcs.csv" );
167
168
168169 sprintf( szSearchKey, "%d", nPCSCode );
169170 papszRecord = CSVScanFileByName( pszFilename, "COORD_REF_SYS_CODE",
170171 szSearchKey, CC_Integer );
258259 {
259260 if( nUOMAngle == 9110 ) /* DDD.MMSSsss */
260261 {
261 char szAngleString[32];
262
263 sprintf( szAngleString, "%12.7f", dfAngle );
264 dfAngle = GTIFAngleStringToDD( szAngleString, nUOMAngle );
262 if( dfAngle > -999.9 && dfAngle < 999.9 )
263 {
264 char szAngleString[32];
265
266 sprintf( szAngleString, "%12.7f", dfAngle );
267 dfAngle = GTIFAngleStringToDD( szAngleString, nUOMAngle );
268 }
265269 }
266270 else if ( nUOMAngle != KvUserDefined )
267271 {
268272 double dfInDegrees = 1.0;
269
273
270274 GTIFGetUOMAngleInfo( nUOMAngle, NULL, &dfInDegrees );
271275 dfAngle = dfAngle * dfInDegrees;
272276 }
273277
274 return( dfAngle );
278 return dfAngle;
275279 }
276280
277281 /************************************************************************/
284288
285289 {
286290 double dfAngle;
287
291
288292 if( nUOMAngle == 9110 ) /* DDD.MMSSsss */
289293 {
290294 char *pszDecimal;
291
295
292296 dfAngle = ABS(atoi(pszAngle));
293297 pszDecimal = strchr(pszAngle,'.');
294298 if( pszDecimal != NULL && strlen(pszDecimal) > 1 )
301305 szMinutes[1] = pszDecimal[2];
302306 else
303307 szMinutes[1] = '0';
304
308
305309 szMinutes[2] = '\0';
306310 dfAngle += atoi(szMinutes) / 60.0;
307311
347351 {
348352 CPLAssert( nUOMAngle == 9102 || nUOMAngle == KvUserDefined
349353 || nUOMAngle == 0 );
350
354
351355 dfAngle = GTIFAtof(pszAngle );
352356 }
353357
354 return( dfAngle );
358 return dfAngle;
355359 }
356360
357361 /************************************************************************/
374378 /* -------------------------------------------------------------------- */
375379 const char * pszName = NULL;
376380 nPM = PM_Greenwich;
377 nUOMAngle = Angular_DMS_Hemisphere;
381 nUOMAngle = Angular_DMS_Hemisphere;
378382 if( nGCSCode == GCS_NAD27 )
379383 {
380384 nDatum = Datum_North_American_Datum_1927;
420424 pszFilename = CSVFilename("gcs.override.csv");
421425 sprintf( szSearchKey, "%d", nGCSCode );
422426 nDatum = atoi(CSVGetField( pszFilename,
423 "COORD_REF_SYS_CODE", szSearchKey,
427 "COORD_REF_SYS_CODE", szSearchKey,
424428 CC_Integer, "DATUM_CODE" ) );
425429
426430 if( nDatum < 1 )
428432 pszFilename = CSVFilename("gcs.csv");
429433 sprintf( szSearchKey, "%d", nGCSCode );
430434 nDatum = atoi(CSVGetField( pszFilename,
431 "COORD_REF_SYS_CODE", szSearchKey,
435 "COORD_REF_SYS_CODE", szSearchKey,
432436 CC_Integer, "DATUM_CODE" ) );
433437 }
434438
449453
450454 if( pnDatum != NULL )
451455 *pnDatum = (short) nDatum;
452
456
453457 /* -------------------------------------------------------------------- */
454458 /* Get the PM. */
455459 /* -------------------------------------------------------------------- */
486490 CPLStrdup(CSVGetField( pszFilename,
487491 "COORD_REF_SYS_CODE",szSearchKey,CC_Integer,
488492 "COORD_REF_SYS_NAME" ));
489
490 return( TRUE );
493
494 return TRUE;
491495 }
492496
493497 /************************************************************************/
511515 /* -------------------------------------------------------------------- */
512516 double dfInvFlattening=0.0, dfSemiMinor=0.0;
513517 const char *pszName = NULL;
514
518
515519 if( nEllipseCode == Ellipse_Clarke_1866 )
516520 {
517521 pszName = "Clarke 1866";
589593 GTIFGetUOMLengthInfo( nUOMLength, NULL, &dfToMeters );
590594
591595 dfSemiMajor *= dfToMeters;
592
596
593597 if( pdfSemiMajor != NULL )
594598 *pdfSemiMajor = dfSemiMajor;
595
599
596600 /* -------------------------------------------------------------------- */
597601 /* Get the semi-minor if requested. If the Semi-minor axis */
598602 /* isn't available, compute it based on the inverse flattening. */
606610
607611 if( *pdfSemiMinor == 0.0 )
608612 {
609 dfInvFlattening =
613 dfInvFlattening =
610614 GTIFAtof(CSVGetField( CSVFilename("ellipsoid.csv"),
611615 "ELLIPSOID_CODE", szSearchKey, CC_Integer,
612616 "INV_FLATTENING" ));
622626 CPLStrdup(CSVGetField( CSVFilename("ellipsoid.csv"),
623627 "ELLIPSOID_CODE", szSearchKey, CC_Integer,
624628 "ELLIPSOID_NAME" ));
625
626 return( TRUE );
629
630 return TRUE;
627631 }
628632
629633 /************************************************************************/
659663 sprintf( szSearchKey, "%d", nPMCode );
660664
661665 nUOMAngle =
662 atoi(CSVGetField( pszFilename,
666 atoi(CSVGetField( pszFilename,
663667 "PRIME_MERIDIAN_CODE", szSearchKey, CC_Integer,
664668 "UOM_CODE" ) );
665669 if( nUOMAngle < 1 )
684688 {
685689 *pdfOffset =
686690 GTIFAngleStringToDD(
687 CSVGetField( pszFilename,
691 CSVGetField( pszFilename,
688692 "PRIME_MERIDIAN_CODE", szSearchKey, CC_Integer,
689693 "GREENWICH_LONGITUDE" ),
690694 nUOMAngle );
691695 }
692
696
693697 /* -------------------------------------------------------------------- */
694698 /* Get the name, if requested. */
695699 /* -------------------------------------------------------------------- */
696700 if( ppszName != NULL )
697701 *ppszName =
698702 CPLStrdup(
699 CSVGetField( pszFilename,
703 CSVGetField( pszFilename,
700704 "PRIME_MERIDIAN_CODE", szSearchKey, CC_Integer,
701705 "PRIME_MERIDIAN_NAME" ));
702
703 return( TRUE );
706
707 return TRUE;
704708 }
705709
706710 /************************************************************************/
764768 {
765769 pszFilename = CSVFilename( "gdal_datum.csv" );
766770 VSIFClose( fp );
767 }
771 }
768772 }
769773 else
770774 VSIFClose( fp );
806810 CPLStrdup(CSVGetField( pszFilename,
807811 "DATUM_CODE", szSearchKey, CC_Integer,
808812 "DATUM_NAME" ));
809
810 return( TRUE );
813
814 return TRUE;
811815 }
812816
813817
885889 "UNIT_OF_MEAS_NAME" );
886890 *ppszUOMName = CPLStrdup( CSLGetField(papszUnitsRecord, iNameField) );
887891 }
888
892
889893 /* -------------------------------------------------------------------- */
890894 /* Get the A and B factor fields, and create the multiplicative */
891895 /* factor. */
893897 if( pdfInMeters != NULL )
894898 {
895899 int iBFactorField, iCFactorField;
896
900
897901 iBFactorField = CSVGetFileFieldId( pszFilename, "FACTOR_B" );
898902 iCFactorField = CSVGetFileFieldId( pszFilename, "FACTOR_C" );
899903
903907 else
904908 *pdfInMeters = 0.0;
905909 }
906
907 return( TRUE );
910
911 return TRUE;
908912 }
909913
910914 /************************************************************************/
965969 default:
966970 break;
967971 }
968
972
969973 if (pszUOMName)
970974 {
971975 if( ppszUOMName != NULL )
994998 if( pszUOMName != NULL )
995999 {
9961000 double dfFactorB, dfFactorC, dfInRadians;
997
998 dfFactorB =
1001
1002 dfFactorB =
9991003 GTIFAtof(CSVGetField( pszFilename,
10001004 "UOM_CODE", szSearchKey, CC_Integer,
10011005 "FACTOR_B" ));
1002
1003 dfFactorC =
1006
1007 dfFactorC =
10041008 GTIFAtof(CSVGetField( pszFilename,
10051009 "UOM_CODE", szSearchKey, CC_Integer,
10061010 "FACTOR_C" ));
10261030 if( pdfInDegrees != NULL )
10271031 *pdfInDegrees = dfInDegrees;
10281032
1029 return( TRUE );
1033 return TRUE;
10301034 }
10311035
10321036 /************************************************************************/
10401044
10411045 {
10421046 /* see trf_method.csv for list of EPSG codes */
1043
1047
10441048 switch( nEPSG )
10451049 {
10461050 case 9801:
1047 return( CT_LambertConfConic_1SP );
1051 return CT_LambertConfConic_1SP;
10481052
10491053 case 9802:
1050 return( CT_LambertConfConic_2SP );
1054 return CT_LambertConfConic_2SP;
10511055
10521056 case 9803:
1053 return( CT_LambertConfConic_2SP ); /* Belgian variant not supported */
1057 return CT_LambertConfConic_2SP; /* Belgian variant not supported */
10541058
10551059 case 9804:
1056 return( CT_Mercator ); /* 1SP and 2SP not differentiated */
1060 return CT_Mercator; /* 1SP and 2SP not differentiated */
10571061
10581062 case 9805:
10591063 if( bReturnExtendedCTCode )
1060 return( CT_Ext_Mercator_2SP );
1064 return CT_Ext_Mercator_2SP;
10611065 else
1062 return( CT_Mercator ); /* 1SP and 2SP not differentiated */
1063
1066 return CT_Mercator; /* 1SP and 2SP not differentiated */
1067
10641068 /* Mercator 1SP (Spherical) For EPSG:3785 */
10651069 case 9841:
1066 return( CT_Mercator ); /* 1SP and 2SP not differentiated */
1067
1070 return CT_Mercator; /* 1SP and 2SP not differentiated */
1071
10681072 /* Google Mercator For EPSG:3857 */
10691073 case 1024:
1070 return( CT_Mercator ); /* 1SP and 2SP not differentiated */
1074 return CT_Mercator; /* 1SP and 2SP not differentiated */
10711075
10721076 case 9806:
1073 return( CT_CassiniSoldner );
1077 return CT_CassiniSoldner;
10741078
10751079 case 9807:
1076 return( CT_TransverseMercator );
1080 return CT_TransverseMercator;
10771081
10781082 case 9808:
1079 return( CT_TransvMercator_SouthOriented );
1083 return CT_TransvMercator_SouthOriented;
10801084
10811085 case 9809:
1082 return( CT_ObliqueStereographic );
1086 return CT_ObliqueStereographic;
10831087
10841088 case 9810:
1085 case 9829: /* variant B not quite the same - not sure how to handle */
1086 return( CT_PolarStereographic );
1089 case 9829: /* variant B not quite the same - not sure how to handle */
1090 return CT_PolarStereographic;
10871091
10881092 case 9811:
1089 return( CT_NewZealandMapGrid );
1093 return CT_NewZealandMapGrid;
10901094
10911095 case 9812:
1092 return( CT_ObliqueMercator ); /* is hotine actually different? */
1096 return CT_ObliqueMercator; /* is hotine actually different? */
10931097
10941098 case 9813:
1095 return( CT_ObliqueMercator_Laborde );
1099 return CT_ObliqueMercator_Laborde;
10961100
10971101 case 9814:
1098 return( CT_ObliqueMercator_Rosenmund ); /* swiss */
1102 return CT_ObliqueMercator_Rosenmund; /* swiss */
10991103
11001104 case 9815:
1101 return( CT_HotineObliqueMercatorAzimuthCenter );
1105 return CT_HotineObliqueMercatorAzimuthCenter;
11021106
11031107 case 9816: /* tunesia mining grid has no counterpart */
1104 return( KvUserDefined );
1108 return KvUserDefined;
11051109
11061110 case 9818:
1107 return( CT_Polyconic );
1111 return CT_Polyconic;
11081112
11091113 case 9820:
11101114 case 1027:
1111 return( CT_LambertAzimEqualArea );
1115 return CT_LambertAzimEqualArea;
11121116
11131117 case 9822:
1114 return( CT_AlbersEqualArea );
1118 return CT_AlbersEqualArea;
11151119
11161120 case 9834:
1117 return( CT_CylindricalEqualArea );
1118
1121 return CT_CylindricalEqualArea;
1122
11191123 case 1028:
11201124 case 1029:
11211125 case 9823: /* spherical */
11221126 case 9842: /* elliptical */
1123 return( CT_Equirectangular );
1127 return CT_Equirectangular;
11241128
11251129 default: /* use the EPSG code for other methods */
11261130 return nEPSG;
11361140 /* will need to be updated. */
11371141 /************************************************************************/
11381142
1139 static int SetGTParmIds( int nCTProjection,
1140 int *panProjParmId,
1143 static int SetGTParmIds( int nCTProjection,
1144 int *panProjParmId,
11411145 int *panEPSGCodes )
11421146
11431147 {
11511155 memset( panEPSGCodes, 0, sizeof(int) * 7 );
11521156
11531157 /* psDefn->nParms = 7; */
1154
1158
11551159 switch( nCTProjection )
11561160 {
11571161 case CT_CassiniSoldner:
12021206 panEPSGCodes[5] = EPSGProjCenterEasting;
12031207 panEPSGCodes[6] = EPSGProjCenterNorthing;
12041208 return TRUE;
1205
1209
12061210 case CT_LambertConfConic_1SP:
12071211 case CT_Mercator:
12081212 case CT_ObliqueStereographic:
13161320 return TRUE;
13171321
13181322 default:
1319 return( FALSE );
1323 return FALSE;
13201324 }
13211325 }
13221326
13301334 /************************************************************************/
13311335
13321336 int GTIFGetProjTRFInfo( /* COORD_OP_CODE from coordinate_operation.csv */
1333 int nProjTRFCode,
1337 int nProjTRFCode,
13341338 char **ppszProjTRFName,
13351339 short * pnProjMethod,
13361340 double * padfProjParms )
13411345 char szTRFCode[16];
13421346 int nCTProjMethod;
13431347 char *pszFilename;
1344
1348
13451349 if ((nProjTRFCode >= Proj_UTM_zone_1N && nProjTRFCode <= Proj_UTM_zone_60N) ||
13461350 (nProjTRFCode >= Proj_UTM_zone_1S && nProjTRFCode <= Proj_UTM_zone_60S))
13471351 {
14421446 sprintf( szParamCodeID, "PARAMETER_CODE_%d", iEPSG+1 );
14431447
14441448 if( atoi(CSVGetField( pszFilename,
1445 "COORD_OP_CODE", szTRFCode, CC_Integer,
1449 "COORD_OP_CODE", szTRFCode, CC_Integer,
14461450 szParamCodeID )) == nEPSGCode )
14471451 break;
14481452 }
14651469 nEPSGCode = EPSGOriginLong;
14661470 else
14671471 continue;
1468
1472
14691473 for( iEPSG = 0; iEPSG < 7; iEPSG++ )
14701474 {
14711475 sprintf( szParamCodeID, "PARAMETER_CODE_%d", iEPSG+1 );
14721476
14731477 if( atoi(CSVGetField( pszFilename,
1474 "COORD_OP_CODE", szTRFCode, CC_Integer,
1478 "COORD_OP_CODE", szTRFCode, CC_Integer,
14751479 szParamCodeID )) == nEPSGCode )
14761480 break;
14771481 }
1478
1482
14791483 if( iEPSG == 7 )
14801484 continue;
14811485 }
14851489 sprintf( szParamValueID, "PARAMETER_VALUE_%d", iEPSG+1 );
14861490
14871491 nUOM = atoi(CSVGetField( pszFilename,
1488 "COORD_OP_CODE", szTRFCode, CC_Integer,
1492 "COORD_OP_CODE", szTRFCode, CC_Integer,
14891493 szParamUOMID ));
14901494 pszValue = CSVGetField( pszFilename,
1491 "COORD_OP_CODE", szTRFCode, CC_Integer,
1495 "COORD_OP_CODE", szTRFCode, CC_Integer,
14921496 szParamValueID );
14931497
14941498 /* Transform according to the UOM */
15161520 "COORD_OP_CODE", szTRFCode, CC_Integer,
15171521 "COORD_OP_NAME" ));
15181522 }
1519
1523
15201524 /* -------------------------------------------------------------------- */
15211525 /* Transfer requested data into passed variables. */
15221526 /* -------------------------------------------------------------------- */
15491553 return 0;
15501554 if( tagtype != expected_tagtype )
15511555 {
1552 static int nErrorCount = 0;
1553 if( ++nErrorCount < 100 )
1556 if( psGTIF->gt_error_callback )
15541557 {
1555 fprintf(stderr,
1556 "Expected key %s to be of type %s. Got %s\n",
1557 GTIFKeyName(key), GTIFTypeName(expected_tagtype),
1558 GTIFTypeName(tagtype));
1558 psGTIF->gt_error_callback(
1559 psGTIF,
1560 LIBGEOTIFF_WARNING,
1561 "Expected key %s to be of type %s. Got %s",
1562 GTIFKeyName(key), GTIFTypeName(expected_tagtype),
1563 GTIFTypeName(tagtype));
15591564 }
15601565 return 0;
15611566 }
16081613 /* -------------------------------------------------------------------- */
16091614 if( !GTIFKeyGetDOUBLE(psGTIF, ProjFalseEastingGeoKey, &dfFalseEasting, 0, 1)
16101615 && !GTIFKeyGetDOUBLE(psGTIF, ProjCenterEastingGeoKey,
1611 &dfFalseEasting, 0, 1)
1616 &dfFalseEasting, 0, 1)
16121617 && !GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginEastingGeoKey,
16131618 &dfFalseEasting, 0, 1) )
16141619 dfFalseEasting = 0.0;
1615
1620
16161621 if( !GTIFKeyGetDOUBLE(psGTIF, ProjFalseNorthingGeoKey, &dfFalseNorthing,0,1)
16171622 && !GTIFKeyGetDOUBLE(psGTIF, ProjCenterNorthingGeoKey,
16181623 &dfFalseNorthing, 0, 1)
16191624 && !GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginNorthingGeoKey,
16201625 &dfFalseNorthing, 0, 1) )
16211626 dfFalseNorthing = 0.0;
1622
1627
16231628 switch( psDefn->CTProjection )
16241629 {
16251630 /* -------------------------------------------------------------------- */
16261631 case CT_Stereographic:
16271632 /* -------------------------------------------------------------------- */
1628 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
1633 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
16291634 &dfNatOriginLong, 0, 1 ) == 0
1630 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
1635 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
16311636 &dfNatOriginLong, 0, 1 ) == 0
1632 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
1637 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
16331638 &dfNatOriginLong, 0, 1 ) == 0 )
16341639 dfNatOriginLong = 0.0;
16351640
1636 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
1641 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
16371642 &dfNatOriginLat, 0, 1 ) == 0
1638 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
1643 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
16391644 &dfNatOriginLat, 0, 1 ) == 0
1640 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
1645 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
16411646 &dfNatOriginLat, 0, 1 ) == 0 )
16421647 dfNatOriginLat = 0.0;
16431648
16441649 if( GTIFKeyGetDOUBLE(psGTIF, ProjScaleAtNatOriginGeoKey,
16451650 &dfNatOriginScale, 0, 1 ) == 0 )
16461651 dfNatOriginScale = 1.0;
1647
1652
16481653 /* notdef: should transform to decimal degrees at this point */
16491654
16501655 psDefn->ProjParm[0] = dfNatOriginLat;
17241729 case CT_TransverseMercator:
17251730 case CT_TransvMercator_SouthOriented:
17261731 /* -------------------------------------------------------------------- */
1727 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
1732 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
17281733 &dfNatOriginLong, 0, 1 ) == 0
1729 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
1734 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
17301735 &dfNatOriginLong, 0, 1 ) == 0
1731 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
1736 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
17321737 &dfNatOriginLong, 0, 1 ) == 0 )
17331738 dfNatOriginLong = 0.0;
17341739
1735 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
1740 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
17361741 &dfNatOriginLat, 0, 1 ) == 0
1737 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
1742 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
17381743 &dfNatOriginLat, 0, 1 ) == 0
1739 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
1744 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
17401745 &dfNatOriginLat, 0, 1 ) == 0 )
17411746 dfNatOriginLat = 0.0;
17421747
17431748 if( GTIFKeyGetDOUBLE(psGTIF, ProjScaleAtNatOriginGeoKey,
1749 &dfNatOriginScale, 0, 1 ) == 0
1750 /* See https://github.com/OSGeo/gdal/files/1665718/lasinfo.txt */
1751 && GTIFKeyGetDOUBLE(psGTIF, ProjScaleAtCenterGeoKey,
17441752 &dfNatOriginScale, 0, 1 ) == 0 )
17451753 dfNatOriginScale = 1.0;
1746
1754
17471755 /* notdef: should transform to decimal degrees at this point */
17481756
17491757 psDefn->ProjParm[0] = dfNatOriginLat;
17621770
17631771 /* -------------------------------------------------------------------- */
17641772 case CT_ObliqueMercator: /* hotine */
1765 case CT_HotineObliqueMercatorAzimuthCenter:
1766 /* -------------------------------------------------------------------- */
1767 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
1773 case CT_HotineObliqueMercatorAzimuthCenter:
1774 /* -------------------------------------------------------------------- */
1775 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
17681776 &dfNatOriginLong, 0, 1 ) == 0
1769 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
1777 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
17701778 &dfNatOriginLong, 0, 1 ) == 0
1771 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
1779 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
17721780 &dfNatOriginLong, 0, 1 ) == 0 )
17731781 dfNatOriginLong = 0.0;
17741782
1775 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
1783 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
17761784 &dfNatOriginLat, 0, 1 ) == 0
1777 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
1785 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
17781786 &dfNatOriginLat, 0, 1 ) == 0
1779 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
1787 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
17801788 &dfNatOriginLat, 0, 1 ) == 0 )
17811789 dfNatOriginLat = 0.0;
17821790
1783 if( GTIFKeyGetDOUBLE(psGTIF, ProjAzimuthAngleGeoKey,
1791 if( GTIFKeyGetDOUBLE(psGTIF, ProjAzimuthAngleGeoKey,
17841792 &dfAzimuth, 0, 1 ) == 0 )
17851793 dfAzimuth = 0.0;
17861794
17931801 && GTIFKeyGetDOUBLE(psGTIF, ProjScaleAtCenterGeoKey,
17941802 &dfNatOriginScale, 0, 1 ) == 0 )
17951803 dfNatOriginScale = 1.0;
1796
1804
17971805 /* notdef: should transform to decimal degrees at this point */
17981806
17991807 psDefn->ProjParm[0] = dfNatOriginLat;
18181826 case CT_CassiniSoldner:
18191827 case CT_Polyconic:
18201828 /* -------------------------------------------------------------------- */
1821 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
1829 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
18221830 &dfNatOriginLong, 0, 1 ) == 0
1823 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
1831 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
18241832 &dfNatOriginLong, 0, 1 ) == 0
1825 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
1833 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
18261834 &dfNatOriginLong, 0, 1 ) == 0 )
18271835 dfNatOriginLong = 0.0;
18281836
1829 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
1837 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
18301838 &dfNatOriginLat, 0, 1 ) == 0
1831 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
1839 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
18321840 &dfNatOriginLat, 0, 1 ) == 0
1833 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
1841 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
18341842 &dfNatOriginLat, 0, 1 ) == 0 )
18351843 dfNatOriginLat = 0.0;
18361844
18391847 && GTIFKeyGetDOUBLE(psGTIF, ProjScaleAtCenterGeoKey,
18401848 &dfNatOriginScale, 0, 1 ) == 0 )
18411849 dfNatOriginScale = 1.0;
1842
1850
18431851 /* notdef: should transform to decimal degrees at this point */
18441852
18451853 psDefn->ProjParm[0] = dfNatOriginLat;
18641872 case CT_Orthographic:
18651873 case CT_NewZealandMapGrid:
18661874 /* -------------------------------------------------------------------- */
1867 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
1875 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
18681876 &dfNatOriginLong, 0, 1 ) == 0
1869 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
1877 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
18701878 &dfNatOriginLong, 0, 1 ) == 0
1871 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
1879 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
18721880 &dfNatOriginLong, 0, 1 ) == 0 )
18731881 dfNatOriginLong = 0.0;
18741882
1875 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
1883 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
18761884 &dfNatOriginLat, 0, 1 ) == 0
1877 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
1885 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
18781886 &dfNatOriginLat, 0, 1 ) == 0
1879 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
1887 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
18801888 &dfNatOriginLat, 0, 1 ) == 0 )
18811889 dfNatOriginLat = 0.0;
18821890
18971905 /* -------------------------------------------------------------------- */
18981906 case CT_Equirectangular:
18991907 /* -------------------------------------------------------------------- */
1900 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
1908 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
19011909 &dfNatOriginLong, 0, 1 ) == 0
1902 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
1910 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
19031911 &dfNatOriginLong, 0, 1 ) == 0
1904 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
1912 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
19051913 &dfNatOriginLong, 0, 1 ) == 0 )
19061914 dfNatOriginLong = 0.0;
19071915
1908 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
1916 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
19091917 &dfNatOriginLat, 0, 1 ) == 0
1910 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
1918 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
19111919 &dfNatOriginLat, 0, 1 ) == 0
1912 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
1920 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
19131921 &dfNatOriginLat, 0, 1 ) == 0 )
19141922 dfNatOriginLat = 0.0;
19151923
1916 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel1GeoKey,
1924 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel1GeoKey,
19171925 &dfStdParallel1, 0, 1 ) == 0 )
19181926 dfStdParallel1 = 0.0;
19191927
19381946 case CT_Sinusoidal:
19391947 case CT_VanDerGrinten:
19401948 /* -------------------------------------------------------------------- */
1941 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
1949 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
19421950 &dfNatOriginLong, 0, 1 ) == 0
1943 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
1951 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
19441952 &dfNatOriginLong, 0, 1 ) == 0
1945 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
1953 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
19461954 &dfNatOriginLong, 0, 1 ) == 0 )
19471955 dfNatOriginLong = 0.0;
19481956
19611969 /* -------------------------------------------------------------------- */
19621970 case CT_PolarStereographic:
19631971 /* -------------------------------------------------------------------- */
1964 if( GTIFKeyGetDOUBLE(psGTIF, ProjStraightVertPoleLongGeoKey,
1972 if( GTIFKeyGetDOUBLE(psGTIF, ProjStraightVertPoleLongGeoKey,
19651973 &dfNatOriginLong, 0, 1 ) == 0
1966 && GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
1974 && GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
19671975 &dfNatOriginLong, 0, 1 ) == 0
1968 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
1976 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
19691977 &dfNatOriginLong, 0, 1 ) == 0
1970 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
1978 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
19711979 &dfNatOriginLong, 0, 1 ) == 0 )
19721980 dfNatOriginLong = 0.0;
19731981
1974 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
1982 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
19751983 &dfNatOriginLat, 0, 1 ) == 0
1976 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
1984 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
19771985 &dfNatOriginLat, 0, 1 ) == 0
1978 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
1986 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
19791987 &dfNatOriginLat, 0, 1 ) == 0 )
19801988 dfNatOriginLat = 0.0;
19811989
19841992 && GTIFKeyGetDOUBLE(psGTIF, ProjScaleAtCenterGeoKey,
19851993 &dfNatOriginScale, 0, 1 ) == 0 )
19861994 dfNatOriginScale = 1.0;
1987
1995
19881996 /* notdef: should transform to decimal degrees at this point */
19891997
19901998 psDefn->ProjParm[0] = dfNatOriginLat;
20042012 /* -------------------------------------------------------------------- */
20052013 case CT_LambertConfConic_2SP:
20062014 /* -------------------------------------------------------------------- */
2007 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel1GeoKey,
2015 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel1GeoKey,
20082016 &dfStdParallel1, 0, 1 ) == 0 )
20092017 dfStdParallel1 = 0.0;
20102018
2011 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel2GeoKey,
2019 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel2GeoKey,
20122020 &dfStdParallel2, 0, 1 ) == 0 )
20132021 dfStdParallel1 = 0.0;
20142022
2015 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
2023 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
20162024 &dfNatOriginLong, 0, 1 ) == 0
2017 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
2025 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
20182026 &dfNatOriginLong, 0, 1 ) == 0
2019 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
2027 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
20202028 &dfNatOriginLong, 0, 1 ) == 0 )
20212029 dfNatOriginLong = 0.0;
20222030
2023 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
2031 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
20242032 &dfNatOriginLat, 0, 1 ) == 0
2025 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
2033 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
20262034 &dfNatOriginLat, 0, 1 ) == 0
2027 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
2035 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
20282036 &dfNatOriginLat, 0, 1 ) == 0 )
20292037 dfNatOriginLat = 0.0;
20302038
20502058 case CT_AlbersEqualArea:
20512059 case CT_EquidistantConic:
20522060 /* -------------------------------------------------------------------- */
2053 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel1GeoKey,
2061 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel1GeoKey,
20542062 &dfStdParallel1, 0, 1 ) == 0 )
20552063 dfStdParallel1 = 0.0;
20562064
2057 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel2GeoKey,
2065 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel2GeoKey,
20582066 &dfStdParallel2, 0, 1 ) == 0 )
20592067 dfStdParallel2 = 0.0;
20602068
2061 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
2069 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
20622070 &dfNatOriginLong, 0, 1 ) == 0
2063 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
2071 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
20642072 &dfNatOriginLong, 0, 1 ) == 0
2065 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
2073 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
20662074 &dfNatOriginLong, 0, 1 ) == 0 )
20672075 dfNatOriginLong = 0.0;
20682076
2069 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
2077 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
20702078 &dfNatOriginLat, 0, 1 ) == 0
2071 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
2079 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
20722080 &dfNatOriginLat, 0, 1 ) == 0
2073 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
2081 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
20742082 &dfNatOriginLat, 0, 1 ) == 0 )
20752083 dfNatOriginLat = 0.0;
20762084
20952103 /* -------------------------------------------------------------------- */
20962104 case CT_CylindricalEqualArea:
20972105 /* -------------------------------------------------------------------- */
2098 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel1GeoKey,
2106 if( GTIFKeyGetDOUBLE(psGTIF, ProjStdParallel1GeoKey,
20992107 &dfStdParallel1, 0, 1 ) == 0 )
21002108 dfStdParallel1 = 0.0;
21012109
2102 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
2110 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
21032111 &dfNatOriginLong, 0, 1 ) == 0
2104 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
2112 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
21052113 &dfNatOriginLong, 0, 1 ) == 0
2106 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
2114 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
21072115 &dfNatOriginLong, 0, 1 ) == 0 )
21082116 dfNatOriginLong = 0.0;
21092117
21372145 case ProjFalseOriginNorthingGeoKey:
21382146 case ProjCenterEastingGeoKey:
21392147 case ProjCenterNorthingGeoKey:
2140 if( psDefn->UOMLengthInMeters != 0
2148 if( psDefn->UOMLengthInMeters != 0
21412149 && psDefn->UOMLengthInMeters != 1.0 )
21422150 {
21432151 psDefn->ProjParm[iParm] *= psDefn->UOMLengthInMeters;
21612169 @return TRUE if the function has been successful, otherwise FALSE.
21622170
21632171 This function reads the coordinate system definition from a GeoTIFF file,
2164 and <i>normalizes</i> it into a set of component information using
2165 definitions from CSV (Comma Separated Value ASCII) files derived from
2172 and <i>normalizes</i> it into a set of component information using
2173 definitions from CSV (Comma Separated Value ASCII) files derived from
21662174 EPSG tables. This function is intended to simplify correct support for
21672175 reading files with defined PCS (Projected Coordinate System) codes that
21682176 wouldn't otherwise be directly known by application software by reducing
2169 it to the underlying projection method, parameters, datum, ellipsoid,
2177 it to the underlying projection method, parameters, datum, ellipsoid,
21702178 prime meridian and units.<p>
21712179
2172 The application should pass a pointer to an existing uninitialized
2173 GTIFDefn structure, and GTIFGetDefn() will fill it in. The function
2174 currently always returns TRUE but in the future will return FALSE if
2180 The application should pass a pointer to an existing uninitialized
2181 GTIFDefn structure, and GTIFGetDefn() will fill it in. The function
2182 currently always returns TRUE but in the future will return FALSE if
21752183 CSV files are not found. In any event, all geokeys actually found in the
21762184 file will be copied into the GTIFDefn. However, if the CSV files aren't
21772185 found codes implied by other codes will not be set properly.<p>
21782186
21792187 GTIFGetDefn() will not generally work if the EPSG derived CSV files cannot
2180 be found. By default a modest attempt will be made to find them, but
2188 be found. By default a modest attempt will be made to find them, but
21812189 in general it is necessary for the calling application to override the
2182 logic to find them. This can be done by calling the
2190 logic to find them. This can be done by calling the
21832191 SetCSVFilenameHook() function to
21842192 override the search method based on application knowledge of where they are
21852193 found.<p>
21862194
21872195 The normalization methodology operates by fetching tags from the GeoTIFF
21882196 file, and then setting all other tags implied by them in the structure. The
2189 implied relationships are worked out by reading definitions from the
2197 implied relationships are worked out by reading definitions from the
21902198 various EPSG derived CSV tables.<p>
21912199
21922200 For instance, if a PCS (ProjectedCSTypeGeoKey) is found in the GeoTIFF file
21942202 file. For example given the PCS 26746 we can find the name
21952203 (NAD27 / California zone VI), the GCS 4257 (NAD27), and the ProjectionCode
21962204 10406 (California CS27 zone VI). The GCS, and ProjectionCode can in turn
2197 be looked up in other tables until all the details of units, ellipsoid,
2205 be looked up in other tables until all the details of units, ellipsoid,
21982206 prime meridian, datum, projection (LambertConfConic_2SP) and projection
2199 parameters are established. A full listgeo dump of a file
2207 parameters are established. A full listgeo dump of a file
22002208 for this result might look like the following, all based on a single PCS
22012209 value:<p>
22022210
22072215 Key_Revision: 1.0
22082216 Tagged_Information:
22092217 ModelTiepointTag (2,3):
2210 0 0 0
2211 1577139.71 634349.176 0
2218 0 0 0
2219 1577139.71 634349.176 0
22122220 ModelPixelScaleTag (1,3):
2213 195.509321 198.32184 0
2221 195.509321 198.32184 0
22142222 End_Of_Tags.
22152223 Keyed_Information:
22162224 GTModelTypeGeoKey (Short,1): ModelTypeProjected
22372245
22382246 Note that GTIFGetDefn() does not inspect or return the tiepoints and scale.
22392247 This must be handled separately as it normally would. It is intended to
2240 simplify capture and normalization of the coordinate system definition.
2248 simplify capture and normalization of the coordinate system definition.
22412249 Note that GTIFGetDefn() also does the following things:
22422250
22432251 <ol>
22442252 <li> Convert all angular values to decimal degrees.
2245 <li> Convert all linear values to meters.
2253 <li> Convert all linear values to meters.
22462254 <li> Return the linear units and conversion to meters for the tiepoints and
2247 scale (though the tiepoints and scale remain in their native units).
2255 scale (though the tiepoints and scale remain in their native units).
22482256 <li> When reading projection parameters a variety of differences between
22492257 different GeoTIFF generators are handled, and a normalized set of parameters
22502258 for each projection are always returned.
22602268 be zero. This is done to retain correspondence to the EPSG parameter
22612269 numbering scheme.<p>
22622270
2263 The
2264 <a href="http://www.remotesensing.org/cgi-bin/cvsweb.cgi/~checkout~/osrs/geotiff/libgeotiff/geotiff_proj4.c">geotiff_proj4.c</a> module distributed with libgeotiff can
2271 The
2272 <a href="http://www.remotesensing.org/cgi-bin/cvsweb.cgi/~checkout~/osrs/geotiff/libgeotiff/geotiff_proj4.c">geotiff_proj4.c</a> module distributed with libgeotiff can
22652273 be used as an example of code that converts a GTIFDefn into another projection
22662274 system.<p>
22672275
22752283 int i;
22762284 short nGeogUOMLinear;
22772285 double dfInvFlattening;
2278
2286
22792287 /* -------------------------------------------------------------------- */
22802288 /* Initially we default all the information we can. */
22812289 /* -------------------------------------------------------------------- */
23742382 /* -------------------------------------------------------------------- */
23752383 if( psDefn->ProjCode == KvUserDefined )
23762384 GTIFKeyGetSHORT(psGTIF, ProjectionGeoKey, &(psDefn->ProjCode), 0, 1 );
2377
2385
23782386 if( psDefn->ProjCode != KvUserDefined )
23792387 {
23802388 /*
23862394 */
23872395 GTIFGetProjTRFInfo( psDefn->ProjCode, NULL, &(psDefn->Projection),
23882396 psDefn->ProjParm );
2389
2397
23902398 /*
23912399 * Set the GeoTIFF identity of the parameters.
23922400 */
2393 psDefn->CTProjection = (short)
2401 psDefn->CTProjection = (short)
23942402 EPSGProjMethodToCTProjMethod( psDefn->Projection, FALSE );
23952403
23962404 SetGTParmIds( EPSGProjMethodToCTProjMethod(psDefn->Projection, TRUE),
24142422 GTIFGetGCSInfo( psDefn->GCS, NULL, &(psDefn->Datum), &(psDefn->PM),
24152423 &(psDefn->UOMAngle) );
24162424 }
2417
2425
24182426 /* -------------------------------------------------------------------- */
24192427 /* Handle the GCS angular units. GeogAngularUnitsGeoKey */
24202428 /* overrides the GCS or PCS setting. */
24562464 /* -------------------------------------------------------------------- */
24572465 CPL_IGNORE_RET_VAL_INT(GTIFKeyGetDOUBLE(psGTIF, GeogSemiMajorAxisGeoKey, &(psDefn->SemiMajor), 0, 1 ));
24582466 CPL_IGNORE_RET_VAL_INT(GTIFKeyGetDOUBLE(psGTIF, GeogSemiMinorAxisGeoKey, &(psDefn->SemiMinor), 0, 1 ));
2459
2460 if( GTIFKeyGetDOUBLE(psGTIF, GeogInvFlatteningGeoKey, &dfInvFlattening,
2467
2468 if( GTIFKeyGetDOUBLE(psGTIF, GeogInvFlatteningGeoKey, &dfInvFlattening,
24612469 0, 1 ) == 1 )
24622470 {
24632471 if( dfInvFlattening != 0.0 )
2464 psDefn->SemiMinor =
2472 psDefn->SemiMinor =
24652473 psDefn->SemiMajor * (1 - 1.0/dfInvFlattening);
24662474 else
24672475 psDefn->SemiMinor = psDefn->SemiMajor;
24682476 }
2469
2477
24702478 /* -------------------------------------------------------------------- */
24712479 /* Get the prime meridian info. */
24722480 /* -------------------------------------------------------------------- */
24902498 /* Get the TOWGS84 parameters. */
24912499 /* -------------------------------------------------------------------- */
24922500 #if !defined(GEO_NORMALIZE_DISABLE_TOWGS84)
2493 psDefn->TOWGS84Count =
2501 psDefn->TOWGS84Count =
24942502 (short)GTIFKeyGetDOUBLE(psGTIF, GeogTOWGS84GeoKey, psDefn->TOWGS84, 0, 7 );
24952503 #endif
24962504
25392547 psDefn->nParms = 7;
25402548 psDefn->ProjParmId[0] = ProjNatOriginLatGeoKey;
25412549 psDefn->ProjParm[0] = 0.0;
2542
2550
25432551 psDefn->ProjParmId[1] = ProjNatOriginLongGeoKey;
25442552 psDefn->ProjParm[1] = psDefn->Zone*6 - 183.0;
2545
2553
25462554 psDefn->ProjParmId[4] = ProjScaleAtNatOriginGeoKey;
25472555 psDefn->ProjParm[4] = 0.9996;
2548
2556
25492557 psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
25502558 psDefn->ProjParm[5] = 500000.0;
2551
2559
25522560 psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
25532561
25542562 if( psDefn->MapSys == MapSys_UTM_North )
26002608 nPrecision+3, nPrecision, pszHemisphere );
26012609 sprintf( szBuffer, szFormat, nDegrees, nMinutes, dfSeconds );
26022610
2603 return( szBuffer );
2611 return szBuffer;
26042612 }
26052613
26062614 /************************************************************************/
26282636 if( psDefn->PCS != KvUserDefined )
26292637 {
26302638 char *pszPCSName = NULL;
2631
2639
26322640 GTIFGetPCSInfo( psDefn->PCS, &pszPCSName, NULL, NULL, NULL );
26332641 if( pszPCSName == NULL )
26342642 pszPCSName = CPLStrdup("name unknown");
2635
2643
26362644 fprintf( fp, "PCS = %d (%s)\n", psDefn->PCS, pszPCSName );
26372645 CPLFree( pszPCSName );
26382646 }
26472655 GTIFGetProjTRFInfo( psDefn->ProjCode, &pszTRFName, NULL, NULL );
26482656 if( pszTRFName == NULL )
26492657 pszTRFName = CPLStrdup("");
2650
2658
26512659 fprintf( fp, "Projection = %d (%s)\n",
26522660 psDefn->ProjCode, pszTRFName );
26532661
26652673
26662674 if( pszName == NULL )
26672675 pszName = "(unknown)";
2668
2676
26692677 fprintf( fp, "Projection Method: %s\n", pszName );
26702678
26712679 for( i = 0; i < psDefn->nParms; i++ )
26802688 if( i < 4 )
26812689 {
26822690 char *pszAxisName;
2683
2691
26842692 if( strstr(pszName,"Long") != NULL )
26852693 pszAxisName = "Long";
26862694 else if( strstr(pszName,"Lat") != NULL )
26872695 pszAxisName = "Lat";
26882696 else
26892697 pszAxisName = "?";
2690
2698
26912699 fprintf( fp, " %s: %f (%s)\n",
26922700 pszName, psDefn->ProjParm[i],
26932701 GTIFDecToDMS( psDefn->ProjParm[i], pszAxisName, 2 ) );
27092717 GTIFGetGCSInfo( psDefn->GCS, &pszName, NULL, NULL, NULL );
27102718 if( pszName == NULL )
27112719 pszName = CPLStrdup("(unknown)");
2712
2720
27132721 fprintf( fp, "GCS: %d/%s\n", psDefn->GCS, pszName );
27142722 CPLFree( pszName );
27152723 }
27242732 GTIFGetDatumInfo( psDefn->Datum, &pszName, NULL );
27252733 if( pszName == NULL )
27262734 pszName = CPLStrdup("(unknown)");
2727
2735
27282736 fprintf( fp, "Datum: %d/%s\n", psDefn->Datum, pszName );
27292737 CPLFree( pszName );
27302738 }
27392747 GTIFGetEllipsoidInfo( psDefn->Ellipsoid, &pszName, NULL, NULL );
27402748 if( pszName == NULL )
27412749 pszName = CPLStrdup("(unknown)");
2742
2750
27432751 fprintf( fp, "Ellipsoid: %d/%s (%.2f,%.2f)\n",
27442752 psDefn->Ellipsoid, pszName,
27452753 psDefn->SemiMajor, psDefn->SemiMinor );
27462754 CPLFree( pszName );
27472755 }
2748
2756
27492757 /* -------------------------------------------------------------------- */
27502758 /* Report the prime meridian. */
27512759 /* -------------------------------------------------------------------- */
27572765
27582766 if( pszName == NULL )
27592767 pszName = CPLStrdup("(unknown)");
2760
2768
27612769 fprintf( fp, "Prime Meridian: %d/%s (%f/%s)\n",
27622770 psDefn->PM, pszName,
27632771 psDefn->PMLongToGreenwich,
27742782 int i;
27752783
27762784 fprintf( fp, "TOWGS84: " );
2777
2785
27782786 for( i = 0; i < psDefn->TOWGS84Count; i++ )
27792787 {
27802788 if( i > 0 )
27972805 GTIFGetUOMLengthInfo( psDefn->UOMLength, &pszName, NULL );
27982806 if( pszName == NULL )
27992807 pszName = CPLStrdup( "(unknown)" );
2800
2808
28012809 fprintf( fp, "Projection Linear Units: %d/%s (%fm)\n",
28022810 psDefn->UOMLength, pszName, psDefn->UOMLengthInMeters );
28032811 CPLFree( pszName );
28542862 /* Free a GTIF structure allocated by GTIFAllocDefn(). */
28552863 /************************************************************************/
28562864
2857 void GTIFFreeDefn( GTIFDefn *defn )
2865 void GTIFFreeDefn( GTIFDefn *defn )
28582866 {
28592867 VSIFree( defn );
28602868 }
00 /******************************************************************************
1 * $Id: geo_normalize.h 2233 2012-10-09 01:33:11Z warmerdam $
1 * $Id: geo_normalize.h 2762 2017-04-14 11:48:02Z rouault $
22 *
33 * Project: libgeotiff
44 * Purpose: Include file related to geo_normalize.c containing Code to
4242 *
4343 * Include file for extended projection definition normalization api.
4444 */
45
45
4646 #define MAX_GTIF_PROJPARMS 10
4747
4848 /**
5959
6060 /** From GeographicTypeGeoKey tag. For example GCS_WGS_84 or
6161 GCS_Voirol_1875_Paris. Includes datum and prime meridian value. */
62 short GCS;
62 short GCS;
6363
6464 /** From ProjLinearUnitsGeoKey. For example Linear_Meter. */
6565 short UOMLength;
7272
7373 /** One UOMAngle = UOMLengthInDegrees degrees. */
7474 double UOMAngleInDegrees;
75
75
7676 /** Datum from GeogGeodeticDatumGeoKey tag. For example Datum_WGS84 */
7777 short Datum;
7878
9494 /** The length of the semi minor ellipse axis in meters. */
9595 double SemiMinor;
9696
97 /* this #if is primary intended to maintain binary compatability with older
98 versions of libgeotiff for MrSID binaries (for example) */
97 /* This #if is primary intended to maintain binary compatibility with older
98 versions of libgeotiff for MrSID binaries (for example). */
9999 #if !defined(GEO_NORMALIZE_DISABLE_TOWGS84)
100100 /** TOWGS84 transformation values (0/3/7) */
101101 short TOWGS84Count;
112112 short Projection;
113113
114114 /** GeoTIFF identifier for underlying projection method. While some of
115 these values have corresponding vlaues in EPSG (Projection field),
115 these values have corresponding values in EPSG (Projection field),
116116 others do not. For example CT_TransverseMercator. */
117 short CTProjection;
117 short CTProjection;
118118
119119 /** Number of projection parameters in ProjParm and ProjParmId. */
120120 int nParms;
142142
143143 } GTIFDefn;
144144
145 int CPL_DLL GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
146 short *pnProjOp,
145 int GTIF_DLL GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
146 short *pnProjOp,
147147 short *pnUOMLengthCode, short *pnGeogCS );
148 int CPL_DLL GTIFGetProjTRFInfo( int nProjTRFCode,
148 int GTIF_DLL GTIFGetProjTRFInfo( int nProjTRFCode,
149149 char ** ppszProjTRFName,
150150 short * pnProjMethod,
151151 double * padfProjParms );
152 int CPL_DLL GTIFGetGCSInfo( int nGCSCode, char **ppszName,
152 int GTIF_DLL GTIFGetGCSInfo( int nGCSCode, char **ppszName,
153153 short *pnDatum, short *pnPM, short *pnUOMAngle );
154 int CPL_DLL GTIFGetDatumInfo( int nDatumCode, char **ppszName,
154 int GTIF_DLL GTIFGetDatumInfo( int nDatumCode, char **ppszName,
155155 short * pnEllipsoid );
156 int CPL_DLL GTIFGetEllipsoidInfo( int nEllipsoid, char ** ppszName,
156 int GTIF_DLL GTIFGetEllipsoidInfo( int nEllipsoid, char ** ppszName,
157157 double * pdfSemiMajor,
158158 double * pdfSemiMinor );
159 int CPL_DLL GTIFGetPMInfo( int nPM, char **ppszName,
159 int GTIF_DLL GTIFGetPMInfo( int nPM, char **ppszName,
160160 double * pdfLongToGreenwich );
161161
162 double CPL_DLL GTIFAngleStringToDD( const char *pszAngle, int nUOMAngle );
163 int CPL_DLL GTIFGetUOMLengthInfo( int nUOMLengthCode,
162 double GTIF_DLL GTIFAngleStringToDD( const char *pszAngle, int nUOMAngle );
163 int GTIF_DLL GTIFGetUOMLengthInfo( int nUOMLengthCode,
164164 char **ppszUOMName,
165165 double * pdfInMeters );
166 int CPL_DLL GTIFGetUOMAngleInfo( int nUOMAngleCode,
166 int GTIF_DLL GTIFGetUOMAngleInfo( int nUOMAngleCode,
167167 char **ppszUOMName,
168168 double * pdfInDegrees );
169 double CPL_DLL GTIFAngleToDD( double dfAngle, int nUOMAngle );
170
169 double GTIF_DLL GTIFAngleToDD( double dfAngle, int nUOMAngle );
170
171171
172172 /* this should be used to free strings returned by GTIFGet... funcs */
173 void CPL_DLL GTIFFreeMemory( char * );
174 void CPL_DLL GTIFDeaccessCSV( void );
175
176 int CPL_DLL GTIFGetDefn( GTIF *psGTIF, GTIFDefn * psDefn );
177 void CPL_DLL GTIFPrintDefn( GTIFDefn *, FILE * );
178 GTIFDefn CPL_DLL *GTIFAllocDefn( void );
179 void CPL_DLL GTIFFreeDefn( GTIFDefn * );
180
181 void CPL_DLL SetCSVFilenameHook( const char *(*CSVFileOverride)(const char *) );
182
183 const char CPL_DLL *GTIFDecToDMS( double, const char *, int );
173 void GTIF_DLL GTIFFreeMemory( char * );
174 void GTIF_DLL GTIFDeaccessCSV( void );
175
176 int GTIF_DLL GTIFGetDefn( GTIF *psGTIF, GTIFDefn * psDefn );
177 void GTIF_DLL GTIFPrintDefn( GTIFDefn *, FILE * );
178 GTIFDefn GTIF_DLL *GTIFAllocDefn( void );
179 void GTIF_DLL GTIFFreeDefn( GTIFDefn * );
180
181 void GTIF_DLL SetCSVFilenameHook( const char *(*CSVFileOverride)(const char *) );
182
183 const char GTIF_DLL *GTIFDecToDMS( double, const char *, int );
184184
185185 /*
186186 * These are useful for recognising UTM and State Plane, with or without
192192 #define MapSys_State_Plane_27 -9003
193193 #define MapSys_State_Plane_83 -9004
194194
195 int CPL_DLL GTIFMapSysToPCS( int MapSys, int Datum, int nZone );
196 int CPL_DLL GTIFMapSysToProj( int MapSys, int nZone );
197 int CPL_DLL GTIFPCSToMapSys( int PCSCode, int * pDatum, int * pZone );
198 int CPL_DLL GTIFProjToMapSys( int ProjCode, int * pZone );
195 int GTIF_DLL GTIFMapSysToPCS( int MapSys, int Datum, int nZone );
196 int GTIF_DLL GTIFMapSysToProj( int MapSys, int nZone );
197 int GTIF_DLL GTIFPCSToMapSys( int PCSCode, int * pDatum, int * pZone );
198 int GTIF_DLL GTIFProjToMapSys( int ProjCode, int * pZone );
199199
200200 /*
201201 * These are only useful if using libgeotiff with libproj (PROJ.4+).
202202 */
203 char CPL_DLL *GTIFGetProj4Defn( GTIFDefn * );
204
205 int CPL_DLL GTIFProj4ToLatLong( GTIFDefn *, int, double *, double * );
206 int CPL_DLL GTIFProj4FromLatLong( GTIFDefn *, int, double *, double * );
207
208 int CPL_DLL GTIFSetFromProj4( GTIF *gtif, const char *proj4 );
203 char GTIF_DLL *GTIFGetProj4Defn( GTIFDefn * );
204
205 int GTIF_DLL GTIFProj4ToLatLong( GTIFDefn *, int, double *, double * );
206 int GTIF_DLL GTIFProj4FromLatLong( GTIFDefn *, int, double *, double * );
207
208 int GTIF_DLL GTIFSetFromProj4( GTIF *gtif, const char *proj4 );
209209
210210 #if defined(HAVE_LIBPROJ) && defined(HAVE_PROJECTS_H)
211211 # define HAVE_GTIFPROJ4
214214 #ifdef __cplusplus
215215 }
216216 #endif
217
217
218218 #endif /* ndef GEO_NORMALIZE_H_INCLUDED */
2626 #include <stdio.h> /* for sprintf */
2727
2828 #define FMT_GEOTIFF "Geotiff_Information:"
29 #define FMT_VERSION "Version: %hd"
30 #define FMT_REV "Key_Revision: %1hd.%hd"
29 #define FMT_VERSION "Version: %hu"
30 #define FMT_REV "Key_Revision: %1hu.%hu"
3131 #define FMT_TAGS "Tagged_Information:"
3232 #define FMT_TAGEND "End_Of_Tags."
3333 #define FMT_KEYS "Keyed_Information:"
3434 #define FMT_KEYEND "End_Of_Keys."
3535 #define FMT_GEOEND "End_Of_Geotiff."
3636 #define FMT_DOUBLE "%-17.15g"
37 #define FMT_SHORT "%-11hd"
38
39 static void DefaultPrint(char *string, void *aux);
37 #define FMT_SHORT "%-11hu"
38
39 static int DefaultPrint(char *string, void *aux);
4040 static void PrintKey(GeoKey *key, GTIFPrintMethod print,void *aux);
4141 static void PrintGeoTags(GTIF *gtif,GTIFReadMethod scan,void *aux);
42 static void PrintTag(int tag, int nrows, double *data, int ncols,
42 static void PrintTag(int tag, int nrows, double *data, int ncols,
4343 GTIFPrintMethod print,void *aux);
44 static void DefaultRead(char *string, void *aux);
44 static int DefaultRead(char *string, void *aux);
4545 static int ReadKey(GTIF *gt, GTIFReadMethod scan, void *aux);
4646 static int ReadTag(GTIF *gt,GTIFReadMethod scan,void *aux);
4747
5353 * The output format is a "GeoTIFF meta-data" file, which may be
5454 * used to import information with the GTIFFImport() routine.
5555 */
56
56
5757 void GTIFPrint(GTIF *gtif, GTIFPrintMethod print,void *aux)
5858 {
5959 int i;
6060 int numkeys = gtif->gt_num_keys;
6161 GeoKey *key = gtif->gt_keys;
6262 char message[1024];
63
64 if (!print) print = (GTIFPrintMethod) &DefaultPrint;
65 if (!aux) aux=stdout;
66
67 sprintf(message,FMT_GEOTIFF "\n");
63
64 if (!print) print = &DefaultPrint;
65 if (!aux) aux=stdout;
66
67 sprintf(message,FMT_GEOTIFF "\n");
6868 print(message,aux);
69 sprintf(message, "Version: %hd" ,gtif->gt_version);
7069 sprintf(message, FMT_VERSION,gtif->gt_version);
7170 print(" ",aux); print(message,aux); print("\n",aux);
7271 sprintf(message, FMT_REV,gtif->gt_rev_major,
73 gtif->gt_rev_minor);
72 gtif->gt_rev_minor);
7473 print(" ",aux); print(message,aux); print("\n",aux);
7574
7675 sprintf(message," %s\n",FMT_TAGS); print(message,aux);
102101 PrintTag(GTIFF_TRANSMATRIX,count/4, data, 4, print, aux);
103102 }
104103
105 static void PrintTag(int tag, int nrows, double *dptr, int ncols,
104 static void PrintTag(int tag, int nrows, double *dptr, int ncols,
106105 GTIFPrintMethod print,void *aux)
107106 {
108107 int i,j;
142141
143142 print(" ",aux);
144143 print(GTIFKeyName(keyid),aux);
145
144
146145 sprintf(message," (%s,%d): ",GTIFTypeName(key->gk_type),count);
147146 print(message,aux);
148
147
149148 if (key->gk_type==TYPE_SHORT && count==1)
150149 data = (char *)&key->gk_data;
151150 else
152151 data = key->gk_data;
153
152
154153 switch (key->gk_type)
155154 {
156 case TYPE_ASCII:
155 case TYPE_ASCII:
157156 {
158157 int in_char, out_char;
159158
193192 print("\"\n",aux);
194193 }
195194 break;
196
197 case TYPE_DOUBLE:
195
196 case TYPE_DOUBLE:
198197 for (dptr = (double *)data; count > 0; count-= vals_now)
199198 {
200199 vals_now = count > 3? 3: count;
206205 print("\n",aux);
207206 }
208207 break;
209
210 case TYPE_SHORT:
208
209 case TYPE_SHORT:
211210 sptr = (pinfo_t *)data;
212211 if (count==1)
213212 {
230229 }
231230 }
232231 break;
233
234 default:
232
233 default:
235234 sprintf(message, "Unknown Type (%d)\n",key->gk_type);
236235 print(message,aux);
237236 break;
238237 }
239238 }
240239
241 static void DefaultPrint(char *string, void *aux)
240 static int DefaultPrint(char *string, void *aux)
242241 {
243242 /* Pretty boring */
244243 fprintf((FILE *)aux,"%s",string);
244 return 1;
245245 }
246246
247247
257257 * The input format is a "GeoTIFF meta-data" file, which may be
258258 * generated by the GTIFFPrint() routine.
259259 */
260
260
261261 int GTIFImport(GTIF *gtif, GTIFReadMethod scan,void *aux)
262262 {
263263 int status;
264 /* Caution: if you change this size, also change it in DefaultRead */
264265 char message[1024];
265
266 if (!scan) scan = (GTIFReadMethod) &DefaultRead;
267 if (!aux) aux=stdin;
268
269 scan(message,aux);
270 if (strncmp(message,FMT_GEOTIFF,8)) return 0;
271 scan(message,aux);
272 if (!sscanf(message,FMT_VERSION,(short int*)&gtif->gt_version)) return 0;
273 scan(message,aux);
274 if (sscanf(message,FMT_REV,(short int*)&gtif->gt_rev_major,
275 (short int*)&gtif->gt_rev_minor) !=2) return 0;
266
267 if (!scan) scan = &DefaultRead;
268 if (!aux) aux=stdin;
269
270 scan(message,aux);
271 if (strncmp(message,FMT_GEOTIFF,8)) return 0;
272 scan(message,aux);
273 if (!sscanf(message,FMT_VERSION,(short unsigned*)&gtif->gt_version)) return 0;
274 scan(message,aux);
275 if (sscanf(message,FMT_REV,(short unsigned*)&gtif->gt_rev_major,
276 (short unsigned*)&gtif->gt_rev_minor) !=2) return 0;
276277
277278 scan(message,aux);
278279 if (strncmp(message,FMT_TAGS,8)) return 0;
282283 scan(message,aux);
283284 if (strncmp(message,FMT_KEYS,8)) return 0;
284285 while ((status=ReadKey(gtif,scan,aux))>0);
285
286
286287 return (status==0); /* success */
287288 }
288289
309310 scan(message,aux);
310311 if (!strncmp(message,FMT_TAGEND,8)) return 0;
311312
312 num=sscanf(message,"%[^( ] (%d,%d):\n",tagname,&nrows,&ncols);
313 num=sscanf(message,"%99[^( ] (%d,%d):\n",tagname,&nrows,&ncols);
313314 if (num!=3) return StringError(message);
314
315
315316 tag = GTIFTagCode(tagname);
316317 if (tag < 0) return StringError(tagname);
317318
319320
320321 data = (double *) _GTIFcalloc(count * sizeof(double));
321322 dptr = data;
322
323
323324 for (i=0;i<nrows;i++)
324325 {
325326 scan(message,aux);
334335 FINDCHAR(vptr,' ');
335336 SKIPWHITE(vptr);
336337 }
337 }
338 (gt->gt_methods.set)(gt->gt_tif, (pinfo_t) tag, count, data );
338 }
339 (gt->gt_methods.set)(gt->gt_tif, (pinfo_t) tag, count, data );
339340
340341 _GTIFFree( data );
341342
361362 int keycode;
362363 int typecode;
363364
364 scan(message,aux);
365 scan(message,aux);
365366 if (!strncmp(message,FMT_KEYEND,8)) return 0;
366367
367 num=sscanf(message,"%[^( ] (%[^,],%d):\n",name,type,&count);
368 num=sscanf(message,"%99[^( ] (%19[^,],%d):\n",name,type,&count);
368369 if (num!=3) return StringError(message);
369370
370371 vptr = message;
371 FINDCHAR(vptr,':');
372 FINDCHAR(vptr,':');
372373 if (!*vptr) return StringError(message);
373374 vptr+=2;
374375
387388 /* skip white space */
388389 SKIPWHITE(vptr);
389390 if (!*vptr) return StringError(message);
390
391
391392 switch (ktype)
392393 {
393 case TYPE_ASCII:
394 case TYPE_ASCII:
394395 {
395396 char *cdata;
396397 int out_char = 0;
433434 }
434435 break;
435436
436 case TYPE_DOUBLE:
437 case TYPE_DOUBLE:
437438 {
438439 double data[100];
439440 outcount = count;
459460 GTIFKeySet(gt,key,ktype,outcount,data);
460461 break;
461462 }
462
463 case TYPE_SHORT:
463
464 case TYPE_SHORT:
464465 if (count==1)
465466 {
466467 icode = GTIFValueCode(key,vptr);
502503 }
503504
504505
505 static void DefaultRead(char *string, void *aux)
506 static int DefaultRead(char *string, void *aux)
506507 {
507508 /* Pretty boring */
508509 int num_read;
509 num_read = fscanf((FILE *)aux, "%[^\n]\n", string);
510 /* 1023 comes from char message[1024]; in GTIFFImport */
511 num_read = fscanf((FILE *)aux, "%1023[^\n]\n", string);
510512 if (num_read != 0) {
511513 fprintf(stderr, "geo_print.c DefaultRead failed to read anything.\n");
512514 }
513 }
514
515 return 1;
516 }
2525 This must come from the list of legal geokey_t values
2626 (an enumeration) listed below.
2727
28 @param val The <b>val</b> argument is a pointer to the
29 variable into which the value should be read. The type of the variable
30 varies depending on the geokey_t given. While there is no ready mapping
31 of geokey_t values onto types, in general code values are of type <i>short</i>,
32 citations are strings, and everything else is of type <i>double</i>. Note
33 that pointer's to <i>int</i> should never be passed to GTIFKeyGet() for
34 integer values as they will be shorts, and the int's may not be properly
35 initialized (and will be grossly wrong on MSB systems).
36
37 @param index Indicates how far into the list of values
38 for this geokey to offset. Should normally be zero.
28 @param type Type of the key.
3929
4030 @param count Indicates how many values
4131 to read. At this time all keys except for strings have only one value,
4232 so <b>index</b> should be zero, and <b>count</b> should be one.<p>
4333
44 The <b>key</b> indicates the key name to be written to the
45 file and should from the geokey_t enumeration
34 The <b>keyID</b> indicates the key name to be written to the
35 file and should from the geokey_t enumeration
4636 (eg. <tt>ProjectedCSTypeGeoKey</tt>). The full list of possible geokey_t
4737 values can be found in geokeys.inc, or in the online documentation for
4838 GTIFKeyGet().<p>
6050 if count is larger than 1.<p>
6151
6252 Note that key values aren't actually flushed to the file until
63 GTIFWriteKeys() is called. Till then
53 GTIFWriteKeys() is called. Till then
6454 the new values are just kept with the GTIF structure.<p>
6555
6656 <b>Example:</b><p>
6757
6858 <pre>
69 GTIFKeySet(gtif, GTRasterTypeGeoKey, TYPE_SHORT, 1,
59 GTIFKeySet(gtif, GTRasterTypeGeoKey, TYPE_SHORT, 1,
7060 RasterPixelIsArea);
71 GTIFKeySet(gtif, GTCitationGeoKey, TYPE_ASCII, 0,
61 GTIFKeySet(gtif, GTCitationGeoKey, TYPE_ASCII, 0,
7262 "UTM 11 North / NAD27" );
7363 </pre>
7464
7868 {
7969 va_list ap;
8070 int nIndex = gtif->gt_keyindex[ keyID ];
81 int newvalues = 0;
8271 GeoKey *key;
8372 char *data = NULL;
8473 char *val = NULL;
8776
8877 va_start(ap, count);
8978 /* pass singleton keys by value */
90 if (count>1 && type!=TYPE_ASCII)
79 if (count>1 && type!=TYPE_ASCII)
9180 {
9281 val = va_arg(ap, char*);
9382 }
10695
10796 while( nIndex < gtif->gt_num_keys )
10897 {
109 _GTIFmemcpy( gtif->gt_keys + nIndex,
110 gtif->gt_keys + nIndex + 1,
98 _GTIFmemcpy( gtif->gt_keys + nIndex,
99 gtif->gt_keys + nIndex + 1,
111100 sizeof(GeoKey) );
112101 gtif->gt_keyindex[gtif->gt_keys[nIndex].gk_key] = nIndex;
113102 nIndex++;
122111 }
123112 else switch (type)
124113 {
125 case TYPE_SHORT: sval=(pinfo_t) va_arg(ap, int); val=(char *)&sval; break;
126 case TYPE_DOUBLE: dval=va_arg(ap, dblparam_t); val=(char *)&dval; break;
127 case TYPE_ASCII:
114 case TYPE_SHORT:
115 /* cppcheck-suppress unreadVariable */
116 sval=(pinfo_t) va_arg(ap, int);
117 val=(char *)&sval;
118 break;
119 case TYPE_DOUBLE:
120 /* cppcheck-suppress unreadVariable */
121 dval=va_arg(ap, dblparam_t);
122 val=(char *)&dval;
123 break;
124 case TYPE_ASCII:
128125 val=va_arg(ap, char*);
129126 count = (int)strlen(val) + 1; /* force = string length */
130127 break;
133130 break;
134131 }
135132 va_end(ap);
136
133
137134 /* We assume here that there are no multi-valued SHORTS ! */
138135 if (nIndex)
139136 {
145142 key->gk_type = type;
146143 key->gk_count = count;
147144 key->gk_size = _gtiff_size[ type ];
148 newvalues = 1;
145
146 if( type == TYPE_DOUBLE )
147 {
148 key->gk_data = (char *)(gtif->gt_double + gtif->gt_ndoubles);
149 gtif->gt_ndoubles += count;
150 }
149151 }
150152 }
151153 else
161163 key->gk_size = _gtiff_size[ type ];
162164 if ((geokey_t)gtif->gt_keymin > keyID) gtif->gt_keymin=keyID;
163165 if ((geokey_t)gtif->gt_keymax < keyID) gtif->gt_keymax=keyID;
164 newvalues = 1;
165 }
166
167 if (newvalues)
168 {
169 switch (type)
170 {
171 case TYPE_SHORT:
166 gtif->gt_nshorts += sizeof(KeyEntry)/sizeof(pinfo_t);
167 if( type == TYPE_DOUBLE )
168 {
169 key->gk_data = (char *)(gtif->gt_double + gtif->gt_ndoubles);
170 gtif->gt_ndoubles += count;
171 }
172 }
173
174 switch (type)
175 {
176 case TYPE_SHORT:
172177 if (count > 1) return 0;
173178 data = (char *)&key->gk_data; /* store value *in* data */
174179 break;
175 case TYPE_DOUBLE:
176 key->gk_data = (char *)(gtif->gt_double + gtif->gt_ndoubles);
177 data = key->gk_data;
178 gtif->gt_ndoubles += count;
179 break;
180 case TYPE_ASCII:
181 break;
182 default:
183 va_end(ap);
184 return 0;
185 }
186 gtif->gt_nshorts += sizeof(KeyEntry)/sizeof(pinfo_t);
187 }
188
189 /* this fixes a bug where if a request is made to write a duplicate
190 key, we must initialize the data to a valid value.
191 Bryan Wells (bryan@athena.bangor.autometric.com) */
192
193 else /* no new values, but still have something to write */
194 {
195 switch (type)
196 {
197 case TYPE_SHORT:
198 if (count > 1) return 0;
199 data = (char *)&key->gk_data; /* store value *in* data */
200 break;
201 case TYPE_DOUBLE:
180 case TYPE_DOUBLE:
202181 data = key->gk_data;
203182 break;
204 case TYPE_ASCII:
183 case TYPE_ASCII:
184 /* throw away existing data and allocate room for new data */
185 if (key->gk_data != 0)
186 {
187 _GTIFFree(key->gk_data);
188 }
189 key->gk_data = (char *)_GTIFcalloc(count);
190 key->gk_count = count;
191 data = key->gk_data;
205192 break;
206 default:
193 default:
207194 return 0;
208 }
209 }
210
211 switch (type)
212 {
213 case TYPE_ASCII:
214 /* throw away existing data and allocate room for new data */
215 if (key->gk_data != 0)
216 {
217 _GTIFFree(key->gk_data);
218 }
219 key->gk_data = (char *)_GTIFcalloc(count);
220 key->gk_count = count;
221 data = key->gk_data;
222 break;
223 default:
224 break;
225195 }
226196
227197 _GTIFmemcpy(data, val, count*key->gk_size);
228
198
229199 gtif->gt_flags |= FLAG_FILE_MODIFIED;
230200 return 1;
231201 }
2323 * tags in memory, without depending on libtiff.
2424 *
2525 *****************************************************************************/
26
26
2727 #include "geotiff.h" /* public GTIFF interface */
2828 #include "geo_simpletags.h"
2929
3737 static tagtype_t _GTIFTagType (tiff_t *tif, pinfo_t tag);
3838
3939 /*
40 * Set up default TIFF handlers.
40 * Set up default TIFF handlers.
4141 */
4242 void GTIFSetSimpleTagsMethods(TIFFMethod *method)
4343 {
4444 if (!method) return;
45
45
4646 method->get = _GTIFGetField;
4747 method->set = _GTIFSetField;
4848 method->type = _GTIFTagType;
5858 int item_size, data_type;
5959 void *internal_value, *ret_value;
6060
61 if( !ST_GetKey( (ST_TIFF*) tif, (int) tag, count, &data_type,
61 if( !ST_GetKey( (ST_TIFF*) tif, (int) tag, count, &data_type,
6262 &internal_value ) )
6363 return 0;
6464
7171 if (!ret_value) return 0;
7272
7373 _TIFFmemcpy( ret_value, internal_value, item_size * *count );
74
74
7575 *(void **)val = ret_value;
7676 return 1;
7777 }
7878
79 /*
79 /*
8080 * Set a GeoTIFF TIFF field.
8181 */
8282 static int _GTIFSetField (tiff_t *tif, pinfo_t tag, int count, void *value )
100100 tagtype_t ttype;
101101
102102 (void) tif; /* dummy reference */
103
103
104104 switch (tag)
105105 {
106106 case GTIFF_ASCIIPARAMS: ttype=TYPE_ASCII; break;
111111 case GTIFF_GEOKEYDIRECTORY: ttype=TYPE_SHORT; break;
112112 default: ttype = TYPE_UNKNOWN;
113113 }
114
114
115115 return ttype;
116116 }
117117
123123 {
124124 switch (tag)
125125 {
126 case GTIFF_ASCIIPARAMS:
126 case GTIFF_ASCIIPARAMS:
127127 return STT_ASCII;
128128
129129 case GTIFF_PIXELSCALE:
130130 case GTIFF_TRANSMATRIX:
131131 case GTIFF_TIEPOINTS:
132 case GTIFF_DOUBLEPARAMS:
132 case GTIFF_DOUBLEPARAMS:
133133 return STT_DOUBLE;
134134
135135 case GTIFF_GEOKEYDIRECTORY:
136136 return STT_SHORT;
137137 }
138
138
139139 return -1;
140140 }
141141
151151 return 1;
152152 else if( st_type == STT_SHORT )
153153 return 2;
154 else if( st_type == STT_DOUBLE )
155 return 8;
156 else
154 else /* if( st_type == STT_DOUBLE ) */
157155 return 8;
158156 }
159157
196194 /* -------------------------------------------------------------------- */
197195 /* We should compute the length if we were not given a count */
198196 /* -------------------------------------------------------------------- */
199 if (count == 0 && st_type == STT_ASCII )
197 if (count == 0 && st_type == STT_ASCII )
200198 {
201199 count = (int)strlen((char*)data)+1;
202200 }
230228 /* +1 to make clang static analyzer not warn about potential malloc(0) */
231229 st->key_list[st->key_count-1].data = malloc(item_size * count+1);
232230 memcpy( st->key_list[st->key_count-1].data, data, item_size * count );
233
231
234232 return 1;
235233 }
236234
238236 /* ST_GetKey() */
239237 /************************************************************************/
240238
241 int ST_GetKey( ST_TIFF *st, int tag, int *count,
239 int ST_GetKey( ST_TIFF *st, int tag, int *count,
242240 int *st_type, void **data_ptr )
243241
244242 {
260258
261259 return 0;
262260 }
263
1919 * DEALINGS IN THE SOFTWARE.
2020 *****************************************************************************
2121 *
22 * geo_simpletags.h
22 * geo_simpletags.h
2323 *
2424 * Provides interface for a "simple tags io in memory" mechanism
2525 * as an alternative to accessing a real tiff file using libtiff.
5353
5454 typedef void *STIFF;
5555
56 void CPL_DLL GTIFSetSimpleTagsMethods(TIFFMethod *method);
56 void GTIF_DLL GTIFSetSimpleTagsMethods(TIFFMethod *method);
5757
58 int CPL_DLL ST_SetKey( ST_TIFF *, int tag, int count,
58 int GTIF_DLL ST_SetKey( ST_TIFF *, int tag, int count,
5959 int st_type, void *data );
60 int CPL_DLL ST_GetKey( ST_TIFF *, int tag, int *count,
60 int GTIF_DLL ST_GetKey( ST_TIFF *, int tag, int *count,
6161 int *st_type, void **data_ptr );
6262
63 ST_TIFF CPL_DLL *ST_Create( void );
64 void CPL_DLL ST_Destroy( ST_TIFF * );
63 ST_TIFF GTIF_DLL *ST_Create( void );
64 void GTIF_DLL ST_Destroy( ST_TIFF * );
6565
66 int CPL_DLL ST_TagType( int tag );
66 int GTIF_DLL ST_TagType( int tag );
6767
6868 #if defined(__cplusplus)
69 }
69 }
7070 #endif
7171
7272 #endif /* LIBGEOTIFF_GEO_SIMPLETAGS_H_ */
1414 * notice accompanies any products derived therefrom.
1515 *
1616 **********************************************************************/
17
17
1818 #include "geotiff.h" /* public GTIFF interface */
1919
2020 #include "geo_tiffp.h" /* Private TIFF interface */
2828 static tagtype_t _GTIFTagType (tiff_t *tif, pinfo_t tag);
2929
3030 /*
31 * Set up default TIFF handlers.
31 * Set up default TIFF handlers.
3232 */
3333 void _GTIFSetDefaultTIFF(TIFFMethod *method)
3434 {
3535 if (!method) return;
36
36
3737 method->get = _GTIFGetField;
3838 method->set = _GTIFSetField;
3939 method->type = _GTIFTagType;
4848
4949 gdata_t _GTIFrealloc(gdata_t ptr, gsize_t size)
5050 {
51 return( _TIFFrealloc((tdata_t)ptr, (tsize_t) size) );
51 return _TIFFrealloc((tdata_t)ptr, (tsize_t) size);
5252 }
5353
5454 void _GTIFmemcpy(gdata_t out,gdata_t in,gsize_t size)
7575 char *tmp;
7676 char *value;
7777 gsize_t size = _gtiff_size[_GTIFTagType (tif,tag)];
78
78
7979 if (_GTIFTagType(tif, tag) == TYPE_ASCII)
8080 {
8181 status = TIFFGetField((TIFF *)tif,tag,&tmp);
8484 }
8585 else status = TIFFGetField((TIFF *)tif,tag,&scount,&tmp);
8686 if (!status) return status;
87
87
8888 *count = scount;
8989
9090 value = (char *)_GTIFcalloc( (scount+MAX_VALUES)*size);
9191 if (!value) return 0;
92
92
9393 _TIFFmemcpy( value, tmp, size * scount);
94
94
9595 *(char **)val = value;
9696 return status;
9797 }
9898
99 /*
99 /*
100100 * Set a GeoTIFF TIFF field.
101101 */
102102 static int _GTIFSetField (tiff_t *tif, pinfo_t tag, int count, void *value )
107107 /* libtiff ASCII uses null-delimiter */
108108 if (_GTIFTagType(tif, tag) == TYPE_ASCII)
109109 status = TIFFSetField((TIFF *)tif,tag,value);
110 else
110 else
111111 status = TIFFSetField((TIFF *)tif,tag,scount,value);
112112 return status;
113113 }
127127 tagtype_t ttype;
128128
129129 (void) tif; /* dummy reference */
130
130
131131 switch (tag)
132132 {
133133 case GTIFF_ASCIIPARAMS: ttype=TYPE_ASCII; break;
138138 case GTIFF_GEOKEYDIRECTORY: ttype=TYPE_SHORT; break;
139139 default: ttype = TYPE_UNKNOWN;
140140 }
141
141
142142 return ttype;
143143 }
144
2727 * with the appropriate one for your own TIFF parsing routines.
2828 *
2929 * Revision History
30 *
30 *
3131 * 19 September 1995 ndr Demoted Intergraph trans matrix.
3232 *
3333 **********************************************************************/
5757 * with the appropriate definitions to access the geo-tags
5858 *
5959 **********************************************************************/
60
60
6161 typedef unsigned short pinfo_t; /* SHORT ProjectionInfo tag type */
6262 typedef TIFF tiff_t; /* TIFF file descriptor */
6363 typedef tdata_t gdata_t; /* pointer to data */
6464 typedef tsize_t gsize_t; /* data allocation size */
65
65
6666 #define GTIFF_GEOKEYDIRECTORY TIFFTAG_GEOKEYDIRECTORY /* from xtiffio.h */
6767 #define GTIFF_DOUBLEPARAMS TIFFTAG_GEODOUBLEPARAMS
6868 #define GTIFF_ASCIIPARAMS TIFFTAG_GEOASCIIPARAMS
9090
9191 /**********************************************************************
9292 *
93 * Protected Function Declarations
93 * Protected Function Declarations
9494 *
9595 * These routines are exposed implementations, and should not
9696 * be used by external GEOTIFF client programs.
9898 **********************************************************************/
9999
100100 extern gsize_t _gtiff_size[]; /* TIFF data sizes */
101 extern void CPL_DLL _GTIFSetDefaultTIFF(TIFFMethod *method);
102 extern gdata_t CPL_DLL _GTIFcalloc(gsize_t);
103 extern gdata_t CPL_DLL _GTIFrealloc(gdata_t,gsize_t);
104 extern void CPL_DLL _GTIFFree(gdata_t data);
105 extern void CPL_DLL _GTIFmemcpy(gdata_t out,gdata_t in,gsize_t size);
101 extern void GTIF_DLL _GTIFSetDefaultTIFF(TIFFMethod *method);
102 extern gdata_t GTIF_DLL _GTIFcalloc(gsize_t);
103 extern gdata_t GTIF_DLL _GTIFrealloc(gdata_t,gsize_t);
104 extern void GTIF_DLL _GTIFFree(gdata_t data);
105 extern void GTIF_DLL _GTIFmemcpy(gdata_t out,gdata_t in,gsize_t size);
106106
107107 #if defined(__cplusplus)
108 }
108 }
109109 #endif
110110
111111
00 /******************************************************************************
1 * $Id: geo_trans.c 2688 2015-11-22 22:38:17Z rouault $
1 * $Id: geo_trans.c 2741 2016-09-04 18:50:49Z rouault $
22 *
33 * Project: libgeotiff
44 * Purpose: Code to abstract translation between pixel/line and PCS
2626 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2727 * DEALINGS IN THE SOFTWARE.
2828 *****************************************************************************/
29
29
3030 #include "geotiff.h"
3131 #include "geo_tiffp.h" /* external TIFF interface */
3232 #include "geo_keyp.h" /* private interface */
8585 (void) y_in;
8686 (void) x_out;
8787 (void) y_out;
88
88
8989 /* I would appreciate a _brief_ block of code for doing second order
9090 polynomial regression here! */
9191 return FALSE;
140140 /* If the pixelscale count is zero, but we have tiepoints use */
141141 /* the tiepoint based approach. */
142142 /* -------------------------------------------------------------------- */
143 if( tiepoint_count > 6 && count == 0 )
143 if( tiepoint_count > 6 && count == 0 )
144144 {
145145 res = GTIFTiepointTranslate( tiepoint_count / 6,
146146 tiepoints, tiepoints + 3,
150150 /* -------------------------------------------------------------------- */
151151 /* If we have a transformation matrix, use it. */
152152 /* -------------------------------------------------------------------- */
153 else if( transform_count == 16 )
153 else if( transform_count == 16 )
154154 {
155155 double x_in = *x, y_in = *y;
156156
157157 *x = x_in * transform[0] + y_in * transform[1] + transform[3];
158158 *y = x_in * transform[4] + y_in * transform[5] + transform[7];
159
159
160160 res = TRUE;
161 }
161 }
162162
163163 /* -------------------------------------------------------------------- */
164164 /* For now we require one tie point, and a valid pixel scale. */
165165 /* -------------------------------------------------------------------- */
166 else if( count < 3 || tiepoint_count < 6 )
166 else if( count < 3 || tiepoint_count < 6 )
167167 {
168168 res = FALSE;
169 }
170
171 else
169 }
170
171 else
172172 {
173173 *x = (*x - tiepoints[0]) * pixel_scale[0] + tiepoints[3];
174174 *y = (*y - tiepoints[1]) * (-1 * pixel_scale[1]) + tiepoints[4];
179179 /* -------------------------------------------------------------------- */
180180 /* Cleanup */
181181 /* -------------------------------------------------------------------- */
182 if(tiepoints)
182 if(tiepoints)
183183 _GTIFFree(tiepoints);
184184 if(pixel_scale)
185185 _GTIFFree(pixel_scale);
186 if(transform)
186 if(transform)
187187 _GTIFFree(transform);
188188
189189 return res;
197197 * Translate a projection coordinate to pixel/line coordinates.
198198 *
199199 * At this time this function does not support PCS to image translations for
200 * tiepoints-only based definitions, only matrix and pixelscale/tiepoints
200 * tiepoints-only based definitions, only matrix and pixelscale/tiepoints
201201 * formulations are supposed.
202202 *
203203 * @param gtif The handle from GTIFNew() indicating the target file.
254254 {
255255 double x_in = *x, y_in = *y;
256256 double gt_in[6], gt_out[6];
257
257
258258 gt_in[0] = transform[0];
259259 gt_in[1] = transform[1];
260260 gt_in[2] = transform[3];
268268 {
269269 *x = x_in * gt_out[0] + y_in * gt_out[1] + gt_out[2];
270270 *y = x_in * gt_out[3] + y_in * gt_out[4] + gt_out[5];
271
271
272272 result = TRUE;
273273 }
274274 }
287287 /* -------------------------------------------------------------------- */
288288 /* Cleanup. */
289289 /* -------------------------------------------------------------------- */
290 if(tiepoints)
290 if(tiepoints)
291291 _GTIFFree(tiepoints);
292292 if(pixel_scale)
293293 _GTIFFree(pixel_scale);
294 if(transform)
294 if(transform)
295295 _GTIFFree(transform);
296296
297297 return result;
298298 }
299
2020
2121
2222 /**
23 This function flushes all the GeoTIFF keys that have been set with the
24 GTIFKeySet() function into the associated
23 This function flushes all the GeoTIFF keys that have been set with the
24 GTIFKeySet() function into the associated
2525 TIFF file.
2626
2727 @param gt The GeoTIFF handle returned by GTIFNew.
2828
29 GTIFWriteKeys() should be called before
29 GTIFWriteKeys() should be called before
3030 GTIFFree() is used to deallocate a GeoTIFF access handle.
3131 */
3232
3838 KeyHeader *header;
3939 TempKeyData tempData;
4040 int sortkeys[MAX_KEYS];
41
41
4242 if (!(gt->gt_flags & FLAG_FILE_MODIFIED)) return 1;
4343
4444 if( gt->gt_tif == NULL )
4545 return 0;
46
46
4747 tempData.tk_asciiParams = 0;
4848 tempData.tk_asciiParamsLength = 0;
4949 tempData.tk_asciiParamsOffset = 0;
5353 {
5454 /* XXX error: a key was not recognized */
5555 }
56
56
5757 /* Set up header of ProjectionInfo tag */
5858 header = (KeyHeader *)gt->gt_short;
5959 header->hdr_num_keys = (pinfo_t) gt->gt_num_keys;
6060 header->hdr_version = GvCurrentVersion;
6161 header->hdr_rev_major = GvCurrentRevision;
6262 header->hdr_rev_minor = GvCurrentMinorRev;
63
63
6464 /* Sum up the ASCII tag lengths */
6565 for (i = 0; i < gt->gt_num_keys; i++)
6666 {
9292 }
9393 return 0;
9494 }
95 }
96
95 }
96
9797 /* Write out the Key Directory */
98 (gt->gt_methods.set)(gt->gt_tif, GTIFF_GEOKEYDIRECTORY, gt->gt_nshorts, gt->gt_short );
99
98 (gt->gt_methods.set)(gt->gt_tif, GTIFF_GEOKEYDIRECTORY, gt->gt_nshorts, gt->gt_short );
99
100100 /* Write out the params directories */
101101 if (gt->gt_ndoubles)
102102 (gt->gt_methods.set)(gt->gt_tif, GTIFF_DOUBLEPARAMS, gt->gt_ndoubles, gt->gt_double );
107107 (gt->gt_methods.set)(gt->gt_tif,
108108 GTIFF_ASCIIPARAMS, 0, tempData.tk_asciiParams);
109109 }
110
110
111111 gt->gt_flags &= ~FLAG_FILE_MODIFIED;
112112
113113 if (tempData.tk_asciiParamsLength > 0)
122122 * Private Routines
123123 *
124124 **********************************************************************/
125
125
126126 /*
127127 * Given GeoKey, write out the KeyEntry entries, returning 0 if failure.
128128 * This is the exact complement of ReadKey().
132132 KeyEntry* entptr, GeoKey* keyptr)
133133 {
134134 int count;
135
135
136136 entptr->ent_key = (pinfo_t) keyptr->gk_key;
137137 entptr->ent_count = (pinfo_t) keyptr->gk_count;
138138 count = entptr->ent_count;
139
139
140140 if (count==1 && keyptr->gk_type==TYPE_SHORT)
141141 {
142142 entptr->ent_location = GTIFF_LOCAL;
143143 memcpy(&(entptr->ent_val_offset), &keyptr->gk_data, sizeof(pinfo_t));
144144 return 1;
145145 }
146
146
147147 switch (keyptr->gk_type)
148148 {
149149 case TYPE_SHORT:
153153 break;
154154 case TYPE_DOUBLE:
155155 entptr->ent_location = GTIFF_DOUBLEPARAMS;
156 entptr->ent_val_offset = (pinfo_t)
156 entptr->ent_val_offset = (pinfo_t)
157157 ((double*)keyptr->gk_data - gt->gt_double);
158158 break;
159159 case TYPE_ASCII:
169169 default:
170170 return 0; /* failure */
171171 }
172
172
173173 return 1; /* success */
174174 }
175175
176176
177 /*
177 /*
178178 * Numerically sort the GeoKeys.
179179 * We just do a linear search through
180180 * the list and pull out the keys that were set.
196196 did_work = 0;
197197 for( i = 0; i < gt->gt_num_keys-1; i++ )
198198 {
199 if( gt->gt_keys[sortkeys[i]].gk_key
199 if( gt->gt_keys[sortkeys[i]].gk_key
200200 > gt->gt_keys[sortkeys[i+1]].gk_key )
201201 {
202202 /* swap keys in sort list */
203203 int j = sortkeys[i];
204204 sortkeys[i] = sortkeys[i+1];
205205 sortkeys[i+1] = j;
206
206
207207 did_work = 1;
208208 }
209209 }
211211
212212 return 1;
213213 }
214
1212 #ifndef LIBGEOTIFF_GEOKEYS_H_
1313 #define LIBGEOTIFF_GEOKEYS_H_
1414
15 /* The GvCurrentRevision number should be incremented whenever a
16 * new set of Keys are defined or modified in "geokeys.inc", and comments
15 /* The GvCurrentRevision number should be incremented whenever a
16 * new set of Keys are defined or modified in "geokeys.inc", and comments
1717 * added to the "Revision History" section above. If only code
1818 * _values_ are augmented, the "GvCurrentMinorRev" number should
19 * be incremented instead (see "geovalues.h"). Whenever the
19 * be incremented instead (see "geovalues.h"). Whenever the
2020 * GvCurrentRevision is incremented, the GvCurrentMinorRev should
2121 * be reset to zero.
2222 *
3838 # include "geokeys.inc" /* geokey database */
3939
4040 ReservedEndGeoKey = 32767,
41
41
4242 /* Key space available for Private or internal use */
4343 PrivateBaseGeoKey = 32768, /* Consistent with TIFF Private tags */
44 PrivateEndGeoKey = 65535,
45
44 PrivateEndGeoKey = 65535,
45
4646 EndGeoKey = 65535 /* Largest Possible GeoKey ID */
4747 } geokey_t;
4848
00 /*
11 * geonames.h
22 *
3 * This encapsulates all of the value-naming mechanism of
4 * libgeotiff.
3 * This encapsulates all of the value-naming mechanism of
4 * libgeotiff.
55 *
66 * Written By: Niles Ritter
77 *
2020 };
2121 typedef struct _KeyInfo KeyInfo;
2222
23 /* If memory is a premium, then omitting the
24 * long name lists may save some space; simply
23 /* If memory is a premium, then omitting the
24 * long name lists may save some space; simply
2525 * #define OMIT_GEOTIFF_NAMES in the compile statement
2626 * to remove all key->string translation.
2727 */
5050 {KvUndefined, "Undefined"}, \
5151 {KvUserDefined,"User-Defined"}, \
5252 ValuePair(KvUndefined,KvUndefined) \
53 ValuePair(KvUserDefined,KvUserDefined)
53 ValuePair(KvUserDefined,KvUserDefined)
5454
5555 static const KeyInfo _csdefaultValue[] = {
5656 COMMON_VALUES
57 END_LIST
57 END_LIST
5858 };
5959
6060 /************************************************************
6969 ValuePair(ModelProjected,1) /* aliases */
7070 ValuePair(ModelGeographic,2) /* aliases */
7171 ValuePair(ModelGeocentric,3) /* aliases */
72 END_LIST
72 END_LIST
7373 };
7474
7575 static const KeyInfo _rastertypeValue[] = {
7676 COMMON_VALUES
7777 ValuePair(RasterPixelIsArea,1)
7878 ValuePair(RasterPixelIsPoint,2)
79 END_LIST
79 END_LIST
8080 };
8181
8282 static const KeyInfo _geounitsValue[] = {
8383 COMMON_VALUES
8484 # include "epsg_units.inc"
85 END_LIST
85 END_LIST
8686 };
8787
8888 static const KeyInfo _geographicValue[] = {
8989 COMMON_VALUES
9090 # include "epsg_gcs.inc"
91 END_LIST
91 END_LIST
9292 };
9393
9494 static const KeyInfo _geodeticdatumValue[] = {
9595 COMMON_VALUES
9696 # include "epsg_datum.inc"
97 END_LIST
97 END_LIST
9898 };
9999
100100 static const KeyInfo _ellipsoidValue[] = {
101101 COMMON_VALUES
102102 # include "epsg_ellipse.inc"
103 END_LIST
103 END_LIST
104104 };
105105
106106 static const KeyInfo _primemeridianValue[] = {
107107 COMMON_VALUES
108108 # include "epsg_pm.inc"
109 END_LIST
109 END_LIST
110110 };
111111
112112 static const KeyInfo _pcstypeValue[] = {
113113 COMMON_VALUES
114114 # include "epsg_pcs.inc"
115 END_LIST
115 END_LIST
116116 };
117117
118118 static const KeyInfo _projectionValue[] = {
119119 COMMON_VALUES
120120 # include "epsg_proj.inc"
121 END_LIST
121 END_LIST
122122 };
123123
124124 static const KeyInfo _coordtransValue[] = {
125125 COMMON_VALUES
126126 # include "geo_ctrans.inc"
127 END_LIST
127 END_LIST
128128 };
129129
130130 static const KeyInfo _vertcstypeValue[] = {
131131 COMMON_VALUES
132132 # include "epsg_vertcs.inc"
133 END_LIST
133 END_LIST
134134 };
135135
136136 static const KeyInfo _vdatumValue[] = {
137137 COMMON_VALUES
138138 ValuePair(VDatumBase,1)
139 END_LIST
139 END_LIST
140140 };
141141
142142 #endif /* LIBGEOTIFF_GEONAMES_H_ */
143
1717 *
1818 * Primary libgeotiff include file.
1919 *
20 * This is the defacto registry for valid GEOTIFF GeoKeys
20 * This is the de facto registry for valid GeoTIFF GeoKeys
2121 * and their associated symbolic values. This is also the only file
2222 * of the GeoTIFF library which needs to be included in client source
2323 * code.
2929 */
3030 #define GvCurrentVersion 1
3131
32 #define LIBGEOTIFF_VERSION 1420
32 #define LIBGEOTIFF_VERSION 1430
3333
34 #include <geo_config.h>
34 #include "geo_config.h"
3535 #include "geokeys.h"
3636
3737 /**********************************************************************
3838 * Do we want to build as a DLL on windows?
3939 **********************************************************************/
40 #if !defined(CPL_DLL)
40 #if !defined(GTIF_DLL)
4141 # if defined(_WIN32) && defined(BUILD_AS_DLL)
42 # define CPL_DLL __declspec(dllexport)
42 # define GTIF_DLL __declspec(dllexport)
4343 # else
44 # define CPL_DLL
44 # define GTIF_DLL
4545 # endif
4646 #endif
4747
7676 TYPE_UNKNOWN=11
7777 } tagtype_t;
7878
79 #define LIBGEOTIFF_WARNING 0
80 #define LIBGEOTIFF_ERROR 1
81
82 #ifndef GTIF_PRINT_FUNC_FORMAT
83 #if defined(__GNUC__) && __GNUC__ >= 3
84 #define GTIF_PRINT_FUNC_FORMAT( format_idx, arg_idx ) __attribute__((__format__ (__printf__, format_idx, arg_idx)))
85 #else
86 #define GTIF_PRINT_FUNC_FORMAT( format_idx, arg_idx )
87 #endif
88 #endif
89
90 #ifndef GTERRORCALLBACK_DEFINED
91 #define GTERRORCALLBACK_DEFINED
92 /* Defined in both geotiff.h and geo_kep.h */
93 typedef void (*GTErrorCallback) (struct gtiff*,
94 int level,
95 const char* msg, ...) GTIF_PRINT_FUNC_FORMAT(3,4);
96 #endif
7997
8098 /**********************************************************************
8199 *
84102 **********************************************************************/
85103
86104 /* TIFF-level interface */
87 GTIF CPL_DLL *GTIFNew(void *tif);
88 GTIF CPL_DLL *GTIFNewSimpleTags(void *tif);
89 GTIF CPL_DLL *GTIFNewWithMethods(void *tif, TIFFMethod*);
90 void CPL_DLL GTIFFree(GTIF *gtif);
91 int CPL_DLL GTIFWriteKeys(GTIF *gtif);
92 void CPL_DLL GTIFDirectoryInfo(GTIF *gtif, int *versions, int *keycount);
105 GTIF GTIF_DLL *GTIFNew(void *tif);
106 GTIF GTIF_DLL *GTIFNewEx(void *tif,
107 GTErrorCallback error_callback, void* user_data);
108 GTIF GTIF_DLL *GTIFNewSimpleTags(void *tif);
109 GTIF GTIF_DLL *GTIFNewWithMethods(void *tif, TIFFMethod*);
110 GTIF GTIF_DLL *GTIFNewWithMethodsEx(void *tif, TIFFMethod* methods,
111 GTErrorCallback error_callback,
112 void* user_data);
113 void GTIF_DLL GTIFFree(GTIF *gtif);
114 int GTIF_DLL GTIFWriteKeys(GTIF *gtif);
115 void GTIF_DLL GTIFDirectoryInfo(GTIF *gtif, int *versions, int *keycount);
116 void GTIF_DLL *GTIFGetUserData(GTIF *gtif);
93117
94118 /* GeoKey Access */
95 int CPL_DLL GTIFKeyInfo(GTIF *gtif, geokey_t key, int *size, tagtype_t* type);
96 int CPL_DLL GTIFKeyGet(GTIF *gtif, geokey_t key, void *val, int index,
119 int GTIF_DLL GTIFKeyInfo(GTIF *gtif, geokey_t key, int *size, tagtype_t* type);
120 int GTIF_DLL GTIFKeyGet(GTIF *gtif, geokey_t key, void *val, int index,
97121 int count);
98 int CPL_DLL GTIFKeySet(GTIF *gtif, geokey_t keyID, tagtype_t type,
122 int GTIF_DLL GTIFKeySet(GTIF *gtif, geokey_t keyID, tagtype_t type,
99123 int count,...);
100124
101125 /* Metadata Import-Export utilities */
102 void CPL_DLL GTIFPrint(GTIF *gtif, GTIFPrintMethod print, void *aux);
103 int CPL_DLL GTIFImport(GTIF *gtif, GTIFReadMethod scan, void *aux);
104 char CPL_DLL *GTIFKeyName(geokey_t key);
105 char CPL_DLL *GTIFValueName(geokey_t key,int value);
106 char CPL_DLL *GTIFTypeName(tagtype_t type);
107 char CPL_DLL *GTIFTagName(int tag);
108 int CPL_DLL GTIFKeyCode(char * key);
109 int CPL_DLL GTIFValueCode(geokey_t key,char *value);
110 int CPL_DLL GTIFTypeCode(char *type);
111 int CPL_DLL GTIFTagCode(char *tag);
126 void GTIF_DLL GTIFPrint(GTIF *gtif, GTIFPrintMethod print, void *aux);
127 int GTIF_DLL GTIFImport(GTIF *gtif, GTIFReadMethod scan, void *aux);
128 char GTIF_DLL *GTIFKeyName(geokey_t key);
129 char GTIF_DLL *GTIFValueName(geokey_t key,int value);
130 char GTIF_DLL *GTIFTypeName(tagtype_t type);
131 char GTIF_DLL *GTIFTagName(int tag);
132 int GTIF_DLL GTIFKeyCode(char * key);
133 int GTIF_DLL GTIFValueCode(geokey_t key,char *value);
134 int GTIF_DLL GTIFTypeCode(char *type);
135 int GTIF_DLL GTIFTagCode(char *tag);
112136
113137 /* Translation between image/PCS space */
114138
115 int CPL_DLL GTIFImageToPCS( GTIF *gtif, double *x, double *y );
116 int CPL_DLL GTIFPCSToImage( GTIF *gtif, double *x, double *y );
139 int GTIF_DLL GTIFImageToPCS( GTIF *gtif, double *x, double *y );
140 int GTIF_DLL GTIFPCSToImage( GTIF *gtif, double *x, double *y );
117141
118142 #if defined(__cplusplus)
119143 }
00 /******************************************************************************
1 * $Id: geotiff_proj4.c 2653 2015-05-02 12:07:17Z rouault $
1 * $Id: geotiff_proj4.c 2741 2016-09-04 18:50:49Z rouault $
22 *
33 * Project: libgeotiff
44 * Purpose: Code to convert a normalized GeoTIFF definition into a PROJ.4
117117 {
118118 size_t field_len = strlen(pszField);
119119 int i;
120
120
121121 if( !papszNV )
122122 return NULL;
123123
144144 /* helper function for importFromProj4(). */
145145 /************************************************************************/
146146
147 static double OSR_GDV( char **papszNV, const char * pszField,
147 static double OSR_GDV( char **papszNV, const char * pszField,
148148 double dfDefaultValue )
149149
150150 {
186186 short nSpheroid = KvUserDefined;
187187 double dfSemiMajor=0.0, dfSemiMinor=0.0, dfInvFlattening=0.0;
188188 int nDatum = KvUserDefined;
189 int nGCS = KvUserDefined;
189 int nGCS = KvUserDefined;
190190 const char *value;
191191
192192 /* -------------------------------------------------------------------- */
215215 if( dfSemiMinor != 0.0 && dfInvFlattening == 0.0 )
216216 dfInvFlattening = -1.0 / (dfSemiMinor/dfSemiMajor - 1.0);
217217 }
218
218
219219 /* -------------------------------------------------------------------- */
220220 /* Get the GCS/Datum code. */
221221 /* -------------------------------------------------------------------- */
222222 value = OSR_GSV( papszNV, "datum" );
223223
224 if( value == NULL )
224 if( value == NULL )
225225 {
226226 }
227227 else if( EQUAL(value,"WGS84") )
254254 else if( EQUAL(value,"longlat") || EQUAL(value,"latlong") )
255255 {
256256 }
257
257
258258 else if( EQUAL(value,"tmerc") )
259259 {
260260 GTIFKeySet(gtif, GTModelTypeGeoKey, TYPE_SHORT, 1,
264264 GTIFKeySet(gtif, ProjectionGeoKey, TYPE_SHORT, 1,
265265 KvUserDefined );
266266
267 GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1,
267 GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1,
268268 CT_TransverseMercator );
269269
270270 GTIFKeySet(gtif, ProjNatOriginLatGeoKey, TYPE_DOUBLE, 1,
272272
273273 GTIFKeySet(gtif, ProjNatOriginLongGeoKey, TYPE_DOUBLE, 1,
274274 OSR_GDV( papszNV, "lon_0", 0.0 ) );
275
275
276276 GTIFKeySet(gtif, ProjScaleAtNatOriginGeoKey, TYPE_DOUBLE, 1,
277277 OSR_GDV( papszNV, "k", 1.0 ) );
278
278
279279 GTIFKeySet(gtif, ProjFalseEastingGeoKey, TYPE_DOUBLE, 1,
280280 OSR_GDV( papszNV, "x_0", 0.0 ) );
281
281
282282 GTIFKeySet(gtif, ProjFalseNorthingGeoKey, TYPE_DOUBLE, 1,
283283 OSR_GDV( papszNV, "y_0", 0.0 ) );
284284 }
287287 {
288288 int nZone = (int) OSR_GDV(papszNV,"zone",0);
289289 const char *south = OSR_GSV(papszNV,"south");
290
290
291291 GTIFKeySet(gtif, GTModelTypeGeoKey, TYPE_SHORT, 1,
292292 ModelTypeProjected);
293293 GTIFKeySet(gtif, ProjectedCSTypeGeoKey, TYPE_SHORT, 1,
295295 GTIFKeySet(gtif, ProjectionGeoKey, TYPE_SHORT, 1,
296296 KvUserDefined );
297297
298 GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1,
298 GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1,
299299 CT_TransverseMercator );
300300
301 GTIFKeySet(gtif, ProjNatOriginLatGeoKey, TYPE_DOUBLE, 1,
301 GTIFKeySet(gtif, ProjNatOriginLatGeoKey, TYPE_DOUBLE, 1,
302302 0.0 );
303303
304304 GTIFKeySet(gtif, ProjNatOriginLongGeoKey, TYPE_DOUBLE, 1,
305305 nZone * 6 - 183.0 );
306
306
307307 GTIFKeySet(gtif, ProjScaleAtNatOriginGeoKey, TYPE_DOUBLE, 1,
308308 0.9996 );
309
309
310310 GTIFKeySet(gtif, ProjFalseEastingGeoKey, TYPE_DOUBLE, 1,
311311 500000.0 );
312312
318318 0.0 );
319319 }
320320
321 else if( EQUAL(value,"lcc")
322 && OSR_GDV(papszNV, "lat_0", 0.0 )
321 else if( EQUAL(value,"lcc")
322 && OSR_GDV(papszNV, "lat_0", 0.0 )
323323 == OSR_GDV(papszNV, "lat_1", 0.0 ) )
324324 {
325325 GTIFKeySet(gtif, GTModelTypeGeoKey, TYPE_SHORT, 1,
329329 GTIFKeySet(gtif, ProjectionGeoKey, TYPE_SHORT, 1,
330330 KvUserDefined );
331331
332 GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1,
332 GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1,
333333 CT_LambertConfConic_1SP );
334334
335335 GTIFKeySet(gtif, ProjNatOriginLatGeoKey, TYPE_DOUBLE, 1,
337337
338338 GTIFKeySet(gtif, ProjNatOriginLongGeoKey, TYPE_DOUBLE, 1,
339339 OSR_GDV( papszNV, "lon_0", 0.0 ) );
340
340
341341 GTIFKeySet(gtif, ProjScaleAtNatOriginGeoKey, TYPE_DOUBLE, 1,
342342 OSR_GDV( papszNV, "k", 1.0 ) );
343
343
344344 GTIFKeySet(gtif, ProjFalseEastingGeoKey, TYPE_DOUBLE, 1,
345345 OSR_GDV( papszNV, "x_0", 0.0 ) );
346
346
347347 GTIFKeySet(gtif, ProjFalseNorthingGeoKey, TYPE_DOUBLE, 1,
348348 OSR_GDV( papszNV, "y_0", 0.0 ) );
349349 }
357357 GTIFKeySet(gtif, ProjectionGeoKey, TYPE_SHORT, 1,
358358 KvUserDefined );
359359
360 GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1,
360 GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1,
361361 CT_LambertConfConic_2SP );
362362
363363 GTIFKeySet(gtif, ProjFalseOriginLatGeoKey, TYPE_DOUBLE, 1,
365365
366366 GTIFKeySet(gtif, ProjFalseOriginLongGeoKey, TYPE_DOUBLE, 1,
367367 OSR_GDV( papszNV, "lon_0", 0.0 ) );
368
368
369369 GTIFKeySet(gtif, ProjStdParallel1GeoKey, TYPE_DOUBLE, 1,
370370 OSR_GDV( papszNV, "lat_1", 0.0 ) );
371
371
372372 GTIFKeySet(gtif, ProjStdParallel2GeoKey, TYPE_DOUBLE, 1,
373373 OSR_GDV( papszNV, "lat_2", 0.0 ) );
374
374
375375 GTIFKeySet(gtif, ProjFalseOriginEastingGeoKey, TYPE_DOUBLE, 1,
376376 OSR_GDV( papszNV, "x_0", 0.0 ) );
377
377
378378 GTIFKeySet(gtif, ProjFalseOriginNorthingGeoKey, TYPE_DOUBLE, 1,
379379 OSR_GDV( papszNV, "y_0", 0.0 ) );
380380 }
382382 #ifdef notdef
383383 else if( EQUAL(value,"bonne") )
384384 {
385 SetBonne( OSR_GDV( papszNV, "lat_1", 0.0 ),
386 OSR_GDV( papszNV, "lon_0", 0.0 ),
387 OSR_GDV( papszNV, "x_0", 0.0 ),
385 SetBonne( OSR_GDV( papszNV, "lat_1", 0.0 ),
386 OSR_GDV( papszNV, "lon_0", 0.0 ),
387 OSR_GDV( papszNV, "x_0", 0.0 ),
388388 OSR_GDV( papszNV, "y_0", 0.0 ) );
389389 }
390390
391391 else if( EQUAL(value,"cass") )
392392 {
393 SetCS( OSR_GDV( papszNV, "lat_0", 0.0 ),
394 OSR_GDV( papszNV, "lon_0", 0.0 ),
395 OSR_GDV( papszNV, "x_0", 0.0 ),
393 SetCS( OSR_GDV( papszNV, "lat_0", 0.0 ),
394 OSR_GDV( papszNV, "lon_0", 0.0 ),
395 OSR_GDV( papszNV, "x_0", 0.0 ),
396396 OSR_GDV( papszNV, "y_0", 0.0 ) );
397397 }
398398
399399 else if( EQUAL(value,"nzmg") )
400400 {
401 SetNZMG( OSR_GDV( papszNV, "lat_0", -41.0 ),
402 OSR_GDV( papszNV, "lon_0", 173.0 ),
403 OSR_GDV( papszNV, "x_0", 2510000.0 ),
401 SetNZMG( OSR_GDV( papszNV, "lat_0", -41.0 ),
402 OSR_GDV( papszNV, "lon_0", 173.0 ),
403 OSR_GDV( papszNV, "x_0", 2510000.0 ),
404404 OSR_GDV( papszNV, "y_0", 6023150.0 ) );
405405 }
406406
407407 else if( EQUAL(value,"cea") )
408408 {
409 SetCEA( OSR_GDV( papszNV, "lat_ts", 0.0 ),
410 OSR_GDV( papszNV, "lon_0", 0.0 ),
411 OSR_GDV( papszNV, "x_0", 0.0 ),
409 SetCEA( OSR_GDV( papszNV, "lat_ts", 0.0 ),
410 OSR_GDV( papszNV, "lon_0", 0.0 ),
411 OSR_GDV( papszNV, "x_0", 0.0 ),
412412 OSR_GDV( papszNV, "y_0", 0.0 ) );
413413 }
414414
415415 else if( EQUAL(value,"merc") /* 2SP form */
416416 && OSR_GDV(papszNV, "lat_ts", 1000.0) < 999.0 )
417417 {
418 SetMercator2SP( OSR_GDV( papszNV, "lat_ts", 0.0 ),
418 SetMercator2SP( OSR_GDV( papszNV, "lat_ts", 0.0 ),
419419 0.0,
420 OSR_GDV( papszNV, "lon_0", 0.0 ),
421 OSR_GDV( papszNV, "x_0", 0.0 ),
420 OSR_GDV( papszNV, "lon_0", 0.0 ),
421 OSR_GDV( papszNV, "x_0", 0.0 ),
422422 OSR_GDV( papszNV, "y_0", 0.0 ) );
423423 }
424424
425425 else if( EQUAL(value,"merc") ) /* 1SP form */
426426 {
427427 SetMercator( 0.0,
428 OSR_GDV( papszNV, "lon_0", 0.0 ),
429 OSR_GDV( papszNV, "k", 1.0 ),
430 OSR_GDV( papszNV, "x_0", 0.0 ),
428 OSR_GDV( papszNV, "lon_0", 0.0 ),
429 OSR_GDV( papszNV, "k", 1.0 ),
430 OSR_GDV( papszNV, "x_0", 0.0 ),
431431 OSR_GDV( papszNV, "y_0", 0.0 ) );
432432 }
433433
434 else if( EQUAL(value,"stere")
434 else if( EQUAL(value,"stere")
435435 && ABS(OSR_GDV( papszNV, "lat_0", 0.0 ) - 90) < 0.001 )
436436 {
437 SetPS( OSR_GDV( papszNV, "lat_ts", 90.0 ),
438 OSR_GDV( papszNV, "lon_0", 0.0 ),
439 OSR_GDV( papszNV, "k", 1.0 ),
440 OSR_GDV( papszNV, "x_0", 0.0 ),
437 SetPS( OSR_GDV( papszNV, "lat_ts", 90.0 ),
438 OSR_GDV( papszNV, "lon_0", 0.0 ),
439 OSR_GDV( papszNV, "k", 1.0 ),
440 OSR_GDV( papszNV, "x_0", 0.0 ),
441441 OSR_GDV( papszNV, "y_0", 0.0 ) );
442442 }
443443
444 else if( EQUAL(value,"stere")
444 else if( EQUAL(value,"stere")
445445 && ABS(OSR_GDV( papszNV, "lat_0", 0.0 ) + 90) < 0.001 )
446446 {
447 SetPS( OSR_GDV( papszNV, "lat_ts", -90.0 ),
448 OSR_GDV( papszNV, "lon_0", 0.0 ),
449 OSR_GDV( papszNV, "k", 1.0 ),
450 OSR_GDV( papszNV, "x_0", 0.0 ),
447 SetPS( OSR_GDV( papszNV, "lat_ts", -90.0 ),
448 OSR_GDV( papszNV, "lon_0", 0.0 ),
449 OSR_GDV( papszNV, "k", 1.0 ),
450 OSR_GDV( papszNV, "x_0", 0.0 ),
451451 OSR_GDV( papszNV, "y_0", 0.0 ) );
452452 }
453453
454454 else if( EQUALN(value,"stere",5) /* mostly sterea */
455455 && CSLFetchNameValue(papszNV,"k") != NULL )
456456 {
457 SetOS( OSR_GDV( papszNV, "lat_0", 0.0 ),
458 OSR_GDV( papszNV, "lon_0", 0.0 ),
459 OSR_GDV( papszNV, "k", 1.0 ),
460 OSR_GDV( papszNV, "x_0", 0.0 ),
457 SetOS( OSR_GDV( papszNV, "lat_0", 0.0 ),
458 OSR_GDV( papszNV, "lon_0", 0.0 ),
459 OSR_GDV( papszNV, "k", 1.0 ),
460 OSR_GDV( papszNV, "x_0", 0.0 ),
461461 OSR_GDV( papszNV, "y_0", 0.0 ) );
462462 }
463463
464464 else if( EQUAL(value,"stere") )
465465 {
466 SetStereographic( OSR_GDV( papszNV, "lat_0", 0.0 ),
467 OSR_GDV( papszNV, "lon_0", 0.0 ),
468 1.0,
469 OSR_GDV( papszNV, "x_0", 0.0 ),
466 SetStereographic( OSR_GDV( papszNV, "lat_0", 0.0 ),
467 OSR_GDV( papszNV, "lon_0", 0.0 ),
468 1.0,
469 OSR_GDV( papszNV, "x_0", 0.0 ),
470470 OSR_GDV( papszNV, "y_0", 0.0 ) );
471471 }
472472
496496
497497 else if( EQUAL(value,"gnom") )
498498 {
499 SetGnomonic( OSR_GDV( papszNV, "lat_0", 0.0 ),
500 OSR_GDV( papszNV, "lon_0", 0.0 ),
501 OSR_GDV( papszNV, "x_0", 0.0 ),
499 SetGnomonic( OSR_GDV( papszNV, "lat_0", 0.0 ),
500 OSR_GDV( papszNV, "lon_0", 0.0 ),
501 OSR_GDV( papszNV, "x_0", 0.0 ),
502502 OSR_GDV( papszNV, "y_0", 0.0 ) );
503503 }
504504
505505 else if( EQUAL(value,"ortho") )
506506 {
507 SetOrthographic( OSR_GDV( papszNV, "lat_0", 0.0 ),
508 OSR_GDV( papszNV, "lon_0", 0.0 ),
509 OSR_GDV( papszNV, "x_0", 0.0 ),
507 SetOrthographic( OSR_GDV( papszNV, "lat_0", 0.0 ),
508 OSR_GDV( papszNV, "lon_0", 0.0 ),
509 OSR_GDV( papszNV, "x_0", 0.0 ),
510510 OSR_GDV( papszNV, "y_0", 0.0 ) );
511511 }
512512
513513 else if( EQUAL(value,"laea") )
514514 {
515 SetLAEA( OSR_GDV( papszNV, "lat_0", 0.0 ),
516 OSR_GDV( papszNV, "lon_0", 0.0 ),
517 OSR_GDV( papszNV, "x_0", 0.0 ),
515 SetLAEA( OSR_GDV( papszNV, "lat_0", 0.0 ),
516 OSR_GDV( papszNV, "lon_0", 0.0 ),
517 OSR_GDV( papszNV, "x_0", 0.0 ),
518518 OSR_GDV( papszNV, "y_0", 0.0 ) );
519519 }
520520
521521 else if( EQUAL(value,"aeqd") )
522522 {
523 SetAE( OSR_GDV( papszNV, "lat_0", 0.0 ),
524 OSR_GDV( papszNV, "lon_0", 0.0 ),
525 OSR_GDV( papszNV, "x_0", 0.0 ),
523 SetAE( OSR_GDV( papszNV, "lat_0", 0.0 ),
524 OSR_GDV( papszNV, "lon_0", 0.0 ),
525 OSR_GDV( papszNV, "x_0", 0.0 ),
526526 OSR_GDV( papszNV, "y_0", 0.0 ) );
527527 }
528528
529529 else if( EQUAL(value,"eqdc") )
530530 {
531 SetEC( OSR_GDV( papszNV, "lat_1", 0.0 ),
532 OSR_GDV( papszNV, "lat_2", 0.0 ),
533 OSR_GDV( papszNV, "lat_0", 0.0 ),
534 OSR_GDV( papszNV, "lon_0", 0.0 ),
535 OSR_GDV( papszNV, "x_0", 0.0 ),
531 SetEC( OSR_GDV( papszNV, "lat_1", 0.0 ),
532 OSR_GDV( papszNV, "lat_2", 0.0 ),
533 OSR_GDV( papszNV, "lat_0", 0.0 ),
534 OSR_GDV( papszNV, "lon_0", 0.0 ),
535 OSR_GDV( papszNV, "x_0", 0.0 ),
536536 OSR_GDV( papszNV, "y_0", 0.0 ) );
537537 }
538538
539539 else if( EQUAL(value,"mill") )
540540 {
541 SetMC( OSR_GDV( papszNV, "lat_0", 0.0 ),
542 OSR_GDV( papszNV, "lon_0", 0.0 ),
543 OSR_GDV( papszNV, "x_0", 0.0 ),
541 SetMC( OSR_GDV( papszNV, "lat_0", 0.0 ),
542 OSR_GDV( papszNV, "lon_0", 0.0 ),
543 OSR_GDV( papszNV, "x_0", 0.0 ),
544544 OSR_GDV( papszNV, "y_0", 0.0 ) );
545545 }
546546
547547 else if( EQUAL(value,"moll") )
548548 {
549 SetMollweide( OSR_GDV( papszNV, "lon_0", 0.0 ),
550 OSR_GDV( papszNV, "x_0", 0.0 ),
549 SetMollweide( OSR_GDV( papszNV, "lon_0", 0.0 ),
550 OSR_GDV( papszNV, "x_0", 0.0 ),
551551 OSR_GDV( papszNV, "y_0", 0.0 ) );
552552 }
553553
554554 else if( EQUAL(value,"eck4") )
555555 {
556 SetEckertIV( OSR_GDV( papszNV, "lon_0", 0.0 ),
557 OSR_GDV( papszNV, "x_0", 0.0 ),
556 SetEckertIV( OSR_GDV( papszNV, "lon_0", 0.0 ),
557 OSR_GDV( papszNV, "x_0", 0.0 ),
558558 OSR_GDV( papszNV, "y_0", 0.0 ) );
559559 }
560560
561561 else if( EQUAL(value,"eck6") )
562562 {
563 SetEckertVI( OSR_GDV( papszNV, "lon_0", 0.0 ),
564 OSR_GDV( papszNV, "x_0", 0.0 ),
563 SetEckertVI( OSR_GDV( papszNV, "lon_0", 0.0 ),
564 OSR_GDV( papszNV, "x_0", 0.0 ),
565565 OSR_GDV( papszNV, "y_0", 0.0 ) );
566566 }
567567
568568 else if( EQUAL(value,"poly") )
569569 {
570 SetPolyconic( OSR_GDV( papszNV, "lat_0", 0.0 ),
571 OSR_GDV( papszNV, "lon_0", 0.0 ),
572 OSR_GDV( papszNV, "x_0", 0.0 ),
570 SetPolyconic( OSR_GDV( papszNV, "lat_0", 0.0 ),
571 OSR_GDV( papszNV, "lon_0", 0.0 ),
572 OSR_GDV( papszNV, "x_0", 0.0 ),
573573 OSR_GDV( papszNV, "y_0", 0.0 ) );
574574 }
575575
576576 else if( EQUAL(value,"aea") )
577577 {
578 SetACEA( OSR_GDV( papszNV, "lat_1", 0.0 ),
579 OSR_GDV( papszNV, "lat_2", 0.0 ),
580 OSR_GDV( papszNV, "lat_0", 0.0 ),
581 OSR_GDV( papszNV, "lon_0", 0.0 ),
582 OSR_GDV( papszNV, "x_0", 0.0 ),
578 SetACEA( OSR_GDV( papszNV, "lat_1", 0.0 ),
579 OSR_GDV( papszNV, "lat_2", 0.0 ),
580 OSR_GDV( papszNV, "lat_0", 0.0 ),
581 OSR_GDV( papszNV, "lon_0", 0.0 ),
582 OSR_GDV( papszNV, "x_0", 0.0 ),
583583 OSR_GDV( papszNV, "y_0", 0.0 ) );
584584 }
585585
586586 else if( EQUAL(value,"robin") )
587587 {
588 SetRobinson( OSR_GDV( papszNV, "lon_0", 0.0 ),
589 OSR_GDV( papszNV, "x_0", 0.0 ),
588 SetRobinson( OSR_GDV( papszNV, "lon_0", 0.0 ),
589 OSR_GDV( papszNV, "x_0", 0.0 ),
590590 OSR_GDV( papszNV, "y_0", 0.0 ) );
591591 }
592592
593593 else if( EQUAL(value,"vandg") )
594594 {
595 SetVDG( OSR_GDV( papszNV, "lon_0", 0.0 ),
596 OSR_GDV( papszNV, "x_0", 0.0 ),
595 SetVDG( OSR_GDV( papszNV, "lon_0", 0.0 ),
596 OSR_GDV( papszNV, "x_0", 0.0 ),
597597 OSR_GDV( papszNV, "y_0", 0.0 ) );
598598 }
599599
600600 else if( EQUAL(value,"sinu") )
601601 {
602 SetSinusoidal( OSR_GDV( papszNV, "lon_0", 0.0 ),
603 OSR_GDV( papszNV, "x_0", 0.0 ),
602 SetSinusoidal( OSR_GDV( papszNV, "lon_0", 0.0 ),
603 OSR_GDV( papszNV, "x_0", 0.0 ),
604604 OSR_GDV( papszNV, "y_0", 0.0 ) );
605605 }
606606
607607 else if( EQUAL(value,"gall") )
608608 {
609 SetGS( OSR_GDV( papszNV, "lon_0", 0.0 ),
610 OSR_GDV( papszNV, "x_0", 0.0 ),
609 SetGS( OSR_GDV( papszNV, "lon_0", 0.0 ),
610 OSR_GDV( papszNV, "x_0", 0.0 ),
611611 OSR_GDV( papszNV, "y_0", 0.0 ) );
612612 }
613613
614614 else if( EQUAL(value,"goode") )
615615 {
616 SetGH( OSR_GDV( papszNV, "lon_0", 0.0 ),
617 OSR_GDV( papszNV, "x_0", 0.0 ),
616 SetGH( OSR_GDV( papszNV, "lon_0", 0.0 ),
617 OSR_GDV( papszNV, "x_0", 0.0 ),
618618 OSR_GDV( papszNV, "y_0", 0.0 ) );
619619 }
620620
621621 else if( EQUAL(value,"geos") )
622622 {
623 SetGEOS( OSR_GDV( papszNV, "lon_0", 0.0 ),
624 OSR_GDV( papszNV, "h", 35785831.0 ),
625 OSR_GDV( papszNV, "x_0", 0.0 ),
623 SetGEOS( OSR_GDV( papszNV, "lon_0", 0.0 ),
624 OSR_GDV( papszNV, "h", 35785831.0 ),
625 OSR_GDV( papszNV, "x_0", 0.0 ),
626626 OSR_GDV( papszNV, "y_0", 0.0 ) );
627627 }
628628
629 else if( EQUAL(value,"lcc") )
630 {
631 if( OSR_GDV(papszNV, "lat_0", 0.0 )
629 else if( EQUAL(value,"lcc") )
630 {
631 if( OSR_GDV(papszNV, "lat_0", 0.0 )
632632 == OSR_GDV(papszNV, "lat_1", 0.0 ) )
633633 {
634634 /* 1SP form */
635 SetLCC1SP( OSR_GDV( papszNV, "lat_0", 0.0 ),
636 OSR_GDV( papszNV, "lon_0", 0.0 ),
637 OSR_GDV( papszNV, "k_0", 1.0 ),
638 OSR_GDV( papszNV, "x_0", 0.0 ),
635 SetLCC1SP( OSR_GDV( papszNV, "lat_0", 0.0 ),
636 OSR_GDV( papszNV, "lon_0", 0.0 ),
637 OSR_GDV( papszNV, "k_0", 1.0 ),
638 OSR_GDV( papszNV, "x_0", 0.0 ),
639639 OSR_GDV( papszNV, "y_0", 0.0 ) );
640640 }
641641 else
642642 {
643643 /* 2SP form */
644 SetLCC( OSR_GDV( papszNV, "lat_1", 0.0 ),
645 OSR_GDV( papszNV, "lat_2", 0.0 ),
646 OSR_GDV( papszNV, "lat_0", 0.0 ),
647 OSR_GDV( papszNV, "lon_0", 0.0 ),
648 OSR_GDV( papszNV, "x_0", 0.0 ),
644 SetLCC( OSR_GDV( papszNV, "lat_1", 0.0 ),
645 OSR_GDV( papszNV, "lat_2", 0.0 ),
646 OSR_GDV( papszNV, "lat_0", 0.0 ),
647 OSR_GDV( papszNV, "lon_0", 0.0 ),
648 OSR_GDV( papszNV, "x_0", 0.0 ),
649649 OSR_GDV( papszNV, "y_0", 0.0 ) );
650650 }
651651 }
652652
653653 else if( EQUAL(value,"omerc") )
654654 {
655 SetHOM( OSR_GDV( papszNV, "lat_0", 0.0 ),
656 OSR_GDV( papszNV, "lonc", 0.0 ),
657 OSR_GDV( papszNV, "alpha", 0.0 ),
655 SetHOM( OSR_GDV( papszNV, "lat_0", 0.0 ),
656 OSR_GDV( papszNV, "lonc", 0.0 ),
657 OSR_GDV( papszNV, "alpha", 0.0 ),
658658 0.0, /* ??? */
659 OSR_GDV( papszNV, "k", 1.0 ),
660 OSR_GDV( papszNV, "x_0", 0.0 ),
659 OSR_GDV( papszNV, "k", 1.0 ),
660 OSR_GDV( papszNV, "x_0", 0.0 ),
661661 OSR_GDV( papszNV, "y_0", 0.0 ) );
662662 }
663663
664664 else if( EQUAL(value,"somerc") )
665665 {
666 SetHOM( OSR_GDV( papszNV, "lat_0", 0.0 ),
667 OSR_GDV( papszNV, "lon_0", 0.0 ),
668 90.0, 90.0,
669 OSR_GDV( papszNV, "k", 1.0 ),
670 OSR_GDV( papszNV, "x_0", 0.0 ),
666 SetHOM( OSR_GDV( papszNV, "lat_0", 0.0 ),
667 OSR_GDV( papszNV, "lon_0", 0.0 ),
668 90.0, 90.0,
669 OSR_GDV( papszNV, "k", 1.0 ),
670 OSR_GDV( papszNV, "x_0", 0.0 ),
671671 OSR_GDV( papszNV, "y_0", 0.0 ) );
672672 }
673673
674674 else if( EQUAL(value,"krovak") )
675675 {
676 SetKrovak( OSR_GDV( papszNV, "lat_0", 0.0 ),
677 OSR_GDV( papszNV, "lon_0", 0.0 ),
678 OSR_GDV( papszNV, "alpha", 0.0 ),
676 SetKrovak( OSR_GDV( papszNV, "lat_0", 0.0 ),
677 OSR_GDV( papszNV, "lon_0", 0.0 ),
678 OSR_GDV( papszNV, "alpha", 0.0 ),
679679 0.0, /* pseudo_standard_parallel_1 */
680 OSR_GDV( papszNV, "k", 1.0 ),
681 OSR_GDV( papszNV, "x_0", 0.0 ),
680 OSR_GDV( papszNV, "k", 1.0 ),
681 OSR_GDV( papszNV, "x_0", 0.0 ),
682682 OSR_GDV( papszNV, "y_0", 0.0 ) );
683683 }
684684
685685 else if( EQUAL(value, "iwm_p") )
686686 {
687 SetIWMPolyconic( OSR_GDV( papszNV, "lat_1", 0.0 ),
687 SetIWMPolyconic( OSR_GDV( papszNV, "lat_1", 0.0 ),
688688 OSR_GDV( papszNV, "lat_2", 0.0 ),
689 OSR_GDV( papszNV, "lon_0", 0.0 ),
690 OSR_GDV( papszNV, "x_0", 0.0 ),
689 OSR_GDV( papszNV, "lon_0", 0.0 ),
690 OSR_GDV( papszNV, "x_0", 0.0 ),
691691 OSR_GDV( papszNV, "y_0", 0.0 ) );
692692 }
693693
694694 else if( EQUAL(value, "wag1") )
695695 {
696696 SetWagner( 1, 0.0,
697 OSR_GDV( papszNV, "x_0", 0.0 ),
697 OSR_GDV( papszNV, "x_0", 0.0 ),
698698 OSR_GDV( papszNV, "y_0", 0.0 ) );
699699 }
700700
701701 else if( EQUAL(value, "wag2") )
702702 {
703703 SetWagner( 2, 0.0,
704 OSR_GDV( papszNV, "x_0", 0.0 ),
704 OSR_GDV( papszNV, "x_0", 0.0 ),
705705 OSR_GDV( papszNV, "y_0", 0.0 ) );
706706 }
707707
709709 {
710710 SetWagner( 3,
711711 OSR_GDV( papszNV, "lat_ts", 0.0 ),
712 OSR_GDV( papszNV, "x_0", 0.0 ),
712 OSR_GDV( papszNV, "x_0", 0.0 ),
713713 OSR_GDV( papszNV, "y_0", 0.0 ) );
714714 }
715715
716716 else if( EQUAL(value, "wag1") )
717717 {
718718 SetWagner( 4, 0.0,
719 OSR_GDV( papszNV, "x_0", 0.0 ),
719 OSR_GDV( papszNV, "x_0", 0.0 ),
720720 OSR_GDV( papszNV, "y_0", 0.0 ) );
721721 }
722722
723723 else if( EQUAL(value, "wag1") )
724724 {
725725 SetWagner( 5, 0.0,
726 OSR_GDV( papszNV, "x_0", 0.0 ),
726 OSR_GDV( papszNV, "x_0", 0.0 ),
727727 OSR_GDV( papszNV, "y_0", 0.0 ) );
728728 }
729729
730730 else if( EQUAL(value, "wag1") )
731731 {
732732 SetWagner( 6, 0.0,
733 OSR_GDV( papszNV, "x_0", 0.0 ),
733 OSR_GDV( papszNV, "x_0", 0.0 ),
734734 OSR_GDV( papszNV, "y_0", 0.0 ) );
735735 }
736736
737737 else if( EQUAL(value, "wag1") )
738738 {
739739 SetWagner( 7, 0.0,
740 OSR_GDV( papszNV, "x_0", 0.0 ),
740 OSR_GDV( papszNV, "x_0", 0.0 ),
741741 OSR_GDV( papszNV, "y_0", 0.0 ) );
742742 }
743743
744744 else if( EQUAL(value,"tpeqd") )
745745 {
746 SetTPED( OSR_GDV( papszNV, "lat_1", 0.0 ),
747 OSR_GDV( papszNV, "lon_1", 0.0 ),
748 OSR_GDV( papszNV, "lat_2", 0.0 ),
749 OSR_GDV( papszNV, "lon_2", 0.0 ),
750 OSR_GDV( papszNV, "x_0", 0.0 ),
746 SetTPED( OSR_GDV( papszNV, "lat_1", 0.0 ),
747 OSR_GDV( papszNV, "lon_1", 0.0 ),
748 OSR_GDV( papszNV, "lat_2", 0.0 ),
749 OSR_GDV( papszNV, "lon_2", 0.0 ),
750 OSR_GDV( papszNV, "x_0", 0.0 ),
751751 OSR_GDV( papszNV, "y_0", 0.0 ) );
752752 }
753753 #endif
768768 }
769769 else
770770 {
771 GTIFKeySet( gtif, GeographicTypeGeoKey, TYPE_SHORT, 1,
771 GTIFKeySet( gtif, GeographicTypeGeoKey, TYPE_SHORT, 1,
772772 KvUserDefined );
773773 GTIFKeySet( gtif, GeogGeodeticDatumGeoKey, TYPE_SHORT,
774774 1, nDatum );
780780 if( nGCS == KvUserDefined )
781781 {
782782 if( nSpheroid != KvUserDefined )
783 GTIFKeySet( gtif, GeogEllipsoidGeoKey, TYPE_SHORT, 1,
783 GTIFKeySet( gtif, GeogEllipsoidGeoKey, TYPE_SHORT, 1,
784784 nSpheroid );
785785 else
786786 {
787 GTIFKeySet( gtif, GeogEllipsoidGeoKey, TYPE_SHORT, 1,
787 GTIFKeySet( gtif, GeogEllipsoidGeoKey, TYPE_SHORT, 1,
788788 KvUserDefined );
789789 GTIFKeySet( gtif, GeogSemiMajorAxisGeoKey, TYPE_DOUBLE, 1,
790790 dfSemiMajor );
795795 GTIFKeySet( gtif, GeogInvFlatteningGeoKey, TYPE_DOUBLE, 1,
796796 dfInvFlattening );
797797 }
798
799798 }
800799
801800 /* -------------------------------------------------------------------- */
808807 value = OSR_GSV( papszNV, "to_meter" );
809808 if( value )
810809 {
811 GTIFKeySet( gtif, ProjLinearUnitsGeoKey, TYPE_SHORT, 1,
810 GTIFKeySet( gtif, ProjLinearUnitsGeoKey, TYPE_SHORT, 1,
812811 KvUserDefined );
813 GTIFKeySet( gtif, ProjLinearUnitSizeGeoKey, TYPE_DOUBLE, 1,
812 GTIFKeySet( gtif, ProjLinearUnitSizeGeoKey, TYPE_DOUBLE, 1,
814813 GTIFAtof(value) );
815814 }
816815 }
817816 else if( EQUAL(value,"meter") || EQUAL(value,"m") )
818817 {
819 GTIFKeySet( gtif, ProjLinearUnitsGeoKey, TYPE_SHORT, 1,
818 GTIFKeySet( gtif, ProjLinearUnitsGeoKey, TYPE_SHORT, 1,
820819 Linear_Meter );
821 }
820 }
822821 else if( EQUAL(value,"us-ft") )
823822 {
824 GTIFKeySet( gtif, ProjLinearUnitsGeoKey, TYPE_SHORT, 1,
823 GTIFKeySet( gtif, ProjLinearUnitsGeoKey, TYPE_SHORT, 1,
825824 Linear_Foot_US_Survey );
826 }
825 }
827826 else if( EQUAL(value,"ft") )
828827 {
829 GTIFKeySet( gtif, ProjLinearUnitsGeoKey, TYPE_SHORT, 1,
828 GTIFKeySet( gtif, ProjLinearUnitsGeoKey, TYPE_SHORT, 1,
830829 Linear_Foot );
831 }
830 }
832831
833832
834833 OSRFreeStringList( papszNV );
835
834
836835 return TRUE;
837836 }
838837
851850 return CPLStrdup("");
852851
853852 szProjection[0] = '\0';
854
853
855854 /* ==================================================================== */
856855 /* Translate the units of measure. */
857856 /* */
861860 /* ==================================================================== */
862861 if( psDefn->UOMLength == Linear_Meter )
863862 {
864 strcpy( szUnits, "+units=m " );
863 strcpy( szUnits, "+units=m " );
865864 }
866865 else if( psDefn->UOMLength == Linear_Foot )
867866 {
902901 /* -------------------------------------------------------------------- */
903902 dfFalseEasting = psDefn->ProjParm[5];
904903 dfFalseNorthing = psDefn->ProjParm[6];
905
904
906905 /* ==================================================================== */
907906 /* Handle general projection methods. */
908907 /* ==================================================================== */
909
908
910909 /* -------------------------------------------------------------------- */
911910 /* Geographic. */
912911 /* -------------------------------------------------------------------- */
913912 if(psDefn->Model==ModelTypeGeographic)
914913 {
915914 sprintf(szProjection+strlen(szProjection),"+proj=latlong ");
916
917 }
918
915 }
916
919917 /* -------------------------------------------------------------------- */
920918 /* UTM - special case override on transverse mercator so things */
921919 /* will be more meaningful to the user. */
926924 "+proj=utm +zone=%d ",
927925 psDefn->Zone );
928926 }
929
927
930928 /* -------------------------------------------------------------------- */
931929 /* Transverse Mercator */
932930 /* -------------------------------------------------------------------- */
11361134 dfFalseEasting,
11371135 dfFalseNorthing );
11381136 }
1139
1137
11401138 /* -------------------------------------------------------------------- */
11411139 /* EquidistantConic */
11421140 /* -------------------------------------------------------------------- */
11521150 dfFalseEasting,
11531151 dfFalseNorthing );
11541152 }
1155
1153
11561154 /* -------------------------------------------------------------------- */
11571155 /* Robinson */
11581156 /* -------------------------------------------------------------------- */
11641162 dfFalseEasting,
11651163 dfFalseNorthing );
11661164 }
1167
1165
11681166 /* -------------------------------------------------------------------- */
11691167 /* VanDerGrinten */
11701168 /* -------------------------------------------------------------------- */
11761174 dfFalseEasting,
11771175 dfFalseNorthing );
11781176 }
1179
1177
11801178 /* -------------------------------------------------------------------- */
11811179 /* Sinusoidal */
11821180 /* -------------------------------------------------------------------- */
11881186 dfFalseEasting,
11891187 dfFalseNorthing );
11901188 }
1191
1189
11921190 /* -------------------------------------------------------------------- */
11931191 /* LambertConfConic_2SP */
11941192 /* -------------------------------------------------------------------- */
12041202 dfFalseEasting,
12051203 dfFalseNorthing );
12061204 }
1207
1205
12081206 /* -------------------------------------------------------------------- */
12091207 /* LambertConfConic_1SP */
12101208 /* -------------------------------------------------------------------- */
12201218 psDefn->ProjParm[5],
12211219 psDefn->ProjParm[6] );
12221220 }
1223
1221
12241222 /* -------------------------------------------------------------------- */
12251223 /* CT_CylindricalEqualArea */
12261224 /* -------------------------------------------------------------------- */
12341232 psDefn->ProjParm[5],
12351233 psDefn->ProjParm[6] );
12361234 }
1237
1235
12381236 /* -------------------------------------------------------------------- */
12391237 /* NewZealandMapGrid */
12401238 /* -------------------------------------------------------------------- */
12481246 psDefn->ProjParm[5],
12491247 psDefn->ProjParm[6] );
12501248 }
1251
1249
12521250 /* -------------------------------------------------------------------- */
12531251 /* Transverse Mercator - south oriented. */
12541252 /* -------------------------------------------------------------------- */
12561254 {
12571255 /* this appears to be an unsupported formulation with PROJ.4 */
12581256 }
1259
1257
12601258 /* -------------------------------------------------------------------- */
12611259 /* ObliqueMercator (Hotine) */
12621260 /* -------------------------------------------------------------------- */
12801278 else if( psDefn->CTProjection == CT_HotineObliqueMercatorAzimuthCenter )
12811279 {
12821280 /* special case for swiss oblique mercator : see GDAL bug 423 */
1283 if( fabs(psDefn->ProjParm[2] - 90.0) < 0.0001
1281 if( fabs(psDefn->ProjParm[2] - 90.0) < 0.0001
12841282 && fabs(psDefn->ProjParm[3]-90.0) < 0.0001 )
12851283 {
12861284 sprintf( szProjection+strlen(szProjection),
13371335 }
13381336
13391337 strcat( szProjection, szUnits );
1340
1338
13411339 /* If we don't have anything, reset */
13421340 if (strstr(szProjection, "+proj=") == NULL) { return CPLStrdup(""); }
13431341
1344 return( CPLStrdup( szProjection ) );
1342 return CPLStrdup( szProjection );
13451343 }
13461344
13471345 #if !defined(HAVE_LIBPROJ)
13531351 (void) nPoints;
13541352 (void) padfX;
13551353 (void) padfY;
1356 #ifdef DEBUG
1354 #ifdef DEBUG
13571355 fprintf( stderr,
13581356 "GTIFProj4ToLatLong() - PROJ.4 support not compiled in.\n" );
1359 #endif
1357 #endif
13601358 return FALSE;
13611359 }
13621360
13671365 (void) nPoints;
13681366 (void) padfX;
13691367 (void) padfY;
1370 #ifdef DEBUG
1368 #ifdef DEBUG
13711369 fprintf( stderr,
13721370 "GTIFProj4FromLatLong() - PROJ.4 support not compiled in.\n" );
1373 #endif
1371 #endif
13741372 return FALSE;
13751373 }
13761374 #else
13911389 char *pszProjection, **papszArgs;
13921390 projPJ *psPJ;
13931391 int i;
1394
1392
13951393 /* -------------------------------------------------------------------- */
13961394 /* Get a projection definition. */
13971395 /* -------------------------------------------------------------------- */
14031401 /* -------------------------------------------------------------------- */
14041402 /* Parse into tokens for pj_init(), and initialize the projection. */
14051403 /* -------------------------------------------------------------------- */
1406
1404
14071405 papszArgs = CSLTokenizeStringComplex( pszProjection, " +", TRUE, FALSE );
14081406 free( pszProjection );
14091407
14511449 char *pszProjection, **papszArgs;
14521450 projPJ *psPJ;
14531451 int i;
1454
1452
14551453 /* -------------------------------------------------------------------- */
14561454 /* Get a projection definition. */
14571455 /* -------------------------------------------------------------------- */
14631461 /* -------------------------------------------------------------------- */
14641462 /* Parse into tokens for pj_init(), and initialize the projection. */
14651463 /* -------------------------------------------------------------------- */
1466
1464
14671465 papszArgs = CSLTokenizeStringComplex( pszProjection, " +", TRUE, FALSE );
14681466 free( pszProjection );
14691467
14981496 }
14991497
15001498 #endif /* has proj_api.h and -lproj */
1501
0 /*
0 /*
11 * geotiffio.h
2 *
2 *
33 * Standard include file for geotiff, including all
44 * key and code definitions.
55 *
1717 #include "geovalues.h" /* key code definitions */
1818
1919 #endif /* LIBGEOTIFF_GEOTIFFIO_H_ */
20
1313 #ifndef LIBGEOTIFF_GEOVALUES_H_
1414 #define LIBGEOTIFF_GEOVALUES_H_
1515
16 /* If code values are added or modified, the "GvCurrentMinorRev"
16 /* If code values are added or modified, the "GvCurrentMinorRev"
1717 * number should be incremented here. If new Keys are added, then the
1818 * GvCurrentRevision number should be incremented instead, and the
1919 * GvCurrentMinorRev should be reset to zero (see "geokeys.h").
2121 * In addition, any changes here should be reflected in "geo_names.c"
2222 *
2323 */
24
24
2525 #define GvCurrentMinorRev 0 /* First Major Rev EPSG Code Release */
2626
2727
4040 * The section numbers refer to the GeoTIFF Specification section
4141 * in which the code values are documented.
4242 */
43
43
4444 /************************************************************
4545 * 6.3.1 GeoTIFF General Codes
4646 ************************************************************/
112112 } vdatum_t;
113113
114114 #endif /* LIBGEOTIFF_GEOVALUES_H_ */
115
0 # Makefile.in generated by automake 1.14.1 from Makefile.am.
0 # Makefile.in generated by automake 1.15 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
1515
1616
1717 VPATH = @srcdir@
18 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__is_gnu_make = { \
19 if test -z '$(MAKELEVEL)'; then \
20 false; \
21 elif test -n '$(MAKE_HOST)'; then \
22 true; \
23 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
24 true; \
25 else \
26 false; \
27 fi; \
28 }
1929 am__make_running_with_option = \
2030 case $${target_option-} in \
2131 ?) ;; \
7989 build_triplet = @build@
8090 host_triplet = @host@
8191 subdir = libxtiff
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(top_srcdir)/depcomp $(include_HEADERS)
8492 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
8593 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
8694 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
8896 $(top_srcdir)/m4/ax_prog_doxygen.m4 $(top_srcdir)/configure.ac
8997 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
9098 $(ACLOCAL_M4)
99 DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
100 $(am__DIST_COMMON)
91101 mkinstalldirs = $(install_sh) -d
92102 CONFIG_HEADER = $(top_builddir)/geo_config.h
93103 CONFIG_CLEAN_FILES =
189199 done | $(am__uniquify_input)`
190200 ETAGS = etags
191201 CTAGS = ctags
202 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
192203 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
193204 ACLOCAL = @ACLOCAL@
194205 AMTAR = @AMTAR@
261272 LIPO = @LIPO@
262273 LN_S = @LN_S@
263274 LTLIBOBJS = @LTLIBOBJS@
275 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
264276 MAINT = @MAINT@
265277 MAKEINFO = @MAKEINFO@
266278 MANIFEST_TOOL = @MANIFEST_TOOL@
336348 prefix = @prefix@
337349 program_transform_name = @program_transform_name@
338350 psdir = @psdir@
351 runstatedir = @runstatedir@
339352 sbindir = @sbindir@
340353 sharedstatedir = @sharedstatedir@
341354 srcdir = @srcdir@
365378 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libxtiff/Makefile'; \
366379 $(am__cd) $(top_srcdir) && \
367380 $(AUTOMAKE) --gnu libxtiff/Makefile
368 .PRECIOUS: Makefile
369381 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
370382 @case '$?' in \
371383 *config.status*) \
661673 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
662674 uninstall-am uninstall-includeHEADERS
663675
676 .PRECIOUS: Makefile
677
664678
665679 # Tell versions [3.59,3.63) of GNU make to not export all variables.
666680 # Otherwise a system limit (for SysV at least) may be exceeded.
1616 * library (usually libtiff).
1717 */
1818
19 /*
20 * Define public Tag names and values here
19 /*
20 * Define public Tag names and values here
2121 */
2222
2323 /* tags 33550 is a private tag registered to SoftDesk, Inc */
2727 #define TIFFTAG_GEOTIEPOINTS 33922
2828 /* tags 34263-34264 are private tags registered to NASA-JPL Carto Group */
2929 #ifdef JPL_TAG_SUPPORT
30 #define TIFFTAG_JPL_CARTO_IFD 34263 /* $use GeoProjectionInfo ! */
30 #define TIFFTAG_JPL_CARTO_IFD 34263 /* $use GeoProjectionInfo ! */
3131 #endif
32 #define TIFFTAG_GEOTRANSMATRIX 34264 /* New Matrix Tag replaces 33920 */
32 #define TIFFTAG_GEOTRANSMATRIX 34264 /* New Matrix Tag replaces 33920 */
3333 /* tags 34735-3438 are private tags registered to SPOT Image, Inc */
3434 #define TIFFTAG_GEOKEYDIRECTORY 34735
3535 #define TIFFTAG_GEODOUBLEPARAMS 34736
3636 #define TIFFTAG_GEOASCIIPARAMS 34737
3737
38 /*
38 /*
3939 * Define Printing method flags. These
4040 * flags may be passed in to TIFFPrintDirectory() to
4141 * indicate that those particular field values should
5656 /**********************************************************************
5757 * Do we want to build as a DLL on windows?
5858 **********************************************************************/
59 #if !defined(CPL_DLL)
59 #if !defined(GTIF_DLL)
6060 # if defined(_WIN32) && defined(BUILD_AS_DLL)
61 # define CPL_DLL __declspec(dllexport)
61 # define GTIF_DLL __declspec(dllexport)
6262 # else
63 # define CPL_DLL
63 # define GTIF_DLL
6464 # endif
6565 #endif
6666
67 extern void CPL_DLL XTIFFInitialize(void);
68 extern TIFF CPL_DLL * XTIFFOpen(const char* name, const char* mode);
69 extern TIFF CPL_DLL * XTIFFFdOpen(int fd, const char* name, const char* mode);
70 extern void CPL_DLL XTIFFClose(TIFF *tif);
67 extern void GTIF_DLL XTIFFInitialize(void);
68 extern TIFF GTIF_DLL * XTIFFOpen(const char* name, const char* mode);
69 extern TIFF GTIF_DLL * XTIFFFdOpen(int fd, const char* name, const char* mode);
70 extern void GTIF_DLL XTIFFClose(TIFF *tif);
7171
72 extern TIFF CPL_DLL * XTIFFClientOpen(const char* name, const char* mode,
72 extern TIFF GTIF_DLL * XTIFFClientOpen(const char* name, const char* mode,
7373 thandle_t thehandle,
7474 TIFFReadWriteProc, TIFFReadWriteProc,
7575 TIFFSeekProc, TIFFCloseProc,
8080 #endif
8181
8282 #endif /* LIBGEOTIFF_XTIFFIO_H_ */
83
+3656
-2161
ltmain.sh less more
0
1 # libtool (GNU libtool) 2.4.2
0 #! /bin/sh
1 ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
2 ## by inline-source v2014-01-03.01
3
4 # libtool (GNU libtool) 2.4.6
5 # Provide generalized library-building support services.
26 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
37
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5 # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
8 # Copyright (C) 1996-2015 Free Software Foundation, Inc.
69 # This is free software; see the source for copying conditions. There is NO
710 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
811
2225 # General Public License for more details.
2326 #
2427 # You should have received a copy of the GNU General Public License
25 # along with GNU Libtool; see the file COPYING. If not, a copy
26 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
27 # or obtained by writing to the Free Software Foundation, Inc.,
28 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
30 # Usage: $progname [OPTION]... [MODE-ARG]...
31 #
32 # Provide generalized library-building support services.
33 #
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --no-quiet, --no-silent
42 # print informational messages (default)
43 # --no-warn don't display warning messages
44 # --tag=TAG use configuration variables from tag TAG
45 # -v, --verbose print more informational messages than default
46 # --no-verbose don't print the extra informational messages
47 # --version print version information
48 # -h, --help, --help-all print short, long, or detailed help message
49 #
50 # MODE must be one of the following:
51 #
52 # clean remove files from the build directory
53 # compile compile a source file into a libtool object
54 # execute automatically set library path, then run a program
55 # finish complete the installation of libtool libraries
56 # install install libraries or executables
57 # link create a library or an executable
58 # uninstall remove libraries from an installed directory
59 #
60 # MODE-ARGS vary depending on the MODE. When passed as first option,
61 # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
62 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
63 #
64 # When reporting a bug, please describe a test case to reproduce it and
65 # include the following information:
66 #
67 # host-triplet: $host
68 # shell: $SHELL
69 # compiler: $LTCC
70 # compiler flags: $LTCFLAGS
71 # linker: $LD (gnu? $with_gnu_ld)
72 # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1
73 # automake: $automake_version
74 # autoconf: $autoconf_version
75 #
76 # Report bugs to <bug-libtool@gnu.org>.
77 # GNU libtool home page: <http://www.gnu.org/software/libtool/>.
78 # General help using GNU software: <http://www.gnu.org/gethelp/>.
28 # along with this program. If not, see <http://www.gnu.org/licenses/>.
29
7930
8031 PROGRAM=libtool
8132 PACKAGE=libtool
82 VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1"
83 TIMESTAMP=""
84 package_revision=1.3337
85
86 # Be Bourne compatible
87 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
33 VERSION="2.4.6 Debian-2.4.6-0.1"
34 package_revision=2.4.6
35
36
37 ## ------ ##
38 ## Usage. ##
39 ## ------ ##
40
41 # Run './libtool --help' for help with using this script from the
42 # command line.
43
44
45 ## ------------------------------- ##
46 ## User overridable command paths. ##
47 ## ------------------------------- ##
48
49 # After configure completes, it has a better idea of some of the
50 # shell tools we need than the defaults used by the functions shared
51 # with bootstrap, so set those here where they can still be over-
52 # ridden by the user, but otherwise take precedence.
53
54 : ${AUTOCONF="autoconf"}
55 : ${AUTOMAKE="automake"}
56
57
58 ## -------------------------- ##
59 ## Source external libraries. ##
60 ## -------------------------- ##
61
62 # Much of our low-level functionality needs to be sourced from external
63 # libraries, which are installed to $pkgauxdir.
64
65 # Set a version string for this script.
66 scriptversion=2015-01-20.17; # UTC
67
68 # General shell script boiler plate, and helper functions.
69 # Written by Gary V. Vaughan, 2004
70
71 # Copyright (C) 2004-2015 Free Software Foundation, Inc.
72 # This is free software; see the source for copying conditions. There is NO
73 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
74
75 # This program is free software; you can redistribute it and/or modify
76 # it under the terms of the GNU General Public License as published by
77 # the Free Software Foundation; either version 3 of the License, or
78 # (at your option) any later version.
79
80 # As a special exception to the GNU General Public License, if you distribute
81 # this file as part of a program or library that is built using GNU Libtool,
82 # you may include this file under the same distribution terms that you use
83 # for the rest of that program.
84
85 # This program is distributed in the hope that it will be useful,
86 # but WITHOUT ANY WARRANTY; without even the implied warranty of
87 # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
88 # General Public License for more details.
89
90 # You should have received a copy of the GNU General Public License
91 # along with this program. If not, see <http://www.gnu.org/licenses/>.
92
93 # Please report bugs or propose patches to gary@gnu.org.
94
95
96 ## ------ ##
97 ## Usage. ##
98 ## ------ ##
99
100 # Evaluate this file near the top of your script to gain access to
101 # the functions and variables defined here:
102 #
103 # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
104 #
105 # If you need to override any of the default environment variable
106 # settings, do that before evaluating this file.
107
108
109 ## -------------------- ##
110 ## Shell normalisation. ##
111 ## -------------------- ##
112
113 # Some shells need a little help to be as Bourne compatible as possible.
114 # Before doing anything else, make sure all that help has been provided!
115
116 DUALCASE=1; export DUALCASE # for MKS sh
117 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
88118 emulate sh
89119 NULLCMD=:
90 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
120 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
91121 # is contrary to our usage. Disable this feature.
92122 alias -g '${1+"$@"}'='"$@"'
93123 setopt NO_GLOB_SUBST
94124 else
95 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
125 case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
96126 fi
97 BIN_SH=xpg4; export BIN_SH # for Tru64
98 DUALCASE=1; export DUALCASE # for MKS sh
99
100 # A function that is used when there is no print builtin or printf.
101 func_fallback_echo ()
102 {
103 eval 'cat <<_LTECHO_EOF
104 $1
105 _LTECHO_EOF'
106 }
107
108 # NLS nuisances: We save the old values to restore during execute mode.
109 lt_user_locale=
110 lt_safe_locale=
111 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
127
128 # NLS nuisances: We save the old values in case they are required later.
129 _G_user_locale=
130 _G_safe_locale=
131 for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
112132 do
113 eval "if test \"\${$lt_var+set}\" = set; then
114 save_$lt_var=\$$lt_var
115 $lt_var=C
116 export $lt_var
117 lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
118 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
133 eval "if test set = \"\${$_G_var+set}\"; then
134 save_$_G_var=\$$_G_var
135 $_G_var=C
136 export $_G_var
137 _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
138 _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
119139 fi"
120140 done
121 LC_ALL=C
122 LANGUAGE=C
123 export LANGUAGE LC_ALL
124
125 $lt_unset CDPATH
126
141
142 # CDPATH.
143 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
144
145 # Make sure IFS has a sensible default
146 sp=' '
147 nl='
148 '
149 IFS="$sp $nl"
150
151 # There are apparently some retarded systems that use ';' as a PATH separator!
152 if test "${PATH_SEPARATOR+set}" != set; then
153 PATH_SEPARATOR=:
154 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
155 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
156 PATH_SEPARATOR=';'
157 }
158 fi
159
160
161
162 ## ------------------------- ##
163 ## Locate command utilities. ##
164 ## ------------------------- ##
165
166
167 # func_executable_p FILE
168 # ----------------------
169 # Check that FILE is an executable regular file.
170 func_executable_p ()
171 {
172 test -f "$1" && test -x "$1"
173 }
174
175
176 # func_path_progs PROGS_LIST CHECK_FUNC [PATH]
177 # --------------------------------------------
178 # Search for either a program that responds to --version with output
179 # containing "GNU", or else returned by CHECK_FUNC otherwise, by
180 # trying all the directories in PATH with each of the elements of
181 # PROGS_LIST.
182 #
183 # CHECK_FUNC should accept the path to a candidate program, and
184 # set $func_check_prog_result if it truncates its output less than
185 # $_G_path_prog_max characters.
186 func_path_progs ()
187 {
188 _G_progs_list=$1
189 _G_check_func=$2
190 _G_PATH=${3-"$PATH"}
191
192 _G_path_prog_max=0
193 _G_path_prog_found=false
194 _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
195 for _G_dir in $_G_PATH; do
196 IFS=$_G_save_IFS
197 test -z "$_G_dir" && _G_dir=.
198 for _G_prog_name in $_G_progs_list; do
199 for _exeext in '' .EXE; do
200 _G_path_prog=$_G_dir/$_G_prog_name$_exeext
201 func_executable_p "$_G_path_prog" || continue
202 case `"$_G_path_prog" --version 2>&1` in
203 *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
204 *) $_G_check_func $_G_path_prog
205 func_path_progs_result=$func_check_prog_result
206 ;;
207 esac
208 $_G_path_prog_found && break 3
209 done
210 done
211 done
212 IFS=$_G_save_IFS
213 test -z "$func_path_progs_result" && {
214 echo "no acceptable sed could be found in \$PATH" >&2
215 exit 1
216 }
217 }
218
219
220 # We want to be able to use the functions in this file before configure
221 # has figured out where the best binaries are kept, which means we have
222 # to search for them ourselves - except when the results are already set
223 # where we skip the searches.
224
225 # Unless the user overrides by setting SED, search the path for either GNU
226 # sed, or the sed that truncates its output the least.
227 test -z "$SED" && {
228 _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
229 for _G_i in 1 2 3 4 5 6 7; do
230 _G_sed_script=$_G_sed_script$nl$_G_sed_script
231 done
232 echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
233 _G_sed_script=
234
235 func_check_prog_sed ()
236 {
237 _G_path_prog=$1
238
239 _G_count=0
240 printf 0123456789 >conftest.in
241 while :
242 do
243 cat conftest.in conftest.in >conftest.tmp
244 mv conftest.tmp conftest.in
245 cp conftest.in conftest.nl
246 echo '' >> conftest.nl
247 "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
248 diff conftest.out conftest.nl >/dev/null 2>&1 || break
249 _G_count=`expr $_G_count + 1`
250 if test "$_G_count" -gt "$_G_path_prog_max"; then
251 # Best one so far, save it but keep looking for a better one
252 func_check_prog_result=$_G_path_prog
253 _G_path_prog_max=$_G_count
254 fi
255 # 10*(2^10) chars as input seems more than enough
256 test 10 -lt "$_G_count" && break
257 done
258 rm -f conftest.in conftest.tmp conftest.nl conftest.out
259 }
260
261 func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
262 rm -f conftest.sed
263 SED=$func_path_progs_result
264 }
265
266
267 # Unless the user overrides by setting GREP, search the path for either GNU
268 # grep, or the grep that truncates its output the least.
269 test -z "$GREP" && {
270 func_check_prog_grep ()
271 {
272 _G_path_prog=$1
273
274 _G_count=0
275 _G_path_prog_max=0
276 printf 0123456789 >conftest.in
277 while :
278 do
279 cat conftest.in conftest.in >conftest.tmp
280 mv conftest.tmp conftest.in
281 cp conftest.in conftest.nl
282 echo 'GREP' >> conftest.nl
283 "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
284 diff conftest.out conftest.nl >/dev/null 2>&1 || break
285 _G_count=`expr $_G_count + 1`
286 if test "$_G_count" -gt "$_G_path_prog_max"; then
287 # Best one so far, save it but keep looking for a better one
288 func_check_prog_result=$_G_path_prog
289 _G_path_prog_max=$_G_count
290 fi
291 # 10*(2^10) chars as input seems more than enough
292 test 10 -lt "$_G_count" && break
293 done
294 rm -f conftest.in conftest.tmp conftest.nl conftest.out
295 }
296
297 func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
298 GREP=$func_path_progs_result
299 }
300
301
302 ## ------------------------------- ##
303 ## User overridable command paths. ##
304 ## ------------------------------- ##
305
306 # All uppercase variable names are used for environment variables. These
307 # variables can be overridden by the user before calling a script that
308 # uses them if a suitable command of that name is not already available
309 # in the command search PATH.
310
311 : ${CP="cp -f"}
312 : ${ECHO="printf %s\n"}
313 : ${EGREP="$GREP -E"}
314 : ${FGREP="$GREP -F"}
315 : ${LN_S="ln -s"}
316 : ${MAKE="make"}
317 : ${MKDIR="mkdir"}
318 : ${MV="mv -f"}
319 : ${RM="rm -f"}
320 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
321
322
323 ## -------------------- ##
324 ## Useful sed snippets. ##
325 ## -------------------- ##
326
327 sed_dirname='s|/[^/]*$||'
328 sed_basename='s|^.*/||'
329
330 # Sed substitution that helps us do robust quoting. It backslashifies
331 # metacharacters that are still active within double-quoted strings.
332 sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
333
334 # Same as above, but do not quote variable references.
335 sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
336
337 # Sed substitution that turns a string into a regex matching for the
338 # string literally.
339 sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
340
341 # Sed substitution that converts a w32 file name or path
342 # that contains forward slashes, into one that contains
343 # (escaped) backslashes. A very naive implementation.
344 sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
345
346 # Re-'\' parameter expansions in output of sed_double_quote_subst that
347 # were '\'-ed in input to the same. If an odd number of '\' preceded a
348 # '$' in input to sed_double_quote_subst, that '$' was protected from
349 # expansion. Since each input '\' is now two '\'s, look for any number
350 # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
351 _G_bs='\\'
352 _G_bs2='\\\\'
353 _G_bs4='\\\\\\\\'
354 _G_dollar='\$'
355 sed_double_backslash="\
356 s/$_G_bs4/&\\
357 /g
358 s/^$_G_bs2$_G_dollar/$_G_bs&/
359 s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
360 s/\n//g"
361
362
363 ## ----------------- ##
364 ## Global variables. ##
365 ## ----------------- ##
366
367 # Except for the global variables explicitly listed below, the following
368 # functions in the '^func_' namespace, and the '^require_' namespace
369 # variables initialised in the 'Resource management' section, sourcing
370 # this file will not pollute your global namespace with anything
371 # else. There's no portable way to scope variables in Bourne shell
372 # though, so actually running these functions will sometimes place
373 # results into a variable named after the function, and often use
374 # temporary variables in the '^_G_' namespace. If you are careful to
375 # avoid using those namespaces casually in your sourcing script, things
376 # should continue to work as you expect. And, of course, you can freely
377 # overwrite any of the functions or variables defined here before
378 # calling anything to customize them.
379
380 EXIT_SUCCESS=0
381 EXIT_FAILURE=1
382 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
383 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
384
385 # Allow overriding, eg assuming that you follow the convention of
386 # putting '$debug_cmd' at the start of all your functions, you can get
387 # bash to show function call trace with:
388 #
389 # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
390 debug_cmd=${debug_cmd-":"}
391 exit_cmd=:
392
393 # By convention, finish your script with:
394 #
395 # exit $exit_status
396 #
397 # so that you can set exit_status to non-zero if you want to indicate
398 # something went wrong during execution without actually bailing out at
399 # the point of failure.
400 exit_status=$EXIT_SUCCESS
127401
128402 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
129403 # is ksh but when the shell is invoked as "sh" and the current value of
130404 # the _XPG environment variable is not equal to 1 (one), the special
131405 # positional parameter $0, within a function call, is the name of the
132406 # function.
133 progpath="$0"
134
135
136
137 : ${CP="cp -f"}
138 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
139 : ${MAKE="make"}
140 : ${MKDIR="mkdir"}
141 : ${MV="mv -f"}
142 : ${RM="rm -f"}
143 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
144 : ${Xsed="$SED -e 1s/^X//"}
145
146 # Global variables:
147 EXIT_SUCCESS=0
148 EXIT_FAILURE=1
149 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
150 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
151
152 exit_status=$EXIT_SUCCESS
153
154 # Make sure IFS has a sensible default
155 lt_nl='
156 '
157 IFS=" $lt_nl"
158
159 dirname="s,/[^/]*$,,"
160 basename="s,^.*/,,"
161
162 # func_dirname file append nondir_replacement
407 progpath=$0
408
409 # The name of this program.
410 progname=`$ECHO "$progpath" |$SED "$sed_basename"`
411
412 # Make sure we have an absolute progpath for reexecution:
413 case $progpath in
414 [\\/]*|[A-Za-z]:\\*) ;;
415 *[\\/]*)
416 progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
417 progdir=`cd "$progdir" && pwd`
418 progpath=$progdir/$progname
419 ;;
420 *)
421 _G_IFS=$IFS
422 IFS=${PATH_SEPARATOR-:}
423 for progdir in $PATH; do
424 IFS=$_G_IFS
425 test -x "$progdir/$progname" && break
426 done
427 IFS=$_G_IFS
428 test -n "$progdir" || progdir=`pwd`
429 progpath=$progdir/$progname
430 ;;
431 esac
432
433
434 ## ----------------- ##
435 ## Standard options. ##
436 ## ----------------- ##
437
438 # The following options affect the operation of the functions defined
439 # below, and should be set appropriately depending on run-time para-
440 # meters passed on the command line.
441
442 opt_dry_run=false
443 opt_quiet=false
444 opt_verbose=false
445
446 # Categories 'all' and 'none' are always available. Append any others
447 # you will pass as the first argument to func_warning from your own
448 # code.
449 warning_categories=
450
451 # By default, display warnings according to 'opt_warning_types'. Set
452 # 'warning_func' to ':' to elide all warnings, or func_fatal_error to
453 # treat the next displayed warning as a fatal error.
454 warning_func=func_warn_and_continue
455
456 # Set to 'all' to display all warnings, 'none' to suppress all
457 # warnings, or a space delimited list of some subset of
458 # 'warning_categories' to display only the listed warnings.
459 opt_warning_types=all
460
461
462 ## -------------------- ##
463 ## Resource management. ##
464 ## -------------------- ##
465
466 # This section contains definitions for functions that each ensure a
467 # particular resource (a file, or a non-empty configuration variable for
468 # example) is available, and if appropriate to extract default values
469 # from pertinent package files. Call them using their associated
470 # 'require_*' variable to ensure that they are executed, at most, once.
471 #
472 # It's entirely deliberate that calling these functions can set
473 # variables that don't obey the namespace limitations obeyed by the rest
474 # of this file, in order that that they be as useful as possible to
475 # callers.
476
477
478 # require_term_colors
479 # -------------------
480 # Allow display of bold text on terminals that support it.
481 require_term_colors=func_require_term_colors
482 func_require_term_colors ()
483 {
484 $debug_cmd
485
486 test -t 1 && {
487 # COLORTERM and USE_ANSI_COLORS environment variables take
488 # precedence, because most terminfo databases neglect to describe
489 # whether color sequences are supported.
490 test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
491
492 if test 1 = "$USE_ANSI_COLORS"; then
493 # Standard ANSI escape sequences
494 tc_reset=''
495 tc_bold=''; tc_standout=''
496 tc_red=''; tc_green=''
497 tc_blue=''; tc_cyan=''
498 else
499 # Otherwise trust the terminfo database after all.
500 test -n "`tput sgr0 2>/dev/null`" && {
501 tc_reset=`tput sgr0`
502 test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
503 tc_standout=$tc_bold
504 test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
505 test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
506 test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
507 test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
508 test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
509 }
510 fi
511 }
512
513 require_term_colors=:
514 }
515
516
517 ## ----------------- ##
518 ## Function library. ##
519 ## ----------------- ##
520
521 # This section contains a variety of useful functions to call in your
522 # scripts. Take note of the portable wrappers for features provided by
523 # some modern shells, which will fall back to slower equivalents on
524 # less featureful shells.
525
526
527 # func_append VAR VALUE
528 # ---------------------
529 # Append VALUE onto the existing contents of VAR.
530
531 # We should try to minimise forks, especially on Windows where they are
532 # unreasonably slow, so skip the feature probes when bash or zsh are
533 # being used:
534 if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
535 : ${_G_HAVE_ARITH_OP="yes"}
536 : ${_G_HAVE_XSI_OPS="yes"}
537 # The += operator was introduced in bash 3.1
538 case $BASH_VERSION in
539 [12].* | 3.0 | 3.0*) ;;
540 *)
541 : ${_G_HAVE_PLUSEQ_OP="yes"}
542 ;;
543 esac
544 fi
545
546 # _G_HAVE_PLUSEQ_OP
547 # Can be empty, in which case the shell is probed, "yes" if += is
548 # useable or anything else if it does not work.
549 test -z "$_G_HAVE_PLUSEQ_OP" \
550 && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
551 && _G_HAVE_PLUSEQ_OP=yes
552
553 if test yes = "$_G_HAVE_PLUSEQ_OP"
554 then
555 # This is an XSI compatible shell, allowing a faster implementation...
556 eval 'func_append ()
557 {
558 $debug_cmd
559
560 eval "$1+=\$2"
561 }'
562 else
563 # ...otherwise fall back to using expr, which is often a shell builtin.
564 func_append ()
565 {
566 $debug_cmd
567
568 eval "$1=\$$1\$2"
569 }
570 fi
571
572
573 # func_append_quoted VAR VALUE
574 # ----------------------------
575 # Quote VALUE and append to the end of shell variable VAR, separated
576 # by a space.
577 if test yes = "$_G_HAVE_PLUSEQ_OP"; then
578 eval 'func_append_quoted ()
579 {
580 $debug_cmd
581
582 func_quote_for_eval "$2"
583 eval "$1+=\\ \$func_quote_for_eval_result"
584 }'
585 else
586 func_append_quoted ()
587 {
588 $debug_cmd
589
590 func_quote_for_eval "$2"
591 eval "$1=\$$1\\ \$func_quote_for_eval_result"
592 }
593 fi
594
595
596 # func_append_uniq VAR VALUE
597 # --------------------------
598 # Append unique VALUE onto the existing contents of VAR, assuming
599 # entries are delimited by the first character of VALUE. For example:
600 #
601 # func_append_uniq options " --another-option option-argument"
602 #
603 # will only append to $options if " --another-option option-argument "
604 # is not already present somewhere in $options already (note spaces at
605 # each end implied by leading space in second argument).
606 func_append_uniq ()
607 {
608 $debug_cmd
609
610 eval _G_current_value='`$ECHO $'$1'`'
611 _G_delim=`expr "$2" : '\(.\)'`
612
613 case $_G_delim$_G_current_value$_G_delim in
614 *"$2$_G_delim"*) ;;
615 *) func_append "$@" ;;
616 esac
617 }
618
619
620 # func_arith TERM...
621 # ------------------
622 # Set func_arith_result to the result of evaluating TERMs.
623 test -z "$_G_HAVE_ARITH_OP" \
624 && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
625 && _G_HAVE_ARITH_OP=yes
626
627 if test yes = "$_G_HAVE_ARITH_OP"; then
628 eval 'func_arith ()
629 {
630 $debug_cmd
631
632 func_arith_result=$(( $* ))
633 }'
634 else
635 func_arith ()
636 {
637 $debug_cmd
638
639 func_arith_result=`expr "$@"`
640 }
641 fi
642
643
644 # func_basename FILE
645 # ------------------
646 # Set func_basename_result to FILE with everything up to and including
647 # the last / stripped.
648 if test yes = "$_G_HAVE_XSI_OPS"; then
649 # If this shell supports suffix pattern removal, then use it to avoid
650 # forking. Hide the definitions single quotes in case the shell chokes
651 # on unsupported syntax...
652 _b='func_basename_result=${1##*/}'
653 _d='case $1 in
654 */*) func_dirname_result=${1%/*}$2 ;;
655 * ) func_dirname_result=$3 ;;
656 esac'
657
658 else
659 # ...otherwise fall back to using sed.
660 _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
661 _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
662 if test "X$func_dirname_result" = "X$1"; then
663 func_dirname_result=$3
664 else
665 func_append func_dirname_result "$2"
666 fi'
667 fi
668
669 eval 'func_basename ()
670 {
671 $debug_cmd
672
673 '"$_b"'
674 }'
675
676
677 # func_dirname FILE APPEND NONDIR_REPLACEMENT
678 # -------------------------------------------
163679 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
164680 # otherwise set result to NONDIR_REPLACEMENT.
165 func_dirname ()
166 {
167 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
168 if test "X$func_dirname_result" = "X${1}"; then
169 func_dirname_result="${3}"
170 else
171 func_dirname_result="$func_dirname_result${2}"
172 fi
173 } # func_dirname may be replaced by extended shell implementation
174
175
176 # func_basename file
177 func_basename ()
178 {
179 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
180 } # func_basename may be replaced by extended shell implementation
181
182
183 # func_dirname_and_basename file append nondir_replacement
184 # perform func_basename and func_dirname in a single function
681 eval 'func_dirname ()
682 {
683 $debug_cmd
684
685 '"$_d"'
686 }'
687
688
689 # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
690 # --------------------------------------------------------
691 # Perform func_basename and func_dirname in a single function
185692 # call:
186693 # dirname: Compute the dirname of FILE. If nonempty,
187694 # add APPEND to the result, otherwise set result
189696 # value returned in "$func_dirname_result"
190697 # basename: Compute filename of FILE.
191698 # value retuned in "$func_basename_result"
192 # Implementation must be kept synchronized with func_dirname
193 # and func_basename. For efficiency, we do not delegate to
194 # those functions but instead duplicate the functionality here.
195 func_dirname_and_basename ()
196 {
197 # Extract subdirectory from the argument.
198 func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
199 if test "X$func_dirname_result" = "X${1}"; then
200 func_dirname_result="${3}"
699 # For efficiency, we do not delegate to the functions above but instead
700 # duplicate the functionality here.
701 eval 'func_dirname_and_basename ()
702 {
703 $debug_cmd
704
705 '"$_b"'
706 '"$_d"'
707 }'
708
709
710 # func_echo ARG...
711 # ----------------
712 # Echo program name prefixed message.
713 func_echo ()
714 {
715 $debug_cmd
716
717 _G_message=$*
718
719 func_echo_IFS=$IFS
720 IFS=$nl
721 for _G_line in $_G_message; do
722 IFS=$func_echo_IFS
723 $ECHO "$progname: $_G_line"
724 done
725 IFS=$func_echo_IFS
726 }
727
728
729 # func_echo_all ARG...
730 # --------------------
731 # Invoke $ECHO with all args, space-separated.
732 func_echo_all ()
733 {
734 $ECHO "$*"
735 }
736
737
738 # func_echo_infix_1 INFIX ARG...
739 # ------------------------------
740 # Echo program name, followed by INFIX on the first line, with any
741 # additional lines not showing INFIX.
742 func_echo_infix_1 ()
743 {
744 $debug_cmd
745
746 $require_term_colors
747
748 _G_infix=$1; shift
749 _G_indent=$_G_infix
750 _G_prefix="$progname: $_G_infix: "
751 _G_message=$*
752
753 # Strip color escape sequences before counting printable length
754 for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
755 do
756 test -n "$_G_tc" && {
757 _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
758 _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
759 }
760 done
761 _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
762
763 func_echo_infix_1_IFS=$IFS
764 IFS=$nl
765 for _G_line in $_G_message; do
766 IFS=$func_echo_infix_1_IFS
767 $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
768 _G_prefix=$_G_indent
769 done
770 IFS=$func_echo_infix_1_IFS
771 }
772
773
774 # func_error ARG...
775 # -----------------
776 # Echo program name prefixed message to standard error.
777 func_error ()
778 {
779 $debug_cmd
780
781 $require_term_colors
782
783 func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
784 }
785
786
787 # func_fatal_error ARG...
788 # -----------------------
789 # Echo program name prefixed message to standard error, and exit.
790 func_fatal_error ()
791 {
792 $debug_cmd
793
794 func_error "$*"
795 exit $EXIT_FAILURE
796 }
797
798
799 # func_grep EXPRESSION FILENAME
800 # -----------------------------
801 # Check whether EXPRESSION matches any line of FILENAME, without output.
802 func_grep ()
803 {
804 $debug_cmd
805
806 $GREP "$1" "$2" >/dev/null 2>&1
807 }
808
809
810 # func_len STRING
811 # ---------------
812 # Set func_len_result to the length of STRING. STRING may not
813 # start with a hyphen.
814 test -z "$_G_HAVE_XSI_OPS" \
815 && (eval 'x=a/b/c;
816 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
817 && _G_HAVE_XSI_OPS=yes
818
819 if test yes = "$_G_HAVE_XSI_OPS"; then
820 eval 'func_len ()
821 {
822 $debug_cmd
823
824 func_len_result=${#1}
825 }'
826 else
827 func_len ()
828 {
829 $debug_cmd
830
831 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
832 }
833 fi
834
835
836 # func_mkdir_p DIRECTORY-PATH
837 # ---------------------------
838 # Make sure the entire path to DIRECTORY-PATH is available.
839 func_mkdir_p ()
840 {
841 $debug_cmd
842
843 _G_directory_path=$1
844 _G_dir_list=
845
846 if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
847
848 # Protect directory names starting with '-'
849 case $_G_directory_path in
850 -*) _G_directory_path=./$_G_directory_path ;;
851 esac
852
853 # While some portion of DIR does not yet exist...
854 while test ! -d "$_G_directory_path"; do
855 # ...make a list in topmost first order. Use a colon delimited
856 # list incase some portion of path contains whitespace.
857 _G_dir_list=$_G_directory_path:$_G_dir_list
858
859 # If the last portion added has no slash in it, the list is done
860 case $_G_directory_path in */*) ;; *) break ;; esac
861
862 # ...otherwise throw away the child directory and loop
863 _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
864 done
865 _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
866
867 func_mkdir_p_IFS=$IFS; IFS=:
868 for _G_dir in $_G_dir_list; do
869 IFS=$func_mkdir_p_IFS
870 # mkdir can fail with a 'File exist' error if two processes
871 # try to create one of the directories concurrently. Don't
872 # stop in that case!
873 $MKDIR "$_G_dir" 2>/dev/null || :
874 done
875 IFS=$func_mkdir_p_IFS
876
877 # Bail out if we (or some other process) failed to create a directory.
878 test -d "$_G_directory_path" || \
879 func_fatal_error "Failed to create '$1'"
880 fi
881 }
882
883
884 # func_mktempdir [BASENAME]
885 # -------------------------
886 # Make a temporary directory that won't clash with other running
887 # libtool processes, and avoids race conditions if possible. If
888 # given, BASENAME is the basename for that directory.
889 func_mktempdir ()
890 {
891 $debug_cmd
892
893 _G_template=${TMPDIR-/tmp}/${1-$progname}
894
895 if test : = "$opt_dry_run"; then
896 # Return a directory name, but don't create it in dry-run mode
897 _G_tmpdir=$_G_template-$$
201898 else
202 func_dirname_result="$func_dirname_result${2}"
899
900 # If mktemp works, use that first and foremost
901 _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
902
903 if test ! -d "$_G_tmpdir"; then
904 # Failing that, at least try and use $RANDOM to avoid a race
905 _G_tmpdir=$_G_template-${RANDOM-0}$$
906
907 func_mktempdir_umask=`umask`
908 umask 0077
909 $MKDIR "$_G_tmpdir"
910 umask $func_mktempdir_umask
911 fi
912
913 # If we're not in dry-run mode, bomb out on failure
914 test -d "$_G_tmpdir" || \
915 func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
203916 fi
204 func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
205 } # func_dirname_and_basename may be replaced by extended shell implementation
206
207
208 # func_stripname prefix suffix name
209 # strip PREFIX and SUFFIX off of NAME.
210 # PREFIX and SUFFIX must not contain globbing or regex special
211 # characters, hashes, percent signs, but SUFFIX may contain a leading
212 # dot (in which case that matches only a dot).
213 # func_strip_suffix prefix name
214 func_stripname ()
215 {
216 case ${2} in
217 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
218 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
219 esac
220 } # func_stripname may be replaced by extended shell implementation
221
222
223 # These SED scripts presuppose an absolute path with a trailing slash.
224 pathcar='s,^/\([^/]*\).*$,\1,'
225 pathcdr='s,^/[^/]*,,'
226 removedotparts=':dotsl
227 s@/\./@/@g
228 t dotsl
229 s,/\.$,/,'
230 collapseslashes='s@/\{1,\}@/@g'
231 finalslash='s,/*$,/,'
917
918 $ECHO "$_G_tmpdir"
919 }
920
232921
233922 # func_normal_abspath PATH
923 # ------------------------
234924 # Remove doubled-up and trailing slashes, "." path components,
235925 # and cancel out any ".." path components in PATH after making
236926 # it an absolute path.
237 # value returned in "$func_normal_abspath_result"
238927 func_normal_abspath ()
239928 {
240 # Start from root dir and reassemble the path.
241 func_normal_abspath_result=
242 func_normal_abspath_tpath=$1
243 func_normal_abspath_altnamespace=
244 case $func_normal_abspath_tpath in
245 "")
246 # Empty path, that just means $cwd.
247 func_stripname '' '/' "`pwd`"
248 func_normal_abspath_result=$func_stripname_result
249 return
250 ;;
251 # The next three entries are used to spot a run of precisely
252 # two leading slashes without using negated character classes;
253 # we take advantage of case's first-match behaviour.
254 ///*)
255 # Unusual form of absolute path, do nothing.
256 ;;
257 //*)
258 # Not necessarily an ordinary path; POSIX reserves leading '//'
259 # and for example Cygwin uses it to access remote file shares
260 # over CIFS/SMB, so we conserve a leading double slash if found.
261 func_normal_abspath_altnamespace=/
262 ;;
263 /*)
264 # Absolute path, do nothing.
265 ;;
266 *)
267 # Relative path, prepend $cwd.
268 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
269 ;;
270 esac
271 # Cancel out all the simple stuff to save iterations. We also want
272 # the path to end with a slash for ease of parsing, so make sure
273 # there is one (and only one) here.
274 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
275 -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
276 while :; do
277 # Processed it all yet?
278 if test "$func_normal_abspath_tpath" = / ; then
279 # If we ascended to the root using ".." the result may be empty now.
280 if test -z "$func_normal_abspath_result" ; then
281 func_normal_abspath_result=/
282 fi
283 break
284 fi
285 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
286 -e "$pathcar"`
929 $debug_cmd
930
931 # These SED scripts presuppose an absolute path with a trailing slash.
932 _G_pathcar='s|^/\([^/]*\).*$|\1|'
933 _G_pathcdr='s|^/[^/]*||'
934 _G_removedotparts=':dotsl
935 s|/\./|/|g
936 t dotsl
937 s|/\.$|/|'
938 _G_collapseslashes='s|/\{1,\}|/|g'
939 _G_finalslash='s|/*$|/|'
940
941 # Start from root dir and reassemble the path.
942 func_normal_abspath_result=
943 func_normal_abspath_tpath=$1
944 func_normal_abspath_altnamespace=
945 case $func_normal_abspath_tpath in
946 "")
947 # Empty path, that just means $cwd.
948 func_stripname '' '/' "`pwd`"
949 func_normal_abspath_result=$func_stripname_result
950 return
951 ;;
952 # The next three entries are used to spot a run of precisely
953 # two leading slashes without using negated character classes;
954 # we take advantage of case's first-match behaviour.
955 ///*)
956 # Unusual form of absolute path, do nothing.
957 ;;
958 //*)
959 # Not necessarily an ordinary path; POSIX reserves leading '//'
960 # and for example Cygwin uses it to access remote file shares
961 # over CIFS/SMB, so we conserve a leading double slash if found.
962 func_normal_abspath_altnamespace=/
963 ;;
964 /*)
965 # Absolute path, do nothing.
966 ;;
967 *)
968 # Relative path, prepend $cwd.
969 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
970 ;;
971 esac
972
973 # Cancel out all the simple stuff to save iterations. We also want
974 # the path to end with a slash for ease of parsing, so make sure
975 # there is one (and only one) here.
287976 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
288 -e "$pathcdr"`
289 # Figure out what to do with it
290 case $func_normal_abspath_tcomponent in
291 "")
292 # Trailing empty path component, ignore it.
293 ;;
294 ..)
295 # Parent dir; strip last assembled component from result.
296 func_dirname "$func_normal_abspath_result"
297 func_normal_abspath_result=$func_dirname_result
298 ;;
299 *)
300 # Actual path component, append it.
301 func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
302 ;;
303 esac
304 done
305 # Restore leading double-slash if one was found on entry.
306 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
307 }
308
309 # func_relative_path SRCDIR DSTDIR
310 # generates a relative path from SRCDIR to DSTDIR, with a trailing
311 # slash if non-empty, suitable for immediately appending a filename
312 # without needing to append a separator.
313 # value returned in "$func_relative_path_result"
314 func_relative_path ()
315 {
316 func_relative_path_result=
317 func_normal_abspath "$1"
318 func_relative_path_tlibdir=$func_normal_abspath_result
319 func_normal_abspath "$2"
320 func_relative_path_tbindir=$func_normal_abspath_result
321
322 # Ascend the tree starting from libdir
323 while :; do
324 # check if we have found a prefix of bindir
325 case $func_relative_path_tbindir in
326 $func_relative_path_tlibdir)
327 # found an exact match
328 func_relative_path_tcancelled=
329 break
330 ;;
331 $func_relative_path_tlibdir*)
332 # found a matching prefix
333 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
334 func_relative_path_tcancelled=$func_stripname_result
335 if test -z "$func_relative_path_result"; then
336 func_relative_path_result=.
977 -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
978 while :; do
979 # Processed it all yet?
980 if test / = "$func_normal_abspath_tpath"; then
981 # If we ascended to the root using ".." the result may be empty now.
982 if test -z "$func_normal_abspath_result"; then
983 func_normal_abspath_result=/
337984 fi
338985 break
339 ;;
340 *)
341 func_dirname $func_relative_path_tlibdir
342 func_relative_path_tlibdir=${func_dirname_result}
343 if test "x$func_relative_path_tlibdir" = x ; then
344 # Have to descend all the way to the root!
345 func_relative_path_result=../$func_relative_path_result
346 func_relative_path_tcancelled=$func_relative_path_tbindir
347 break
348 fi
349 func_relative_path_result=../$func_relative_path_result
350 ;;
351 esac
352 done
353
354 # Now calculate path; take care to avoid doubling-up slashes.
355 func_stripname '' '/' "$func_relative_path_result"
356 func_relative_path_result=$func_stripname_result
357 func_stripname '/' '/' "$func_relative_path_tcancelled"
358 if test "x$func_stripname_result" != x ; then
359 func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
360 fi
361
362 # Normalisation. If bindir is libdir, return empty string,
363 # else relative path ending with a slash; either way, target
364 # file name can be directly appended.
365 if test ! -z "$func_relative_path_result"; then
366 func_stripname './' '' "$func_relative_path_result/"
367 func_relative_path_result=$func_stripname_result
368 fi
369 }
370
371 # The name of this program:
372 func_dirname_and_basename "$progpath"
373 progname=$func_basename_result
374
375 # Make sure we have an absolute path for reexecution:
376 case $progpath in
377 [\\/]*|[A-Za-z]:\\*) ;;
378 *[\\/]*)
379 progdir=$func_dirname_result
380 progdir=`cd "$progdir" && pwd`
381 progpath="$progdir/$progname"
382 ;;
383 *)
384 save_IFS="$IFS"
385 IFS=${PATH_SEPARATOR-:}
386 for progdir in $PATH; do
387 IFS="$save_IFS"
388 test -x "$progdir/$progname" && break
389 done
390 IFS="$save_IFS"
391 test -n "$progdir" || progdir=`pwd`
392 progpath="$progdir/$progname"
393 ;;
394 esac
395
396 # Sed substitution that helps us do robust quoting. It backslashifies
397 # metacharacters that are still active within double-quoted strings.
398 Xsed="${SED}"' -e 1s/^X//'
399 sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
400
401 # Same as above, but do not quote variable references.
402 double_quote_subst='s/\(["`\\]\)/\\\1/g'
403
404 # Sed substitution that turns a string into a regex matching for the
405 # string literally.
406 sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
407
408 # Sed substitution that converts a w32 file name or path
409 # which contains forward slashes, into one that contains
410 # (escaped) backslashes. A very naive implementation.
411 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
412
413 # Re-`\' parameter expansions in output of double_quote_subst that were
414 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
415 # in input to double_quote_subst, that '$' was protected from expansion.
416 # Since each input `\' is now two `\'s, look for any number of runs of
417 # four `\'s followed by two `\'s and then a '$'. `\' that '$'.
418 bs='\\'
419 bs2='\\\\'
420 bs4='\\\\\\\\'
421 dollar='\$'
422 sed_double_backslash="\
423 s/$bs4/&\\
424 /g
425 s/^$bs2$dollar/$bs&/
426 s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
427 s/\n//g"
428
429 # Standard options:
430 opt_dry_run=false
431 opt_help=false
432 opt_quiet=false
433 opt_verbose=false
434 opt_warning=:
435
436 # func_echo arg...
437 # Echo program name prefixed message, along with the current mode
438 # name if it has been set yet.
439 func_echo ()
440 {
441 $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
442 }
443
444 # func_verbose arg...
445 # Echo program name prefixed message in verbose mode only.
446 func_verbose ()
447 {
448 $opt_verbose && func_echo ${1+"$@"}
986 fi
987 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
988 -e "$_G_pathcar"`
989 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
990 -e "$_G_pathcdr"`
991 # Figure out what to do with it
992 case $func_normal_abspath_tcomponent in
993 "")
994 # Trailing empty path component, ignore it.
995 ;;
996 ..)
997 # Parent dir; strip last assembled component from result.
998 func_dirname "$func_normal_abspath_result"
999 func_normal_abspath_result=$func_dirname_result
1000 ;;
1001 *)
1002 # Actual path component, append it.
1003 func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
1004 ;;
1005 esac
1006 done
1007 # Restore leading double-slash if one was found on entry.
1008 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
1009 }
1010
1011
1012 # func_notquiet ARG...
1013 # --------------------
1014 # Echo program name prefixed message only when not in quiet mode.
1015 func_notquiet ()
1016 {
1017 $debug_cmd
1018
1019 $opt_quiet || func_echo ${1+"$@"}
4491020
4501021 # A bug in bash halts the script if the last line of a function
4511022 # fails when set -e is in force, so we need another command to
4531024 :
4541025 }
4551026
456 # func_echo_all arg...
457 # Invoke $ECHO with all args, space-separated.
458 func_echo_all ()
459 {
460 $ECHO "$*"
461 }
462
463 # func_error arg...
464 # Echo program name prefixed message to standard error.
465 func_error ()
466 {
467 $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
468 }
469
470 # func_warning arg...
471 # Echo program name prefixed warning message to standard error.
472 func_warning ()
473 {
474 $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
475
476 # bash bug again:
1027
1028 # func_relative_path SRCDIR DSTDIR
1029 # --------------------------------
1030 # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
1031 func_relative_path ()
1032 {
1033 $debug_cmd
1034
1035 func_relative_path_result=
1036 func_normal_abspath "$1"
1037 func_relative_path_tlibdir=$func_normal_abspath_result
1038 func_normal_abspath "$2"
1039 func_relative_path_tbindir=$func_normal_abspath_result
1040
1041 # Ascend the tree starting from libdir
1042 while :; do
1043 # check if we have found a prefix of bindir
1044 case $func_relative_path_tbindir in
1045 $func_relative_path_tlibdir)
1046 # found an exact match
1047 func_relative_path_tcancelled=
1048 break
1049 ;;
1050 $func_relative_path_tlibdir*)
1051 # found a matching prefix
1052 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
1053 func_relative_path_tcancelled=$func_stripname_result
1054 if test -z "$func_relative_path_result"; then
1055 func_relative_path_result=.
1056 fi
1057 break
1058 ;;
1059 *)
1060 func_dirname $func_relative_path_tlibdir
1061 func_relative_path_tlibdir=$func_dirname_result
1062 if test -z "$func_relative_path_tlibdir"; then
1063 # Have to descend all the way to the root!
1064 func_relative_path_result=../$func_relative_path_result
1065 func_relative_path_tcancelled=$func_relative_path_tbindir
1066 break
1067 fi
1068 func_relative_path_result=../$func_relative_path_result
1069 ;;
1070 esac
1071 done
1072
1073 # Now calculate path; take care to avoid doubling-up slashes.
1074 func_stripname '' '/' "$func_relative_path_result"
1075 func_relative_path_result=$func_stripname_result
1076 func_stripname '/' '/' "$func_relative_path_tcancelled"
1077 if test -n "$func_stripname_result"; then
1078 func_append func_relative_path_result "/$func_stripname_result"
1079 fi
1080
1081 # Normalisation. If bindir is libdir, return '.' else relative path.
1082 if test -n "$func_relative_path_result"; then
1083 func_stripname './' '' "$func_relative_path_result"
1084 func_relative_path_result=$func_stripname_result
1085 fi
1086
1087 test -n "$func_relative_path_result" || func_relative_path_result=.
1088
4771089 :
4781090 }
4791091
480 # func_fatal_error arg...
481 # Echo program name prefixed message to standard error, and exit.
482 func_fatal_error ()
483 {
484 func_error ${1+"$@"}
485 exit $EXIT_FAILURE
486 }
487
488 # func_fatal_help arg...
489 # Echo program name prefixed message to standard error, followed by
490 # a help hint, and exit.
491 func_fatal_help ()
492 {
493 func_error ${1+"$@"}
494 func_fatal_error "$help"
495 }
496 help="Try \`$progname --help' for more information." ## default
497
498
499 # func_grep expression filename
500 # Check whether EXPRESSION matches any line of FILENAME, without output.
501 func_grep ()
502 {
503 $GREP "$1" "$2" >/dev/null 2>&1
504 }
505
506
507 # func_mkdir_p directory-path
508 # Make sure the entire path to DIRECTORY-PATH is available.
509 func_mkdir_p ()
510 {
511 my_directory_path="$1"
512 my_dir_list=
513
514 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
515
516 # Protect directory names starting with `-'
517 case $my_directory_path in
518 -*) my_directory_path="./$my_directory_path" ;;
1092
1093 # func_quote_for_eval ARG...
1094 # --------------------------
1095 # Aesthetically quote ARGs to be evaled later.
1096 # This function returns two values:
1097 # i) func_quote_for_eval_result
1098 # double-quoted, suitable for a subsequent eval
1099 # ii) func_quote_for_eval_unquoted_result
1100 # has all characters that are still active within double
1101 # quotes backslashified.
1102 func_quote_for_eval ()
1103 {
1104 $debug_cmd
1105
1106 func_quote_for_eval_unquoted_result=
1107 func_quote_for_eval_result=
1108 while test 0 -lt $#; do
1109 case $1 in
1110 *[\\\`\"\$]*)
1111 _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
1112 *)
1113 _G_unquoted_arg=$1 ;;
5191114 esac
520
521 # While some portion of DIR does not yet exist...
522 while test ! -d "$my_directory_path"; do
523 # ...make a list in topmost first order. Use a colon delimited
524 # list incase some portion of path contains whitespace.
525 my_dir_list="$my_directory_path:$my_dir_list"
526
527 # If the last portion added has no slash in it, the list is done
528 case $my_directory_path in */*) ;; *) break ;; esac
529
530 # ...otherwise throw away the child directory and loop
531 my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
532 done
533 my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
534
535 save_mkdir_p_IFS="$IFS"; IFS=':'
536 for my_dir in $my_dir_list; do
537 IFS="$save_mkdir_p_IFS"
538 # mkdir can fail with a `File exist' error if two processes
539 # try to create one of the directories concurrently. Don't
540 # stop in that case!
541 $MKDIR "$my_dir" 2>/dev/null || :
542 done
543 IFS="$save_mkdir_p_IFS"
544
545 # Bail out if we (or some other process) failed to create a directory.
546 test -d "$my_directory_path" || \
547 func_fatal_error "Failed to create \`$1'"
548 fi
549 }
550
551
552 # func_mktempdir [string]
553 # Make a temporary directory that won't clash with other running
554 # libtool processes, and avoids race conditions if possible. If
555 # given, STRING is the basename for that directory.
556 func_mktempdir ()
557 {
558 my_template="${TMPDIR-/tmp}/${1-$progname}"
559
560 if test "$opt_dry_run" = ":"; then
561 # Return a directory name, but don't create it in dry-run mode
562 my_tmpdir="${my_template}-$$"
563 else
564
565 # If mktemp works, use that first and foremost
566 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
567
568 if test ! -d "$my_tmpdir"; then
569 # Failing that, at least try and use $RANDOM to avoid a race
570 my_tmpdir="${my_template}-${RANDOM-0}$$"
571
572 save_mktempdir_umask=`umask`
573 umask 0077
574 $MKDIR "$my_tmpdir"
575 umask $save_mktempdir_umask
1115 if test -n "$func_quote_for_eval_unquoted_result"; then
1116 func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
1117 else
1118 func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
5761119 fi
5771120
578 # If we're not in dry-run mode, bomb out on failure
579 test -d "$my_tmpdir" || \
580 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
581 fi
582
583 $ECHO "$my_tmpdir"
584 }
585
586
587 # func_quote_for_eval arg
588 # Aesthetically quote ARG to be evaled later.
589 # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
590 # is double-quoted, suitable for a subsequent eval, whereas
591 # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
592 # which are still active within double quotes backslashified.
593 func_quote_for_eval ()
594 {
595 case $1 in
596 *[\\\`\"\$]*)
597 func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
598 *)
599 func_quote_for_eval_unquoted_result="$1" ;;
600 esac
601
602 case $func_quote_for_eval_unquoted_result in
603 # Double-quote args containing shell metacharacters to delay
604 # word splitting, command substitution and and variable
605 # expansion for a subsequent eval.
606 # Many Bourne shells cannot handle close brackets correctly
607 # in scan sets, so we specify it separately.
608 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
609 func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
610 ;;
611 *)
612 func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
613 esac
614 }
615
616
617 # func_quote_for_expand arg
1121 case $_G_unquoted_arg in
1122 # Double-quote args containing shell metacharacters to delay
1123 # word splitting, command substitution and variable expansion
1124 # for a subsequent eval.
1125 # Many Bourne shells cannot handle close brackets correctly
1126 # in scan sets, so we specify it separately.
1127 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1128 _G_quoted_arg=\"$_G_unquoted_arg\"
1129 ;;
1130 *)
1131 _G_quoted_arg=$_G_unquoted_arg
1132 ;;
1133 esac
1134
1135 if test -n "$func_quote_for_eval_result"; then
1136 func_append func_quote_for_eval_result " $_G_quoted_arg"
1137 else
1138 func_append func_quote_for_eval_result "$_G_quoted_arg"
1139 fi
1140 shift
1141 done
1142 }
1143
1144
1145 # func_quote_for_expand ARG
1146 # -------------------------
6181147 # Aesthetically quote ARG to be evaled later; same as above,
6191148 # but do not quote variable references.
6201149 func_quote_for_expand ()
6211150 {
1151 $debug_cmd
1152
6221153 case $1 in
6231154 *[\\\`\"]*)
624 my_arg=`$ECHO "$1" | $SED \
625 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
1155 _G_arg=`$ECHO "$1" | $SED \
1156 -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
6261157 *)
627 my_arg="$1" ;;
1158 _G_arg=$1 ;;
6281159 esac
6291160
630 case $my_arg in
1161 case $_G_arg in
6311162 # Double-quote args containing shell metacharacters to delay
6321163 # word splitting and command substitution for a subsequent eval.
6331164 # Many Bourne shells cannot handle close brackets correctly
6341165 # in scan sets, so we specify it separately.
6351166 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
636 my_arg="\"$my_arg\""
1167 _G_arg=\"$_G_arg\"
6371168 ;;
6381169 esac
6391170
640 func_quote_for_expand_result="$my_arg"
641 }
642
643
644 # func_show_eval cmd [fail_exp]
645 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
1171 func_quote_for_expand_result=$_G_arg
1172 }
1173
1174
1175 # func_stripname PREFIX SUFFIX NAME
1176 # ---------------------------------
1177 # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
1178 # PREFIX and SUFFIX must not contain globbing or regex special
1179 # characters, hashes, percent signs, but SUFFIX may contain a leading
1180 # dot (in which case that matches only a dot).
1181 if test yes = "$_G_HAVE_XSI_OPS"; then
1182 eval 'func_stripname ()
1183 {
1184 $debug_cmd
1185
1186 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
1187 # positional parameters, so assign one to ordinary variable first.
1188 func_stripname_result=$3
1189 func_stripname_result=${func_stripname_result#"$1"}
1190 func_stripname_result=${func_stripname_result%"$2"}
1191 }'
1192 else
1193 func_stripname ()
1194 {
1195 $debug_cmd
1196
1197 case $2 in
1198 .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
1199 *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
1200 esac
1201 }
1202 fi
1203
1204
1205 # func_show_eval CMD [FAIL_EXP]
1206 # -----------------------------
1207 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
6461208 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
6471209 # is given, then evaluate it.
6481210 func_show_eval ()
6491211 {
650 my_cmd="$1"
651 my_fail_exp="${2-:}"
652
653 ${opt_silent-false} || {
654 func_quote_for_expand "$my_cmd"
655 eval "func_echo $func_quote_for_expand_result"
1212 $debug_cmd
1213
1214 _G_cmd=$1
1215 _G_fail_exp=${2-':'}
1216
1217 func_quote_for_expand "$_G_cmd"
1218 eval "func_notquiet $func_quote_for_expand_result"
1219
1220 $opt_dry_run || {
1221 eval "$_G_cmd"
1222 _G_status=$?
1223 if test 0 -ne "$_G_status"; then
1224 eval "(exit $_G_status); $_G_fail_exp"
1225 fi
6561226 }
657
658 if ${opt_dry_run-false}; then :; else
659 eval "$my_cmd"
660 my_status=$?
661 if test "$my_status" -eq 0; then :; else
662 eval "(exit $my_status); $my_fail_exp"
663 fi
664 fi
665 }
666
667
668 # func_show_eval_locale cmd [fail_exp]
669 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
1227 }
1228
1229
1230 # func_show_eval_locale CMD [FAIL_EXP]
1231 # ------------------------------------
1232 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
6701233 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
6711234 # is given, then evaluate it. Use the saved locale for evaluation.
6721235 func_show_eval_locale ()
6731236 {
674 my_cmd="$1"
675 my_fail_exp="${2-:}"
676
677 ${opt_silent-false} || {
678 func_quote_for_expand "$my_cmd"
1237 $debug_cmd
1238
1239 _G_cmd=$1
1240 _G_fail_exp=${2-':'}
1241
1242 $opt_quiet || {
1243 func_quote_for_expand "$_G_cmd"
6791244 eval "func_echo $func_quote_for_expand_result"
6801245 }
6811246
682 if ${opt_dry_run-false}; then :; else
683 eval "$lt_user_locale
684 $my_cmd"
685 my_status=$?
686 eval "$lt_safe_locale"
687 if test "$my_status" -eq 0; then :; else
688 eval "(exit $my_status); $my_fail_exp"
1247 $opt_dry_run || {
1248 eval "$_G_user_locale
1249 $_G_cmd"
1250 _G_status=$?
1251 eval "$_G_safe_locale"
1252 if test 0 -ne "$_G_status"; then
1253 eval "(exit $_G_status); $_G_fail_exp"
6891254 fi
690 fi
691 }
1255 }
1256 }
1257
6921258
6931259 # func_tr_sh
1260 # ----------
6941261 # Turn $1 into a string suitable for a shell variable name.
6951262 # Result is stored in $func_tr_sh_result. All characters
6961263 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
6971264 # if $1 begins with a digit, a '_' is prepended as well.
6981265 func_tr_sh ()
6991266 {
700 case $1 in
701 [0-9]* | *[!a-zA-Z0-9_]*)
702 func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
703 ;;
704 * )
705 func_tr_sh_result=$1
706 ;;
707 esac
708 }
709
710
711 # func_version
712 # Echo version message to standard output and exit.
713 func_version ()
714 {
715 $opt_debug
716
717 $SED -n '/(C)/!b go
718 :more
719 /\./!{
720 N
721 s/\n# / /
722 b more
723 }
724 :go
725 /^# '$PROGRAM' (GNU /,/# warranty; / {
726 s/^# //
727 s/^# *$//
728 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
729 p
730 }' < "$progpath"
731 exit $?
732 }
733
734 # func_usage
735 # Echo short help message to standard output and exit.
736 func_usage ()
737 {
738 $opt_debug
739
740 $SED -n '/^# Usage:/,/^# *.*--help/ {
741 s/^# //
742 s/^# *$//
743 s/\$progname/'$progname'/
744 p
745 }' < "$progpath"
746 echo
747 $ECHO "run \`$progname --help | more' for full usage"
748 exit $?
749 }
750
751 # func_help [NOEXIT]
752 # Echo long help message to standard output and exit,
753 # unless 'noexit' is passed as argument.
1267 $debug_cmd
1268
1269 case $1 in
1270 [0-9]* | *[!a-zA-Z0-9_]*)
1271 func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
1272 ;;
1273 * )
1274 func_tr_sh_result=$1
1275 ;;
1276 esac
1277 }
1278
1279
1280 # func_verbose ARG...
1281 # -------------------
1282 # Echo program name prefixed message in verbose mode only.
1283 func_verbose ()
1284 {
1285 $debug_cmd
1286
1287 $opt_verbose && func_echo "$*"
1288
1289 :
1290 }
1291
1292
1293 # func_warn_and_continue ARG...
1294 # -----------------------------
1295 # Echo program name prefixed warning message to standard error.
1296 func_warn_and_continue ()
1297 {
1298 $debug_cmd
1299
1300 $require_term_colors
1301
1302 func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
1303 }
1304
1305
1306 # func_warning CATEGORY ARG...
1307 # ----------------------------
1308 # Echo program name prefixed warning message to standard error. Warning
1309 # messages can be filtered according to CATEGORY, where this function
1310 # elides messages where CATEGORY is not listed in the global variable
1311 # 'opt_warning_types'.
1312 func_warning ()
1313 {
1314 $debug_cmd
1315
1316 # CATEGORY must be in the warning_categories list!
1317 case " $warning_categories " in
1318 *" $1 "*) ;;
1319 *) func_internal_error "invalid warning category '$1'" ;;
1320 esac
1321
1322 _G_category=$1
1323 shift
1324
1325 case " $opt_warning_types " in
1326 *" $_G_category "*) $warning_func ${1+"$@"} ;;
1327 esac
1328 }
1329
1330
1331 # func_sort_ver VER1 VER2
1332 # -----------------------
1333 # 'sort -V' is not generally available.
1334 # Note this deviates from the version comparison in automake
1335 # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
1336 # but this should suffice as we won't be specifying old
1337 # version formats or redundant trailing .0 in bootstrap.conf.
1338 # If we did want full compatibility then we should probably
1339 # use m4_version_compare from autoconf.
1340 func_sort_ver ()
1341 {
1342 $debug_cmd
1343
1344 printf '%s\n%s\n' "$1" "$2" \
1345 | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
1346 }
1347
1348 # func_lt_ver PREV CURR
1349 # ---------------------
1350 # Return true if PREV and CURR are in the correct order according to
1351 # func_sort_ver, otherwise false. Use it like this:
1352 #
1353 # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
1354 func_lt_ver ()
1355 {
1356 $debug_cmd
1357
1358 test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
1359 }
1360
1361
1362 # Local variables:
1363 # mode: shell-script
1364 # sh-indentation: 2
1365 # eval: (add-hook 'before-save-hook 'time-stamp)
1366 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1367 # time-stamp-time-zone: "UTC"
1368 # End:
1369 #! /bin/sh
1370
1371 # Set a version string for this script.
1372 scriptversion=2014-01-07.03; # UTC
1373
1374 # A portable, pluggable option parser for Bourne shell.
1375 # Written by Gary V. Vaughan, 2010
1376
1377 # Copyright (C) 2010-2015 Free Software Foundation, Inc.
1378 # This is free software; see the source for copying conditions. There is NO
1379 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1380
1381 # This program is free software: you can redistribute it and/or modify
1382 # it under the terms of the GNU General Public License as published by
1383 # the Free Software Foundation, either version 3 of the License, or
1384 # (at your option) any later version.
1385
1386 # This program is distributed in the hope that it will be useful,
1387 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1388 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1389 # GNU General Public License for more details.
1390
1391 # You should have received a copy of the GNU General Public License
1392 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1393
1394 # Please report bugs or propose patches to gary@gnu.org.
1395
1396
1397 ## ------ ##
1398 ## Usage. ##
1399 ## ------ ##
1400
1401 # This file is a library for parsing options in your shell scripts along
1402 # with assorted other useful supporting features that you can make use
1403 # of too.
1404 #
1405 # For the simplest scripts you might need only:
1406 #
1407 # #!/bin/sh
1408 # . relative/path/to/funclib.sh
1409 # . relative/path/to/options-parser
1410 # scriptversion=1.0
1411 # func_options ${1+"$@"}
1412 # eval set dummy "$func_options_result"; shift
1413 # ...rest of your script...
1414 #
1415 # In order for the '--version' option to work, you will need to have a
1416 # suitably formatted comment like the one at the top of this file
1417 # starting with '# Written by ' and ending with '# warranty; '.
1418 #
1419 # For '-h' and '--help' to work, you will also need a one line
1420 # description of your script's purpose in a comment directly above the
1421 # '# Written by ' line, like the one at the top of this file.
1422 #
1423 # The default options also support '--debug', which will turn on shell
1424 # execution tracing (see the comment above debug_cmd below for another
1425 # use), and '--verbose' and the func_verbose function to allow your script
1426 # to display verbose messages only when your user has specified
1427 # '--verbose'.
1428 #
1429 # After sourcing this file, you can plug processing for additional
1430 # options by amending the variables from the 'Configuration' section
1431 # below, and following the instructions in the 'Option parsing'
1432 # section further down.
1433
1434 ## -------------- ##
1435 ## Configuration. ##
1436 ## -------------- ##
1437
1438 # You should override these variables in your script after sourcing this
1439 # file so that they reflect the customisations you have added to the
1440 # option parser.
1441
1442 # The usage line for option parsing errors and the start of '-h' and
1443 # '--help' output messages. You can embed shell variables for delayed
1444 # expansion at the time the message is displayed, but you will need to
1445 # quote other shell meta-characters carefully to prevent them being
1446 # expanded when the contents are evaled.
1447 usage='$progpath [OPTION]...'
1448
1449 # Short help message in response to '-h' and '--help'. Add to this or
1450 # override it after sourcing this library to reflect the full set of
1451 # options your script accepts.
1452 usage_message="\
1453 --debug enable verbose shell tracing
1454 -W, --warnings=CATEGORY
1455 report the warnings falling in CATEGORY [all]
1456 -v, --verbose verbosely report processing
1457 --version print version information and exit
1458 -h, --help print short or long help message and exit
1459 "
1460
1461 # Additional text appended to 'usage_message' in response to '--help'.
1462 long_help_message="
1463 Warning categories include:
1464 'all' show all warnings
1465 'none' turn off all the warnings
1466 'error' warnings are treated as fatal errors"
1467
1468 # Help message printed before fatal option parsing errors.
1469 fatal_help="Try '\$progname --help' for more information."
1470
1471
1472
1473 ## ------------------------- ##
1474 ## Hook function management. ##
1475 ## ------------------------- ##
1476
1477 # This section contains functions for adding, removing, and running hooks
1478 # to the main code. A hook is just a named list of of function, that can
1479 # be run in order later on.
1480
1481 # func_hookable FUNC_NAME
1482 # -----------------------
1483 # Declare that FUNC_NAME will run hooks added with
1484 # 'func_add_hook FUNC_NAME ...'.
1485 func_hookable ()
1486 {
1487 $debug_cmd
1488
1489 func_append hookable_fns " $1"
1490 }
1491
1492
1493 # func_add_hook FUNC_NAME HOOK_FUNC
1494 # ---------------------------------
1495 # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
1496 # first have been declared "hookable" by a call to 'func_hookable'.
1497 func_add_hook ()
1498 {
1499 $debug_cmd
1500
1501 case " $hookable_fns " in
1502 *" $1 "*) ;;
1503 *) func_fatal_error "'$1' does not accept hook functions." ;;
1504 esac
1505
1506 eval func_append ${1}_hooks '" $2"'
1507 }
1508
1509
1510 # func_remove_hook FUNC_NAME HOOK_FUNC
1511 # ------------------------------------
1512 # Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
1513 func_remove_hook ()
1514 {
1515 $debug_cmd
1516
1517 eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
1518 }
1519
1520
1521 # func_run_hooks FUNC_NAME [ARG]...
1522 # ---------------------------------
1523 # Run all hook functions registered to FUNC_NAME.
1524 # It is assumed that the list of hook functions contains nothing more
1525 # than a whitespace-delimited list of legal shell function names, and
1526 # no effort is wasted trying to catch shell meta-characters or preserve
1527 # whitespace.
1528 func_run_hooks ()
1529 {
1530 $debug_cmd
1531
1532 case " $hookable_fns " in
1533 *" $1 "*) ;;
1534 *) func_fatal_error "'$1' does not support hook funcions.n" ;;
1535 esac
1536
1537 eval _G_hook_fns=\$$1_hooks; shift
1538
1539 for _G_hook in $_G_hook_fns; do
1540 eval $_G_hook '"$@"'
1541
1542 # store returned options list back into positional
1543 # parameters for next 'cmd' execution.
1544 eval _G_hook_result=\$${_G_hook}_result
1545 eval set dummy "$_G_hook_result"; shift
1546 done
1547
1548 func_quote_for_eval ${1+"$@"}
1549 func_run_hooks_result=$func_quote_for_eval_result
1550 }
1551
1552
1553
1554 ## --------------- ##
1555 ## Option parsing. ##
1556 ## --------------- ##
1557
1558 # In order to add your own option parsing hooks, you must accept the
1559 # full positional parameter list in your hook function, remove any
1560 # options that you action, and then pass back the remaining unprocessed
1561 # options in '<hooked_function_name>_result', escaped suitably for
1562 # 'eval'. Like this:
1563 #
1564 # my_options_prep ()
1565 # {
1566 # $debug_cmd
1567 #
1568 # # Extend the existing usage message.
1569 # usage_message=$usage_message'
1570 # -s, --silent don'\''t print informational messages
1571 # '
1572 #
1573 # func_quote_for_eval ${1+"$@"}
1574 # my_options_prep_result=$func_quote_for_eval_result
1575 # }
1576 # func_add_hook func_options_prep my_options_prep
1577 #
1578 #
1579 # my_silent_option ()
1580 # {
1581 # $debug_cmd
1582 #
1583 # # Note that for efficiency, we parse as many options as we can
1584 # # recognise in a loop before passing the remainder back to the
1585 # # caller on the first unrecognised argument we encounter.
1586 # while test $# -gt 0; do
1587 # opt=$1; shift
1588 # case $opt in
1589 # --silent|-s) opt_silent=: ;;
1590 # # Separate non-argument short options:
1591 # -s*) func_split_short_opt "$_G_opt"
1592 # set dummy "$func_split_short_opt_name" \
1593 # "-$func_split_short_opt_arg" ${1+"$@"}
1594 # shift
1595 # ;;
1596 # *) set dummy "$_G_opt" "$*"; shift; break ;;
1597 # esac
1598 # done
1599 #
1600 # func_quote_for_eval ${1+"$@"}
1601 # my_silent_option_result=$func_quote_for_eval_result
1602 # }
1603 # func_add_hook func_parse_options my_silent_option
1604 #
1605 #
1606 # my_option_validation ()
1607 # {
1608 # $debug_cmd
1609 #
1610 # $opt_silent && $opt_verbose && func_fatal_help "\
1611 # '--silent' and '--verbose' options are mutually exclusive."
1612 #
1613 # func_quote_for_eval ${1+"$@"}
1614 # my_option_validation_result=$func_quote_for_eval_result
1615 # }
1616 # func_add_hook func_validate_options my_option_validation
1617 #
1618 # You'll alse need to manually amend $usage_message to reflect the extra
1619 # options you parse. It's preferable to append if you can, so that
1620 # multiple option parsing hooks can be added safely.
1621
1622
1623 # func_options [ARG]...
1624 # ---------------------
1625 # All the functions called inside func_options are hookable. See the
1626 # individual implementations for details.
1627 func_hookable func_options
1628 func_options ()
1629 {
1630 $debug_cmd
1631
1632 func_options_prep ${1+"$@"}
1633 eval func_parse_options \
1634 ${func_options_prep_result+"$func_options_prep_result"}
1635 eval func_validate_options \
1636 ${func_parse_options_result+"$func_parse_options_result"}
1637
1638 eval func_run_hooks func_options \
1639 ${func_validate_options_result+"$func_validate_options_result"}
1640
1641 # save modified positional parameters for caller
1642 func_options_result=$func_run_hooks_result
1643 }
1644
1645
1646 # func_options_prep [ARG]...
1647 # --------------------------
1648 # All initialisations required before starting the option parse loop.
1649 # Note that when calling hook functions, we pass through the list of
1650 # positional parameters. If a hook function modifies that list, and
1651 # needs to propogate that back to rest of this script, then the complete
1652 # modified list must be put in 'func_run_hooks_result' before
1653 # returning.
1654 func_hookable func_options_prep
1655 func_options_prep ()
1656 {
1657 $debug_cmd
1658
1659 # Option defaults:
1660 opt_verbose=false
1661 opt_warning_types=
1662
1663 func_run_hooks func_options_prep ${1+"$@"}
1664
1665 # save modified positional parameters for caller
1666 func_options_prep_result=$func_run_hooks_result
1667 }
1668
1669
1670 # func_parse_options [ARG]...
1671 # ---------------------------
1672 # The main option parsing loop.
1673 func_hookable func_parse_options
1674 func_parse_options ()
1675 {
1676 $debug_cmd
1677
1678 func_parse_options_result=
1679
1680 # this just eases exit handling
1681 while test $# -gt 0; do
1682 # Defer to hook functions for initial option parsing, so they
1683 # get priority in the event of reusing an option name.
1684 func_run_hooks func_parse_options ${1+"$@"}
1685
1686 # Adjust func_parse_options positional parameters to match
1687 eval set dummy "$func_run_hooks_result"; shift
1688
1689 # Break out of the loop if we already parsed every option.
1690 test $# -gt 0 || break
1691
1692 _G_opt=$1
1693 shift
1694 case $_G_opt in
1695 --debug|-x) debug_cmd='set -x'
1696 func_echo "enabling shell trace mode"
1697 $debug_cmd
1698 ;;
1699
1700 --no-warnings|--no-warning|--no-warn)
1701 set dummy --warnings none ${1+"$@"}
1702 shift
1703 ;;
1704
1705 --warnings|--warning|-W)
1706 test $# = 0 && func_missing_arg $_G_opt && break
1707 case " $warning_categories $1" in
1708 *" $1 "*)
1709 # trailing space prevents matching last $1 above
1710 func_append_uniq opt_warning_types " $1"
1711 ;;
1712 *all)
1713 opt_warning_types=$warning_categories
1714 ;;
1715 *none)
1716 opt_warning_types=none
1717 warning_func=:
1718 ;;
1719 *error)
1720 opt_warning_types=$warning_categories
1721 warning_func=func_fatal_error
1722 ;;
1723 *)
1724 func_fatal_error \
1725 "unsupported warning category: '$1'"
1726 ;;
1727 esac
1728 shift
1729 ;;
1730
1731 --verbose|-v) opt_verbose=: ;;
1732 --version) func_version ;;
1733 -\?|-h) func_usage ;;
1734 --help) func_help ;;
1735
1736 # Separate optargs to long options (plugins may need this):
1737 --*=*) func_split_equals "$_G_opt"
1738 set dummy "$func_split_equals_lhs" \
1739 "$func_split_equals_rhs" ${1+"$@"}
1740 shift
1741 ;;
1742
1743 # Separate optargs to short options:
1744 -W*)
1745 func_split_short_opt "$_G_opt"
1746 set dummy "$func_split_short_opt_name" \
1747 "$func_split_short_opt_arg" ${1+"$@"}
1748 shift
1749 ;;
1750
1751 # Separate non-argument short options:
1752 -\?*|-h*|-v*|-x*)
1753 func_split_short_opt "$_G_opt"
1754 set dummy "$func_split_short_opt_name" \
1755 "-$func_split_short_opt_arg" ${1+"$@"}
1756 shift
1757 ;;
1758
1759 --) break ;;
1760 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1761 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1762 esac
1763 done
1764
1765 # save modified positional parameters for caller
1766 func_quote_for_eval ${1+"$@"}
1767 func_parse_options_result=$func_quote_for_eval_result
1768 }
1769
1770
1771 # func_validate_options [ARG]...
1772 # ------------------------------
1773 # Perform any sanity checks on option settings and/or unconsumed
1774 # arguments.
1775 func_hookable func_validate_options
1776 func_validate_options ()
1777 {
1778 $debug_cmd
1779
1780 # Display all warnings if -W was not given.
1781 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
1782
1783 func_run_hooks func_validate_options ${1+"$@"}
1784
1785 # Bail if the options were screwed!
1786 $exit_cmd $EXIT_FAILURE
1787
1788 # save modified positional parameters for caller
1789 func_validate_options_result=$func_run_hooks_result
1790 }
1791
1792
1793
1794 ## ----------------- ##
1795 ## Helper functions. ##
1796 ## ----------------- ##
1797
1798 # This section contains the helper functions used by the rest of the
1799 # hookable option parser framework in ascii-betical order.
1800
1801
1802 # func_fatal_help ARG...
1803 # ----------------------
1804 # Echo program name prefixed message to standard error, followed by
1805 # a help hint, and exit.
1806 func_fatal_help ()
1807 {
1808 $debug_cmd
1809
1810 eval \$ECHO \""Usage: $usage"\"
1811 eval \$ECHO \""$fatal_help"\"
1812 func_error ${1+"$@"}
1813 exit $EXIT_FAILURE
1814 }
1815
1816
1817 # func_help
1818 # ---------
1819 # Echo long help message to standard output and exit.
7541820 func_help ()
7551821 {
756 $opt_debug
757
758 $SED -n '/^# Usage:/,/# Report bugs to/ {
759 :print
760 s/^# //
761 s/^# *$//
762 s*\$progname*'$progname'*
763 s*\$host*'"$host"'*
764 s*\$SHELL*'"$SHELL"'*
765 s*\$LTCC*'"$LTCC"'*
766 s*\$LTCFLAGS*'"$LTCFLAGS"'*
767 s*\$LD*'"$LD"'*
768 s/\$with_gnu_ld/'"$with_gnu_ld"'/
769 s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
770 s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
771 p
772 d
773 }
774 /^# .* home page:/b print
775 /^# General help using/b print
776 ' < "$progpath"
777 ret=$?
778 if test -z "$1"; then
779 exit $ret
780 fi
781 }
782
783 # func_missing_arg argname
1822 $debug_cmd
1823
1824 func_usage_message
1825 $ECHO "$long_help_message"
1826 exit 0
1827 }
1828
1829
1830 # func_missing_arg ARGNAME
1831 # ------------------------
7841832 # Echo program name prefixed message to standard error and set global
7851833 # exit_cmd.
7861834 func_missing_arg ()
7871835 {
788 $opt_debug
789
790 func_error "missing argument for $1."
1836 $debug_cmd
1837
1838 func_error "Missing argument for '$1'."
7911839 exit_cmd=exit
7921840 }
7931841
7941842
795 # func_split_short_opt shortopt
1843 # func_split_equals STRING
1844 # ------------------------
1845 # Set func_split_equals_lhs and func_split_equals_rhs shell variables after
1846 # splitting STRING at the '=' sign.
1847 test -z "$_G_HAVE_XSI_OPS" \
1848 && (eval 'x=a/b/c;
1849 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
1850 && _G_HAVE_XSI_OPS=yes
1851
1852 if test yes = "$_G_HAVE_XSI_OPS"
1853 then
1854 # This is an XSI compatible shell, allowing a faster implementation...
1855 eval 'func_split_equals ()
1856 {
1857 $debug_cmd
1858
1859 func_split_equals_lhs=${1%%=*}
1860 func_split_equals_rhs=${1#*=}
1861 test "x$func_split_equals_lhs" = "x$1" \
1862 && func_split_equals_rhs=
1863 }'
1864 else
1865 # ...otherwise fall back to using expr, which is often a shell builtin.
1866 func_split_equals ()
1867 {
1868 $debug_cmd
1869
1870 func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
1871 func_split_equals_rhs=
1872 test "x$func_split_equals_lhs" = "x$1" \
1873 || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
1874 }
1875 fi #func_split_equals
1876
1877
1878 # func_split_short_opt SHORTOPT
1879 # -----------------------------
7961880 # Set func_split_short_opt_name and func_split_short_opt_arg shell
7971881 # variables after splitting SHORTOPT after the 2nd character.
798 func_split_short_opt ()
799 {
800 my_sed_short_opt='1s/^\(..\).*$/\1/;q'
801 my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
802
803 func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
804 func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
805 } # func_split_short_opt may be replaced by extended shell implementation
806
807
808 # func_split_long_opt longopt
809 # Set func_split_long_opt_name and func_split_long_opt_arg shell
810 # variables after splitting LONGOPT at the `=' sign.
811 func_split_long_opt ()
812 {
813 my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
814 my_sed_long_arg='1s/^--[^=]*=//'
815
816 func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
817 func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
818 } # func_split_long_opt may be replaced by extended shell implementation
819
820 exit_cmd=:
821
822
823
824
825
826 magic="%%%MAGIC variable%%%"
827 magic_exe="%%%MAGIC EXE variable%%%"
828
829 # Global variables.
830 nonopt=
831 preserve_args=
832 lo2o="s/\\.lo\$/.${objext}/"
833 o2lo="s/\\.${objext}\$/.lo/"
834 extracted_archives=
835 extracted_serial=0
836
837 # If this variable is set in any of the actions, the command in it
838 # will be execed at the end. This prevents here-documents from being
839 # left over by shells.
840 exec_cmd=
841
842 # func_append var value
843 # Append VALUE to the end of shell variable VAR.
844 func_append ()
845 {
846 eval "${1}=\$${1}\${2}"
847 } # func_append may be replaced by extended shell implementation
848
849 # func_append_quoted var value
850 # Quote VALUE and append to the end of shell variable VAR, separated
851 # by a space.
852 func_append_quoted ()
853 {
854 func_quote_for_eval "${2}"
855 eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
856 } # func_append_quoted may be replaced by extended shell implementation
857
858
859 # func_arith arithmetic-term...
860 func_arith ()
861 {
862 func_arith_result=`expr "${@}"`
863 } # func_arith may be replaced by extended shell implementation
864
865
866 # func_len string
867 # STRING may not start with a hyphen.
868 func_len ()
869 {
870 func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
871 } # func_len may be replaced by extended shell implementation
872
873
874 # func_lo2o object
875 func_lo2o ()
876 {
877 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
878 } # func_lo2o may be replaced by extended shell implementation
879
880
881 # func_xform libobj-or-source
882 func_xform ()
883 {
884 func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
885 } # func_xform may be replaced by extended shell implementation
886
887
888 # func_fatal_configuration arg...
1882 if test yes = "$_G_HAVE_XSI_OPS"
1883 then
1884 # This is an XSI compatible shell, allowing a faster implementation...
1885 eval 'func_split_short_opt ()
1886 {
1887 $debug_cmd
1888
1889 func_split_short_opt_arg=${1#??}
1890 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
1891 }'
1892 else
1893 # ...otherwise fall back to using expr, which is often a shell builtin.
1894 func_split_short_opt ()
1895 {
1896 $debug_cmd
1897
1898 func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
1899 func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
1900 }
1901 fi #func_split_short_opt
1902
1903
1904 # func_usage
1905 # ----------
1906 # Echo short help message to standard output and exit.
1907 func_usage ()
1908 {
1909 $debug_cmd
1910
1911 func_usage_message
1912 $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
1913 exit 0
1914 }
1915
1916
1917 # func_usage_message
1918 # ------------------
1919 # Echo short help message to standard output.
1920 func_usage_message ()
1921 {
1922 $debug_cmd
1923
1924 eval \$ECHO \""Usage: $usage"\"
1925 echo
1926 $SED -n 's|^# ||
1927 /^Written by/{
1928 x;p;x
1929 }
1930 h
1931 /^Written by/q' < "$progpath"
1932 echo
1933 eval \$ECHO \""$usage_message"\"
1934 }
1935
1936
1937 # func_version
1938 # ------------
1939 # Echo version message to standard output and exit.
1940 func_version ()
1941 {
1942 $debug_cmd
1943
1944 printf '%s\n' "$progname $scriptversion"
1945 $SED -n '
1946 /(C)/!b go
1947 :more
1948 /\./!{
1949 N
1950 s|\n# | |
1951 b more
1952 }
1953 :go
1954 /^# Written by /,/# warranty; / {
1955 s|^# ||
1956 s|^# *$||
1957 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
1958 p
1959 }
1960 /^# Written by / {
1961 s|^# ||
1962 p
1963 }
1964 /^warranty; /q' < "$progpath"
1965
1966 exit $?
1967 }
1968
1969
1970 # Local variables:
1971 # mode: shell-script
1972 # sh-indentation: 2
1973 # eval: (add-hook 'before-save-hook 'time-stamp)
1974 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1975 # time-stamp-time-zone: "UTC"
1976 # End:
1977
1978 # Set a version string.
1979 scriptversion='(GNU libtool) 2.4.6'
1980
1981
1982 # func_echo ARG...
1983 # ----------------
1984 # Libtool also displays the current mode in messages, so override
1985 # funclib.sh func_echo with this custom definition.
1986 func_echo ()
1987 {
1988 $debug_cmd
1989
1990 _G_message=$*
1991
1992 func_echo_IFS=$IFS
1993 IFS=$nl
1994 for _G_line in $_G_message; do
1995 IFS=$func_echo_IFS
1996 $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
1997 done
1998 IFS=$func_echo_IFS
1999 }
2000
2001
2002 # func_warning ARG...
2003 # -------------------
2004 # Libtool warnings are not categorized, so override funclib.sh
2005 # func_warning with this simpler definition.
2006 func_warning ()
2007 {
2008 $debug_cmd
2009
2010 $warning_func ${1+"$@"}
2011 }
2012
2013
2014 ## ---------------- ##
2015 ## Options parsing. ##
2016 ## ---------------- ##
2017
2018 # Hook in the functions to make sure our own options are parsed during
2019 # the option parsing loop.
2020
2021 usage='$progpath [OPTION]... [MODE-ARG]...'
2022
2023 # Short help message in response to '-h'.
2024 usage_message="Options:
2025 --config show all configuration variables
2026 --debug enable verbose shell tracing
2027 -n, --dry-run display commands without modifying any files
2028 --features display basic configuration information and exit
2029 --mode=MODE use operation mode MODE
2030 --no-warnings equivalent to '-Wnone'
2031 --preserve-dup-deps don't remove duplicate dependency libraries
2032 --quiet, --silent don't print informational messages
2033 --tag=TAG use configuration variables from tag TAG
2034 -v, --verbose print more informational messages than default
2035 --version print version information
2036 -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
2037 -h, --help, --help-all print short, long, or detailed help message
2038 "
2039
2040 # Additional text appended to 'usage_message' in response to '--help'.
2041 func_help ()
2042 {
2043 $debug_cmd
2044
2045 func_usage_message
2046 $ECHO "$long_help_message
2047
2048 MODE must be one of the following:
2049
2050 clean remove files from the build directory
2051 compile compile a source file into a libtool object
2052 execute automatically set library path, then run a program
2053 finish complete the installation of libtool libraries
2054 install install libraries or executables
2055 link create a library or an executable
2056 uninstall remove libraries from an installed directory
2057
2058 MODE-ARGS vary depending on the MODE. When passed as first option,
2059 '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
2060 Try '$progname --help --mode=MODE' for a more detailed description of MODE.
2061
2062 When reporting a bug, please describe a test case to reproduce it and
2063 include the following information:
2064
2065 host-triplet: $host
2066 shell: $SHELL
2067 compiler: $LTCC
2068 compiler flags: $LTCFLAGS
2069 linker: $LD (gnu? $with_gnu_ld)
2070 version: $progname (GNU libtool) 2.4.6
2071 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
2072 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
2073
2074 Report bugs to <bug-libtool@gnu.org>.
2075 GNU libtool home page: <http://www.gnu.org/s/libtool/>.
2076 General help using GNU software: <http://www.gnu.org/gethelp/>."
2077 exit 0
2078 }
2079
2080
2081 # func_lo2o OBJECT-NAME
2082 # ---------------------
2083 # Transform OBJECT-NAME from a '.lo' suffix to the platform specific
2084 # object suffix.
2085
2086 lo2o=s/\\.lo\$/.$objext/
2087 o2lo=s/\\.$objext\$/.lo/
2088
2089 if test yes = "$_G_HAVE_XSI_OPS"; then
2090 eval 'func_lo2o ()
2091 {
2092 case $1 in
2093 *.lo) func_lo2o_result=${1%.lo}.$objext ;;
2094 * ) func_lo2o_result=$1 ;;
2095 esac
2096 }'
2097
2098 # func_xform LIBOBJ-OR-SOURCE
2099 # ---------------------------
2100 # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
2101 # suffix to a '.lo' libtool-object suffix.
2102 eval 'func_xform ()
2103 {
2104 func_xform_result=${1%.*}.lo
2105 }'
2106 else
2107 # ...otherwise fall back to using sed.
2108 func_lo2o ()
2109 {
2110 func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
2111 }
2112
2113 func_xform ()
2114 {
2115 func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
2116 }
2117 fi
2118
2119
2120 # func_fatal_configuration ARG...
2121 # -------------------------------
8892122 # Echo program name prefixed message to standard error, followed by
8902123 # a configuration failure hint, and exit.
8912124 func_fatal_configuration ()
8922125 {
893 func_error ${1+"$@"}
894 func_error "See the $PACKAGE documentation for more information."
895 func_fatal_error "Fatal configuration error."
2126 func__fatal_error ${1+"$@"} \
2127 "See the $PACKAGE documentation for more information." \
2128 "Fatal configuration error."
8962129 }
8972130
8982131
8992132 # func_config
2133 # -----------
9002134 # Display the configuration for all the tags in this script.
9012135 func_config ()
9022136 {
9142148 exit $?
9152149 }
9162150
2151
9172152 # func_features
2153 # -------------
9182154 # Display the features supported by this script.
9192155 func_features ()
9202156 {
9212157 echo "host: $host"
922 if test "$build_libtool_libs" = yes; then
2158 if test yes = "$build_libtool_libs"; then
9232159 echo "enable shared libraries"
9242160 else
9252161 echo "disable shared libraries"
9262162 fi
927 if test "$build_old_libs" = yes; then
2163 if test yes = "$build_old_libs"; then
9282164 echo "enable static libraries"
9292165 else
9302166 echo "disable static libraries"
9332169 exit $?
9342170 }
9352171
936 # func_enable_tag tagname
2172
2173 # func_enable_tag TAGNAME
2174 # -----------------------
9372175 # Verify that TAGNAME is valid, and either flag an error and exit, or
9382176 # enable the TAGNAME tag. We also add TAGNAME to the global $taglist
9392177 # variable here.
9402178 func_enable_tag ()
9412179 {
942 # Global variable:
943 tagname="$1"
944
945 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
946 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
947 sed_extractcf="/$re_begincf/,/$re_endcf/p"
948
949 # Validate tagname.
950 case $tagname in
951 *[!-_A-Za-z0-9,/]*)
952 func_fatal_error "invalid tag name: $tagname"
953 ;;
954 esac
955
956 # Don't test for the "default" C tag, as we know it's
957 # there but not specially marked.
958 case $tagname in
959 CC) ;;
2180 # Global variable:
2181 tagname=$1
2182
2183 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
2184 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
2185 sed_extractcf=/$re_begincf/,/$re_endcf/p
2186
2187 # Validate tagname.
2188 case $tagname in
2189 *[!-_A-Za-z0-9,/]*)
2190 func_fatal_error "invalid tag name: $tagname"
2191 ;;
2192 esac
2193
2194 # Don't test for the "default" C tag, as we know it's
2195 # there but not specially marked.
2196 case $tagname in
2197 CC) ;;
9602198 *)
961 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
962 taglist="$taglist $tagname"
963
964 # Evaluate the configuration. Be careful to quote the path
965 # and the sed script, to avoid splitting on whitespace, but
966 # also don't use non-portable quotes within backquotes within
967 # quotes we have to do it in 2 steps:
968 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
969 eval "$extractedcf"
970 else
971 func_error "ignoring unknown tag $tagname"
972 fi
973 ;;
974 esac
975 }
2199 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
2200 taglist="$taglist $tagname"
2201
2202 # Evaluate the configuration. Be careful to quote the path
2203 # and the sed script, to avoid splitting on whitespace, but
2204 # also don't use non-portable quotes within backquotes within
2205 # quotes we have to do it in 2 steps:
2206 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
2207 eval "$extractedcf"
2208 else
2209 func_error "ignoring unknown tag $tagname"
2210 fi
2211 ;;
2212 esac
2213 }
2214
9762215
9772216 # func_check_version_match
2217 # ------------------------
9782218 # Ensure that we are using m4 macros, and libtool script from the same
9792219 # release of libtool.
9802220 func_check_version_match ()
9812221 {
982 if test "$package_revision" != "$macro_revision"; then
983 if test "$VERSION" != "$macro_version"; then
984 if test -z "$macro_version"; then
985 cat >&2 <<_LT_EOF
2222 if test "$package_revision" != "$macro_revision"; then
2223 if test "$VERSION" != "$macro_version"; then
2224 if test -z "$macro_version"; then
2225 cat >&2 <<_LT_EOF
9862226 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
9872227 $progname: definition of this LT_INIT comes from an older release.
9882228 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
9892229 $progname: and run autoconf again.
9902230 _LT_EOF
991 else
992 cat >&2 <<_LT_EOF
2231 else
2232 cat >&2 <<_LT_EOF
9932233 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
9942234 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
9952235 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
9962236 $progname: and run autoconf again.
9972237 _LT_EOF
998 fi
999 else
1000 cat >&2 <<_LT_EOF
2238 fi
2239 else
2240 cat >&2 <<_LT_EOF
10012241 $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
10022242 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
10032243 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
10042244 $progname: of $PACKAGE $VERSION and run autoconf again.
10052245 _LT_EOF
2246 fi
2247
2248 exit $EXIT_MISMATCH
10062249 fi
1007
1008 exit $EXIT_MISMATCH
1009 fi
1010 }
1011
1012
1013 # Shorthand for --mode=foo, only valid as the first argument
1014 case $1 in
1015 clean|clea|cle|cl)
1016 shift; set dummy --mode clean ${1+"$@"}; shift
1017 ;;
1018 compile|compil|compi|comp|com|co|c)
1019 shift; set dummy --mode compile ${1+"$@"}; shift
1020 ;;
1021 execute|execut|execu|exec|exe|ex|e)
1022 shift; set dummy --mode execute ${1+"$@"}; shift
1023 ;;
1024 finish|finis|fini|fin|fi|f)
1025 shift; set dummy --mode finish ${1+"$@"}; shift
1026 ;;
1027 install|instal|insta|inst|ins|in|i)
1028 shift; set dummy --mode install ${1+"$@"}; shift
1029 ;;
1030 link|lin|li|l)
1031 shift; set dummy --mode link ${1+"$@"}; shift
1032 ;;
1033 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
1034 shift; set dummy --mode uninstall ${1+"$@"}; shift
1035 ;;
1036 esac
1037
1038
1039
1040 # Option defaults:
1041 opt_debug=:
1042 opt_dry_run=false
1043 opt_config=false
1044 opt_preserve_dup_deps=false
1045 opt_features=false
1046 opt_finish=false
1047 opt_help=false
1048 opt_help_all=false
1049 opt_silent=:
1050 opt_warning=:
1051 opt_verbose=:
1052 opt_silent=false
1053 opt_verbose=false
1054
1055
1056 # Parse options once, thoroughly. This comes as soon as possible in the
1057 # script to make things like `--version' happen as quickly as we can.
1058 {
1059 # this just eases exit handling
1060 while test $# -gt 0; do
1061 opt="$1"
1062 shift
1063 case $opt in
1064 --debug|-x) opt_debug='set -x'
1065 func_echo "enabling shell trace mode"
1066 $opt_debug
1067 ;;
1068 --dry-run|--dryrun|-n)
1069 opt_dry_run=:
1070 ;;
1071 --config)
1072 opt_config=:
1073 func_config
1074 ;;
1075 --dlopen|-dlopen)
1076 optarg="$1"
1077 opt_dlopen="${opt_dlopen+$opt_dlopen
1078 }$optarg"
1079 shift
1080 ;;
1081 --preserve-dup-deps)
1082 opt_preserve_dup_deps=:
1083 ;;
1084 --features)
1085 opt_features=:
1086 func_features
1087 ;;
1088 --finish)
1089 opt_finish=:
1090 set dummy --mode finish ${1+"$@"}; shift
1091 ;;
1092 --help)
1093 opt_help=:
1094 ;;
1095 --help-all)
1096 opt_help_all=:
1097 opt_help=': help-all'
1098 ;;
1099 --mode)
1100 test $# = 0 && func_missing_arg $opt && break
1101 optarg="$1"
1102 opt_mode="$optarg"
1103 case $optarg in
1104 # Valid mode arguments:
1105 clean|compile|execute|finish|install|link|relink|uninstall) ;;
1106
1107 # Catch anything else as an error
1108 *) func_error "invalid argument for $opt"
1109 exit_cmd=exit
1110 break
1111 ;;
1112 esac
1113 shift
1114 ;;
1115 --no-silent|--no-quiet)
1116 opt_silent=false
1117 func_append preserve_args " $opt"
1118 ;;
1119 --no-warning|--no-warn)
1120 opt_warning=false
1121 func_append preserve_args " $opt"
1122 ;;
1123 --no-verbose)
1124 opt_verbose=false
1125 func_append preserve_args " $opt"
1126 ;;
1127 --silent|--quiet)
1128 opt_silent=:
1129 func_append preserve_args " $opt"
1130 opt_verbose=false
1131 ;;
1132 --verbose|-v)
1133 opt_verbose=:
1134 func_append preserve_args " $opt"
1135 opt_silent=false
1136 ;;
1137 --tag)
1138 test $# = 0 && func_missing_arg $opt && break
1139 optarg="$1"
1140 opt_tag="$optarg"
1141 func_append preserve_args " $opt $optarg"
1142 func_enable_tag "$optarg"
1143 shift
1144 ;;
1145
1146 -\?|-h) func_usage ;;
1147 --help) func_help ;;
1148 --version) func_version ;;
1149
1150 # Separate optargs to long options:
1151 --*=*)
1152 func_split_long_opt "$opt"
1153 set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
1154 shift
1155 ;;
1156
1157 # Separate non-argument short options:
1158 -\?*|-h*|-n*|-v*)
1159 func_split_short_opt "$opt"
1160 set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
1161 shift
1162 ;;
1163
1164 --) break ;;
1165 -*) func_fatal_help "unrecognized option \`$opt'" ;;
1166 *) set dummy "$opt" ${1+"$@"}; shift; break ;;
2250 }
2251
2252
2253 # libtool_options_prep [ARG]...
2254 # -----------------------------
2255 # Preparation for options parsed by libtool.
2256 libtool_options_prep ()
2257 {
2258 $debug_mode
2259
2260 # Option defaults:
2261 opt_config=false
2262 opt_dlopen=
2263 opt_dry_run=false
2264 opt_help=false
2265 opt_mode=
2266 opt_preserve_dup_deps=false
2267 opt_quiet=false
2268
2269 nonopt=
2270 preserve_args=
2271
2272 # Shorthand for --mode=foo, only valid as the first argument
2273 case $1 in
2274 clean|clea|cle|cl)
2275 shift; set dummy --mode clean ${1+"$@"}; shift
2276 ;;
2277 compile|compil|compi|comp|com|co|c)
2278 shift; set dummy --mode compile ${1+"$@"}; shift
2279 ;;
2280 execute|execut|execu|exec|exe|ex|e)
2281 shift; set dummy --mode execute ${1+"$@"}; shift
2282 ;;
2283 finish|finis|fini|fin|fi|f)
2284 shift; set dummy --mode finish ${1+"$@"}; shift
2285 ;;
2286 install|instal|insta|inst|ins|in|i)
2287 shift; set dummy --mode install ${1+"$@"}; shift
2288 ;;
2289 link|lin|li|l)
2290 shift; set dummy --mode link ${1+"$@"}; shift
2291 ;;
2292 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2293 shift; set dummy --mode uninstall ${1+"$@"}; shift
2294 ;;
11672295 esac
1168 done
1169
1170 # Validate options:
1171
1172 # save first non-option argument
1173 if test "$#" -gt 0; then
1174 nonopt="$opt"
1175 shift
1176 fi
1177
1178 # preserve --debug
1179 test "$opt_debug" = : || func_append preserve_args " --debug"
1180
1181 case $host in
1182 *cygwin* | *mingw* | *pw32* | *cegcc*)
1183 # don't eliminate duplications in $postdeps and $predeps
1184 opt_duplicate_compiler_generated_deps=:
1185 ;;
1186 *)
1187 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
1188 ;;
1189 esac
1190
1191 $opt_help || {
1192 # Sanity checks first:
1193 func_check_version_match
1194
1195 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1196 func_fatal_configuration "not configured to build any kind of library"
2296
2297 # Pass back the list of options.
2298 func_quote_for_eval ${1+"$@"}
2299 libtool_options_prep_result=$func_quote_for_eval_result
2300 }
2301 func_add_hook func_options_prep libtool_options_prep
2302
2303
2304 # libtool_parse_options [ARG]...
2305 # ---------------------------------
2306 # Provide handling for libtool specific options.
2307 libtool_parse_options ()
2308 {
2309 $debug_cmd
2310
2311 # Perform our own loop to consume as many options as possible in
2312 # each iteration.
2313 while test $# -gt 0; do
2314 _G_opt=$1
2315 shift
2316 case $_G_opt in
2317 --dry-run|--dryrun|-n)
2318 opt_dry_run=:
2319 ;;
2320
2321 --config) func_config ;;
2322
2323 --dlopen|-dlopen)
2324 opt_dlopen="${opt_dlopen+$opt_dlopen
2325 }$1"
2326 shift
2327 ;;
2328
2329 --preserve-dup-deps)
2330 opt_preserve_dup_deps=: ;;
2331
2332 --features) func_features ;;
2333
2334 --finish) set dummy --mode finish ${1+"$@"}; shift ;;
2335
2336 --help) opt_help=: ;;
2337
2338 --help-all) opt_help=': help-all' ;;
2339
2340 --mode) test $# = 0 && func_missing_arg $_G_opt && break
2341 opt_mode=$1
2342 case $1 in
2343 # Valid mode arguments:
2344 clean|compile|execute|finish|install|link|relink|uninstall) ;;
2345
2346 # Catch anything else as an error
2347 *) func_error "invalid argument for $_G_opt"
2348 exit_cmd=exit
2349 break
2350 ;;
2351 esac
2352 shift
2353 ;;
2354
2355 --no-silent|--no-quiet)
2356 opt_quiet=false
2357 func_append preserve_args " $_G_opt"
2358 ;;
2359
2360 --no-warnings|--no-warning|--no-warn)
2361 opt_warning=false
2362 func_append preserve_args " $_G_opt"
2363 ;;
2364
2365 --no-verbose)
2366 opt_verbose=false
2367 func_append preserve_args " $_G_opt"
2368 ;;
2369
2370 --silent|--quiet)
2371 opt_quiet=:
2372 opt_verbose=false
2373 func_append preserve_args " $_G_opt"
2374 ;;
2375
2376 --tag) test $# = 0 && func_missing_arg $_G_opt && break
2377 opt_tag=$1
2378 func_append preserve_args " $_G_opt $1"
2379 func_enable_tag "$1"
2380 shift
2381 ;;
2382
2383 --verbose|-v) opt_quiet=false
2384 opt_verbose=:
2385 func_append preserve_args " $_G_opt"
2386 ;;
2387
2388 # An option not handled by this hook function:
2389 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
2390 esac
2391 done
2392
2393
2394 # save modified positional parameters for caller
2395 func_quote_for_eval ${1+"$@"}
2396 libtool_parse_options_result=$func_quote_for_eval_result
2397 }
2398 func_add_hook func_parse_options libtool_parse_options
2399
2400
2401
2402 # libtool_validate_options [ARG]...
2403 # ---------------------------------
2404 # Perform any sanity checks on option settings and/or unconsumed
2405 # arguments.
2406 libtool_validate_options ()
2407 {
2408 # save first non-option argument
2409 if test 0 -lt $#; then
2410 nonopt=$1
2411 shift
11972412 fi
11982413
1199 # Darwin sucks
1200 eval std_shrext=\"$shrext_cmds\"
1201
1202 # Only execute mode is allowed to have -dlopen flags.
1203 if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
1204 func_error "unrecognized option \`-dlopen'"
1205 $ECHO "$help" 1>&2
1206 exit $EXIT_FAILURE
1207 fi
1208
1209 # Change the help message to a mode-specific one.
1210 generic_help="$help"
1211 help="Try \`$progname --help --mode=$opt_mode' for more information."
1212 }
1213
1214
1215 # Bail if the options were screwed
1216 $exit_cmd $EXIT_FAILURE
1217 }
1218
2414 # preserve --debug
2415 test : = "$debug_cmd" || func_append preserve_args " --debug"
2416
2417 case $host in
2418 # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
2419 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
2420 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
2421 # don't eliminate duplications in $postdeps and $predeps
2422 opt_duplicate_compiler_generated_deps=:
2423 ;;
2424 *)
2425 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
2426 ;;
2427 esac
2428
2429 $opt_help || {
2430 # Sanity checks first:
2431 func_check_version_match
2432
2433 test yes != "$build_libtool_libs" \
2434 && test yes != "$build_old_libs" \
2435 && func_fatal_configuration "not configured to build any kind of library"
2436
2437 # Darwin sucks
2438 eval std_shrext=\"$shrext_cmds\"
2439
2440 # Only execute mode is allowed to have -dlopen flags.
2441 if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
2442 func_error "unrecognized option '-dlopen'"
2443 $ECHO "$help" 1>&2
2444 exit $EXIT_FAILURE
2445 fi
2446
2447 # Change the help message to a mode-specific one.
2448 generic_help=$help
2449 help="Try '$progname --help --mode=$opt_mode' for more information."
2450 }
2451
2452 # Pass back the unparsed argument list
2453 func_quote_for_eval ${1+"$@"}
2454 libtool_validate_options_result=$func_quote_for_eval_result
2455 }
2456 func_add_hook func_validate_options libtool_validate_options
2457
2458
2459 # Process options as early as possible so that --help and --version
2460 # can return quickly.
2461 func_options ${1+"$@"}
2462 eval set dummy "$func_options_result"; shift
12192463
12202464
12212465
12232467 ## Main. ##
12242468 ## ----------- ##
12252469
2470 magic='%%%MAGIC variable%%%'
2471 magic_exe='%%%MAGIC EXE variable%%%'
2472
2473 # Global variables.
2474 extracted_archives=
2475 extracted_serial=0
2476
2477 # If this variable is set in any of the actions, the command in it
2478 # will be execed at the end. This prevents here-documents from being
2479 # left over by shells.
2480 exec_cmd=
2481
2482
2483 # A function that is used when there is no print builtin or printf.
2484 func_fallback_echo ()
2485 {
2486 eval 'cat <<_LTECHO_EOF
2487 $1
2488 _LTECHO_EOF'
2489 }
2490
2491 # func_generated_by_libtool
2492 # True iff stdin has been generated by Libtool. This function is only
2493 # a basic sanity check; it will hardly flush out determined imposters.
2494 func_generated_by_libtool_p ()
2495 {
2496 $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
2497 }
2498
12262499 # func_lalib_p file
1227 # True iff FILE is a libtool `.la' library or `.lo' object file.
2500 # True iff FILE is a libtool '.la' library or '.lo' object file.
12282501 # This function is only a basic sanity check; it will hardly flush out
12292502 # determined imposters.
12302503 func_lalib_p ()
12312504 {
12322505 test -f "$1" &&
1233 $SED -e 4q "$1" 2>/dev/null \
1234 | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
2506 $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
12352507 }
12362508
12372509 # func_lalib_unsafe_p file
1238 # True iff FILE is a libtool `.la' library or `.lo' object file.
2510 # True iff FILE is a libtool '.la' library or '.lo' object file.
12392511 # This function implements the same check as func_lalib_p without
12402512 # resorting to external programs. To this end, it redirects stdin and
12412513 # closes it afterwards, without saving the original file descriptor.
12422514 # As a safety measure, use it only where a negative result would be
1243 # fatal anyway. Works if `file' does not exist.
2515 # fatal anyway. Works if 'file' does not exist.
12442516 func_lalib_unsafe_p ()
12452517 {
12462518 lalib_p=no
12482520 for lalib_p_l in 1 2 3 4
12492521 do
12502522 read lalib_p_line
1251 case "$lalib_p_line" in
2523 case $lalib_p_line in
12522524 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
12532525 esac
12542526 done
12552527 exec 0<&5 5<&-
12562528 fi
1257 test "$lalib_p" = yes
2529 test yes = "$lalib_p"
12582530 }
12592531
12602532 # func_ltwrapper_script_p file
12632535 # determined imposters.
12642536 func_ltwrapper_script_p ()
12652537 {
1266 func_lalib_p "$1"
2538 test -f "$1" &&
2539 $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
12672540 }
12682541
12692542 # func_ltwrapper_executable_p file
12882561 {
12892562 func_dirname_and_basename "$1" "" "."
12902563 func_stripname '' '.exe' "$func_basename_result"
1291 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
2564 func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
12922565 }
12932566
12942567 # func_ltwrapper_p file
13072580 # FAIL_CMD may read-access the current command in variable CMD!
13082581 func_execute_cmds ()
13092582 {
1310 $opt_debug
2583 $debug_cmd
2584
13112585 save_ifs=$IFS; IFS='~'
13122586 for cmd in $1; do
2587 IFS=$sp$nl
2588 eval cmd=\"$cmd\"
13132589 IFS=$save_ifs
1314 eval cmd=\"$cmd\"
13152590 func_show_eval "$cmd" "${2-:}"
13162591 done
13172592 IFS=$save_ifs
13232598 # Note that it is not necessary on cygwin/mingw to append a dot to
13242599 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
13252600 # behavior happens only for exec(3), not for open(2)! Also, sourcing
1326 # `FILE.' does not work on cygwin managed mounts.
2601 # 'FILE.' does not work on cygwin managed mounts.
13272602 func_source ()
13282603 {
1329 $opt_debug
2604 $debug_cmd
2605
13302606 case $1 in
13312607 */* | *\\*) . "$1" ;;
13322608 *) . "./$1" ;;
13532629 # store the result into func_replace_sysroot_result.
13542630 func_replace_sysroot ()
13552631 {
1356 case "$lt_sysroot:$1" in
2632 case $lt_sysroot:$1 in
13572633 ?*:"$lt_sysroot"*)
13582634 func_stripname "$lt_sysroot" '' "$1"
1359 func_replace_sysroot_result="=$func_stripname_result"
2635 func_replace_sysroot_result='='$func_stripname_result
13602636 ;;
13612637 *)
13622638 # Including no sysroot.
13732649 # arg is usually of the form 'gcc ...'
13742650 func_infer_tag ()
13752651 {
1376 $opt_debug
2652 $debug_cmd
2653
13772654 if test -n "$available_tags" && test -z "$tagname"; then
13782655 CC_quoted=
13792656 for arg in $CC; do
13922669 for z in $available_tags; do
13932670 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
13942671 # Evaluate the configuration.
1395 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
2672 eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
13962673 CC_quoted=
13972674 for arg in $CC; do
13982675 # Double-quote args containing other shell metacharacters.
14172694 # line option must be used.
14182695 if test -z "$tagname"; then
14192696 func_echo "unable to infer tagged configuration"
1420 func_fatal_error "specify a tag with \`--tag'"
2697 func_fatal_error "specify a tag with '--tag'"
14212698 # else
14222699 # func_verbose "using $tagname tagged configuration"
14232700 fi
14332710 # but don't create it if we're doing a dry run.
14342711 func_write_libtool_object ()
14352712 {
1436 write_libobj=${1}
1437 if test "$build_libtool_libs" = yes; then
1438 write_lobj=\'${2}\'
2713 write_libobj=$1
2714 if test yes = "$build_libtool_libs"; then
2715 write_lobj=\'$2\'
14392716 else
14402717 write_lobj=none
14412718 fi
14422719
1443 if test "$build_old_libs" = yes; then
1444 write_oldobj=\'${3}\'
2720 if test yes = "$build_old_libs"; then
2721 write_oldobj=\'$3\'
14452722 else
14462723 write_oldobj=none
14472724 fi
14492726 $opt_dry_run || {
14502727 cat >${write_libobj}T <<EOF
14512728 # $write_libobj - a libtool object file
1452 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
2729 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
14532730 #
14542731 # Please DO NOT delete this file!
14552732 # It is necessary for linking the library.
14612738 non_pic_object=$write_oldobj
14622739
14632740 EOF
1464 $MV "${write_libobj}T" "${write_libobj}"
2741 $MV "${write_libobj}T" "$write_libobj"
14652742 }
14662743 }
14672744
14812758 # be empty on error (or when ARG is empty)
14822759 func_convert_core_file_wine_to_w32 ()
14832760 {
1484 $opt_debug
1485 func_convert_core_file_wine_to_w32_result="$1"
2761 $debug_cmd
2762
2763 func_convert_core_file_wine_to_w32_result=$1
14862764 if test -n "$1"; then
14872765 # Unfortunately, winepath does not exit with a non-zero error code, so we
14882766 # are forced to check the contents of stdout. On the other hand, if the
14902768 # *an error message* to stdout. So we must check for both error code of
14912769 # zero AND non-empty stdout, which explains the odd construction:
14922770 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
1493 if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
2771 if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
14942772 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
1495 $SED -e "$lt_sed_naive_backslashify"`
2773 $SED -e "$sed_naive_backslashify"`
14962774 else
14972775 func_convert_core_file_wine_to_w32_result=
14982776 fi
15132791 # are convertible, then the result may be empty.
15142792 func_convert_core_path_wine_to_w32 ()
15152793 {
1516 $opt_debug
2794 $debug_cmd
2795
15172796 # unfortunately, winepath doesn't convert paths, only file names
1518 func_convert_core_path_wine_to_w32_result=""
2797 func_convert_core_path_wine_to_w32_result=
15192798 if test -n "$1"; then
15202799 oldIFS=$IFS
15212800 IFS=:
15222801 for func_convert_core_path_wine_to_w32_f in $1; do
15232802 IFS=$oldIFS
15242803 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
1525 if test -n "$func_convert_core_file_wine_to_w32_result" ; then
2804 if test -n "$func_convert_core_file_wine_to_w32_result"; then
15262805 if test -z "$func_convert_core_path_wine_to_w32_result"; then
1527 func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
2806 func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
15282807 else
15292808 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
15302809 fi
15532832 # environment variable; do not put it in $PATH.
15542833 func_cygpath ()
15552834 {
1556 $opt_debug
2835 $debug_cmd
2836
15572837 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
15582838 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
15592839 if test "$?" -ne 0; then
15622842 fi
15632843 else
15642844 func_cygpath_result=
1565 func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
2845 func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
15662846 fi
15672847 }
15682848 #end: func_cygpath
15732853 # result in func_convert_core_msys_to_w32_result.
15742854 func_convert_core_msys_to_w32 ()
15752855 {
1576 $opt_debug
2856 $debug_cmd
2857
15772858 # awkward: cmd appends spaces to result
15782859 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
1579 $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
2860 $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
15802861 }
15812862 #end: func_convert_core_msys_to_w32
15822863
15872868 # func_to_host_file_result to ARG1).
15882869 func_convert_file_check ()
15892870 {
1590 $opt_debug
1591 if test -z "$2" && test -n "$1" ; then
2871 $debug_cmd
2872
2873 if test -z "$2" && test -n "$1"; then
15922874 func_error "Could not determine host file name corresponding to"
1593 func_error " \`$1'"
2875 func_error " '$1'"
15942876 func_error "Continuing, but uninstalled executables may not work."
15952877 # Fallback:
1596 func_to_host_file_result="$1"
2878 func_to_host_file_result=$1
15972879 fi
15982880 }
15992881 # end func_convert_file_check
16052887 # func_to_host_file_result to a simplistic fallback value (see below).
16062888 func_convert_path_check ()
16072889 {
1608 $opt_debug
2890 $debug_cmd
2891
16092892 if test -z "$4" && test -n "$3"; then
16102893 func_error "Could not determine the host path corresponding to"
1611 func_error " \`$3'"
2894 func_error " '$3'"
16122895 func_error "Continuing, but uninstalled executables may not work."
16132896 # Fallback. This is a deliberately simplistic "conversion" and
16142897 # should not be "improved". See libtool.info.
16172900 func_to_host_path_result=`echo "$3" |
16182901 $SED -e "$lt_replace_pathsep_chars"`
16192902 else
1620 func_to_host_path_result="$3"
2903 func_to_host_path_result=$3
16212904 fi
16222905 fi
16232906 }
16292912 # and appending REPL if ORIG matches BACKPAT.
16302913 func_convert_path_front_back_pathsep ()
16312914 {
1632 $opt_debug
2915 $debug_cmd
2916
16332917 case $4 in
1634 $1 ) func_to_host_path_result="$3$func_to_host_path_result"
2918 $1 ) func_to_host_path_result=$3$func_to_host_path_result
16352919 ;;
16362920 esac
16372921 case $4 in
16452929 ##################################################
16462930 # $build to $host FILE NAME CONVERSION FUNCTIONS #
16472931 ##################################################
1648 # invoked via `$to_host_file_cmd ARG'
2932 # invoked via '$to_host_file_cmd ARG'
16492933 #
16502934 # In each case, ARG is the path to be converted from $build to $host format.
16512935 # Result will be available in $func_to_host_file_result.
16562940 # in func_to_host_file_result.
16572941 func_to_host_file ()
16582942 {
1659 $opt_debug
2943 $debug_cmd
2944
16602945 $to_host_file_cmd "$1"
16612946 }
16622947 # end func_to_host_file
16682953 # in (the comma separated) LAZY, no conversion takes place.
16692954 func_to_tool_file ()
16702955 {
1671 $opt_debug
2956 $debug_cmd
2957
16722958 case ,$2, in
16732959 *,"$to_tool_file_cmd",*)
16742960 func_to_tool_file_result=$1
16862972 # Copy ARG to func_to_host_file_result.
16872973 func_convert_file_noop ()
16882974 {
1689 func_to_host_file_result="$1"
2975 func_to_host_file_result=$1
16902976 }
16912977 # end func_convert_file_noop
16922978
16972983 # func_to_host_file_result.
16982984 func_convert_file_msys_to_w32 ()
16992985 {
1700 $opt_debug
1701 func_to_host_file_result="$1"
2986 $debug_cmd
2987
2988 func_to_host_file_result=$1
17022989 if test -n "$1"; then
17032990 func_convert_core_msys_to_w32 "$1"
1704 func_to_host_file_result="$func_convert_core_msys_to_w32_result"
2991 func_to_host_file_result=$func_convert_core_msys_to_w32_result
17052992 fi
17062993 func_convert_file_check "$1" "$func_to_host_file_result"
17072994 }
17133000 # func_to_host_file_result.
17143001 func_convert_file_cygwin_to_w32 ()
17153002 {
1716 $opt_debug
1717 func_to_host_file_result="$1"
3003 $debug_cmd
3004
3005 func_to_host_file_result=$1
17183006 if test -n "$1"; then
17193007 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
17203008 # LT_CYGPATH in this case.
17303018 # and a working winepath. Returns result in func_to_host_file_result.
17313019 func_convert_file_nix_to_w32 ()
17323020 {
1733 $opt_debug
1734 func_to_host_file_result="$1"
3021 $debug_cmd
3022
3023 func_to_host_file_result=$1
17353024 if test -n "$1"; then
17363025 func_convert_core_file_wine_to_w32 "$1"
1737 func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
3026 func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
17383027 fi
17393028 func_convert_file_check "$1" "$func_to_host_file_result"
17403029 }
17463035 # Returns result in func_to_host_file_result.
17473036 func_convert_file_msys_to_cygwin ()
17483037 {
1749 $opt_debug
1750 func_to_host_file_result="$1"
3038 $debug_cmd
3039
3040 func_to_host_file_result=$1
17513041 if test -n "$1"; then
17523042 func_convert_core_msys_to_w32 "$1"
17533043 func_cygpath -u "$func_convert_core_msys_to_w32_result"
1754 func_to_host_file_result="$func_cygpath_result"
3044 func_to_host_file_result=$func_cygpath_result
17553045 fi
17563046 func_convert_file_check "$1" "$func_to_host_file_result"
17573047 }
17643054 # in func_to_host_file_result.
17653055 func_convert_file_nix_to_cygwin ()
17663056 {
1767 $opt_debug
1768 func_to_host_file_result="$1"
3057 $debug_cmd
3058
3059 func_to_host_file_result=$1
17693060 if test -n "$1"; then
17703061 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
17713062 func_convert_core_file_wine_to_w32 "$1"
17723063 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
1773 func_to_host_file_result="$func_cygpath_result"
3064 func_to_host_file_result=$func_cygpath_result
17743065 fi
17753066 func_convert_file_check "$1" "$func_to_host_file_result"
17763067 }
17803071 #############################################
17813072 # $build to $host PATH CONVERSION FUNCTIONS #
17823073 #############################################
1783 # invoked via `$to_host_path_cmd ARG'
3074 # invoked via '$to_host_path_cmd ARG'
17843075 #
17853076 # In each case, ARG is the path to be converted from $build to $host format.
17863077 # The result will be available in $func_to_host_path_result.
18043095 to_host_path_cmd=
18053096 func_init_to_host_path_cmd ()
18063097 {
1807 $opt_debug
3098 $debug_cmd
3099
18083100 if test -z "$to_host_path_cmd"; then
18093101 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
1810 to_host_path_cmd="func_convert_path_${func_stripname_result}"
3102 to_host_path_cmd=func_convert_path_$func_stripname_result
18113103 fi
18123104 }
18133105
18173109 # in func_to_host_path_result.
18183110 func_to_host_path ()
18193111 {
1820 $opt_debug
3112 $debug_cmd
3113
18213114 func_init_to_host_path_cmd
18223115 $to_host_path_cmd "$1"
18233116 }
18283121 # Copy ARG to func_to_host_path_result.
18293122 func_convert_path_noop ()
18303123 {
1831 func_to_host_path_result="$1"
3124 func_to_host_path_result=$1
18323125 }
18333126 # end func_convert_path_noop
18343127
18393132 # func_to_host_path_result.
18403133 func_convert_path_msys_to_w32 ()
18413134 {
1842 $opt_debug
1843 func_to_host_path_result="$1"
3135 $debug_cmd
3136
3137 func_to_host_path_result=$1
18443138 if test -n "$1"; then
18453139 # Remove leading and trailing path separator characters from ARG. MSYS
18463140 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
18483142 func_stripname : : "$1"
18493143 func_to_host_path_tmp1=$func_stripname_result
18503144 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1851 func_to_host_path_result="$func_convert_core_msys_to_w32_result"
3145 func_to_host_path_result=$func_convert_core_msys_to_w32_result
18523146 func_convert_path_check : ";" \
18533147 "$func_to_host_path_tmp1" "$func_to_host_path_result"
18543148 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
18623156 # func_to_host_file_result.
18633157 func_convert_path_cygwin_to_w32 ()
18643158 {
1865 $opt_debug
1866 func_to_host_path_result="$1"
3159 $debug_cmd
3160
3161 func_to_host_path_result=$1
18673162 if test -n "$1"; then
18683163 # See func_convert_path_msys_to_w32:
18693164 func_stripname : : "$1"
18823177 # a working winepath. Returns result in func_to_host_file_result.
18833178 func_convert_path_nix_to_w32 ()
18843179 {
1885 $opt_debug
1886 func_to_host_path_result="$1"
3180 $debug_cmd
3181
3182 func_to_host_path_result=$1
18873183 if test -n "$1"; then
18883184 # See func_convert_path_msys_to_w32:
18893185 func_stripname : : "$1"
18903186 func_to_host_path_tmp1=$func_stripname_result
18913187 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1892 func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
3188 func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
18933189 func_convert_path_check : ";" \
18943190 "$func_to_host_path_tmp1" "$func_to_host_path_result"
18953191 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
19033199 # Returns result in func_to_host_file_result.
19043200 func_convert_path_msys_to_cygwin ()
19053201 {
1906 $opt_debug
1907 func_to_host_path_result="$1"
3202 $debug_cmd
3203
3204 func_to_host_path_result=$1
19083205 if test -n "$1"; then
19093206 # See func_convert_path_msys_to_w32:
19103207 func_stripname : : "$1"
19113208 func_to_host_path_tmp1=$func_stripname_result
19123209 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
19133210 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
1914 func_to_host_path_result="$func_cygpath_result"
3211 func_to_host_path_result=$func_cygpath_result
19153212 func_convert_path_check : : \
19163213 "$func_to_host_path_tmp1" "$func_to_host_path_result"
19173214 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
19263223 # func_to_host_file_result.
19273224 func_convert_path_nix_to_cygwin ()
19283225 {
1929 $opt_debug
1930 func_to_host_path_result="$1"
3226 $debug_cmd
3227
3228 func_to_host_path_result=$1
19313229 if test -n "$1"; then
19323230 # Remove leading and trailing path separator characters from
19333231 # ARG. msys behavior is inconsistent here, cygpath turns them
19363234 func_to_host_path_tmp1=$func_stripname_result
19373235 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
19383236 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
1939 func_to_host_path_result="$func_cygpath_result"
3237 func_to_host_path_result=$func_cygpath_result
19403238 func_convert_path_check : : \
19413239 "$func_to_host_path_tmp1" "$func_to_host_path_result"
19423240 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
19453243 # end func_convert_path_nix_to_cygwin
19463244
19473245
3246 # func_dll_def_p FILE
3247 # True iff FILE is a Windows DLL '.def' file.
3248 # Keep in sync with _LT_DLL_DEF_P in libtool.m4
3249 func_dll_def_p ()
3250 {
3251 $debug_cmd
3252
3253 func_dll_def_p_tmp=`$SED -n \
3254 -e 's/^[ ]*//' \
3255 -e '/^\(;.*\)*$/d' \
3256 -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
3257 -e q \
3258 "$1"`
3259 test DEF = "$func_dll_def_p_tmp"
3260 }
3261
3262
19483263 # func_mode_compile arg...
19493264 func_mode_compile ()
19503265 {
1951 $opt_debug
3266 $debug_cmd
3267
19523268 # Get the compilation command and the source file.
19533269 base_compile=
1954 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
3270 srcfile=$nonopt # always keep a non-empty value in "srcfile"
19553271 suppress_opt=yes
19563272 suppress_output=
19573273 arg_mode=normal
19643280 case $arg_mode in
19653281 arg )
19663282 # do not "continue". Instead, add this to base_compile
1967 lastarg="$arg"
3283 lastarg=$arg
19683284 arg_mode=normal
19693285 ;;
19703286
19713287 target )
1972 libobj="$arg"
3288 libobj=$arg
19733289 arg_mode=normal
19743290 continue
19753291 ;;
19793295 case $arg in
19803296 -o)
19813297 test -n "$libobj" && \
1982 func_fatal_error "you cannot specify \`-o' more than once"
3298 func_fatal_error "you cannot specify '-o' more than once"
19833299 arg_mode=target
19843300 continue
19853301 ;;
20083324 func_stripname '-Wc,' '' "$arg"
20093325 args=$func_stripname_result
20103326 lastarg=
2011 save_ifs="$IFS"; IFS=','
3327 save_ifs=$IFS; IFS=,
20123328 for arg in $args; do
2013 IFS="$save_ifs"
3329 IFS=$save_ifs
20143330 func_append_quoted lastarg "$arg"
20153331 done
2016 IFS="$save_ifs"
3332 IFS=$save_ifs
20173333 func_stripname ' ' '' "$lastarg"
20183334 lastarg=$func_stripname_result
20193335
20263342 # Accept the current argument as the source file.
20273343 # The previous "srcfile" becomes the current argument.
20283344 #
2029 lastarg="$srcfile"
2030 srcfile="$arg"
3345 lastarg=$srcfile
3346 srcfile=$arg
20313347 ;;
20323348 esac # case $arg
20333349 ;;
20423358 func_fatal_error "you must specify an argument for -Xcompile"
20433359 ;;
20443360 target)
2045 func_fatal_error "you must specify a target with \`-o'"
3361 func_fatal_error "you must specify a target with '-o'"
20463362 ;;
20473363 *)
20483364 # Get the name of the library object.
20493365 test -z "$libobj" && {
20503366 func_basename "$srcfile"
2051 libobj="$func_basename_result"
3367 libobj=$func_basename_result
20523368 }
20533369 ;;
20543370 esac
20683384 case $libobj in
20693385 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
20703386 *)
2071 func_fatal_error "cannot determine name of library object from \`$libobj'"
3387 func_fatal_error "cannot determine name of library object from '$libobj'"
20723388 ;;
20733389 esac
20743390
20773393 for arg in $later; do
20783394 case $arg in
20793395 -shared)
2080 test "$build_libtool_libs" != yes && \
2081 func_fatal_configuration "can not build a shared library"
3396 test yes = "$build_libtool_libs" \
3397 || func_fatal_configuration "cannot build a shared library"
20823398 build_old_libs=no
20833399 continue
20843400 ;;
21043420 func_quote_for_eval "$libobj"
21053421 test "X$libobj" != "X$func_quote_for_eval_result" \
21063422 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
2107 && func_warning "libobj name \`$libobj' may not contain shell special characters."
3423 && func_warning "libobj name '$libobj' may not contain shell special characters."
21083424 func_dirname_and_basename "$obj" "/" ""
2109 objname="$func_basename_result"
2110 xdir="$func_dirname_result"
2111 lobj=${xdir}$objdir/$objname
3425 objname=$func_basename_result
3426 xdir=$func_dirname_result
3427 lobj=$xdir$objdir/$objname
21123428
21133429 test -z "$base_compile" && \
21143430 func_fatal_help "you must specify a compilation command"
21153431
21163432 # Delete any leftover library objects.
2117 if test "$build_old_libs" = yes; then
3433 if test yes = "$build_old_libs"; then
21183434 removelist="$obj $lobj $libobj ${libobj}T"
21193435 else
21203436 removelist="$lobj $libobj ${libobj}T"
21263442 pic_mode=default
21273443 ;;
21283444 esac
2129 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
3445 if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
21303446 # non-PIC code in shared libraries is not supported
21313447 pic_mode=default
21323448 fi
21333449
21343450 # Calculate the filename of the output object if compiler does
21353451 # not support -o with -c
2136 if test "$compiler_c_o" = no; then
2137 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
2138 lockfile="$output_obj.lock"
3452 if test no = "$compiler_c_o"; then
3453 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
3454 lockfile=$output_obj.lock
21393455 else
21403456 output_obj=
21413457 need_locks=no
21443460
21453461 # Lock this critical section if it is needed
21463462 # We use this script file to make the link, it avoids creating a new file
2147 if test "$need_locks" = yes; then
3463 if test yes = "$need_locks"; then
21483464 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
21493465 func_echo "Waiting for $lockfile to be removed"
21503466 sleep 2
21513467 done
2152 elif test "$need_locks" = warn; then
3468 elif test warn = "$need_locks"; then
21533469 if test -f "$lockfile"; then
21543470 $ECHO "\
21553471 *** ERROR, $lockfile exists and contains:
21573473
21583474 This indicates that another process is trying to use the same
21593475 temporary object file, and libtool could not work around it because
2160 your compiler does not support \`-c' and \`-o' together. If you
3476 your compiler does not support '-c' and '-o' together. If you
21613477 repeat this compilation, it may succeed, by chance, but you had better
21623478 avoid parallel builds (make -j) in this platform, or get a better
21633479 compiler."
21793495 qsrcfile=$func_quote_for_eval_result
21803496
21813497 # Only build a PIC object if we are building libtool libraries.
2182 if test "$build_libtool_libs" = yes; then
3498 if test yes = "$build_libtool_libs"; then
21833499 # Without this assignment, base_compile gets emptied.
21843500 fbsd_hideous_sh_bug=$base_compile
21853501
2186 if test "$pic_mode" != no; then
3502 if test no != "$pic_mode"; then
21873503 command="$base_compile $qsrcfile $pic_flag"
21883504 else
21893505 # Don't build PIC code
22003516 func_show_eval_locale "$command" \
22013517 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
22023518
2203 if test "$need_locks" = warn &&
3519 if test warn = "$need_locks" &&
22043520 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
22053521 $ECHO "\
22063522 *** ERROR, $lockfile contains:
22113527
22123528 This indicates that another process is trying to use the same
22133529 temporary object file, and libtool could not work around it because
2214 your compiler does not support \`-c' and \`-o' together. If you
3530 your compiler does not support '-c' and '-o' together. If you
22153531 repeat this compilation, it may succeed, by chance, but you had better
22163532 avoid parallel builds (make -j) in this platform, or get a better
22173533 compiler."
22273543 fi
22283544
22293545 # Allow error messages only from the first compilation.
2230 if test "$suppress_opt" = yes; then
3546 if test yes = "$suppress_opt"; then
22313547 suppress_output=' >/dev/null 2>&1'
22323548 fi
22333549 fi
22343550
22353551 # Only build a position-dependent object if we build old libraries.
2236 if test "$build_old_libs" = yes; then
2237 if test "$pic_mode" != yes; then
3552 if test yes = "$build_old_libs"; then
3553 if test yes != "$pic_mode"; then
22383554 # Don't build PIC code
22393555 command="$base_compile $qsrcfile$pie_flag"
22403556 else
22413557 command="$base_compile $qsrcfile $pic_flag"
22423558 fi
2243 if test "$compiler_c_o" = yes; then
3559 if test yes = "$compiler_c_o"; then
22443560 func_append command " -o $obj"
22453561 fi
22463562
22493565 func_show_eval_locale "$command" \
22503566 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
22513567
2252 if test "$need_locks" = warn &&
3568 if test warn = "$need_locks" &&
22533569 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
22543570 $ECHO "\
22553571 *** ERROR, $lockfile contains:
22603576
22613577 This indicates that another process is trying to use the same
22623578 temporary object file, and libtool could not work around it because
2263 your compiler does not support \`-c' and \`-o' together. If you
3579 your compiler does not support '-c' and '-o' together. If you
22643580 repeat this compilation, it may succeed, by chance, but you had better
22653581 avoid parallel builds (make -j) in this platform, or get a better
22663582 compiler."
22803596 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
22813597
22823598 # Unlock the critical section if it was locked
2283 if test "$need_locks" != no; then
3599 if test no != "$need_locks"; then
22843600 removelist=$lockfile
22853601 $RM "$lockfile"
22863602 fi
22903606 }
22913607
22923608 $opt_help || {
2293 test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
3609 test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
22943610 }
22953611
22963612 func_mode_help ()
23103626 Remove files from the build directory.
23113627
23123628 RM is the name of the program to use to delete files associated with each FILE
2313 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
3629 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
23143630 to RM.
23153631
23163632 If FILE is a libtool library, object or program, all the files associated
23293645 -no-suppress do not suppress compiler output for multiple passes
23303646 -prefer-pic try to build PIC objects only
23313647 -prefer-non-pic try to build non-PIC objects only
2332 -shared do not build a \`.o' file suitable for static linking
2333 -static only build a \`.o' file suitable for static linking
3648 -shared do not build a '.o' file suitable for static linking
3649 -static only build a '.o' file suitable for static linking
23343650 -Wc,FLAG pass FLAG directly to the compiler
23353651
2336 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
3652 COMPILE-COMMAND is a command to be used in creating a 'standard' object file
23373653 from the given SOURCEFILE.
23383654
23393655 The output file name is determined by removing the directory component from
2340 SOURCEFILE, then substituting the C source code suffix \`.c' with the
2341 library object suffix, \`.lo'."
3656 SOURCEFILE, then substituting the C source code suffix '.c' with the
3657 library object suffix, '.lo'."
23423658 ;;
23433659
23443660 execute)
23513667
23523668 -dlopen FILE add the directory containing FILE to the library path
23533669
2354 This mode sets the library path environment variable according to \`-dlopen'
3670 This mode sets the library path environment variable according to '-dlopen'
23553671 flags.
23563672
23573673 If any of the ARGS are libtool executable wrappers, then they are translated
23703686 Each LIBDIR is a directory that contains libtool libraries.
23713687
23723688 The commands that this mode executes may require superuser privileges. Use
2373 the \`--dry-run' option if you just want to see what would be executed."
3689 the '--dry-run' option if you just want to see what would be executed."
23743690 ;;
23753691
23763692 install)
23803696 Install executables or libraries.
23813697
23823698 INSTALL-COMMAND is the installation command. The first component should be
2383 either the \`install' or \`cp' program.
3699 either the 'install' or 'cp' program.
23843700
23853701 The following components of INSTALL-COMMAND are treated specially:
23863702
24063722 -avoid-version do not add a version suffix if possible
24073723 -bindir BINDIR specify path to binaries directory (for systems where
24083724 libraries must be found in the PATH setting at runtime)
2409 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
3725 -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
24103726 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
24113727 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
24123728 -export-symbols SYMFILE
24203736 -no-install link a not-installable executable
24213737 -no-undefined declare that a library does not refer to external symbols
24223738 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
2423 -objectlist FILE Use a list of object files found in FILE to specify objects
3739 -objectlist FILE use a list of object files found in FILE to specify objects
3740 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
24243741 -precious-files-regex REGEX
24253742 don't remove output files matching REGEX
24263743 -release RELEASE specify package release information
24403757 -Xlinker FLAG pass linker-specific FLAG directly to the linker
24413758 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
24423759
2443 All other options (arguments beginning with \`-') are ignored.
2444
2445 Every other argument is treated as a filename. Files ending in \`.la' are
3760 All other options (arguments beginning with '-') are ignored.
3761
3762 Every other argument is treated as a filename. Files ending in '.la' are
24463763 treated as uninstalled libtool libraries, other files are standard or library
24473764 object files.
24483765
2449 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
2450 only library objects (\`.lo' files) may be specified, and \`-rpath' is
3766 If the OUTPUT-FILE ends in '.la', then a libtool library is created,
3767 only library objects ('.lo' files) may be specified, and '-rpath' is
24513768 required, except when creating a convenience library.
24523769
2453 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
2454 using \`ar' and \`ranlib', or on Windows using \`lib'.
2455
2456 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
3770 If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
3771 using 'ar' and 'ranlib', or on Windows using 'lib'.
3772
3773 If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
24573774 is created, otherwise an executable program is created."
24583775 ;;
24593776
24643781 Remove libraries from an installation directory.
24653782
24663783 RM is the name of the program to use to delete files associated with each FILE
2467 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
3784 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
24683785 to RM.
24693786
24703787 If FILE is a libtool library, all the files associated with it are deleted.
24723789 ;;
24733790
24743791 *)
2475 func_fatal_help "invalid operation mode \`$opt_mode'"
3792 func_fatal_help "invalid operation mode '$opt_mode'"
24763793 ;;
24773794 esac
24783795
24793796 echo
2480 $ECHO "Try \`$progname --help' for more information about other modes."
3797 $ECHO "Try '$progname --help' for more information about other modes."
24813798 }
24823799
24833800 # Now that we've collected a possible --mode arg, show help if necessary
24843801 if $opt_help; then
2485 if test "$opt_help" = :; then
3802 if test : = "$opt_help"; then
24863803 func_mode_help
24873804 else
24883805 {
24903807 for opt_mode in compile link execute install finish uninstall clean; do
24913808 func_mode_help
24923809 done
2493 } | sed -n '1p; 2,$s/^Usage:/ or: /p'
3810 } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
24943811 {
24953812 func_help noexit
24963813 for opt_mode in compile link execute install finish uninstall clean; do
24983815 func_mode_help
24993816 done
25003817 } |
2501 sed '1d
3818 $SED '1d
25023819 /^When reporting/,/^Report/{
25033820 H
25043821 d
25153832 # func_mode_execute arg...
25163833 func_mode_execute ()
25173834 {
2518 $opt_debug
3835 $debug_cmd
3836
25193837 # The first argument is the command name.
2520 cmd="$nonopt"
3838 cmd=$nonopt
25213839 test -z "$cmd" && \
25223840 func_fatal_help "you must specify a COMMAND"
25233841
25243842 # Handle -dlopen flags immediately.
25253843 for file in $opt_dlopen; do
25263844 test -f "$file" \
2527 || func_fatal_help "\`$file' is not a file"
3845 || func_fatal_help "'$file' is not a file"
25283846
25293847 dir=
25303848 case $file in
25343852
25353853 # Check to see that this really is a libtool archive.
25363854 func_lalib_unsafe_p "$file" \
2537 || func_fatal_help "\`$lib' is not a valid libtool archive"
3855 || func_fatal_help "'$lib' is not a valid libtool archive"
25383856
25393857 # Read the libtool library.
25403858 dlname=
25453863 if test -z "$dlname"; then
25463864 # Warn if it was a shared library.
25473865 test -n "$library_names" && \
2548 func_warning "\`$file' was not linked with \`-export-dynamic'"
3866 func_warning "'$file' was not linked with '-export-dynamic'"
25493867 continue
25503868 fi
25513869
25523870 func_dirname "$file" "" "."
2553 dir="$func_dirname_result"
3871 dir=$func_dirname_result
25543872
25553873 if test -f "$dir/$objdir/$dlname"; then
25563874 func_append dir "/$objdir"
25573875 else
25583876 if test ! -f "$dir/$dlname"; then
2559 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
3877 func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
25603878 fi
25613879 fi
25623880 ;;
25643882 *.lo)
25653883 # Just add the directory containing the .lo file.
25663884 func_dirname "$file" "" "."
2567 dir="$func_dirname_result"
3885 dir=$func_dirname_result
25683886 ;;
25693887
25703888 *)
2571 func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
3889 func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
25723890 continue
25733891 ;;
25743892 esac
25753893
25763894 # Get the absolute pathname.
25773895 absdir=`cd "$dir" && pwd`
2578 test -n "$absdir" && dir="$absdir"
3896 test -n "$absdir" && dir=$absdir
25793897
25803898 # Now add the directory to shlibpath_var.
25813899 if eval "test -z \"\$$shlibpath_var\""; then
25873905
25883906 # This variable tells wrapper scripts just to set shlibpath_var
25893907 # rather than running their programs.
2590 libtool_execute_magic="$magic"
3908 libtool_execute_magic=$magic
25913909
25923910 # Check if any of the arguments is a wrapper script.
25933911 args=
26003918 if func_ltwrapper_script_p "$file"; then
26013919 func_source "$file"
26023920 # Transform arg to wrapped name.
2603 file="$progdir/$program"
3921 file=$progdir/$program
26043922 elif func_ltwrapper_executable_p "$file"; then
26053923 func_ltwrapper_scriptname "$file"
26063924 func_source "$func_ltwrapper_scriptname_result"
26073925 # Transform arg to wrapped name.
2608 file="$progdir/$program"
3926 file=$progdir/$program
26093927 fi
26103928 ;;
26113929 esac
26133931 func_append_quoted args "$file"
26143932 done
26153933
2616 if test "X$opt_dry_run" = Xfalse; then
3934 if $opt_dry_run; then
3935 # Display what would be done.
3936 if test -n "$shlibpath_var"; then
3937 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
3938 echo "export $shlibpath_var"
3939 fi
3940 $ECHO "$cmd$args"
3941 exit $EXIT_SUCCESS
3942 else
26173943 if test -n "$shlibpath_var"; then
26183944 # Export the shlibpath_var.
26193945 eval "export $shlibpath_var"
26303956 done
26313957
26323958 # Now prepare to actually exec the command.
2633 exec_cmd="\$cmd$args"
2634 else
2635 # Display what would be done.
2636 if test -n "$shlibpath_var"; then
2637 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
2638 echo "export $shlibpath_var"
2639 fi
2640 $ECHO "$cmd$args"
2641 exit $EXIT_SUCCESS
3959 exec_cmd=\$cmd$args
26423960 fi
26433961 }
26443962
2645 test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
3963 test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
26463964
26473965
26483966 # func_mode_finish arg...
26493967 func_mode_finish ()
26503968 {
2651 $opt_debug
3969 $debug_cmd
3970
26523971 libs=
26533972 libdirs=
26543973 admincmds=
26623981 if func_lalib_unsafe_p "$opt"; then
26633982 func_append libs " $opt"
26643983 else
2665 func_warning "\`$opt' is not a valid libtool archive"
3984 func_warning "'$opt' is not a valid libtool archive"
26663985 fi
26673986
26683987 else
2669 func_fatal_error "invalid argument \`$opt'"
3988 func_fatal_error "invalid argument '$opt'"
26703989 fi
26713990 done
26723991
26814000 # Remove sysroot references
26824001 if $opt_dry_run; then
26834002 for lib in $libs; do
2684 echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
4003 echo "removing references to $lt_sysroot and '=' prefixes from $lib"
26854004 done
26864005 else
26874006 tmpdir=`func_mktempdir`
26884007 for lib in $libs; do
2689 sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
4008 $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
26904009 > $tmpdir/tmp-la
26914010 mv -f $tmpdir/tmp-la $lib
26924011 done
27114030 fi
27124031
27134032 # Exit here if they wanted silent mode.
2714 $opt_silent && exit $EXIT_SUCCESS
4033 $opt_quiet && exit $EXIT_SUCCESS
27154034
27164035 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
27174036 echo "----------------------------------------------------------------------"
27224041 echo
27234042 echo "If you ever happen to want to link against installed libraries"
27244043 echo "in a given directory, LIBDIR, you must either use libtool, and"
2725 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
4044 echo "specify the full pathname of the library, or use the '-LLIBDIR'"
27264045 echo "flag during linking and do at least one of the following:"
27274046 if test -n "$shlibpath_var"; then
2728 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
4047 echo " - add LIBDIR to the '$shlibpath_var' environment variable"
27294048 echo " during execution"
27304049 fi
27314050 if test -n "$runpath_var"; then
2732 echo " - add LIBDIR to the \`$runpath_var' environment variable"
4051 echo " - add LIBDIR to the '$runpath_var' environment variable"
27334052 echo " during linking"
27344053 fi
27354054 if test -n "$hardcode_libdir_flag_spec"; then
27364055 libdir=LIBDIR
27374056 eval flag=\"$hardcode_libdir_flag_spec\"
27384057
2739 $ECHO " - use the \`$flag' linker flag"
4058 $ECHO " - use the '$flag' linker flag"
27404059 fi
27414060 if test -n "$admincmds"; then
27424061 $ECHO " - have your system administrator run these commands:$admincmds"
27434062 fi
27444063 if test -f /etc/ld.so.conf; then
2745 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
4064 echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
27464065 fi
27474066 echo
27484067
27614080 exit $EXIT_SUCCESS
27624081 }
27634082
2764 test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
4083 test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
27654084
27664085
27674086 # func_mode_install arg...
27684087 func_mode_install ()
27694088 {
2770 $opt_debug
4089 $debug_cmd
4090
27714091 # There may be an optional sh(1) argument at the beginning of
27724092 # install_prog (especially on Windows NT).
2773 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
4093 if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
27744094 # Allow the use of GNU shtool's install command.
2775 case $nonopt in *shtool*) :;; *) false;; esac; then
4095 case $nonopt in *shtool*) :;; *) false;; esac
4096 then
27764097 # Aesthetically quote it.
27774098 func_quote_for_eval "$nonopt"
27784099 install_prog="$func_quote_for_eval_result "
27994120 opts=
28004121 prev=
28014122 install_type=
2802 isdir=no
4123 isdir=false
28034124 stripme=
28044125 no_mode=:
28054126 for arg
28124133 fi
28134134
28144135 case $arg in
2815 -d) isdir=yes ;;
4136 -d) isdir=: ;;
28164137 -f)
28174138 if $install_cp; then :; else
28184139 prev=$arg
28304151 *)
28314152 # If the previous option needed an argument, then skip it.
28324153 if test -n "$prev"; then
2833 if test "x$prev" = x-m && test -n "$install_override_mode"; then
4154 if test X-m = "X$prev" && test -n "$install_override_mode"; then
28344155 arg2=$install_override_mode
28354156 no_mode=false
28364157 fi
28554176 func_fatal_help "you must specify an install program"
28564177
28574178 test -n "$prev" && \
2858 func_fatal_help "the \`$prev' option requires an argument"
4179 func_fatal_help "the '$prev' option requires an argument"
28594180
28604181 if test -n "$install_override_mode" && $no_mode; then
28614182 if $install_cp; then :; else
28774198 dest=$func_stripname_result
28784199
28794200 # Check to see that the destination is a directory.
2880 test -d "$dest" && isdir=yes
2881 if test "$isdir" = yes; then
2882 destdir="$dest"
4201 test -d "$dest" && isdir=:
4202 if $isdir; then
4203 destdir=$dest
28834204 destname=
28844205 else
28854206 func_dirname_and_basename "$dest" "" "."
2886 destdir="$func_dirname_result"
2887 destname="$func_basename_result"
4207 destdir=$func_dirname_result
4208 destname=$func_basename_result
28884209
28894210 # Not a directory, so check to see that there is only one file specified.
28904211 set dummy $files; shift
28914212 test "$#" -gt 1 && \
2892 func_fatal_help "\`$dest' is not a directory"
4213 func_fatal_help "'$dest' is not a directory"
28934214 fi
28944215 case $destdir in
28954216 [\\/]* | [A-Za-z]:[\\/]*) ;;
28984219 case $file in
28994220 *.lo) ;;
29004221 *)
2901 func_fatal_help "\`$destdir' must be an absolute directory name"
4222 func_fatal_help "'$destdir' must be an absolute directory name"
29024223 ;;
29034224 esac
29044225 done
29074228
29084229 # This variable tells wrapper scripts just to set variables rather
29094230 # than running their programs.
2910 libtool_install_magic="$magic"
4231 libtool_install_magic=$magic
29114232
29124233 staticlibs=
29134234 future_libdirs=
29274248
29284249 # Check to see that this really is a libtool archive.
29294250 func_lalib_unsafe_p "$file" \
2930 || func_fatal_help "\`$file' is not a valid libtool archive"
4251 || func_fatal_help "'$file' is not a valid libtool archive"
29314252
29324253 library_names=
29334254 old_library=
29494270 fi
29504271
29514272 func_dirname "$file" "/" ""
2952 dir="$func_dirname_result"
4273 dir=$func_dirname_result
29534274 func_append dir "$objdir"
29544275
29554276 if test -n "$relink_command"; then
29634284 # are installed into $libdir/../bin (currently, that works fine)
29644285 # but it's something to keep an eye on.
29654286 test "$inst_prefix_dir" = "$destdir" && \
2966 func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
4287 func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
29674288
29684289 if test -n "$inst_prefix_dir"; then
29694290 # Stick the inst_prefix_dir data into the link command.
29724293 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
29734294 fi
29744295
2975 func_warning "relinking \`$file'"
4296 func_warning "relinking '$file'"
29764297 func_show_eval "$relink_command" \
2977 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
4298 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
29784299 fi
29794300
29804301 # See the names of the shared library.
29814302 set dummy $library_names; shift
29824303 if test -n "$1"; then
2983 realname="$1"
4304 realname=$1
29844305 shift
29854306
2986 srcname="$realname"
2987 test -n "$relink_command" && srcname="$realname"T
4307 srcname=$realname
4308 test -n "$relink_command" && srcname=${realname}T
29884309
29894310 # Install the shared library and build the symlinks.
29904311 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
29914312 'exit $?'
2992 tstripme="$stripme"
4313 tstripme=$stripme
29934314 case $host_os in
29944315 cygwin* | mingw* | pw32* | cegcc*)
29954316 case $realname in
29964317 *.dll.a)
2997 tstripme=""
4318 tstripme=
4319 ;;
4320 esac
4321 ;;
4322 os2*)
4323 case $realname in
4324 *_dll.a)
4325 tstripme=
29984326 ;;
29994327 esac
30004328 ;;
30054333
30064334 if test "$#" -gt 0; then
30074335 # Delete the old symlinks, and create new ones.
3008 # Try `ln -sf' first, because the `ln' binary might depend on
4336 # Try 'ln -sf' first, because the 'ln' binary might depend on
30094337 # the symlink we replace! Solaris /bin/ln does not understand -f,
30104338 # so we also need to try rm && ln -s.
30114339 for linkname
30164344 fi
30174345
30184346 # Do each command in the postinstall commands.
3019 lib="$destdir/$realname"
4347 lib=$destdir/$realname
30204348 func_execute_cmds "$postinstall_cmds" 'exit $?'
30214349 fi
30224350
30234351 # Install the pseudo-library for information purposes.
30244352 func_basename "$file"
3025 name="$func_basename_result"
3026 instname="$dir/$name"i
4353 name=$func_basename_result
4354 instname=$dir/${name}i
30274355 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
30284356
30294357 # Maybe install the static library, too.
30354363
30364364 # Figure out destination file name, if it wasn't already specified.
30374365 if test -n "$destname"; then
3038 destfile="$destdir/$destname"
4366 destfile=$destdir/$destname
30394367 else
30404368 func_basename "$file"
3041 destfile="$func_basename_result"
3042 destfile="$destdir/$destfile"
4369 destfile=$func_basename_result
4370 destfile=$destdir/$destfile
30434371 fi
30444372
30454373 # Deduce the name of the destination old-style object file.
30494377 staticdest=$func_lo2o_result
30504378 ;;
30514379 *.$objext)
3052 staticdest="$destfile"
4380 staticdest=$destfile
30534381 destfile=
30544382 ;;
30554383 *)
3056 func_fatal_help "cannot copy a libtool object to \`$destfile'"
4384 func_fatal_help "cannot copy a libtool object to '$destfile'"
30574385 ;;
30584386 esac
30594387
30624390 func_show_eval "$install_prog $file $destfile" 'exit $?'
30634391
30644392 # Install the old object if enabled.
3065 if test "$build_old_libs" = yes; then
4393 if test yes = "$build_old_libs"; then
30664394 # Deduce the name of the old-style object file.
30674395 func_lo2o "$file"
30684396 staticobj=$func_lo2o_result
30744402 *)
30754403 # Figure out destination file name, if it wasn't already specified.
30764404 if test -n "$destname"; then
3077 destfile="$destdir/$destname"
4405 destfile=$destdir/$destname
30784406 else
30794407 func_basename "$file"
3080 destfile="$func_basename_result"
3081 destfile="$destdir/$destfile"
4408 destfile=$func_basename_result
4409 destfile=$destdir/$destfile
30824410 fi
30834411
30844412 # If the file is missing, and there is a .exe on the end, strip it
30854413 # because it is most likely a libtool script we actually want to
30864414 # install
3087 stripped_ext=""
4415 stripped_ext=
30884416 case $file in
30894417 *.exe)
30904418 if test ! -f "$file"; then
30914419 func_stripname '' '.exe' "$file"
30924420 file=$func_stripname_result
3093 stripped_ext=".exe"
4421 stripped_ext=.exe
30944422 fi
30954423 ;;
30964424 esac
31184446
31194447 # Check the variables that should have been set.
31204448 test -z "$generated_by_libtool_version" && \
3121 func_fatal_error "invalid libtool wrapper script \`$wrapper'"
3122
3123 finalize=yes
4449 func_fatal_error "invalid libtool wrapper script '$wrapper'"
4450
4451 finalize=:
31244452 for lib in $notinst_deplibs; do
31254453 # Check to see that each library is installed.
31264454 libdir=
31274455 if test -f "$lib"; then
31284456 func_source "$lib"
31294457 fi
3130 libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
4458 libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
31314459 if test -n "$libdir" && test ! -f "$libfile"; then
3132 func_warning "\`$lib' has not been installed in \`$libdir'"
3133 finalize=no
4460 func_warning "'$lib' has not been installed in '$libdir'"
4461 finalize=false
31344462 fi
31354463 done
31364464
31384466 func_source "$wrapper"
31394467
31404468 outputname=
3141 if test "$fast_install" = no && test -n "$relink_command"; then
4469 if test no = "$fast_install" && test -n "$relink_command"; then
31424470 $opt_dry_run || {
3143 if test "$finalize" = yes; then
4471 if $finalize; then
31444472 tmpdir=`func_mktempdir`
31454473 func_basename "$file$stripped_ext"
3146 file="$func_basename_result"
3147 outputname="$tmpdir/$file"
4474 file=$func_basename_result
4475 outputname=$tmpdir/$file
31484476 # Replace the output file specification.
31494477 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
31504478
3151 $opt_silent || {
4479 $opt_quiet || {
31524480 func_quote_for_expand "$relink_command"
31534481 eval "func_echo $func_quote_for_expand_result"
31544482 }
31554483 if eval "$relink_command"; then :
31564484 else
3157 func_error "error: relink \`$file' with the above command before installing it"
4485 func_error "error: relink '$file' with the above command before installing it"
31584486 $opt_dry_run || ${RM}r "$tmpdir"
31594487 continue
31604488 fi
3161 file="$outputname"
4489 file=$outputname
31624490 else
3163 func_warning "cannot relink \`$file'"
4491 func_warning "cannot relink '$file'"
31644492 fi
31654493 }
31664494 else
31974525
31984526 for file in $staticlibs; do
31994527 func_basename "$file"
3200 name="$func_basename_result"
4528 name=$func_basename_result
32014529
32024530 # Set up the ranlib parameters.
3203 oldlib="$destdir/$name"
4531 oldlib=$destdir/$name
32044532 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
32054533 tool_oldlib=$func_to_tool_file_result
32064534
32154543 done
32164544
32174545 test -n "$future_libdirs" && \
3218 func_warning "remember to run \`$progname --finish$future_libdirs'"
4546 func_warning "remember to run '$progname --finish$future_libdirs'"
32194547
32204548 if test -n "$current_libdirs"; then
32214549 # Maybe just do a dry run.
32224550 $opt_dry_run && current_libdirs=" -n$current_libdirs"
3223 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
4551 exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
32244552 else
32254553 exit $EXIT_SUCCESS
32264554 fi
32274555 }
32284556
3229 test "$opt_mode" = install && func_mode_install ${1+"$@"}
4557 test install = "$opt_mode" && func_mode_install ${1+"$@"}
32304558
32314559
32324560 # func_generate_dlsyms outputname originator pic_p
32344562 # a dlpreopen symbol table.
32354563 func_generate_dlsyms ()
32364564 {
3237 $opt_debug
3238 my_outputname="$1"
3239 my_originator="$2"
3240 my_pic_p="${3-no}"
3241 my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
4565 $debug_cmd
4566
4567 my_outputname=$1
4568 my_originator=$2
4569 my_pic_p=${3-false}
4570 my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
32424571 my_dlsyms=
32434572
3244 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4573 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
32454574 if test -n "$NM" && test -n "$global_symbol_pipe"; then
3246 my_dlsyms="${my_outputname}S.c"
4575 my_dlsyms=${my_outputname}S.c
32474576 else
32484577 func_error "not configured to extract global symbols from dlpreopened files"
32494578 fi
32544583 "") ;;
32554584 *.c)
32564585 # Discover the nlist of each of the dlfiles.
3257 nlist="$output_objdir/${my_outputname}.nm"
4586 nlist=$output_objdir/$my_outputname.nm
32584587
32594588 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
32604589
32624591 func_verbose "creating $output_objdir/$my_dlsyms"
32634592
32644593 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
3265 /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
3266 /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
4594 /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
4595 /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
32674596
32684597 #ifdef __cplusplus
32694598 extern \"C\" {
32704599 #endif
32714600
3272 #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
4601 #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
32734602 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
32744603 #endif
32754604
32764605 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3277 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3278 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4606 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4607 /* DATA imports from DLLs on WIN32 can't be const, because runtime
32794608 relocations are performed -- see ld's documentation on pseudo-relocs. */
32804609 # define LT_DLSYM_CONST
3281 #elif defined(__osf__)
4610 #elif defined __osf__
32824611 /* This system does not cope well with relocations in const data. */
32834612 # define LT_DLSYM_CONST
32844613 #else
32854614 # define LT_DLSYM_CONST const
32864615 #endif
32874616
4617 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
4618
32884619 /* External symbol declarations for the compiler. */\
32894620 "
32904621
3291 if test "$dlself" = yes; then
3292 func_verbose "generating symbol list for \`$output'"
4622 if test yes = "$dlself"; then
4623 func_verbose "generating symbol list for '$output'"
32934624
32944625 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
32954626
32974628 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
32984629 for progfile in $progfiles; do
32994630 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3300 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
4631 func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
33014632 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
33024633 done
33034634
33174648
33184649 # Prepare the list of exported symbols
33194650 if test -z "$export_symbols"; then
3320 export_symbols="$output_objdir/$outputname.exp"
4651 export_symbols=$output_objdir/$outputname.exp
33214652 $opt_dry_run || {
33224653 $RM $export_symbols
3323 eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4654 eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
33244655 case $host in
33254656 *cygwin* | *mingw* | *cegcc* )
33264657 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
33304661 }
33314662 else
33324663 $opt_dry_run || {
3333 eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4664 eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
33344665 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
33354666 eval '$MV "$nlist"T "$nlist"'
33364667 case $host in
33444675 fi
33454676
33464677 for dlprefile in $dlprefiles; do
3347 func_verbose "extracting global C symbols from \`$dlprefile'"
4678 func_verbose "extracting global C symbols from '$dlprefile'"
33484679 func_basename "$dlprefile"
3349 name="$func_basename_result"
4680 name=$func_basename_result
33504681 case $host in
33514682 *cygwin* | *mingw* | *cegcc* )
33524683 # if an import library, we need to obtain dlname
33534684 if func_win32_import_lib_p "$dlprefile"; then
33544685 func_tr_sh "$dlprefile"
33554686 eval "curr_lafile=\$libfile_$func_tr_sh_result"
3356 dlprefile_dlbasename=""
4687 dlprefile_dlbasename=
33574688 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
33584689 # Use subshell, to avoid clobbering current variable values
33594690 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3360 if test -n "$dlprefile_dlname" ; then
4691 if test -n "$dlprefile_dlname"; then
33614692 func_basename "$dlprefile_dlname"
3362 dlprefile_dlbasename="$func_basename_result"
4693 dlprefile_dlbasename=$func_basename_result
33634694 else
33644695 # no lafile. user explicitly requested -dlpreopen <import library>.
33654696 $sharedlib_from_linklib_cmd "$dlprefile"
33674698 fi
33684699 fi
33694700 $opt_dry_run || {
3370 if test -n "$dlprefile_dlbasename" ; then
4701 if test -n "$dlprefile_dlbasename"; then
33714702 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
33724703 else
33734704 func_warning "Could not compute DLL name from $name"
34234754 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
34244755 fi
34254756
4757 func_show_eval '$RM "${nlist}I"'
4758 if test -n "$global_symbol_to_import"; then
4759 eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
4760 fi
4761
34264762 echo >> "$output_objdir/$my_dlsyms" "\
34274763
34284764 /* The mapping between symbol names and symbols. */
34314767 void *address;
34324768 } lt_dlsymlist;
34334769 extern LT_DLSYM_CONST lt_dlsymlist
3434 lt_${my_prefix}_LTX_preloaded_symbols[];
4770 lt_${my_prefix}_LTX_preloaded_symbols[];\
4771 "
4772
4773 if test -s "$nlist"I; then
4774 echo >> "$output_objdir/$my_dlsyms" "\
4775 static void lt_syminit(void)
4776 {
4777 LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
4778 for (; symbol->name; ++symbol)
4779 {"
4780 $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
4781 echo >> "$output_objdir/$my_dlsyms" "\
4782 }
4783 }"
4784 fi
4785 echo >> "$output_objdir/$my_dlsyms" "\
34354786 LT_DLSYM_CONST lt_dlsymlist
34364787 lt_${my_prefix}_LTX_preloaded_symbols[] =
3437 {\
3438 { \"$my_originator\", (void *) 0 },"
4788 { {\"$my_originator\", (void *) 0},"
4789
4790 if test -s "$nlist"I; then
4791 echo >> "$output_objdir/$my_dlsyms" "\
4792 {\"@INIT@\", (void *) &lt_syminit},"
4793 fi
34394794
34404795 case $need_lib_prefix in
34414796 no)
34774832 *-*-hpux*)
34784833 pic_flag_for_symtable=" $pic_flag" ;;
34794834 *)
3480 if test "X$my_pic_p" != Xno; then
3481 pic_flag_for_symtable=" $pic_flag"
3482 fi
4835 $my_pic_p && pic_flag_for_symtable=" $pic_flag"
34834836 ;;
34844837 esac
34854838 ;;
34964849 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
34974850
34984851 # Clean up the generated files.
3499 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
4852 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
35004853
35014854 # Transform the symbol file into the correct name.
3502 symfileobj="$output_objdir/${my_outputname}S.$objext"
4855 symfileobj=$output_objdir/${my_outputname}S.$objext
35034856 case $host in
35044857 *cygwin* | *mingw* | *cegcc* )
35054858 if test -f "$output_objdir/$my_outputname.def"; then
35174870 esac
35184871 ;;
35194872 *)
3520 func_fatal_error "unknown suffix for \`$my_dlsyms'"
4873 func_fatal_error "unknown suffix for '$my_dlsyms'"
35214874 ;;
35224875 esac
35234876 else
35294882 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
35304883 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
35314884 fi
4885 }
4886
4887 # func_cygming_gnu_implib_p ARG
4888 # This predicate returns with zero status (TRUE) if
4889 # ARG is a GNU/binutils-style import library. Returns
4890 # with nonzero status (FALSE) otherwise.
4891 func_cygming_gnu_implib_p ()
4892 {
4893 $debug_cmd
4894
4895 func_to_tool_file "$1" func_convert_file_msys_to_w32
4896 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
4897 test -n "$func_cygming_gnu_implib_tmp"
4898 }
4899
4900 # func_cygming_ms_implib_p ARG
4901 # This predicate returns with zero status (TRUE) if
4902 # ARG is an MS-style import library. Returns
4903 # with nonzero status (FALSE) otherwise.
4904 func_cygming_ms_implib_p ()
4905 {
4906 $debug_cmd
4907
4908 func_to_tool_file "$1" func_convert_file_msys_to_w32
4909 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
4910 test -n "$func_cygming_ms_implib_tmp"
35324911 }
35334912
35344913 # func_win32_libid arg
35404919 # Despite the name, also deal with 64 bit binaries.
35414920 func_win32_libid ()
35424921 {
3543 $opt_debug
3544 win32_libid_type="unknown"
4922 $debug_cmd
4923
4924 win32_libid_type=unknown
35454925 win32_fileres=`file -L $1 2>/dev/null`
35464926 case $win32_fileres in
35474927 *ar\ archive\ import\ library*) # definitely import
35514931 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
35524932 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
35534933 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
3554 func_to_tool_file "$1" func_convert_file_msys_to_w32
3555 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
3556 $SED -n -e '
4934 case $nm_interface in
4935 "MS dumpbin")
4936 if func_cygming_ms_implib_p "$1" ||
4937 func_cygming_gnu_implib_p "$1"
4938 then
4939 win32_nmres=import
4940 else
4941 win32_nmres=
4942 fi
4943 ;;
4944 *)
4945 func_to_tool_file "$1" func_convert_file_msys_to_w32
4946 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
4947 $SED -n -e '
35574948 1,100{
35584949 / I /{
3559 s,.*,import,
4950 s|.*|import|
35604951 p
35614952 q
35624953 }
35634954 }'`
4955 ;;
4956 esac
35644957 case $win32_nmres in
35654958 import*) win32_libid_type="x86 archive import";;
35664959 *) win32_libid_type="x86 archive static";;
35924985 # $sharedlib_from_linklib_result
35934986 func_cygming_dll_for_implib ()
35944987 {
3595 $opt_debug
4988 $debug_cmd
4989
35964990 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
35974991 }
35984992
36095003 # specified import library.
36105004 func_cygming_dll_for_implib_fallback_core ()
36115005 {
3612 $opt_debug
5006 $debug_cmd
5007
36135008 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
36145009 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
36155010 $SED '/^Contents of section '"$match_literal"':/{
36455040 /./p' |
36465041 # we now have a list, one entry per line, of the stringified
36475042 # contents of the appropriate section of all members of the
3648 # archive which possess that section. Heuristic: eliminate
3649 # all those which have a first or second character that is
5043 # archive that possess that section. Heuristic: eliminate
5044 # all those that have a first or second character that is
36505045 # a '.' (that is, objdump's representation of an unprintable
36515046 # character.) This should work for all archives with less than
36525047 # 0x302f exports -- but will fail for DLLs whose name actually
36555050 #
36565051 # Of those that remain, print the first one.
36575052 $SED -e '/^\./d;/^.\./d;q'
3658 }
3659
3660 # func_cygming_gnu_implib_p ARG
3661 # This predicate returns with zero status (TRUE) if
3662 # ARG is a GNU/binutils-style import library. Returns
3663 # with nonzero status (FALSE) otherwise.
3664 func_cygming_gnu_implib_p ()
3665 {
3666 $opt_debug
3667 func_to_tool_file "$1" func_convert_file_msys_to_w32
3668 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
3669 test -n "$func_cygming_gnu_implib_tmp"
3670 }
3671
3672 # func_cygming_ms_implib_p ARG
3673 # This predicate returns with zero status (TRUE) if
3674 # ARG is an MS-style import library. Returns
3675 # with nonzero status (FALSE) otherwise.
3676 func_cygming_ms_implib_p ()
3677 {
3678 $opt_debug
3679 func_to_tool_file "$1" func_convert_file_msys_to_w32
3680 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3681 test -n "$func_cygming_ms_implib_tmp"
36825053 }
36835054
36845055 # func_cygming_dll_for_implib_fallback ARG
36945065 # $sharedlib_from_linklib_result
36955066 func_cygming_dll_for_implib_fallback ()
36965067 {
3697 $opt_debug
3698 if func_cygming_gnu_implib_p "$1" ; then
5068 $debug_cmd
5069
5070 if func_cygming_gnu_implib_p "$1"; then
36995071 # binutils import library
37005072 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3701 elif func_cygming_ms_implib_p "$1" ; then
5073 elif func_cygming_ms_implib_p "$1"; then
37025074 # ms-generated import library
37035075 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
37045076 else
37055077 # unknown
3706 sharedlib_from_linklib_result=""
5078 sharedlib_from_linklib_result=
37075079 fi
37085080 }
37095081
37115083 # func_extract_an_archive dir oldlib
37125084 func_extract_an_archive ()
37135085 {
3714 $opt_debug
3715 f_ex_an_ar_dir="$1"; shift
3716 f_ex_an_ar_oldlib="$1"
3717 if test "$lock_old_archive_extraction" = yes; then
5086 $debug_cmd
5087
5088 f_ex_an_ar_dir=$1; shift
5089 f_ex_an_ar_oldlib=$1
5090 if test yes = "$lock_old_archive_extraction"; then
37185091 lockfile=$f_ex_an_ar_oldlib.lock
37195092 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
37205093 func_echo "Waiting for $lockfile to be removed"
37235096 fi
37245097 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
37255098 'stat=$?; rm -f "$lockfile"; exit $stat'
3726 if test "$lock_old_archive_extraction" = yes; then
5099 if test yes = "$lock_old_archive_extraction"; then
37275100 $opt_dry_run || rm -f "$lockfile"
37285101 fi
37295102 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
37375110 # func_extract_archives gentop oldlib ...
37385111 func_extract_archives ()
37395112 {
3740 $opt_debug
3741 my_gentop="$1"; shift
5113 $debug_cmd
5114
5115 my_gentop=$1; shift
37425116 my_oldlibs=${1+"$@"}
3743 my_oldobjs=""
3744 my_xlib=""
3745 my_xabs=""
3746 my_xdir=""
5117 my_oldobjs=
5118 my_xlib=
5119 my_xabs=
5120 my_xdir=
37475121
37485122 for my_xlib in $my_oldlibs; do
37495123 # Extract the objects.
37505124 case $my_xlib in
3751 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
5125 [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
37525126 *) my_xabs=`pwd`"/$my_xlib" ;;
37535127 esac
37545128 func_basename "$my_xlib"
3755 my_xlib="$func_basename_result"
5129 my_xlib=$func_basename_result
37565130 my_xlib_u=$my_xlib
37575131 while :; do
37585132 case " $extracted_archives " in
37645138 esac
37655139 done
37665140 extracted_archives="$extracted_archives $my_xlib_u"
3767 my_xdir="$my_gentop/$my_xlib_u"
5141 my_xdir=$my_gentop/$my_xlib_u
37685142
37695143 func_mkdir_p "$my_xdir"
37705144
37775151 cd $my_xdir || exit $?
37785152 darwin_archive=$my_xabs
37795153 darwin_curdir=`pwd`
3780 darwin_base_archive=`basename "$darwin_archive"`
5154 func_basename "$darwin_archive"
5155 darwin_base_archive=$func_basename_result
37815156 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
37825157 if test -n "$darwin_arches"; then
37835158 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
37845159 darwin_arch=
37855160 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
3786 for darwin_arch in $darwin_arches ; do
3787 func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3788 $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
3789 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3790 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
5161 for darwin_arch in $darwin_arches; do
5162 func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
5163 $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
5164 cd "unfat-$$/$darwin_base_archive-$darwin_arch"
5165 func_extract_an_archive "`pwd`" "$darwin_base_archive"
37915166 cd "$darwin_curdir"
3792 $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
5167 $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
37935168 done # $darwin_arches
37945169 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
3795 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
5170 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
37965171 darwin_file=
37975172 darwin_files=
37985173 for darwin_file in $darwin_filelist; do
38145189 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
38155190 done
38165191
3817 func_extract_archives_result="$my_oldobjs"
5192 func_extract_archives_result=$my_oldobjs
38185193 }
38195194
38205195
38295204 #
38305205 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
38315206 # variable will take. If 'yes', then the emitted script
3832 # will assume that the directory in which it is stored is
5207 # will assume that the directory where it is stored is
38335208 # the $objdir directory. This is a cygwin/mingw-specific
38345209 # behavior.
38355210 func_emit_wrapper ()
38405215 #! $SHELL
38415216
38425217 # $output - temporary wrapper script for $objdir/$outputname
3843 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
5218 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
38445219 #
38455220 # The $output program cannot be directly executed until all the libtool
38465221 # libraries that it depends on are installed.
38975272
38985273 # Very basic option parsing. These options are (a) specific to
38995274 # the libtool wrapper, (b) are identical between the wrapper
3900 # /script/ and the wrapper /executable/ which is used only on
5275 # /script/ and the wrapper /executable/ that is used only on
39015276 # windows platforms, and (c) all begin with the string "--lt-"
3902 # (application programs are unlikely to have options which match
5277 # (application programs are unlikely to have options that match
39035278 # this pattern).
39045279 #
39055280 # There are only two supported options: --lt-debug and
39325307
39335308 # Print the debug banner immediately:
39345309 if test -n \"\$lt_option_debug\"; then
3935 echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
5310 echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
39365311 fi
39375312 }
39385313
39435318 lt_dump_args_N=1;
39445319 for lt_arg
39455320 do
3946 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
5321 \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
39475322 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
39485323 done
39495324 }
39575332 *-*-mingw | *-*-os2* | *-cegcc*)
39585333 $ECHO "\
39595334 if test -n \"\$lt_option_debug\"; then
3960 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
5335 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
39615336 func_lt_dump_args \${1+\"\$@\"} 1>&2
39625337 fi
39635338 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
39675342 *)
39685343 $ECHO "\
39695344 if test -n \"\$lt_option_debug\"; then
3970 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
5345 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
39715346 func_lt_dump_args \${1+\"\$@\"} 1>&2
39725347 fi
39735348 exec \"\$progdir/\$program\" \${1+\"\$@\"}
40425417 test -n \"\$absdir\" && thisdir=\"\$absdir\"
40435418 "
40445419
4045 if test "$fast_install" = yes; then
5420 if test yes = "$fast_install"; then
40465421 $ECHO "\
40475422 program=lt-'$outputname'$exeext
40485423 progdir=\"\$thisdir/$objdir\"
40495424
40505425 if test ! -f \"\$progdir/\$program\" ||
4051 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5426 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
40525427 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
40535428
40545429 file=\"\$\$-\$program\"
40655440 if test -n \"\$relink_command\"; then
40665441 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
40675442 else
4068 $ECHO \"\$relink_command_output\" >&2
5443 \$ECHO \"\$relink_command_output\" >&2
40695444 $RM \"\$progdir/\$file\"
40705445 exit 1
40715446 fi
41005475 fi
41015476
41025477 # Export our shlibpath_var if we have one.
4103 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5478 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
41045479 $ECHO "\
41055480 # Add our own library path to $shlibpath_var
41065481 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
41205495 fi
41215496 else
41225497 # The program doesn't exist.
4123 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5498 \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
41245499 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
41255500 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
41265501 exit 1
41395514 cat <<EOF
41405515
41415516 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4142 Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
5517 Generated by $PROGRAM (GNU $PACKAGE) $VERSION
41435518
41445519 The $output program cannot be directly executed until all the libtool
41455520 libraries that it depends on are installed.
41745549 #include <fcntl.h>
41755550 #include <sys/stat.h>
41765551
5552 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
5553
41775554 /* declarations of non-ANSI functions */
4178 #if defined(__MINGW32__)
5555 #if defined __MINGW32__
41795556 # ifdef __STRICT_ANSI__
41805557 int _putenv (const char *);
41815558 # endif
4182 #elif defined(__CYGWIN__)
5559 #elif defined __CYGWIN__
41835560 # ifdef __STRICT_ANSI__
41845561 char *realpath (const char *, char *);
41855562 int putenv (char *);
41865563 int setenv (const char *, const char *, int);
41875564 # endif
4188 /* #elif defined (other platforms) ... */
5565 /* #elif defined other_platform || defined ... */
41895566 #endif
41905567
41915568 /* portability defines, excluding path handling macros */
4192 #if defined(_MSC_VER)
5569 #if defined _MSC_VER
41935570 # define setmode _setmode
41945571 # define stat _stat
41955572 # define chmod _chmod
41965573 # define getcwd _getcwd
41975574 # define putenv _putenv
41985575 # define S_IXUSR _S_IEXEC
4199 # ifndef _INTPTR_T_DEFINED
4200 # define _INTPTR_T_DEFINED
4201 # define intptr_t int
4202 # endif
4203 #elif defined(__MINGW32__)
5576 #elif defined __MINGW32__
42045577 # define setmode _setmode
42055578 # define stat _stat
42065579 # define chmod _chmod
42075580 # define getcwd _getcwd
42085581 # define putenv _putenv
4209 #elif defined(__CYGWIN__)
5582 #elif defined __CYGWIN__
42105583 # define HAVE_SETENV
42115584 # define FOPEN_WB "wb"
4212 /* #elif defined (other platforms) ... */
5585 /* #elif defined other platforms ... */
42135586 #endif
42145587
4215 #if defined(PATH_MAX)
5588 #if defined PATH_MAX
42165589 # define LT_PATHMAX PATH_MAX
4217 #elif defined(MAXPATHLEN)
5590 #elif defined MAXPATHLEN
42185591 # define LT_PATHMAX MAXPATHLEN
42195592 #else
42205593 # define LT_PATHMAX 1024
42335606 # define PATH_SEPARATOR ':'
42345607 #endif
42355608
4236 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4237 defined (__OS2__)
5609 #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
5610 defined __OS2__
42385611 # define HAVE_DOS_BASED_FILE_SYSTEM
42395612 # define FOPEN_WB "wb"
42405613 # ifndef DIR_SEPARATOR_2
42675640
42685641 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
42695642 #define XFREE(stale) do { \
4270 if (stale) { free ((void *) stale); stale = 0; } \
5643 if (stale) { free (stale); stale = 0; } \
42715644 } while (0)
42725645
4273 #if defined(LT_DEBUGWRAPPER)
5646 #if defined LT_DEBUGWRAPPER
42745647 static int lt_debug = 1;
42755648 #else
42765649 static int lt_debug = 0;
42995672 EOF
43005673
43015674 cat <<EOF
4302 volatile const char * MAGIC_EXE = "$magic_exe";
5675 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
5676 # define externally_visible volatile
5677 #else
5678 # define externally_visible __attribute__((externally_visible)) volatile
5679 #endif
5680 externally_visible const char * MAGIC_EXE = "$magic_exe";
43035681 const char * LIB_PATH_VARNAME = "$shlibpath_var";
43045682 EOF
43055683
4306 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5684 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
43075685 func_to_host_path "$temp_rpath"
43085686 cat <<EOF
43095687 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
43275705 EOF
43285706 fi
43295707
4330 if test "$fast_install" = yes; then
5708 if test yes = "$fast_install"; then
43315709 cat <<EOF
43325710 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
43335711 EOF
43565734 char *actual_cwrapper_name;
43575735 char *target_name;
43585736 char *lt_argv_zero;
4359 intptr_t rval = 127;
5737 int rval = 127;
43605738
43615739 int i;
43625740
43635741 program_name = (char *) xstrdup (base_name (argv[0]));
4364 newargz = XMALLOC (char *, argc + 1);
5742 newargz = XMALLOC (char *, (size_t) argc + 1);
43655743
43665744 /* very simple arg parsing; don't want to rely on getopt
43675745 * also, copy all non cwrapper options to newargz, except
43705748 newargc=0;
43715749 for (i = 1; i < argc; i++)
43725750 {
4373 if (strcmp (argv[i], dumpscript_opt) == 0)
5751 if (STREQ (argv[i], dumpscript_opt))
43745752 {
43755753 EOF
4376 case "$host" in
5754 case $host in
43775755 *mingw* | *cygwin* )
43785756 # make stdout use "unix" line endings
43795757 echo " setmode(1,_O_BINARY);"
43845762 lt_dump_script (stdout);
43855763 return 0;
43865764 }
4387 if (strcmp (argv[i], debug_opt) == 0)
5765 if (STREQ (argv[i], debug_opt))
43885766 {
43895767 lt_debug = 1;
43905768 continue;
43915769 }
4392 if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
5770 if (STREQ (argv[i], ltwrapper_option_prefix))
43935771 {
43945772 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
43955773 namespace, but it is not one of the ones we know about and
44125790 EOF
44135791 cat <<EOF
44145792 /* The GNU banner must be the first non-error debug message */
4415 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
5793 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
44165794 EOF
44175795 cat <<"EOF"
44185796 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
45235901 cat <<"EOF"
45245902 /* execv doesn't actually work on mingw as expected on unix */
45255903 newargz = prepare_spawn (newargz);
4526 rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
5904 rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
45275905 if (rval == -1)
45285906 {
45295907 /* failed to start process */
45685946 {
45695947 const char *base;
45705948
4571 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5949 #if defined HAVE_DOS_BASED_FILE_SYSTEM
45725950 /* Skip over the disk name in MSDOS pathnames. */
45735951 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
45745952 name += 2;
46276005 const char *p_next;
46286006 /* static buffer for getcwd */
46296007 char tmp[LT_PATHMAX + 1];
4630 int tmp_len;
6008 size_t tmp_len;
46316009 char *concat_name;
46326010
46336011 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
46376015 return NULL;
46386016
46396017 /* Absolute path? */
4640 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
6018 #if defined HAVE_DOS_BASED_FILE_SYSTEM
46416019 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
46426020 {
46436021 concat_name = xstrdup (wrapper);
46556033 return concat_name;
46566034 XFREE (concat_name);
46576035 }
4658 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
6036 #if defined HAVE_DOS_BASED_FILE_SYSTEM
46596037 }
46606038 #endif
46616039
46786056 for (q = p; *q; q++)
46796057 if (IS_PATH_SEPARATOR (*q))
46806058 break;
4681 p_len = q - p;
6059 p_len = (size_t) (q - p);
46826060 p_next = (*q == '\0' ? q : q + 1);
46836061 if (p_len == 0)
46846062 {
47976175 if (patlen <= len)
47986176 {
47996177 str += len - patlen;
4800 if (strcmp (str, pat) == 0)
6178 if (STREQ (str, pat))
48016179 *str = '\0';
48026180 }
48036181 return str;
48626240 char *str = xstrdup (value);
48636241 setenv (name, str, 1);
48646242 #else
4865 int len = strlen (name) + 1 + strlen (value) + 1;
6243 size_t len = strlen (name) + 1 + strlen (value) + 1;
48666244 char *str = XMALLOC (char, len);
48676245 sprintf (str, "%s=%s", name, value);
48686246 if (putenv (str) != EXIT_SUCCESS)
48796257 char *new_value;
48806258 if (orig_value && *orig_value)
48816259 {
4882 int orig_value_len = strlen (orig_value);
4883 int add_len = strlen (add);
6260 size_t orig_value_len = strlen (orig_value);
6261 size_t add_len = strlen (add);
48846262 new_value = XMALLOC (char, add_len + orig_value_len + 1);
48856263 if (to_end)
48866264 {
49116289 {
49126290 char *new_value = lt_extend_str (getenv (name), value, 0);
49136291 /* some systems can't cope with a ':'-terminated path #' */
4914 int len = strlen (new_value);
4915 while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
6292 size_t len = strlen (new_value);
6293 while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
49166294 {
4917 new_value[len-1] = '\0';
6295 new_value[--len] = '\0';
49186296 }
49196297 lt_setenv (name, new_value);
49206298 XFREE (new_value);
50816459 # True if ARG is an import lib, as indicated by $file_magic_cmd
50826460 func_win32_import_lib_p ()
50836461 {
5084 $opt_debug
6462 $debug_cmd
6463
50856464 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
50866465 *import*) : ;;
50876466 *) false ;;
50886467 esac
50896468 }
50906469
6470 # func_suncc_cstd_abi
6471 # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
6472 # Several compiler flags select an ABI that is incompatible with the
6473 # Cstd library. Avoid specifying it if any are in CXXFLAGS.
6474 func_suncc_cstd_abi ()
6475 {
6476 $debug_cmd
6477
6478 case " $compile_command " in
6479 *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
6480 suncc_use_cstd_abi=no
6481 ;;
6482 *)
6483 suncc_use_cstd_abi=yes
6484 ;;
6485 esac
6486 }
6487
50916488 # func_mode_link arg...
50926489 func_mode_link ()
50936490 {
5094 $opt_debug
6491 $debug_cmd
6492
50956493 case $host in
50966494 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
50976495 # It is impossible to link a dll without this setting, and
50986496 # we shouldn't force the makefile maintainer to figure out
5099 # which system we are compiling for in order to pass an extra
6497 # what system we are compiling for in order to pass an extra
51006498 # flag for every libtool invocation.
51016499 # allow_undefined=no
51026500
51036501 # FIXME: Unfortunately, there are problems with the above when trying
5104 # to make a dll which has undefined symbols, in which case not
6502 # to make a dll that has undefined symbols, in which case not
51056503 # even a static library is built. For now, we need to specify
51066504 # -no-undefined on the libtool link line when we can be certain
51076505 # that all symbols are satisfied, otherwise we get a static library.
51456543 module=no
51466544 no_install=no
51476545 objs=
6546 os2dllname=
51486547 non_pic_objects=
51496548 precious_files_regex=
51506549 prefer_static_libs=no
5151 preload=no
6550 preload=false
51526551 prev=
51536552 prevarg=
51546553 release=
51606559 vinfo=
51616560 vinfo_number=no
51626561 weak_libs=
5163 single_module="${wl}-single_module"
6562 single_module=$wl-single_module
51646563 func_infer_tag $base_compile
51656564
51666565 # We need to know -static, to get the right output filenames.
51686567 do
51696568 case $arg in
51706569 -shared)
5171 test "$build_libtool_libs" != yes && \
5172 func_fatal_configuration "can not build a shared library"
6570 test yes != "$build_libtool_libs" \
6571 && func_fatal_configuration "cannot build a shared library"
51736572 build_old_libs=no
51746573 break
51756574 ;;
51766575 -all-static | -static | -static-libtool-libs)
51776576 case $arg in
51786577 -all-static)
5179 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
6578 if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
51806579 func_warning "complete static linking is impossible in this configuration"
51816580 fi
51826581 if test -n "$link_static_flag"; then
52096608
52106609 # Go through the arguments, transforming them on the way.
52116610 while test "$#" -gt 0; do
5212 arg="$1"
6611 arg=$1
52136612 shift
52146613 func_quote_for_eval "$arg"
52156614 qarg=$func_quote_for_eval_unquoted_result
52266625
52276626 case $prev in
52286627 bindir)
5229 bindir="$arg"
6628 bindir=$arg
52306629 prev=
52316630 continue
52326631 ;;
52336632 dlfiles|dlprefiles)
5234 if test "$preload" = no; then
6633 $preload || {
52356634 # Add the symbol object into the linking commands.
52366635 func_append compile_command " @SYMFILE@"
52376636 func_append finalize_command " @SYMFILE@"
5238 preload=yes
5239 fi
6637 preload=:
6638 }
52406639 case $arg in
52416640 *.la | *.lo) ;; # We handle these cases below.
52426641 force)
5243 if test "$dlself" = no; then
6642 if test no = "$dlself"; then
52446643 dlself=needless
52456644 export_dynamic=yes
52466645 fi
52486647 continue
52496648 ;;
52506649 self)
5251 if test "$prev" = dlprefiles; then
6650 if test dlprefiles = "$prev"; then
52526651 dlself=yes
5253 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
6652 elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
52546653 dlself=yes
52556654 else
52566655 dlself=needless
52606659 continue
52616660 ;;
52626661 *)
5263 if test "$prev" = dlfiles; then
6662 if test dlfiles = "$prev"; then
52646663 func_append dlfiles " $arg"
52656664 else
52666665 func_append dlprefiles " $arg"
52716670 esac
52726671 ;;
52736672 expsyms)
5274 export_symbols="$arg"
6673 export_symbols=$arg
52756674 test -f "$arg" \
5276 || func_fatal_error "symbol file \`$arg' does not exist"
6675 || func_fatal_error "symbol file '$arg' does not exist"
52776676 prev=
52786677 continue
52796678 ;;
52806679 expsyms_regex)
5281 export_symbols_regex="$arg"
6680 export_symbols_regex=$arg
52826681 prev=
52836682 continue
52846683 ;;
52966695 continue
52976696 ;;
52986697 inst_prefix)
5299 inst_prefix_dir="$arg"
6698 inst_prefix_dir=$arg
6699 prev=
6700 continue
6701 ;;
6702 mllvm)
6703 # Clang does not use LLVM to link, so we can simply discard any
6704 # '-mllvm $arg' options when doing the link step.
53006705 prev=
53016706 continue
53026707 ;;
53206725
53216726 if test -z "$pic_object" ||
53226727 test -z "$non_pic_object" ||
5323 test "$pic_object" = none &&
5324 test "$non_pic_object" = none; then
5325 func_fatal_error "cannot find name of object for \`$arg'"
6728 test none = "$pic_object" &&
6729 test none = "$non_pic_object"; then
6730 func_fatal_error "cannot find name of object for '$arg'"
53266731 fi
53276732
53286733 # Extract subdirectory from the argument.
53296734 func_dirname "$arg" "/" ""
5330 xdir="$func_dirname_result"
5331
5332 if test "$pic_object" != none; then
6735 xdir=$func_dirname_result
6736
6737 if test none != "$pic_object"; then
53336738 # Prepend the subdirectory the object is found in.
5334 pic_object="$xdir$pic_object"
5335
5336 if test "$prev" = dlfiles; then
5337 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
6739 pic_object=$xdir$pic_object
6740
6741 if test dlfiles = "$prev"; then
6742 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
53386743 func_append dlfiles " $pic_object"
53396744 prev=
53406745 continue
53456750 fi
53466751
53476752 # CHECK ME: I think I busted this. -Ossama
5348 if test "$prev" = dlprefiles; then
6753 if test dlprefiles = "$prev"; then
53496754 # Preload the old-style object.
53506755 func_append dlprefiles " $pic_object"
53516756 prev=
53536758
53546759 # A PIC object.
53556760 func_append libobjs " $pic_object"
5356 arg="$pic_object"
6761 arg=$pic_object
53576762 fi
53586763
53596764 # Non-PIC object.
5360 if test "$non_pic_object" != none; then
6765 if test none != "$non_pic_object"; then
53616766 # Prepend the subdirectory the object is found in.
5362 non_pic_object="$xdir$non_pic_object"
6767 non_pic_object=$xdir$non_pic_object
53636768
53646769 # A standard non-PIC object
53656770 func_append non_pic_objects " $non_pic_object"
5366 if test -z "$pic_object" || test "$pic_object" = none ; then
5367 arg="$non_pic_object"
6771 if test -z "$pic_object" || test none = "$pic_object"; then
6772 arg=$non_pic_object
53686773 fi
53696774 else
53706775 # If the PIC object exists, use it instead.
53716776 # $xdir was prepended to $pic_object above.
5372 non_pic_object="$pic_object"
6777 non_pic_object=$pic_object
53736778 func_append non_pic_objects " $non_pic_object"
53746779 fi
53756780 else
53776782 if $opt_dry_run; then
53786783 # Extract subdirectory from the argument.
53796784 func_dirname "$arg" "/" ""
5380 xdir="$func_dirname_result"
6785 xdir=$func_dirname_result
53816786
53826787 func_lo2o "$arg"
53836788 pic_object=$xdir$objdir/$func_lo2o_result
53856790 func_append libobjs " $pic_object"
53866791 func_append non_pic_objects " $non_pic_object"
53876792 else
5388 func_fatal_error "\`$arg' is not a valid libtool object"
6793 func_fatal_error "'$arg' is not a valid libtool object"
53896794 fi
53906795 fi
53916796 done
53926797 else
5393 func_fatal_error "link input file \`$arg' does not exist"
6798 func_fatal_error "link input file '$arg' does not exist"
53946799 fi
53956800 arg=$save_arg
53966801 prev=
53976802 continue
53986803 ;;
6804 os2dllname)
6805 os2dllname=$arg
6806 prev=
6807 continue
6808 ;;
53996809 precious_regex)
5400 precious_files_regex="$arg"
6810 precious_files_regex=$arg
54016811 prev=
54026812 continue
54036813 ;;
54046814 release)
5405 release="-$arg"
6815 release=-$arg
54066816 prev=
54076817 continue
54086818 ;;
54146824 func_fatal_error "only absolute run-paths are allowed"
54156825 ;;
54166826 esac
5417 if test "$prev" = rpath; then
6827 if test rpath = "$prev"; then
54186828 case "$rpath " in
54196829 *" $arg "*) ;;
54206830 *) func_append rpath " $arg" ;;
54296839 continue
54306840 ;;
54316841 shrext)
5432 shrext_cmds="$arg"
6842 shrext_cmds=$arg
54336843 prev=
54346844 continue
54356845 ;;
54696879 esac
54706880 fi # test -n "$prev"
54716881
5472 prevarg="$arg"
6882 prevarg=$arg
54736883
54746884 case $arg in
54756885 -all-static)
54836893
54846894 -allow-undefined)
54856895 # FIXME: remove this flag sometime in the future.
5486 func_fatal_error "\`-allow-undefined' must not be used because it is the default"
6896 func_fatal_error "'-allow-undefined' must not be used because it is the default"
54876897 ;;
54886898
54896899 -avoid-version)
55156925 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
55166926 func_fatal_error "more than one -exported-symbols argument is not allowed"
55176927 fi
5518 if test "X$arg" = "X-export-symbols"; then
6928 if test X-export-symbols = "X$arg"; then
55196929 prev=expsyms
55206930 else
55216931 prev=expsyms_regex
55496959 func_stripname "-L" '' "$arg"
55506960 if test -z "$func_stripname_result"; then
55516961 if test "$#" -gt 0; then
5552 func_fatal_error "require no space between \`-L' and \`$1'"
6962 func_fatal_error "require no space between '-L' and '$1'"
55536963 else
5554 func_fatal_error "need path for \`-L' option"
6964 func_fatal_error "need path for '-L' option"
55556965 fi
55566966 fi
55576967 func_resolve_sysroot "$func_stripname_result"
55626972 *)
55636973 absdir=`cd "$dir" && pwd`
55646974 test -z "$absdir" && \
5565 func_fatal_error "cannot determine absolute directory name of \`$dir'"
5566 dir="$absdir"
6975 func_fatal_error "cannot determine absolute directory name of '$dir'"
6976 dir=$absdir
55676977 ;;
55686978 esac
55696979 case "$deplibs " in
55987008 ;;
55997009
56007010 -l*)
5601 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
7011 if test X-lc = "X$arg" || test X-lm = "X$arg"; then
56027012 case $host in
56037013 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
56047014 # These systems don't actually have a C or math library (as such)
56067016 ;;
56077017 *-*-os2*)
56087018 # These systems don't actually have a C library (as such)
5609 test "X$arg" = "X-lc" && continue
7019 test X-lc = "X$arg" && continue
56107020 ;;
5611 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
7021 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
56127022 # Do not include libc due to us having libc/libc_r.
5613 test "X$arg" = "X-lc" && continue
7023 test X-lc = "X$arg" && continue
56147024 ;;
56157025 *-*-rhapsody* | *-*-darwin1.[012])
56167026 # Rhapsody C and math libraries are in the System framework
56197029 ;;
56207030 *-*-sco3.2v5* | *-*-sco5v6*)
56217031 # Causes problems with __ctype
5622 test "X$arg" = "X-lc" && continue
7032 test X-lc = "X$arg" && continue
56237033 ;;
56247034 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
56257035 # Compiler inserts libc in the correct place for threads to work
5626 test "X$arg" = "X-lc" && continue
7036 test X-lc = "X$arg" && continue
56277037 ;;
56287038 esac
5629 elif test "X$arg" = "X-lc_r"; then
7039 elif test X-lc_r = "X$arg"; then
56307040 case $host in
5631 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
7041 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
56327042 # Do not include libc_r directly, use -pthread flag.
56337043 continue
56347044 ;;
56357045 esac
56367046 fi
56377047 func_append deplibs " $arg"
7048 continue
7049 ;;
7050
7051 -mllvm)
7052 prev=mllvm
56387053 continue
56397054 ;;
56407055
56677082 ;;
56687083
56697084 -multi_module)
5670 single_module="${wl}-multi_module"
7085 single_module=$wl-multi_module
56717086 continue
56727087 ;;
56737088
56817096 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
56827097 # The PATH hackery in wrapper scripts is required on Windows
56837098 # and Darwin in order for the loader to find any dlls it needs.
5684 func_warning "\`-no-install' is ignored for $host"
5685 func_warning "assuming \`-no-fast-install' instead"
7099 func_warning "'-no-install' is ignored for $host"
7100 func_warning "assuming '-no-fast-install' instead"
56867101 fast_install=no
56877102 ;;
56887103 *) no_install=yes ;;
56977112
56987113 -objectlist)
56997114 prev=objectlist
7115 continue
7116 ;;
7117
7118 -os2dllname)
7119 prev=os2dllname
57007120 continue
57017121 ;;
57027122
57877207 func_stripname '-Wc,' '' "$arg"
57887208 args=$func_stripname_result
57897209 arg=
5790 save_ifs="$IFS"; IFS=','
7210 save_ifs=$IFS; IFS=,
57917211 for flag in $args; do
5792 IFS="$save_ifs"
7212 IFS=$save_ifs
57937213 func_quote_for_eval "$flag"
57947214 func_append arg " $func_quote_for_eval_result"
57957215 func_append compiler_flags " $func_quote_for_eval_result"
57967216 done
5797 IFS="$save_ifs"
7217 IFS=$save_ifs
57987218 func_stripname ' ' '' "$arg"
57997219 arg=$func_stripname_result
58007220 ;;
58037223 func_stripname '-Wl,' '' "$arg"
58047224 args=$func_stripname_result
58057225 arg=
5806 save_ifs="$IFS"; IFS=','
7226 save_ifs=$IFS; IFS=,
58077227 for flag in $args; do
5808 IFS="$save_ifs"
7228 IFS=$save_ifs
58097229 func_quote_for_eval "$flag"
58107230 func_append arg " $wl$func_quote_for_eval_result"
58117231 func_append compiler_flags " $wl$func_quote_for_eval_result"
58127232 func_append linker_flags " $func_quote_for_eval_result"
58137233 done
5814 IFS="$save_ifs"
7234 IFS=$save_ifs
58157235 func_stripname ' ' '' "$arg"
58167236 arg=$func_stripname_result
58177237 ;;
58347254 # -msg_* for osf cc
58357255 -msg_*)
58367256 func_quote_for_eval "$arg"
5837 arg="$func_quote_for_eval_result"
7257 arg=$func_quote_for_eval_result
58387258 ;;
58397259
58407260 # Flags to be passed through unchanged, with rationale:
58467266 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
58477267 # -F/path path to uninstalled frameworks, gcc on darwin
58487268 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
7269 # -fstack-protector* stack protector flags for GCC
58497270 # @file GCC response files
58507271 # -tp=* Portland pgcc target processor selection
58517272 # --sysroot=* for sysroot support
5852 # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7273 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7274 # -specs=* GCC specs files
7275 # -stdlib=* select c++ std lib with clang
7276 # -fsanitize=* Clang/GCC memory and address sanitizer
58537277 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
58547278 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
5855 -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
7279 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
7280 -specs=*|-fsanitize=*)
58567281 func_quote_for_eval "$arg"
5857 arg="$func_quote_for_eval_result"
7282 arg=$func_quote_for_eval_result
58587283 func_append compile_command " $arg"
58597284 func_append finalize_command " $arg"
58607285 func_append compiler_flags " $arg"
58617286 continue
58627287 ;;
58637288
7289 -Z*)
7290 if test os2 = "`expr $host : '.*\(os2\)'`"; then
7291 # OS/2 uses -Zxxx to specify OS/2-specific options
7292 compiler_flags="$compiler_flags $arg"
7293 func_append compile_command " $arg"
7294 func_append finalize_command " $arg"
7295 case $arg in
7296 -Zlinker | -Zstack)
7297 prev=xcompiler
7298 ;;
7299 esac
7300 continue
7301 else
7302 # Otherwise treat like 'Some other compiler flag' below
7303 func_quote_for_eval "$arg"
7304 arg=$func_quote_for_eval_result
7305 fi
7306 ;;
7307
58647308 # Some other compiler flag.
58657309 -* | +*)
58667310 func_quote_for_eval "$arg"
5867 arg="$func_quote_for_eval_result"
7311 arg=$func_quote_for_eval_result
58687312 ;;
58697313
58707314 *.$objext)
58857329
58867330 if test -z "$pic_object" ||
58877331 test -z "$non_pic_object" ||
5888 test "$pic_object" = none &&
5889 test "$non_pic_object" = none; then
5890 func_fatal_error "cannot find name of object for \`$arg'"
7332 test none = "$pic_object" &&
7333 test none = "$non_pic_object"; then
7334 func_fatal_error "cannot find name of object for '$arg'"
58917335 fi
58927336
58937337 # Extract subdirectory from the argument.
58947338 func_dirname "$arg" "/" ""
5895 xdir="$func_dirname_result"
5896
5897 if test "$pic_object" != none; then
7339 xdir=$func_dirname_result
7340
7341 test none = "$pic_object" || {
58987342 # Prepend the subdirectory the object is found in.
5899 pic_object="$xdir$pic_object"
5900
5901 if test "$prev" = dlfiles; then
5902 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
7343 pic_object=$xdir$pic_object
7344
7345 if test dlfiles = "$prev"; then
7346 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
59037347 func_append dlfiles " $pic_object"
59047348 prev=
59057349 continue
59107354 fi
59117355
59127356 # CHECK ME: I think I busted this. -Ossama
5913 if test "$prev" = dlprefiles; then
7357 if test dlprefiles = "$prev"; then
59147358 # Preload the old-style object.
59157359 func_append dlprefiles " $pic_object"
59167360 prev=
59187362
59197363 # A PIC object.
59207364 func_append libobjs " $pic_object"
5921 arg="$pic_object"
5922 fi
7365 arg=$pic_object
7366 }
59237367
59247368 # Non-PIC object.
5925 if test "$non_pic_object" != none; then
7369 if test none != "$non_pic_object"; then
59267370 # Prepend the subdirectory the object is found in.
5927 non_pic_object="$xdir$non_pic_object"
7371 non_pic_object=$xdir$non_pic_object
59287372
59297373 # A standard non-PIC object
59307374 func_append non_pic_objects " $non_pic_object"
5931 if test -z "$pic_object" || test "$pic_object" = none ; then
5932 arg="$non_pic_object"
7375 if test -z "$pic_object" || test none = "$pic_object"; then
7376 arg=$non_pic_object
59337377 fi
59347378 else
59357379 # If the PIC object exists, use it instead.
59367380 # $xdir was prepended to $pic_object above.
5937 non_pic_object="$pic_object"
7381 non_pic_object=$pic_object
59387382 func_append non_pic_objects " $non_pic_object"
59397383 fi
59407384 else
59427386 if $opt_dry_run; then
59437387 # Extract subdirectory from the argument.
59447388 func_dirname "$arg" "/" ""
5945 xdir="$func_dirname_result"
7389 xdir=$func_dirname_result
59467390
59477391 func_lo2o "$arg"
59487392 pic_object=$xdir$objdir/$func_lo2o_result
59507394 func_append libobjs " $pic_object"
59517395 func_append non_pic_objects " $non_pic_object"
59527396 else
5953 func_fatal_error "\`$arg' is not a valid libtool object"
7397 func_fatal_error "'$arg' is not a valid libtool object"
59547398 fi
59557399 fi
59567400 ;;
59667410 # A libtool-controlled library.
59677411
59687412 func_resolve_sysroot "$arg"
5969 if test "$prev" = dlfiles; then
7413 if test dlfiles = "$prev"; then
59707414 # This library was specified with -dlopen.
59717415 func_append dlfiles " $func_resolve_sysroot_result"
59727416 prev=
5973 elif test "$prev" = dlprefiles; then
7417 elif test dlprefiles = "$prev"; then
59747418 # The library was specified with -dlpreopen.
59757419 func_append dlprefiles " $func_resolve_sysroot_result"
59767420 prev=
59857429 # Unknown arguments in both finalize_command and compile_command need
59867430 # to be aesthetically quoted because they are evaled later.
59877431 func_quote_for_eval "$arg"
5988 arg="$func_quote_for_eval_result"
7432 arg=$func_quote_for_eval_result
59897433 ;;
59907434 esac # arg
59917435
59977441 done # argument parsing loop
59987442
59997443 test -n "$prev" && \
6000 func_fatal_help "the \`$prevarg' option requires an argument"
6001
6002 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
7444 func_fatal_help "the '$prevarg' option requires an argument"
7445
7446 if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
60037447 eval arg=\"$export_dynamic_flag_spec\"
60047448 func_append compile_command " $arg"
60057449 func_append finalize_command " $arg"
60087452 oldlibs=
60097453 # calculate the name of the file, without its directory
60107454 func_basename "$output"
6011 outputname="$func_basename_result"
6012 libobjs_save="$libobjs"
7455 outputname=$func_basename_result
7456 libobjs_save=$libobjs
60137457
60147458 if test -n "$shlibpath_var"; then
60157459 # get the directories listed in $shlibpath_var
6016 eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
7460 eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
60177461 else
60187462 shlib_search_path=
60197463 fi
60207464 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
60217465 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
60227466
7467 # Definition is injected by LT_CONFIG during libtool generation.
7468 func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
7469
60237470 func_dirname "$output" "/" ""
6024 output_objdir="$func_dirname_result$objdir"
7471 output_objdir=$func_dirname_result$objdir
60257472 func_to_tool_file "$output_objdir/"
60267473 tool_output_objdir=$func_to_tool_file_result
60277474 # Create the object directory.
60447491 # Find all interdependent deplibs by searching for libraries
60457492 # that are linked more than once (e.g. -la -lb -la)
60467493 for deplib in $deplibs; do
6047 if $opt_preserve_dup_deps ; then
7494 if $opt_preserve_dup_deps; then
60487495 case "$libs " in
60497496 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
60507497 esac
60527499 func_append libs " $deplib"
60537500 done
60547501
6055 if test "$linkmode" = lib; then
7502 if test lib = "$linkmode"; then
60567503 libs="$predeps $libs $compiler_lib_search_path $postdeps"
60577504
60587505 # Compute libraries that are listed more than once in $predeps
60847531 case $file in
60857532 *.la) ;;
60867533 *)
6087 func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
7534 func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
60887535 ;;
60897536 esac
60907537 done
60927539 prog)
60937540 compile_deplibs=
60947541 finalize_deplibs=
6095 alldeplibs=no
7542 alldeplibs=false
60967543 newdlfiles=
60977544 newdlprefiles=
60987545 passes="conv scan dlopen dlpreopen link"
61047551 for pass in $passes; do
61057552 # The preopen pass in lib mode reverses $deplibs; put it back here
61067553 # so that -L comes before libs that need it for instance...
6107 if test "$linkmode,$pass" = "lib,link"; then
7554 if test lib,link = "$linkmode,$pass"; then
61087555 ## FIXME: Find the place where the list is rebuilt in the wrong
61097556 ## order, and fix it there properly
61107557 tmp_deplibs=
61117558 for deplib in $deplibs; do
61127559 tmp_deplibs="$deplib $tmp_deplibs"
61137560 done
6114 deplibs="$tmp_deplibs"
7561 deplibs=$tmp_deplibs
61157562 fi
61167563
6117 if test "$linkmode,$pass" = "lib,link" ||
6118 test "$linkmode,$pass" = "prog,scan"; then
6119 libs="$deplibs"
7564 if test lib,link = "$linkmode,$pass" ||
7565 test prog,scan = "$linkmode,$pass"; then
7566 libs=$deplibs
61207567 deplibs=
61217568 fi
6122 if test "$linkmode" = prog; then
7569 if test prog = "$linkmode"; then
61237570 case $pass in
6124 dlopen) libs="$dlfiles" ;;
6125 dlpreopen) libs="$dlprefiles" ;;
7571 dlopen) libs=$dlfiles ;;
7572 dlpreopen) libs=$dlprefiles ;;
61267573 link)
61277574 libs="$deplibs %DEPLIBS%"
61287575 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
61297576 ;;
61307577 esac
61317578 fi
6132 if test "$linkmode,$pass" = "lib,dlpreopen"; then
7579 if test lib,dlpreopen = "$linkmode,$pass"; then
61337580 # Collect and forward deplibs of preopened libtool libs
61347581 for lib in $dlprefiles; do
61357582 # Ignore non-libtool-libs
61507597 esac
61517598 done
61527599 done
6153 libs="$dlprefiles"
7600 libs=$dlprefiles
61547601 fi
6155 if test "$pass" = dlopen; then
7602 if test dlopen = "$pass"; then
61567603 # Collect dlpreopened libraries
6157 save_deplibs="$deplibs"
7604 save_deplibs=$deplibs
61587605 deplibs=
61597606 fi
61607607
61617608 for deplib in $libs; do
61627609 lib=
6163 found=no
7610 found=false
61647611 case $deplib in
61657612 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
61667613 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
6167 if test "$linkmode,$pass" = "prog,link"; then
7614 if test prog,link = "$linkmode,$pass"; then
61687615 compile_deplibs="$deplib $compile_deplibs"
61697616 finalize_deplibs="$deplib $finalize_deplibs"
61707617 else
61717618 func_append compiler_flags " $deplib"
6172 if test "$linkmode" = lib ; then
7619 if test lib = "$linkmode"; then
61737620 case "$new_inherited_linker_flags " in
61747621 *" $deplib "*) ;;
61757622 * ) func_append new_inherited_linker_flags " $deplib" ;;
61797626 continue
61807627 ;;
61817628 -l*)
6182 if test "$linkmode" != lib && test "$linkmode" != prog; then
6183 func_warning "\`-l' is ignored for archives/objects"
7629 if test lib != "$linkmode" && test prog != "$linkmode"; then
7630 func_warning "'-l' is ignored for archives/objects"
61847631 continue
61857632 fi
61867633 func_stripname '-l' '' "$deplib"
61877634 name=$func_stripname_result
6188 if test "$linkmode" = lib; then
7635 if test lib = "$linkmode"; then
61897636 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
61907637 else
61917638 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
61937640 for searchdir in $searchdirs; do
61947641 for search_ext in .la $std_shrext .so .a; do
61957642 # Search the libtool library
6196 lib="$searchdir/lib${name}${search_ext}"
7643 lib=$searchdir/lib$name$search_ext
61977644 if test -f "$lib"; then
6198 if test "$search_ext" = ".la"; then
6199 found=yes
7645 if test .la = "$search_ext"; then
7646 found=:
62007647 else
6201 found=no
7648 found=false
62027649 fi
62037650 break 2
62047651 fi
62057652 done
62067653 done
6207 if test "$found" != yes; then
6208 # deplib doesn't seem to be a libtool library
6209 if test "$linkmode,$pass" = "prog,link"; then
6210 compile_deplibs="$deplib $compile_deplibs"
6211 finalize_deplibs="$deplib $finalize_deplibs"
6212 else
6213 deplibs="$deplib $deplibs"
6214 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
6215 fi
6216 continue
6217 else # deplib is a libtool library
7654 if $found; then
7655 # deplib is a libtool library
62187656 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
62197657 # We need to do some special things here, and not later.
6220 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7658 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
62217659 case " $predeps $postdeps " in
62227660 *" $deplib "*)
62237661 if func_lalib_p "$lib"; then
62257663 old_library=
62267664 func_source "$lib"
62277665 for l in $old_library $library_names; do
6228 ll="$l"
7666 ll=$l
62297667 done
6230 if test "X$ll" = "X$old_library" ; then # only static version available
6231 found=no
7668 if test "X$ll" = "X$old_library"; then # only static version available
7669 found=false
62327670 func_dirname "$lib" "" "."
6233 ladir="$func_dirname_result"
7671 ladir=$func_dirname_result
62347672 lib=$ladir/$old_library
6235 if test "$linkmode,$pass" = "prog,link"; then
7673 if test prog,link = "$linkmode,$pass"; then
62367674 compile_deplibs="$deplib $compile_deplibs"
62377675 finalize_deplibs="$deplib $finalize_deplibs"
62387676 else
62397677 deplibs="$deplib $deplibs"
6240 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
7678 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
62417679 fi
62427680 continue
62437681 fi
62467684 *) ;;
62477685 esac
62487686 fi
7687 else
7688 # deplib doesn't seem to be a libtool library
7689 if test prog,link = "$linkmode,$pass"; then
7690 compile_deplibs="$deplib $compile_deplibs"
7691 finalize_deplibs="$deplib $finalize_deplibs"
7692 else
7693 deplibs="$deplib $deplibs"
7694 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
7695 fi
7696 continue
62497697 fi
62507698 ;; # -l
62517699 *.ltframework)
6252 if test "$linkmode,$pass" = "prog,link"; then
7700 if test prog,link = "$linkmode,$pass"; then
62537701 compile_deplibs="$deplib $compile_deplibs"
62547702 finalize_deplibs="$deplib $finalize_deplibs"
62557703 else
62567704 deplibs="$deplib $deplibs"
6257 if test "$linkmode" = lib ; then
7705 if test lib = "$linkmode"; then
62587706 case "$new_inherited_linker_flags " in
62597707 *" $deplib "*) ;;
62607708 * ) func_append new_inherited_linker_flags " $deplib" ;;
62677715 case $linkmode in
62687716 lib)
62697717 deplibs="$deplib $deplibs"
6270 test "$pass" = conv && continue
7718 test conv = "$pass" && continue
62717719 newdependency_libs="$deplib $newdependency_libs"
62727720 func_stripname '-L' '' "$deplib"
62737721 func_resolve_sysroot "$func_stripname_result"
62747722 func_append newlib_search_path " $func_resolve_sysroot_result"
62757723 ;;
62767724 prog)
6277 if test "$pass" = conv; then
7725 if test conv = "$pass"; then
62787726 deplibs="$deplib $deplibs"
62797727 continue
62807728 fi
6281 if test "$pass" = scan; then
7729 if test scan = "$pass"; then
62827730 deplibs="$deplib $deplibs"
62837731 else
62847732 compile_deplibs="$deplib $compile_deplibs"
62897737 func_append newlib_search_path " $func_resolve_sysroot_result"
62907738 ;;
62917739 *)
6292 func_warning "\`-L' is ignored for archives/objects"
7740 func_warning "'-L' is ignored for archives/objects"
62937741 ;;
62947742 esac # linkmode
62957743 continue
62967744 ;; # -L
62977745 -R*)
6298 if test "$pass" = link; then
7746 if test link = "$pass"; then
62997747 func_stripname '-R' '' "$deplib"
63007748 func_resolve_sysroot "$func_stripname_result"
63017749 dir=$func_resolve_sysroot_result
63137761 lib=$func_resolve_sysroot_result
63147762 ;;
63157763 *.$libext)
6316 if test "$pass" = conv; then
7764 if test conv = "$pass"; then
63177765 deplibs="$deplib $deplibs"
63187766 continue
63197767 fi
63247772 case " $dlpreconveniencelibs " in
63257773 *" $deplib "*) ;;
63267774 *)
6327 valid_a_lib=no
7775 valid_a_lib=false
63287776 case $deplibs_check_method in
63297777 match_pattern*)
63307778 set dummy $deplibs_check_method; shift
63317779 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
63327780 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
63337781 | $EGREP "$match_pattern_regex" > /dev/null; then
6334 valid_a_lib=yes
7782 valid_a_lib=:
63357783 fi
63367784 ;;
63377785 pass_all)
6338 valid_a_lib=yes
7786 valid_a_lib=:
63397787 ;;
63407788 esac
6341 if test "$valid_a_lib" != yes; then
7789 if $valid_a_lib; then
7790 echo
7791 $ECHO "*** Warning: Linking the shared library $output against the"
7792 $ECHO "*** static library $deplib is not portable!"
7793 deplibs="$deplib $deplibs"
7794 else
63427795 echo
63437796 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
63447797 echo "*** I have the capability to make that library automatically link in when"
63467799 echo "*** shared version of the library, which you do not appear to have"
63477800 echo "*** because the file extensions .$libext of this argument makes me believe"
63487801 echo "*** that it is just a static archive that I should not use here."
6349 else
6350 echo
6351 $ECHO "*** Warning: Linking the shared library $output against the"
6352 $ECHO "*** static library $deplib is not portable!"
6353 deplibs="$deplib $deplibs"
63547802 fi
63557803 ;;
63567804 esac
63577805 continue
63587806 ;;
63597807 prog)
6360 if test "$pass" != link; then
7808 if test link != "$pass"; then
63617809 deplibs="$deplib $deplibs"
63627810 else
63637811 compile_deplibs="$deplib $compile_deplibs"
63687816 esac # linkmode
63697817 ;; # *.$libext
63707818 *.lo | *.$objext)
6371 if test "$pass" = conv; then
7819 if test conv = "$pass"; then
63727820 deplibs="$deplib $deplibs"
6373 elif test "$linkmode" = prog; then
6374 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
7821 elif test prog = "$linkmode"; then
7822 if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
63757823 # If there is no dlopen support or we're linking statically,
63767824 # we need to preload.
63777825 func_append newdlprefiles " $deplib"
63847832 continue
63857833 ;;
63867834 %DEPLIBS%)
6387 alldeplibs=yes
7835 alldeplibs=:
63887836 continue
63897837 ;;
63907838 esac # case $deplib
63917839
6392 if test "$found" = yes || test -f "$lib"; then :
6393 else
6394 func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
6395 fi
7840 $found || test -f "$lib" \
7841 || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
63967842
63977843 # Check to see that this really is a libtool archive.
63987844 func_lalib_unsafe_p "$lib" \
6399 || func_fatal_error "\`$lib' is not a valid libtool archive"
7845 || func_fatal_error "'$lib' is not a valid libtool archive"
64007846
64017847 func_dirname "$lib" "" "."
6402 ladir="$func_dirname_result"
7848 ladir=$func_dirname_result
64037849
64047850 dlname=
64057851 dlopen=
64297875 done
64307876 fi
64317877 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
6432 if test "$linkmode,$pass" = "lib,link" ||
6433 test "$linkmode,$pass" = "prog,scan" ||
6434 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
7878 if test lib,link = "$linkmode,$pass" ||
7879 test prog,scan = "$linkmode,$pass" ||
7880 { test prog != "$linkmode" && test lib != "$linkmode"; }; then
64357881 test -n "$dlopen" && func_append dlfiles " $dlopen"
64367882 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
64377883 fi
64387884
6439 if test "$pass" = conv; then
7885 if test conv = "$pass"; then
64407886 # Only check for convenience libraries
64417887 deplibs="$lib $deplibs"
64427888 if test -z "$libdir"; then
64437889 if test -z "$old_library"; then
6444 func_fatal_error "cannot find name of link library for \`$lib'"
7890 func_fatal_error "cannot find name of link library for '$lib'"
64457891 fi
64467892 # It is a libtool convenience library, so add in its objects.
64477893 func_append convenience " $ladir/$objdir/$old_library"
64497895 tmp_libs=
64507896 for deplib in $dependency_libs; do
64517897 deplibs="$deplib $deplibs"
6452 if $opt_preserve_dup_deps ; then
7898 if $opt_preserve_dup_deps; then
64537899 case "$tmp_libs " in
64547900 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
64557901 esac
64567902 fi
64577903 func_append tmp_libs " $deplib"
64587904 done
6459 elif test "$linkmode" != prog && test "$linkmode" != lib; then
6460 func_fatal_error "\`$lib' is not a convenience library"
7905 elif test prog != "$linkmode" && test lib != "$linkmode"; then
7906 func_fatal_error "'$lib' is not a convenience library"
64617907 fi
64627908 continue
64637909 fi # $pass = conv
64667912 # Get the name of the library we link against.
64677913 linklib=
64687914 if test -n "$old_library" &&
6469 { test "$prefer_static_libs" = yes ||
6470 test "$prefer_static_libs,$installed" = "built,no"; }; then
7915 { test yes = "$prefer_static_libs" ||
7916 test built,no = "$prefer_static_libs,$installed"; }; then
64717917 linklib=$old_library
64727918 else
64737919 for l in $old_library $library_names; do
6474 linklib="$l"
7920 linklib=$l
64757921 done
64767922 fi
64777923 if test -z "$linklib"; then
6478 func_fatal_error "cannot find name of link library for \`$lib'"
7924 func_fatal_error "cannot find name of link library for '$lib'"
64797925 fi
64807926
64817927 # This library was specified with -dlopen.
6482 if test "$pass" = dlopen; then
6483 if test -z "$libdir"; then
6484 func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
6485 fi
7928 if test dlopen = "$pass"; then
7929 test -z "$libdir" \
7930 && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
64867931 if test -z "$dlname" ||
6487 test "$dlopen_support" != yes ||
6488 test "$build_libtool_libs" = no; then
7932 test yes != "$dlopen_support" ||
7933 test no = "$build_libtool_libs"
7934 then
64897935 # If there is no dlname, no dlopen support or we're linking
64907936 # statically, we need to preload. We also need to preload any
64917937 # dependent libraries so libltdl's deplib preloader doesn't
64997945
65007946 # We need an absolute path.
65017947 case $ladir in
6502 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
7948 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
65037949 *)
65047950 abs_ladir=`cd "$ladir" && pwd`
65057951 if test -z "$abs_ladir"; then
6506 func_warning "cannot determine absolute directory name of \`$ladir'"
7952 func_warning "cannot determine absolute directory name of '$ladir'"
65077953 func_warning "passing it literally to the linker, although it might fail"
6508 abs_ladir="$ladir"
7954 abs_ladir=$ladir
65097955 fi
65107956 ;;
65117957 esac
65127958 func_basename "$lib"
6513 laname="$func_basename_result"
7959 laname=$func_basename_result
65147960
65157961 # Find the relevant object directory and library name.
6516 if test "X$installed" = Xyes; then
7962 if test yes = "$installed"; then
65177963 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6518 func_warning "library \`$lib' was moved."
6519 dir="$ladir"
6520 absdir="$abs_ladir"
6521 libdir="$abs_ladir"
7964 func_warning "library '$lib' was moved."
7965 dir=$ladir
7966 absdir=$abs_ladir
7967 libdir=$abs_ladir
65227968 else
6523 dir="$lt_sysroot$libdir"
6524 absdir="$lt_sysroot$libdir"
7969 dir=$lt_sysroot$libdir
7970 absdir=$lt_sysroot$libdir
65257971 fi
6526 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
7972 test yes = "$hardcode_automatic" && avoidtemprpath=yes
65277973 else
65287974 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6529 dir="$ladir"
6530 absdir="$abs_ladir"
7975 dir=$ladir
7976 absdir=$abs_ladir
65317977 # Remove this search path later
65327978 func_append notinst_path " $abs_ladir"
65337979 else
6534 dir="$ladir/$objdir"
6535 absdir="$abs_ladir/$objdir"
7980 dir=$ladir/$objdir
7981 absdir=$abs_ladir/$objdir
65367982 # Remove this search path later
65377983 func_append notinst_path " $abs_ladir"
65387984 fi
65417987 name=$func_stripname_result
65427988
65437989 # This library was specified with -dlpreopen.
6544 if test "$pass" = dlpreopen; then
6545 if test -z "$libdir" && test "$linkmode" = prog; then
6546 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
7990 if test dlpreopen = "$pass"; then
7991 if test -z "$libdir" && test prog = "$linkmode"; then
7992 func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
65477993 fi
6548 case "$host" in
7994 case $host in
65497995 # special handling for platforms with PE-DLLs.
65507996 *cygwin* | *mingw* | *cegcc* )
65517997 # Linker will automatically link against shared library if both
65898035
65908036 if test -z "$libdir"; then
65918037 # Link the convenience library
6592 if test "$linkmode" = lib; then
8038 if test lib = "$linkmode"; then
65938039 deplibs="$dir/$old_library $deplibs"
6594 elif test "$linkmode,$pass" = "prog,link"; then
8040 elif test prog,link = "$linkmode,$pass"; then
65958041 compile_deplibs="$dir/$old_library $compile_deplibs"
65968042 finalize_deplibs="$dir/$old_library $finalize_deplibs"
65978043 else
66018047 fi
66028048
66038049
6604 if test "$linkmode" = prog && test "$pass" != link; then
8050 if test prog = "$linkmode" && test link != "$pass"; then
66058051 func_append newlib_search_path " $ladir"
66068052 deplibs="$lib $deplibs"
66078053
6608 linkalldeplibs=no
6609 if test "$link_all_deplibs" != no || test -z "$library_names" ||
6610 test "$build_libtool_libs" = no; then
6611 linkalldeplibs=yes
8054 linkalldeplibs=false
8055 if test no != "$link_all_deplibs" || test -z "$library_names" ||
8056 test no = "$build_libtool_libs"; then
8057 linkalldeplibs=:
66128058 fi
66138059
66148060 tmp_libs=
66208066 ;;
66218067 esac
66228068 # Need to link against all dependency_libs?
6623 if test "$linkalldeplibs" = yes; then
8069 if $linkalldeplibs; then
66248070 deplibs="$deplib $deplibs"
66258071 else
66268072 # Need to hardcode shared library paths
66278073 # or/and link against static libraries
66288074 newdependency_libs="$deplib $newdependency_libs"
66298075 fi
6630 if $opt_preserve_dup_deps ; then
8076 if $opt_preserve_dup_deps; then
66318077 case "$tmp_libs " in
66328078 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
66338079 esac
66378083 continue
66388084 fi # $linkmode = prog...
66398085
6640 if test "$linkmode,$pass" = "prog,link"; then
8086 if test prog,link = "$linkmode,$pass"; then
66418087 if test -n "$library_names" &&
6642 { { test "$prefer_static_libs" = no ||
6643 test "$prefer_static_libs,$installed" = "built,yes"; } ||
8088 { { test no = "$prefer_static_libs" ||
8089 test built,yes = "$prefer_static_libs,$installed"; } ||
66448090 test -z "$old_library"; }; then
66458091 # We need to hardcode the library path
6646 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
8092 if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
66478093 # Make sure the rpath contains only unique directories.
6648 case "$temp_rpath:" in
8094 case $temp_rpath: in
66498095 *"$absdir:"*) ;;
66508096 *) func_append temp_rpath "$absdir:" ;;
66518097 esac
66748120 esac
66758121 fi # $linkmode,$pass = prog,link...
66768122
6677 if test "$alldeplibs" = yes &&
6678 { test "$deplibs_check_method" = pass_all ||
6679 { test "$build_libtool_libs" = yes &&
8123 if $alldeplibs &&
8124 { test pass_all = "$deplibs_check_method" ||
8125 { test yes = "$build_libtool_libs" &&
66808126 test -n "$library_names"; }; }; then
66818127 # We only need to search for static libraries
66828128 continue
66858131
66868132 link_static=no # Whether the deplib will be linked statically
66878133 use_static_libs=$prefer_static_libs
6688 if test "$use_static_libs" = built && test "$installed" = yes; then
8134 if test built = "$use_static_libs" && test yes = "$installed"; then
66898135 use_static_libs=no
66908136 fi
66918137 if test -n "$library_names" &&
6692 { test "$use_static_libs" = no || test -z "$old_library"; }; then
8138 { test no = "$use_static_libs" || test -z "$old_library"; }; then
66938139 case $host in
6694 *cygwin* | *mingw* | *cegcc*)
8140 *cygwin* | *mingw* | *cegcc* | *os2*)
66958141 # No point in relinking DLLs because paths are not encoded
66968142 func_append notinst_deplibs " $lib"
66978143 need_relink=no
66988144 ;;
66998145 *)
6700 if test "$installed" = no; then
8146 if test no = "$installed"; then
67018147 func_append notinst_deplibs " $lib"
67028148 need_relink=yes
67038149 fi
67078153
67088154 # Warn about portability, can't link against -module's on some
67098155 # systems (darwin). Don't bleat about dlopened modules though!
6710 dlopenmodule=""
8156 dlopenmodule=
67118157 for dlpremoduletest in $dlprefiles; do
67128158 if test "X$dlpremoduletest" = "X$lib"; then
6713 dlopenmodule="$dlpremoduletest"
8159 dlopenmodule=$dlpremoduletest
67148160 break
67158161 fi
67168162 done
6717 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
8163 if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
67188164 echo
6719 if test "$linkmode" = prog; then
8165 if test prog = "$linkmode"; then
67208166 $ECHO "*** Warning: Linking the executable $output against the loadable module"
67218167 else
67228168 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
67238169 fi
67248170 $ECHO "*** $linklib is not portable!"
67258171 fi
6726 if test "$linkmode" = lib &&
6727 test "$hardcode_into_libs" = yes; then
8172 if test lib = "$linkmode" &&
8173 test yes = "$hardcode_into_libs"; then
67288174 # Hardcode the library path.
67298175 # Skip directories that are in the system default run-time
67308176 # search path.
67528198 # figure out the soname
67538199 set dummy $library_names
67548200 shift
6755 realname="$1"
8201 realname=$1
67568202 shift
67578203 libname=`eval "\\$ECHO \"$libname_spec\""`
67588204 # use dlname if we got it. it's perfectly good, no?
67598205 if test -n "$dlname"; then
6760 soname="$dlname"
8206 soname=$dlname
67618207 elif test -n "$soname_spec"; then
67628208 # bleh windows
67638209 case $host in
6764 *cygwin* | mingw* | *cegcc*)
8210 *cygwin* | mingw* | *cegcc* | *os2*)
67658211 func_arith $current - $age
67668212 major=$func_arith_result
6767 versuffix="-$major"
8213 versuffix=-$major
67688214 ;;
67698215 esac
67708216 eval soname=\"$soname_spec\"
67718217 else
6772 soname="$realname"
8218 soname=$realname
67738219 fi
67748220
67758221 # Make a new name for the extract_expsyms_cmds to use
6776 soroot="$soname"
8222 soroot=$soname
67778223 func_basename "$soroot"
6778 soname="$func_basename_result"
8224 soname=$func_basename_result
67798225 func_stripname 'lib' '.dll' "$soname"
67808226 newlib=libimp-$func_stripname_result.a
67818227
67828228 # If the library has no export list, then create one now
67838229 if test -f "$output_objdir/$soname-def"; then :
67848230 else
6785 func_verbose "extracting exported symbol list from \`$soname'"
8231 func_verbose "extracting exported symbol list from '$soname'"
67868232 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
67878233 fi
67888234
67898235 # Create $newlib
67908236 if test -f "$output_objdir/$newlib"; then :; else
6791 func_verbose "generating import library for \`$soname'"
8237 func_verbose "generating import library for '$soname'"
67928238 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
67938239 fi
67948240 # make sure the library variables are pointing to the new library
67968242 linklib=$newlib
67978243 fi # test -n "$old_archive_from_expsyms_cmds"
67988244
6799 if test "$linkmode" = prog || test "$opt_mode" != relink; then
8245 if test prog = "$linkmode" || test relink != "$opt_mode"; then
68008246 add_shlibpath=
68018247 add_dir=
68028248 add=
68038249 lib_linked=yes
68048250 case $hardcode_action in
68058251 immediate | unsupported)
6806 if test "$hardcode_direct" = no; then
6807 add="$dir/$linklib"
8252 if test no = "$hardcode_direct"; then
8253 add=$dir/$linklib
68088254 case $host in
6809 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
6810 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
8255 *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
8256 *-*-sysv4*uw2*) add_dir=-L$dir ;;
68118257 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
6812 *-*-unixware7*) add_dir="-L$dir" ;;
8258 *-*-unixware7*) add_dir=-L$dir ;;
68138259 *-*-darwin* )
6814 # if the lib is a (non-dlopened) module then we can not
8260 # if the lib is a (non-dlopened) module then we cannot
68158261 # link against it, someone is ignoring the earlier warnings
68168262 if /usr/bin/file -L $add 2> /dev/null |
6817 $GREP ": [^:]* bundle" >/dev/null ; then
8263 $GREP ": [^:]* bundle" >/dev/null; then
68188264 if test "X$dlopenmodule" != "X$lib"; then
68198265 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
6820 if test -z "$old_library" ; then
8266 if test -z "$old_library"; then
68218267 echo
68228268 echo "*** And there doesn't seem to be a static archive available"
68238269 echo "*** The link will probably fail, sorry"
68248270 else
6825 add="$dir/$old_library"
8271 add=$dir/$old_library
68268272 fi
68278273 elif test -n "$old_library"; then
6828 add="$dir/$old_library"
8274 add=$dir/$old_library
68298275 fi
68308276 fi
68318277 esac
6832 elif test "$hardcode_minus_L" = no; then
8278 elif test no = "$hardcode_minus_L"; then
68338279 case $host in
6834 *-*-sunos*) add_shlibpath="$dir" ;;
8280 *-*-sunos*) add_shlibpath=$dir ;;
68358281 esac
6836 add_dir="-L$dir"
6837 add="-l$name"
6838 elif test "$hardcode_shlibpath_var" = no; then
6839 add_shlibpath="$dir"
6840 add="-l$name"
8282 add_dir=-L$dir
8283 add=-l$name
8284 elif test no = "$hardcode_shlibpath_var"; then
8285 add_shlibpath=$dir
8286 add=-l$name
68418287 else
68428288 lib_linked=no
68438289 fi
68448290 ;;
68458291 relink)
6846 if test "$hardcode_direct" = yes &&
6847 test "$hardcode_direct_absolute" = no; then
6848 add="$dir/$linklib"
6849 elif test "$hardcode_minus_L" = yes; then
6850 add_dir="-L$absdir"
8292 if test yes = "$hardcode_direct" &&
8293 test no = "$hardcode_direct_absolute"; then
8294 add=$dir/$linklib
8295 elif test yes = "$hardcode_minus_L"; then
8296 add_dir=-L$absdir
68518297 # Try looking first in the location we're being installed to.
68528298 if test -n "$inst_prefix_dir"; then
68538299 case $libdir in
68568302 ;;
68578303 esac
68588304 fi
6859 add="-l$name"
6860 elif test "$hardcode_shlibpath_var" = yes; then
6861 add_shlibpath="$dir"
6862 add="-l$name"
8305 add=-l$name
8306 elif test yes = "$hardcode_shlibpath_var"; then
8307 add_shlibpath=$dir
8308 add=-l$name
68638309 else
68648310 lib_linked=no
68658311 fi
68678313 *) lib_linked=no ;;
68688314 esac
68698315
6870 if test "$lib_linked" != yes; then
8316 if test yes != "$lib_linked"; then
68718317 func_fatal_configuration "unsupported hardcode properties"
68728318 fi
68738319
68778323 *) func_append compile_shlibpath "$add_shlibpath:" ;;
68788324 esac
68798325 fi
6880 if test "$linkmode" = prog; then
8326 if test prog = "$linkmode"; then
68818327 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
68828328 test -n "$add" && compile_deplibs="$add $compile_deplibs"
68838329 else
68848330 test -n "$add_dir" && deplibs="$add_dir $deplibs"
68858331 test -n "$add" && deplibs="$add $deplibs"
6886 if test "$hardcode_direct" != yes &&
6887 test "$hardcode_minus_L" != yes &&
6888 test "$hardcode_shlibpath_var" = yes; then
8332 if test yes != "$hardcode_direct" &&
8333 test yes != "$hardcode_minus_L" &&
8334 test yes = "$hardcode_shlibpath_var"; then
68898335 case :$finalize_shlibpath: in
68908336 *":$libdir:"*) ;;
68918337 *) func_append finalize_shlibpath "$libdir:" ;;
68948340 fi
68958341 fi
68968342
6897 if test "$linkmode" = prog || test "$opt_mode" = relink; then
8343 if test prog = "$linkmode" || test relink = "$opt_mode"; then
68988344 add_shlibpath=
68998345 add_dir=
69008346 add=
69018347 # Finalize command for both is simple: just hardcode it.
6902 if test "$hardcode_direct" = yes &&
6903 test "$hardcode_direct_absolute" = no; then
6904 add="$libdir/$linklib"
6905 elif test "$hardcode_minus_L" = yes; then
6906 add_dir="-L$libdir"
6907 add="-l$name"
6908 elif test "$hardcode_shlibpath_var" = yes; then
8348 if test yes = "$hardcode_direct" &&
8349 test no = "$hardcode_direct_absolute"; then
8350 add=$libdir/$linklib
8351 elif test yes = "$hardcode_minus_L"; then
8352 add_dir=-L$libdir
8353 add=-l$name
8354 elif test yes = "$hardcode_shlibpath_var"; then
69098355 case :$finalize_shlibpath: in
69108356 *":$libdir:"*) ;;
69118357 *) func_append finalize_shlibpath "$libdir:" ;;
69128358 esac
6913 add="-l$name"
6914 elif test "$hardcode_automatic" = yes; then
8359 add=-l$name
8360 elif test yes = "$hardcode_automatic"; then
69158361 if test -n "$inst_prefix_dir" &&
6916 test -f "$inst_prefix_dir$libdir/$linklib" ; then
6917 add="$inst_prefix_dir$libdir/$linklib"
8362 test -f "$inst_prefix_dir$libdir/$linklib"; then
8363 add=$inst_prefix_dir$libdir/$linklib
69188364 else
6919 add="$libdir/$linklib"
8365 add=$libdir/$linklib
69208366 fi
69218367 else
69228368 # We cannot seem to hardcode it, guess we'll fake it.
6923 add_dir="-L$libdir"
8369 add_dir=-L$libdir
69248370 # Try looking first in the location we're being installed to.
69258371 if test -n "$inst_prefix_dir"; then
69268372 case $libdir in
69298375 ;;
69308376 esac
69318377 fi
6932 add="-l$name"
8378 add=-l$name
69338379 fi
69348380
6935 if test "$linkmode" = prog; then
8381 if test prog = "$linkmode"; then
69368382 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
69378383 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
69388384 else
69408386 test -n "$add" && deplibs="$add $deplibs"
69418387 fi
69428388 fi
6943 elif test "$linkmode" = prog; then
8389 elif test prog = "$linkmode"; then
69448390 # Here we assume that one of hardcode_direct or hardcode_minus_L
69458391 # is not unsupported. This is valid on all known static and
69468392 # shared platforms.
6947 if test "$hardcode_direct" != unsupported; then
6948 test -n "$old_library" && linklib="$old_library"
8393 if test unsupported != "$hardcode_direct"; then
8394 test -n "$old_library" && linklib=$old_library
69498395 compile_deplibs="$dir/$linklib $compile_deplibs"
69508396 finalize_deplibs="$dir/$linklib $finalize_deplibs"
69518397 else
69528398 compile_deplibs="-l$name -L$dir $compile_deplibs"
69538399 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
69548400 fi
6955 elif test "$build_libtool_libs" = yes; then
8401 elif test yes = "$build_libtool_libs"; then
69568402 # Not a shared library
6957 if test "$deplibs_check_method" != pass_all; then
8403 if test pass_all != "$deplibs_check_method"; then
69588404 # We're trying link a shared library against a static one
69598405 # but the system doesn't support it.
69608406
69618407 # Just print a warning and add the library to dependency_libs so
69628408 # that the program can be linked against the static library.
69638409 echo
6964 $ECHO "*** Warning: This system can not link to static lib archive $lib."
8410 $ECHO "*** Warning: This system cannot link to static lib archive $lib."
69658411 echo "*** I have the capability to make that library automatically link in when"
69668412 echo "*** you link to this library. But I can only do this if you have a"
69678413 echo "*** shared version of the library, which you do not appear to have."
6968 if test "$module" = yes; then
8414 if test yes = "$module"; then
69698415 echo "*** But as you try to build a module library, libtool will still create "
69708416 echo "*** a static module, that should work as long as the dlopening application"
69718417 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
69728418 if test -z "$global_symbol_pipe"; then
69738419 echo
69748420 echo "*** However, this would only work if libtool was able to extract symbol"
6975 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
8421 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
69768422 echo "*** not find such a program. So, this module is probably useless."
6977 echo "*** \`nm' from GNU binutils and a full rebuild may help."
8423 echo "*** 'nm' from GNU binutils and a full rebuild may help."
69788424 fi
6979 if test "$build_old_libs" = no; then
8425 if test no = "$build_old_libs"; then
69808426 build_libtool_libs=module
69818427 build_old_libs=yes
69828428 else
69898435 fi
69908436 fi # link shared/static library?
69918437
6992 if test "$linkmode" = lib; then
8438 if test lib = "$linkmode"; then
69938439 if test -n "$dependency_libs" &&
6994 { test "$hardcode_into_libs" != yes ||
6995 test "$build_old_libs" = yes ||
6996 test "$link_static" = yes; }; then
8440 { test yes != "$hardcode_into_libs" ||
8441 test yes = "$build_old_libs" ||
8442 test yes = "$link_static"; }; then
69978443 # Extract -R from dependency_libs
69988444 temp_deplibs=
69998445 for libdir in $dependency_libs; do
70078453 *) func_append temp_deplibs " $libdir";;
70088454 esac
70098455 done
7010 dependency_libs="$temp_deplibs"
8456 dependency_libs=$temp_deplibs
70118457 fi
70128458
70138459 func_append newlib_search_path " $absdir"
70148460 # Link against this library
7015 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
8461 test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
70168462 # ... and its dependency_libs
70178463 tmp_libs=
70188464 for deplib in $dependency_libs; do
70228468 func_resolve_sysroot "$func_stripname_result";;
70238469 *) func_resolve_sysroot "$deplib" ;;
70248470 esac
7025 if $opt_preserve_dup_deps ; then
8471 if $opt_preserve_dup_deps; then
70268472 case "$tmp_libs " in
70278473 *" $func_resolve_sysroot_result "*)
70288474 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
70318477 func_append tmp_libs " $func_resolve_sysroot_result"
70328478 done
70338479
7034 if test "$link_all_deplibs" != no; then
8480 if test no != "$link_all_deplibs"; then
70358481 # Add the search paths of all dependency libraries
70368482 for deplib in $dependency_libs; do
70378483 path=
70388484 case $deplib in
7039 -L*) path="$deplib" ;;
8485 -L*) path=$deplib ;;
70408486 *.la)
70418487 func_resolve_sysroot "$deplib"
70428488 deplib=$func_resolve_sysroot_result
70448490 dir=$func_dirname_result
70458491 # We need an absolute path.
70468492 case $dir in
7047 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
8493 [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
70488494 *)
70498495 absdir=`cd "$dir" && pwd`
70508496 if test -z "$absdir"; then
7051 func_warning "cannot determine absolute directory name of \`$dir'"
7052 absdir="$dir"
8497 func_warning "cannot determine absolute directory name of '$dir'"
8498 absdir=$dir
70538499 fi
70548500 ;;
70558501 esac
70578503 case $host in
70588504 *-*-darwin*)
70598505 depdepl=
7060 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
7061 if test -n "$deplibrary_names" ; then
7062 for tmp in $deplibrary_names ; do
8506 eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
8507 if test -n "$deplibrary_names"; then
8508 for tmp in $deplibrary_names; do
70638509 depdepl=$tmp
70648510 done
7065 if test -f "$absdir/$objdir/$depdepl" ; then
7066 depdepl="$absdir/$objdir/$depdepl"
7067 darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8511 if test -f "$absdir/$objdir/$depdepl"; then
8512 depdepl=$absdir/$objdir/$depdepl
8513 darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
70688514 if test -z "$darwin_install_name"; then
7069 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8515 darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
70708516 fi
7071 func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
7072 func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
8517 func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
8518 func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
70738519 path=
70748520 fi
70758521 fi
70768522 ;;
70778523 *)
7078 path="-L$absdir/$objdir"
8524 path=-L$absdir/$objdir
70798525 ;;
70808526 esac
70818527 else
7082 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
8528 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
70838529 test -z "$libdir" && \
7084 func_fatal_error "\`$deplib' is not a valid libtool archive"
8530 func_fatal_error "'$deplib' is not a valid libtool archive"
70858531 test "$absdir" != "$libdir" && \
7086 func_warning "\`$deplib' seems to be moved"
7087
7088 path="-L$absdir"
8532 func_warning "'$deplib' seems to be moved"
8533
8534 path=-L$absdir
70898535 fi
70908536 ;;
70918537 esac
70978543 fi # link_all_deplibs != no
70988544 fi # linkmode = lib
70998545 done # for deplib in $libs
7100 if test "$pass" = link; then
7101 if test "$linkmode" = "prog"; then
8546 if test link = "$pass"; then
8547 if test prog = "$linkmode"; then
71028548 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
71038549 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
71048550 else
71058551 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
71068552 fi
71078553 fi
7108 dependency_libs="$newdependency_libs"
7109 if test "$pass" = dlpreopen; then
8554 dependency_libs=$newdependency_libs
8555 if test dlpreopen = "$pass"; then
71108556 # Link the dlpreopened libraries before other libraries
71118557 for deplib in $save_deplibs; do
71128558 deplibs="$deplib $deplibs"
71138559 done
71148560 fi
7115 if test "$pass" != dlopen; then
7116 if test "$pass" != conv; then
8561 if test dlopen != "$pass"; then
8562 test conv = "$pass" || {
71178563 # Make sure lib_search_path contains only unique directories.
71188564 lib_search_path=
71198565 for dir in $newlib_search_path; do
71238569 esac
71248570 done
71258571 newlib_search_path=
7126 fi
7127
7128 if test "$linkmode,$pass" != "prog,link"; then
7129 vars="deplibs"
8572 }
8573
8574 if test prog,link = "$linkmode,$pass"; then
8575 vars="compile_deplibs finalize_deplibs"
71308576 else
7131 vars="compile_deplibs finalize_deplibs"
8577 vars=deplibs
71328578 fi
71338579 for var in $vars dependency_libs; do
71348580 # Add libraries to $var in reverse order
71868632 eval $var=\"$tmp_libs\"
71878633 done # for var
71888634 fi
8635
8636 # Add Sun CC postdeps if required:
8637 test CXX = "$tagname" && {
8638 case $host_os in
8639 linux*)
8640 case `$CC -V 2>&1 | sed 5q` in
8641 *Sun\ C*) # Sun C++ 5.9
8642 func_suncc_cstd_abi
8643
8644 if test no != "$suncc_use_cstd_abi"; then
8645 func_append postdeps ' -library=Cstd -library=Crun'
8646 fi
8647 ;;
8648 esac
8649 ;;
8650
8651 solaris*)
8652 func_cc_basename "$CC"
8653 case $func_cc_basename_result in
8654 CC* | sunCC*)
8655 func_suncc_cstd_abi
8656
8657 if test no != "$suncc_use_cstd_abi"; then
8658 func_append postdeps ' -library=Cstd -library=Crun'
8659 fi
8660 ;;
8661 esac
8662 ;;
8663 esac
8664 }
8665
71898666 # Last step: remove runtime libs from dependency_libs
71908667 # (they stay in deplibs)
71918668 tmp_libs=
7192 for i in $dependency_libs ; do
8669 for i in $dependency_libs; do
71938670 case " $predeps $postdeps $compiler_lib_search_path " in
71948671 *" $i "*)
7195 i=""
8672 i=
71968673 ;;
71978674 esac
7198 if test -n "$i" ; then
8675 if test -n "$i"; then
71998676 func_append tmp_libs " $i"
72008677 fi
72018678 done
72028679 dependency_libs=$tmp_libs
72038680 done # for pass
7204 if test "$linkmode" = prog; then
7205 dlfiles="$newdlfiles"
8681 if test prog = "$linkmode"; then
8682 dlfiles=$newdlfiles
72068683 fi
7207 if test "$linkmode" = prog || test "$linkmode" = lib; then
7208 dlprefiles="$newdlprefiles"
8684 if test prog = "$linkmode" || test lib = "$linkmode"; then
8685 dlprefiles=$newdlprefiles
72098686 fi
72108687
72118688 case $linkmode in
72128689 oldlib)
7213 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
7214 func_warning "\`-dlopen' is ignored for archives"
8690 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
8691 func_warning "'-dlopen' is ignored for archives"
72158692 fi
72168693
72178694 case " $deplibs" in
72188695 *\ -l* | *\ -L*)
7219 func_warning "\`-l' and \`-L' are ignored for archives" ;;
8696 func_warning "'-l' and '-L' are ignored for archives" ;;
72208697 esac
72218698
72228699 test -n "$rpath" && \
7223 func_warning "\`-rpath' is ignored for archives"
8700 func_warning "'-rpath' is ignored for archives"
72248701
72258702 test -n "$xrpath" && \
7226 func_warning "\`-R' is ignored for archives"
8703 func_warning "'-R' is ignored for archives"
72278704
72288705 test -n "$vinfo" && \
7229 func_warning "\`-version-info/-version-number' is ignored for archives"
8706 func_warning "'-version-info/-version-number' is ignored for archives"
72308707
72318708 test -n "$release" && \
7232 func_warning "\`-release' is ignored for archives"
8709 func_warning "'-release' is ignored for archives"
72338710
72348711 test -n "$export_symbols$export_symbols_regex" && \
7235 func_warning "\`-export-symbols' is ignored for archives"
8712 func_warning "'-export-symbols' is ignored for archives"
72368713
72378714 # Now set the variables for building old libraries.
72388715 build_libtool_libs=no
7239 oldlibs="$output"
8716 oldlibs=$output
72408717 func_append objs "$old_deplibs"
72418718 ;;
72428719
72438720 lib)
7244 # Make sure we only generate libraries of the form `libNAME.la'.
8721 # Make sure we only generate libraries of the form 'libNAME.la'.
72458722 case $outputname in
72468723 lib*)
72478724 func_stripname 'lib' '.la' "$outputname"
72508727 eval libname=\"$libname_spec\"
72518728 ;;
72528729 *)
7253 test "$module" = no && \
7254 func_fatal_help "libtool library \`$output' must begin with \`lib'"
7255
7256 if test "$need_lib_prefix" != no; then
8730 test no = "$module" \
8731 && func_fatal_help "libtool library '$output' must begin with 'lib'"
8732
8733 if test no != "$need_lib_prefix"; then
72578734 # Add the "lib" prefix for modules if required
72588735 func_stripname '' '.la' "$outputname"
72598736 name=$func_stripname_result
72678744 esac
72688745
72698746 if test -n "$objs"; then
7270 if test "$deplibs_check_method" != pass_all; then
7271 func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
8747 if test pass_all != "$deplibs_check_method"; then
8748 func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
72728749 else
72738750 echo
72748751 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
72778754 fi
72788755 fi
72798756
7280 test "$dlself" != no && \
7281 func_warning "\`-dlopen self' is ignored for libtool libraries"
8757 test no = "$dlself" \
8758 || func_warning "'-dlopen self' is ignored for libtool libraries"
72828759
72838760 set dummy $rpath
72848761 shift
7285 test "$#" -gt 1 && \
7286 func_warning "ignoring multiple \`-rpath's for a libtool library"
7287
7288 install_libdir="$1"
8762 test 1 -lt "$#" \
8763 && func_warning "ignoring multiple '-rpath's for a libtool library"
8764
8765 install_libdir=$1
72898766
72908767 oldlibs=
72918768 if test -z "$rpath"; then
7292 if test "$build_libtool_libs" = yes; then
8769 if test yes = "$build_libtool_libs"; then
72938770 # Building a libtool convenience library.
7294 # Some compilers have problems with a `.al' extension so
8771 # Some compilers have problems with a '.al' extension so
72958772 # convenience libraries should have the same extension an
72968773 # archive normally would.
72978774 oldlibs="$output_objdir/$libname.$libext $oldlibs"
73008777 fi
73018778
73028779 test -n "$vinfo" && \
7303 func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
8780 func_warning "'-version-info/-version-number' is ignored for convenience libraries"
73048781
73058782 test -n "$release" && \
7306 func_warning "\`-release' is ignored for convenience libraries"
8783 func_warning "'-release' is ignored for convenience libraries"
73078784 else
73088785
73098786 # Parse the version information argument.
7310 save_ifs="$IFS"; IFS=':'
8787 save_ifs=$IFS; IFS=:
73118788 set dummy $vinfo 0 0 0
73128789 shift
7313 IFS="$save_ifs"
8790 IFS=$save_ifs
73148791
73158792 test -n "$7" && \
7316 func_fatal_help "too many parameters to \`-version-info'"
8793 func_fatal_help "too many parameters to '-version-info'"
73178794
73188795 # convert absolute version numbers to libtool ages
73198796 # this retains compatibility with .la files and attempts
73218798
73228799 case $vinfo_number in
73238800 yes)
7324 number_major="$1"
7325 number_minor="$2"
7326 number_revision="$3"
8801 number_major=$1
8802 number_minor=$2
8803 number_revision=$3
73278804 #
73288805 # There are really only two kinds -- those that
73298806 # use the current revision as the major version
73308807 # and those that subtract age and use age as
73318808 # a minor version. But, then there is irix
7332 # which has an extra 1 added just for fun
8809 # that has an extra 1 added just for fun
73338810 #
73348811 case $version_type in
73358812 # correct linux to gnu/linux during the next big refactor
7336 darwin|linux|osf|windows|none)
8813 darwin|freebsd-elf|linux|osf|windows|none)
73378814 func_arith $number_major + $number_minor
73388815 current=$func_arith_result
7339 age="$number_minor"
7340 revision="$number_revision"
8816 age=$number_minor
8817 revision=$number_revision
73418818 ;;
7342 freebsd-aout|freebsd-elf|qnx|sunos)
7343 current="$number_major"
7344 revision="$number_minor"
7345 age="0"
8819 freebsd-aout|qnx|sunos)
8820 current=$number_major
8821 revision=$number_minor
8822 age=0
73468823 ;;
73478824 irix|nonstopux)
73488825 func_arith $number_major + $number_minor
73498826 current=$func_arith_result
7350 age="$number_minor"
7351 revision="$number_minor"
8827 age=$number_minor
8828 revision=$number_minor
73528829 lt_irix_increment=no
73538830 ;;
73548831 *)
7355 func_fatal_configuration "$modename: unknown library version type \`$version_type'"
8832 func_fatal_configuration "$modename: unknown library version type '$version_type'"
73568833 ;;
73578834 esac
73588835 ;;
73598836 no)
7360 current="$1"
7361 revision="$2"
7362 age="$3"
8837 current=$1
8838 revision=$2
8839 age=$3
73638840 ;;
73648841 esac
73658842
73678844 case $current in
73688845 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
73698846 *)
7370 func_error "CURRENT \`$current' must be a nonnegative integer"
7371 func_fatal_error "\`$vinfo' is not valid version information"
8847 func_error "CURRENT '$current' must be a nonnegative integer"
8848 func_fatal_error "'$vinfo' is not valid version information"
73728849 ;;
73738850 esac
73748851
73758852 case $revision in
73768853 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
73778854 *)
7378 func_error "REVISION \`$revision' must be a nonnegative integer"
7379 func_fatal_error "\`$vinfo' is not valid version information"
8855 func_error "REVISION '$revision' must be a nonnegative integer"
8856 func_fatal_error "'$vinfo' is not valid version information"
73808857 ;;
73818858 esac
73828859
73838860 case $age in
73848861 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
73858862 *)
7386 func_error "AGE \`$age' must be a nonnegative integer"
7387 func_fatal_error "\`$vinfo' is not valid version information"
8863 func_error "AGE '$age' must be a nonnegative integer"
8864 func_fatal_error "'$vinfo' is not valid version information"
73888865 ;;
73898866 esac
73908867
73918868 if test "$age" -gt "$current"; then
7392 func_error "AGE \`$age' is greater than the current interface number \`$current'"
7393 func_fatal_error "\`$vinfo' is not valid version information"
8869 func_error "AGE '$age' is greater than the current interface number '$current'"
8870 func_fatal_error "'$vinfo' is not valid version information"
73948871 fi
73958872
73968873 # Calculate the version variables.
74058882 # verstring for coding it into the library header
74068883 func_arith $current - $age
74078884 major=.$func_arith_result
7408 versuffix="$major.$age.$revision"
8885 versuffix=$major.$age.$revision
74098886 # Darwin ld doesn't like 0 for these options...
74108887 func_arith $current + 1
74118888 minor_current=$func_arith_result
7412 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
8889 xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
74138890 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8891 # On Darwin other compilers
8892 case $CC in
8893 nagfor*)
8894 verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
8895 ;;
8896 *)
8897 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8898 ;;
8899 esac
74148900 ;;
74158901
74168902 freebsd-aout)
7417 major=".$current"
7418 versuffix=".$current.$revision";
8903 major=.$current
8904 versuffix=.$current.$revision
74198905 ;;
74208906
74218907 freebsd-elf)
7422 major=".$current"
7423 versuffix=".$current"
8908 func_arith $current - $age
8909 major=.$func_arith_result
8910 versuffix=$major.$age.$revision
74248911 ;;
74258912
74268913 irix | nonstopux)
7427 if test "X$lt_irix_increment" = "Xno"; then
8914 if test no = "$lt_irix_increment"; then
74288915 func_arith $current - $age
74298916 else
74308917 func_arith $current - $age + 1
74358922 nonstopux) verstring_prefix=nonstopux ;;
74368923 *) verstring_prefix=sgi ;;
74378924 esac
7438 verstring="$verstring_prefix$major.$revision"
8925 verstring=$verstring_prefix$major.$revision
74398926
74408927 # Add in all the interfaces that we are compatible with.
74418928 loop=$revision
7442 while test "$loop" -ne 0; do
8929 while test 0 -ne "$loop"; do
74438930 func_arith $revision - $loop
74448931 iface=$func_arith_result
74458932 func_arith $loop - 1
74468933 loop=$func_arith_result
7447 verstring="$verstring_prefix$major.$iface:$verstring"
8934 verstring=$verstring_prefix$major.$iface:$verstring
74488935 done
74498936
7450 # Before this point, $major must not contain `.'.
8937 # Before this point, $major must not contain '.'.
74518938 major=.$major
7452 versuffix="$major.$revision"
8939 versuffix=$major.$revision
74538940 ;;
74548941
74558942 linux) # correct to gnu/linux during the next big refactor
74568943 func_arith $current - $age
74578944 major=.$func_arith_result
7458 versuffix="$major.$age.$revision"
8945 versuffix=$major.$age.$revision
74598946 ;;
74608947
74618948 osf)
74628949 func_arith $current - $age
74638950 major=.$func_arith_result
7464 versuffix=".$current.$age.$revision"
7465 verstring="$current.$age.$revision"
8951 versuffix=.$current.$age.$revision
8952 verstring=$current.$age.$revision
74668953
74678954 # Add in all the interfaces that we are compatible with.
74688955 loop=$age
7469 while test "$loop" -ne 0; do
8956 while test 0 -ne "$loop"; do
74708957 func_arith $current - $loop
74718958 iface=$func_arith_result
74728959 func_arith $loop - 1
74738960 loop=$func_arith_result
7474 verstring="$verstring:${iface}.0"
8961 verstring=$verstring:$iface.0
74758962 done
74768963
74778964 # Make executables depend on our current version.
7478 func_append verstring ":${current}.0"
8965 func_append verstring ":$current.0"
74798966 ;;
74808967
74818968 qnx)
7482 major=".$current"
7483 versuffix=".$current"
8969 major=.$current
8970 versuffix=.$current
74848971 ;;
74858972
8973 sco)
8974 major=.$current
8975 versuffix=.$current
8976 ;;
8977
74868978 sunos)
7487 major=".$current"
7488 versuffix=".$current.$revision"
8979 major=.$current
8980 versuffix=.$current.$revision
74898981 ;;
74908982
74918983 windows)
74928984 # Use '-' rather than '.', since we only want one
7493 # extension on DOS 8.3 filesystems.
8985 # extension on DOS 8.3 file systems.
74948986 func_arith $current - $age
74958987 major=$func_arith_result
7496 versuffix="-$major"
8988 versuffix=-$major
74978989 ;;
74988990
74998991 *)
7500 func_fatal_configuration "unknown library version type \`$version_type'"
8992 func_fatal_configuration "unknown library version type '$version_type'"
75018993 ;;
75028994 esac
75038995
75119003 verstring=
75129004 ;;
75139005 *)
7514 verstring="0.0"
9006 verstring=0.0
75159007 ;;
75169008 esac
7517 if test "$need_version" = no; then
9009 if test no = "$need_version"; then
75189010 versuffix=
75199011 else
7520 versuffix=".0.0"
9012 versuffix=.0.0
75219013 fi
75229014 fi
75239015
75249016 # Remove version info from name if versioning should be avoided
7525 if test "$avoid_version" = yes && test "$need_version" = no; then
9017 if test yes,no = "$avoid_version,$need_version"; then
75269018 major=
75279019 versuffix=
7528 verstring=""
9020 verstring=
75299021 fi
75309022
75319023 # Check to see if the archive will have undefined symbols.
7532 if test "$allow_undefined" = yes; then
7533 if test "$allow_undefined_flag" = unsupported; then
7534 func_warning "undefined symbols not allowed in $host shared libraries"
7535 build_libtool_libs=no
7536 build_old_libs=yes
9024 if test yes = "$allow_undefined"; then
9025 if test unsupported = "$allow_undefined_flag"; then
9026 if test yes = "$build_old_libs"; then
9027 func_warning "undefined symbols not allowed in $host shared libraries; building static only"
9028 build_libtool_libs=no
9029 else
9030 func_fatal_error "can't build $host shared library unless -no-undefined is specified"
9031 fi
75379032 fi
75389033 else
75399034 # Don't allow undefined symbols.
7540 allow_undefined_flag="$no_undefined_flag"
9035 allow_undefined_flag=$no_undefined_flag
75419036 fi
75429037
75439038 fi
75449039
7545 func_generate_dlsyms "$libname" "$libname" "yes"
9040 func_generate_dlsyms "$libname" "$libname" :
75469041 func_append libobjs " $symfileobj"
7547 test "X$libobjs" = "X " && libobjs=
7548
7549 if test "$opt_mode" != relink; then
9042 test " " = "$libobjs" && libobjs=
9043
9044 if test relink != "$opt_mode"; then
75509045 # Remove our outputs, but don't remove object files since they
75519046 # may have been created when compiling PIC objects.
75529047 removelist=
75559050 case $p in
75569051 *.$objext | *.gcno)
75579052 ;;
7558 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
7559 if test "X$precious_files_regex" != "X"; then
9053 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
9054 if test -n "$precious_files_regex"; then
75609055 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
75619056 then
75629057 continue
75729067 fi
75739068
75749069 # Now set the variables for building old libraries.
7575 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
9070 if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
75769071 func_append oldlibs " $output_objdir/$libname.$libext"
75779072
75789073 # Transform .lo files to .o files.
7579 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
9074 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
75809075 fi
75819076
75829077 # Eliminate all temporary directories.
75979092 *) func_append finalize_rpath " $libdir" ;;
75989093 esac
75999094 done
7600 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
9095 if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
76019096 dependency_libs="$temp_xrpath $dependency_libs"
76029097 fi
76039098 fi
76049099
76059100 # Make sure dlfiles contains only unique files that won't be dlpreopened
7606 old_dlfiles="$dlfiles"
9101 old_dlfiles=$dlfiles
76079102 dlfiles=
76089103 for lib in $old_dlfiles; do
76099104 case " $dlprefiles $dlfiles " in
76139108 done
76149109
76159110 # Make sure dlprefiles contains only unique files
7616 old_dlprefiles="$dlprefiles"
9111 old_dlprefiles=$dlprefiles
76179112 dlprefiles=
76189113 for lib in $old_dlprefiles; do
76199114 case "$dlprefiles " in
76229117 esac
76239118 done
76249119
7625 if test "$build_libtool_libs" = yes; then
9120 if test yes = "$build_libtool_libs"; then
76269121 if test -n "$rpath"; then
76279122 case $host in
76289123 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
76469141 ;;
76479142 *)
76489143 # Add libc to deplibs on all other systems if necessary.
7649 if test "$build_libtool_need_lc" = "yes"; then
9144 if test yes = "$build_libtool_need_lc"; then
76509145 func_append deplibs " -lc"
76519146 fi
76529147 ;;
76629157 # I'm not sure if I'm treating the release correctly. I think
76639158 # release should show up in the -l (ie -lgmp5) so we don't want to
76649159 # add it in twice. Is that correct?
7665 release=""
7666 versuffix=""
7667 major=""
9160 release=
9161 versuffix=
9162 major=
76689163 newdeplibs=
76699164 droppeddeps=no
76709165 case $deplibs_check_method in
76939188 -l*)
76949189 func_stripname -l '' "$i"
76959190 name=$func_stripname_result
7696 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9191 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
76979192 case " $predeps $postdeps " in
76989193 *" $i "*)
76999194 func_append newdeplibs " $i"
7700 i=""
9195 i=
77019196 ;;
77029197 esac
77039198 fi
7704 if test -n "$i" ; then
9199 if test -n "$i"; then
77059200 libname=`eval "\\$ECHO \"$libname_spec\""`
77069201 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
77079202 set dummy $deplib_matches; shift
77089203 deplib_match=$1
7709 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
9204 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
77109205 func_append newdeplibs " $i"
77119206 else
77129207 droppeddeps=yes
77369231 $opt_dry_run || $RM conftest
77379232 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
77389233 ldd_output=`ldd conftest`
7739 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9234 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
77409235 case " $predeps $postdeps " in
77419236 *" $i "*)
77429237 func_append newdeplibs " $i"
7743 i=""
9238 i=
77449239 ;;
77459240 esac
77469241 fi
7747 if test -n "$i" ; then
9242 if test -n "$i"; then
77489243 libname=`eval "\\$ECHO \"$libname_spec\""`
77499244 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
77509245 set dummy $deplib_matches; shift
77519246 deplib_match=$1
7752 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
9247 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
77539248 func_append newdeplibs " $i"
77549249 else
77559250 droppeddeps=yes
77869281 -l*)
77879282 func_stripname -l '' "$a_deplib"
77889283 name=$func_stripname_result
7789 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9284 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
77909285 case " $predeps $postdeps " in
77919286 *" $a_deplib "*)
77929287 func_append newdeplibs " $a_deplib"
7793 a_deplib=""
9288 a_deplib=
77949289 ;;
77959290 esac
77969291 fi
7797 if test -n "$a_deplib" ; then
9292 if test -n "$a_deplib"; then
77989293 libname=`eval "\\$ECHO \"$libname_spec\""`
77999294 if test -n "$file_magic_glob"; then
78009295 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
78019296 else
78029297 libnameglob=$libname
78039298 fi
7804 test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
9299 test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
78059300 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
7806 if test "$want_nocaseglob" = yes; then
9301 if test yes = "$want_nocaseglob"; then
78079302 shopt -s nocaseglob
78089303 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
78099304 $nocaseglob
78219316 # We might still enter an endless loop, since a link
78229317 # loop can be closed while we follow links,
78239318 # but so what?
7824 potlib="$potent_lib"
9319 potlib=$potent_lib
78259320 while test -h "$potlib" 2>/dev/null; do
7826 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
9321 potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
78279322 case $potliblink in
7828 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
7829 *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
9323 [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
9324 *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
78309325 esac
78319326 done
78329327 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
78339328 $SED -e 10q |
78349329 $EGREP "$file_magic_regex" > /dev/null; then
78359330 func_append newdeplibs " $a_deplib"
7836 a_deplib=""
9331 a_deplib=
78379332 break 2
78389333 fi
78399334 done
78409335 done
78419336 fi
7842 if test -n "$a_deplib" ; then
9337 if test -n "$a_deplib"; then
78439338 droppeddeps=yes
78449339 echo
78459340 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
78479342 echo "*** you link to this library. But I can only do this if you have a"
78489343 echo "*** shared version of the library, which you do not appear to have"
78499344 echo "*** because I did check the linker path looking for a file starting"
7850 if test -z "$potlib" ; then
9345 if test -z "$potlib"; then
78519346 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
78529347 else
78539348 $ECHO "*** with $libname and none of the candidates passed a file format test"
78709365 -l*)
78719366 func_stripname -l '' "$a_deplib"
78729367 name=$func_stripname_result
7873 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9368 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
78749369 case " $predeps $postdeps " in
78759370 *" $a_deplib "*)
78769371 func_append newdeplibs " $a_deplib"
7877 a_deplib=""
9372 a_deplib=
78789373 ;;
78799374 esac
78809375 fi
7881 if test -n "$a_deplib" ; then
9376 if test -n "$a_deplib"; then
78829377 libname=`eval "\\$ECHO \"$libname_spec\""`
78839378 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
78849379 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
78859380 for potent_lib in $potential_libs; do
7886 potlib="$potent_lib" # see symlink-check above in file_magic test
9381 potlib=$potent_lib # see symlink-check above in file_magic test
78879382 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
78889383 $EGREP "$match_pattern_regex" > /dev/null; then
78899384 func_append newdeplibs " $a_deplib"
7890 a_deplib=""
9385 a_deplib=
78919386 break 2
78929387 fi
78939388 done
78949389 done
78959390 fi
7896 if test -n "$a_deplib" ; then
9391 if test -n "$a_deplib"; then
78979392 droppeddeps=yes
78989393 echo
78999394 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
79019396 echo "*** you link to this library. But I can only do this if you have a"
79029397 echo "*** shared version of the library, which you do not appear to have"
79039398 echo "*** because I did check the linker path looking for a file starting"
7904 if test -z "$potlib" ; then
9399 if test -z "$potlib"; then
79059400 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
79069401 else
79079402 $ECHO "*** with $libname and none of the candidates passed a file format test"
79179412 done # Gone through all deplibs.
79189413 ;;
79199414 none | unknown | *)
7920 newdeplibs=""
9415 newdeplibs=
79219416 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
7922 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7923 for i in $predeps $postdeps ; do
9417 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9418 for i in $predeps $postdeps; do
79249419 # can't use Xsed below, because $i might contain '/'
7925 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
9420 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
79269421 done
79279422 fi
79289423 case $tmp_deplibs in
79299424 *[!\ \ ]*)
79309425 echo
7931 if test "X$deplibs_check_method" = "Xnone"; then
9426 if test none = "$deplibs_check_method"; then
79329427 echo "*** Warning: inter-library dependencies are not supported in this platform."
79339428 else
79349429 echo "*** Warning: inter-library dependencies are not known to be supported."
79529447 ;;
79539448 esac
79549449
7955 if test "$droppeddeps" = yes; then
7956 if test "$module" = yes; then
9450 if test yes = "$droppeddeps"; then
9451 if test yes = "$module"; then
79579452 echo
79589453 echo "*** Warning: libtool could not satisfy all declared inter-library"
79599454 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
79629457 if test -z "$global_symbol_pipe"; then
79639458 echo
79649459 echo "*** However, this would only work if libtool was able to extract symbol"
7965 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
9460 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
79669461 echo "*** not find such a program. So, this module is probably useless."
7967 echo "*** \`nm' from GNU binutils and a full rebuild may help."
9462 echo "*** 'nm' from GNU binutils and a full rebuild may help."
79689463 fi
7969 if test "$build_old_libs" = no; then
7970 oldlibs="$output_objdir/$libname.$libext"
9464 if test no = "$build_old_libs"; then
9465 oldlibs=$output_objdir/$libname.$libext
79719466 build_libtool_libs=module
79729467 build_old_libs=yes
79739468 else
79789473 echo "*** automatically added whenever a program is linked with this library"
79799474 echo "*** or is declared to -dlopen it."
79809475
7981 if test "$allow_undefined" = no; then
9476 if test no = "$allow_undefined"; then
79829477 echo
79839478 echo "*** Since this library must not contain undefined symbols,"
79849479 echo "*** because either the platform does not support them or"
79859480 echo "*** it was explicitly requested with -no-undefined,"
79869481 echo "*** libtool will only create a static version of it."
7987 if test "$build_old_libs" = no; then
7988 oldlibs="$output_objdir/$libname.$libext"
9482 if test no = "$build_old_libs"; then
9483 oldlibs=$output_objdir/$libname.$libext
79899484 build_libtool_libs=module
79909485 build_old_libs=yes
79919486 else
80319526 *) func_append new_libs " $deplib" ;;
80329527 esac
80339528 done
8034 deplibs="$new_libs"
9529 deplibs=$new_libs
80359530
80369531 # All the library-specific variables (install_libdir is set above).
80379532 library_names=
80399534 dlname=
80409535
80419536 # Test again, we may have decided not to build it any more
8042 if test "$build_libtool_libs" = yes; then
8043 # Remove ${wl} instances when linking with ld.
9537 if test yes = "$build_libtool_libs"; then
9538 # Remove $wl instances when linking with ld.
80449539 # FIXME: should test the right _cmds variable.
80459540 case $archive_cmds in
80469541 *\$LD\ *) wl= ;;
80479542 esac
8048 if test "$hardcode_into_libs" = yes; then
9543 if test yes = "$hardcode_into_libs"; then
80499544 # Hardcode the library paths
80509545 hardcode_libdirs=
80519546 dep_rpath=
8052 rpath="$finalize_rpath"
8053 test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
9547 rpath=$finalize_rpath
9548 test relink = "$opt_mode" || rpath=$compile_rpath$rpath
80549549 for libdir in $rpath; do
80559550 if test -n "$hardcode_libdir_flag_spec"; then
80569551 if test -n "$hardcode_libdir_separator"; then
80579552 func_replace_sysroot "$libdir"
80589553 libdir=$func_replace_sysroot_result
80599554 if test -z "$hardcode_libdirs"; then
8060 hardcode_libdirs="$libdir"
9555 hardcode_libdirs=$libdir
80619556 else
80629557 # Just accumulate the unique libdirs.
80639558 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
80829577 # Substitute the hardcoded libdirs into the rpath.
80839578 if test -n "$hardcode_libdir_separator" &&
80849579 test -n "$hardcode_libdirs"; then
8085 libdir="$hardcode_libdirs"
9580 libdir=$hardcode_libdirs
80869581 eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
80879582 fi
80889583 if test -n "$runpath_var" && test -n "$perm_rpath"; then
80969591 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
80979592 fi
80989593
8099 shlibpath="$finalize_shlibpath"
8100 test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
9594 shlibpath=$finalize_shlibpath
9595 test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
81019596 if test -n "$shlibpath"; then
81029597 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
81039598 fi
81079602 eval library_names=\"$library_names_spec\"
81089603 set dummy $library_names
81099604 shift
8110 realname="$1"
9605 realname=$1
81119606 shift
81129607
81139608 if test -n "$soname_spec"; then
81149609 eval soname=\"$soname_spec\"
81159610 else
8116 soname="$realname"
9611 soname=$realname
81179612 fi
81189613 if test -z "$dlname"; then
81199614 dlname=$soname
81209615 fi
81219616
8122 lib="$output_objdir/$realname"
9617 lib=$output_objdir/$realname
81239618 linknames=
81249619 for link
81259620 do
81339628 delfiles=
81349629 if test -n "$export_symbols" && test -n "$include_expsyms"; then
81359630 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
8136 export_symbols="$output_objdir/$libname.uexp"
9631 export_symbols=$output_objdir/$libname.uexp
81379632 func_append delfiles " $export_symbols"
81389633 fi
81399634
81429637 cygwin* | mingw* | cegcc*)
81439638 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
81449639 # exporting using user supplied symfile
8145 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
9640 func_dll_def_p "$export_symbols" || {
81469641 # and it's NOT already a .def file. Must figure out
81479642 # which of the given symbols are data symbols and tag
81489643 # them as such. So, trigger use of export_symbols_cmds.
81499644 # export_symbols gets reassigned inside the "prepare
81509645 # the list of exported symbols" if statement, so the
81519646 # include_expsyms logic still works.
8152 orig_export_symbols="$export_symbols"
9647 orig_export_symbols=$export_symbols
81539648 export_symbols=
81549649 always_export_symbols=yes
8155 fi
9650 }
81569651 fi
81579652 ;;
81589653 esac
81599654
81609655 # Prepare the list of exported symbols
81619656 if test -z "$export_symbols"; then
8162 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
8163 func_verbose "generating symbol list for \`$libname.la'"
8164 export_symbols="$output_objdir/$libname.exp"
9657 if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
9658 func_verbose "generating symbol list for '$libname.la'"
9659 export_symbols=$output_objdir/$libname.exp
81659660 $opt_dry_run || $RM $export_symbols
81669661 cmds=$export_symbols_cmds
8167 save_ifs="$IFS"; IFS='~'
9662 save_ifs=$IFS; IFS='~'
81689663 for cmd1 in $cmds; do
8169 IFS="$save_ifs"
9664 IFS=$save_ifs
81709665 # Take the normal branch if the nm_file_list_spec branch
81719666 # doesn't work or if tool conversion is not needed.
81729667 case $nm_file_list_spec~$to_tool_file_cmd in
81809675 try_normal_branch=no
81819676 ;;
81829677 esac
8183 if test "$try_normal_branch" = yes \
9678 if test yes = "$try_normal_branch" \
81849679 && { test "$len" -lt "$max_cmd_len" \
81859680 || test "$max_cmd_len" -le -1; }
81869681 then
81919686 output_la=$func_basename_result
81929687 save_libobjs=$libobjs
81939688 save_output=$output
8194 output=${output_objdir}/${output_la}.nm
9689 output=$output_objdir/$output_la.nm
81959690 func_to_tool_file "$output"
81969691 libobjs=$nm_file_list_spec$func_to_tool_file_result
81979692 func_append delfiles " $output"
82149709 break
82159710 fi
82169711 done
8217 IFS="$save_ifs"
8218 if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
9712 IFS=$save_ifs
9713 if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
82199714 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
82209715 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
82219716 fi
82239718 fi
82249719
82259720 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8226 tmp_export_symbols="$export_symbols"
8227 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
9721 tmp_export_symbols=$export_symbols
9722 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
82289723 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
82299724 fi
82309725
8231 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
9726 if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
82329727 # The given exports_symbols file has to be filtered, so filter it.
8233 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
9728 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
82349729 # FIXME: $output_objdir/$libname.filter potentially contains lots of
8235 # 's' commands which not all seds can handle. GNU sed should be fine
9730 # 's' commands, which not all seds can handle. GNU sed should be fine
82369731 # though. Also, the filter scales superlinearly with the number of
82379732 # global variables. join(1) would be nice here, but unfortunately
82389733 # isn't a blessed tool.
82519746 ;;
82529747 esac
82539748 done
8254 deplibs="$tmp_deplibs"
9749 deplibs=$tmp_deplibs
82559750
82569751 if test -n "$convenience"; then
82579752 if test -n "$whole_archive_flag_spec" &&
8258 test "$compiler_needs_object" = yes &&
9753 test yes = "$compiler_needs_object" &&
82599754 test -z "$libobjs"; then
82609755 # extract the archives, so we have objects to list.
82619756 # TODO: could optimize this to just extract one archive.
82669761 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
82679762 test "X$libobjs" = "X " && libobjs=
82689763 else
8269 gentop="$output_objdir/${outputname}x"
9764 gentop=$output_objdir/${outputname}x
82709765 func_append generated " $gentop"
82719766
82729767 func_extract_archives $gentop $convenience
82759770 fi
82769771 fi
82779772
8278 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
9773 if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
82799774 eval flag=\"$thread_safe_flag_spec\"
82809775 func_append linker_flags " $flag"
82819776 fi
82829777
82839778 # Make a backup of the uninstalled library when relinking
8284 if test "$opt_mode" = relink; then
9779 if test relink = "$opt_mode"; then
82859780 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
82869781 fi
82879782
82889783 # Do each of the archive commands.
8289 if test "$module" = yes && test -n "$module_cmds" ; then
9784 if test yes = "$module" && test -n "$module_cmds"; then
82909785 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
82919786 eval test_cmds=\"$module_expsym_cmds\"
82929787 cmds=$module_expsym_cmds
83049799 fi
83059800 fi
83069801
8307 if test "X$skipped_export" != "X:" &&
9802 if test : != "$skipped_export" &&
83089803 func_len " $test_cmds" &&
83099804 len=$func_len_result &&
83109805 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
83379832 last_robj=
83389833 k=1
83399834
8340 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
8341 output=${output_objdir}/${output_la}.lnkscript
9835 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
9836 output=$output_objdir/$output_la.lnkscript
83429837 func_verbose "creating GNU ld script: $output"
83439838 echo 'INPUT (' > $output
83449839 for obj in $save_libobjs
83509845 func_append delfiles " $output"
83519846 func_to_tool_file "$output"
83529847 output=$func_to_tool_file_result
8353 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
8354 output=${output_objdir}/${output_la}.lnk
9848 elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
9849 output=$output_objdir/$output_la.lnk
83559850 func_verbose "creating linker input file list: $output"
83569851 : > $output
83579852 set x $save_libobjs
83589853 shift
83599854 firstobj=
8360 if test "$compiler_needs_object" = yes; then
9855 if test yes = "$compiler_needs_object"; then
83619856 firstobj="$1 "
83629857 shift
83639858 fi
83729867 else
83739868 if test -n "$save_libobjs"; then
83749869 func_verbose "creating reloadable object files..."
8375 output=$output_objdir/$output_la-${k}.$objext
9870 output=$output_objdir/$output_la-$k.$objext
83769871 eval test_cmds=\"$reload_cmds\"
83779872 func_len " $test_cmds"
83789873 len0=$func_len_result
83849879 func_len " $obj"
83859880 func_arith $len + $func_len_result
83869881 len=$func_arith_result
8387 if test "X$objlist" = X ||
9882 if test -z "$objlist" ||
83889883 test "$len" -lt "$max_cmd_len"; then
83899884 func_append objlist " $obj"
83909885 else
83919886 # The command $test_cmds is almost too long, add a
83929887 # command to the queue.
8393 if test "$k" -eq 1 ; then
9888 if test 1 -eq "$k"; then
83949889 # The first file doesn't have a previous command to add.
83959890 reload_objs=$objlist
83969891 eval concat_cmds=\"$reload_cmds\"
84009895 reload_objs="$objlist $last_robj"
84019896 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
84029897 fi
8403 last_robj=$output_objdir/$output_la-${k}.$objext
9898 last_robj=$output_objdir/$output_la-$k.$objext
84049899 func_arith $k + 1
84059900 k=$func_arith_result
8406 output=$output_objdir/$output_la-${k}.$objext
9901 output=$output_objdir/$output_la-$k.$objext
84079902 objlist=" $obj"
84089903 func_len " $last_robj"
84099904 func_arith $len0 + $func_len_result
84159910 # files will link in the last one created.
84169911 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
84179912 reload_objs="$objlist $last_robj"
8418 eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
9913 eval concat_cmds=\"\$concat_cmds$reload_cmds\"
84199914 if test -n "$last_robj"; then
8420 eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
9915 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
84219916 fi
84229917 func_append delfiles " $output"
84239918
84259920 output=
84269921 fi
84279922
8428 if ${skipped_export-false}; then
8429 func_verbose "generating symbol list for \`$libname.la'"
8430 export_symbols="$output_objdir/$libname.exp"
9923 ${skipped_export-false} && {
9924 func_verbose "generating symbol list for '$libname.la'"
9925 export_symbols=$output_objdir/$libname.exp
84319926 $opt_dry_run || $RM $export_symbols
84329927 libobjs=$output
84339928 # Append the command to create the export file.
84369931 if test -n "$last_robj"; then
84379932 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
84389933 fi
8439 fi
9934 }
84409935
84419936 test -n "$save_libobjs" &&
84429937 func_verbose "creating a temporary reloadable object file: $output"
84439938
84449939 # Loop through the commands generated above and execute them.
8445 save_ifs="$IFS"; IFS='~'
9940 save_ifs=$IFS; IFS='~'
84469941 for cmd in $concat_cmds; do
8447 IFS="$save_ifs"
8448 $opt_silent || {
9942 IFS=$save_ifs
9943 $opt_quiet || {
84499944 func_quote_for_expand "$cmd"
84509945 eval "func_echo $func_quote_for_expand_result"
84519946 }
84539948 lt_exit=$?
84549949
84559950 # Restore the uninstalled library and exit
8456 if test "$opt_mode" = relink; then
9951 if test relink = "$opt_mode"; then
84579952 ( cd "$output_objdir" && \
84589953 $RM "${realname}T" && \
84599954 $MV "${realname}U" "$realname" )
84629957 exit $lt_exit
84639958 }
84649959 done
8465 IFS="$save_ifs"
9960 IFS=$save_ifs
84669961
84679962 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
84689963 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
84709965 fi
84719966 fi
84729967
8473 if ${skipped_export-false}; then
9968 ${skipped_export-false} && {
84749969 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8475 tmp_export_symbols="$export_symbols"
8476 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
9970 tmp_export_symbols=$export_symbols
9971 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
84779972 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
84789973 fi
84799974
84809975 if test -n "$orig_export_symbols"; then
84819976 # The given exports_symbols file has to be filtered, so filter it.
8482 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
9977 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
84839978 # FIXME: $output_objdir/$libname.filter potentially contains lots of
8484 # 's' commands which not all seds can handle. GNU sed should be fine
9979 # 's' commands, which not all seds can handle. GNU sed should be fine
84859980 # though. Also, the filter scales superlinearly with the number of
84869981 # global variables. join(1) would be nice here, but unfortunately
84879982 # isn't a blessed tool.
84909985 export_symbols=$output_objdir/$libname.def
84919986 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
84929987 fi
8493 fi
9988 }
84949989
84959990 libobjs=$output
84969991 # Restore the value of output.
85049999 # value of $libobjs for piecewise linking.
850510000
850610001 # Do each of the archive commands.
8507 if test "$module" = yes && test -n "$module_cmds" ; then
10002 if test yes = "$module" && test -n "$module_cmds"; then
850810003 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
850910004 cmds=$module_expsym_cmds
851010005 else
852610021
852710022 # Add any objects from preloaded convenience libraries
852810023 if test -n "$dlprefiles"; then
8529 gentop="$output_objdir/${outputname}x"
10024 gentop=$output_objdir/${outputname}x
853010025 func_append generated " $gentop"
853110026
853210027 func_extract_archives $gentop $dlprefiles
853410029 test "X$libobjs" = "X " && libobjs=
853510030 fi
853610031
8537 save_ifs="$IFS"; IFS='~'
10032 save_ifs=$IFS; IFS='~'
853810033 for cmd in $cmds; do
8539 IFS="$save_ifs"
10034 IFS=$sp$nl
854010035 eval cmd=\"$cmd\"
8541 $opt_silent || {
10036 IFS=$save_ifs
10037 $opt_quiet || {
854210038 func_quote_for_expand "$cmd"
854310039 eval "func_echo $func_quote_for_expand_result"
854410040 }
854610042 lt_exit=$?
854710043
854810044 # Restore the uninstalled library and exit
8549 if test "$opt_mode" = relink; then
10045 if test relink = "$opt_mode"; then
855010046 ( cd "$output_objdir" && \
855110047 $RM "${realname}T" && \
855210048 $MV "${realname}U" "$realname" )
855510051 exit $lt_exit
855610052 }
855710053 done
8558 IFS="$save_ifs"
10054 IFS=$save_ifs
855910055
856010056 # Restore the uninstalled library and exit
8561 if test "$opt_mode" = relink; then
10057 if test relink = "$opt_mode"; then
856210058 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
856310059
856410060 if test -n "$convenience"; then
857810074 done
857910075
858010076 # If -module or -export-dynamic was specified, set the dlname.
8581 if test "$module" = yes || test "$export_dynamic" = yes; then
10077 if test yes = "$module" || test yes = "$export_dynamic"; then
858210078 # On all known operating systems, these are identical.
8583 dlname="$soname"
10079 dlname=$soname
858410080 fi
858510081 fi
858610082 ;;
858710083
858810084 obj)
8589 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
8590 func_warning "\`-dlopen' is ignored for objects"
10085 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
10086 func_warning "'-dlopen' is ignored for objects"
859110087 fi
859210088
859310089 case " $deplibs" in
859410090 *\ -l* | *\ -L*)
8595 func_warning "\`-l' and \`-L' are ignored for objects" ;;
10091 func_warning "'-l' and '-L' are ignored for objects" ;;
859610092 esac
859710093
859810094 test -n "$rpath" && \
8599 func_warning "\`-rpath' is ignored for objects"
10095 func_warning "'-rpath' is ignored for objects"
860010096
860110097 test -n "$xrpath" && \
8602 func_warning "\`-R' is ignored for objects"
10098 func_warning "'-R' is ignored for objects"
860310099
860410100 test -n "$vinfo" && \
8605 func_warning "\`-version-info' is ignored for objects"
10101 func_warning "'-version-info' is ignored for objects"
860610102
860710103 test -n "$release" && \
8608 func_warning "\`-release' is ignored for objects"
10104 func_warning "'-release' is ignored for objects"
860910105
861010106 case $output in
861110107 *.lo)
861210108 test -n "$objs$old_deplibs" && \
8613 func_fatal_error "cannot build library object \`$output' from non-libtool objects"
10109 func_fatal_error "cannot build library object '$output' from non-libtool objects"
861410110
861510111 libobj=$output
861610112 func_lo2o "$libobj"
861810114 ;;
861910115 *)
862010116 libobj=
8621 obj="$output"
10117 obj=$output
862210118 ;;
862310119 esac
862410120
863110127 # the extraction.
863210128 reload_conv_objs=
863310129 gentop=
8634 # reload_cmds runs $LD directly, so let us get rid of
8635 # -Wl from whole_archive_flag_spec and hope we can get by with
8636 # turning comma into space..
8637 wl=
8638
10130 # if reload_cmds runs $LD directly, get rid of -Wl from
10131 # whole_archive_flag_spec and hope we can get by with turning comma
10132 # into space.
10133 case $reload_cmds in
10134 *\$LD[\ \$]*) wl= ;;
10135 esac
863910136 if test -n "$convenience"; then
864010137 if test -n "$whole_archive_flag_spec"; then
864110138 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
8642 reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
10139 test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
10140 reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
864310141 else
8644 gentop="$output_objdir/${obj}x"
10142 gentop=$output_objdir/${obj}x
864510143 func_append generated " $gentop"
864610144
864710145 func_extract_archives $gentop $convenience
865010148 fi
865110149
865210150 # If we're not building shared, we need to use non_pic_objs
8653 test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
10151 test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
865410152
865510153 # Create the old-style object.
8656 reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
8657
8658 output="$obj"
10154 reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
10155
10156 output=$obj
865910157 func_execute_cmds "$reload_cmds" 'exit $?'
866010158
866110159 # Exit if we aren't doing a library object file.
866710165 exit $EXIT_SUCCESS
866810166 fi
866910167
8670 if test "$build_libtool_libs" != yes; then
10168 test yes = "$build_libtool_libs" || {
867110169 if test -n "$gentop"; then
867210170 func_show_eval '${RM}r "$gentop"'
867310171 fi
867710175 # $show "echo timestamp > $libobj"
867810176 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
867910177 exit $EXIT_SUCCESS
8680 fi
8681
8682 if test -n "$pic_flag" || test "$pic_mode" != default; then
10178 }
10179
10180 if test -n "$pic_flag" || test default != "$pic_mode"; then
868310181 # Only do commands if we really have different PIC objects.
868410182 reload_objs="$libobjs $reload_conv_objs"
8685 output="$libobj"
10183 output=$libobj
868610184 func_execute_cmds "$reload_cmds" 'exit $?'
868710185 fi
868810186
869910197 output=$func_stripname_result.exe;;
870010198 esac
870110199 test -n "$vinfo" && \
8702 func_warning "\`-version-info' is ignored for programs"
10200 func_warning "'-version-info' is ignored for programs"
870310201
870410202 test -n "$release" && \
8705 func_warning "\`-release' is ignored for programs"
8706
8707 test "$preload" = yes \
8708 && test "$dlopen_support" = unknown \
8709 && test "$dlopen_self" = unknown \
8710 && test "$dlopen_self_static" = unknown && \
8711 func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
10203 func_warning "'-release' is ignored for programs"
10204
10205 $preload \
10206 && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
10207 && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
871210208
871310209 case $host in
871410210 *-*-rhapsody* | *-*-darwin1.[012])
872210218 *-*-darwin*)
872310219 # Don't allow lazy linking, it breaks C++ global constructors
872410220 # But is supposedly fixed on 10.4 or later (yay!).
8725 if test "$tagname" = CXX ; then
10221 if test CXX = "$tagname"; then
872610222 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
872710223 10.[0123])
8728 func_append compile_command " ${wl}-bind_at_load"
8729 func_append finalize_command " ${wl}-bind_at_load"
10224 func_append compile_command " $wl-bind_at_load"
10225 func_append finalize_command " $wl-bind_at_load"
873010226 ;;
873110227 esac
873210228 fi
876210258 *) func_append new_libs " $deplib" ;;
876310259 esac
876410260 done
8765 compile_deplibs="$new_libs"
10261 compile_deplibs=$new_libs
876610262
876710263
876810264 func_append compile_command " $compile_deplibs"
878610282 if test -n "$hardcode_libdir_flag_spec"; then
878710283 if test -n "$hardcode_libdir_separator"; then
878810284 if test -z "$hardcode_libdirs"; then
8789 hardcode_libdirs="$libdir"
10285 hardcode_libdirs=$libdir
879010286 else
879110287 # Just accumulate the unique libdirs.
879210288 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
880910305 fi
881010306 case $host in
881110307 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
8812 testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
10308 testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
881310309 case :$dllsearchpath: in
881410310 *":$libdir:"*) ;;
881510311 ::) dllsearchpath=$libdir;;
882610322 # Substitute the hardcoded libdirs into the rpath.
882710323 if test -n "$hardcode_libdir_separator" &&
882810324 test -n "$hardcode_libdirs"; then
8829 libdir="$hardcode_libdirs"
10325 libdir=$hardcode_libdirs
883010326 eval rpath=\" $hardcode_libdir_flag_spec\"
883110327 fi
8832 compile_rpath="$rpath"
10328 compile_rpath=$rpath
883310329
883410330 rpath=
883510331 hardcode_libdirs=
883710333 if test -n "$hardcode_libdir_flag_spec"; then
883810334 if test -n "$hardcode_libdir_separator"; then
883910335 if test -z "$hardcode_libdirs"; then
8840 hardcode_libdirs="$libdir"
10336 hardcode_libdirs=$libdir
884110337 else
884210338 # Just accumulate the unique libdirs.
884310339 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
886210358 # Substitute the hardcoded libdirs into the rpath.
886310359 if test -n "$hardcode_libdir_separator" &&
886410360 test -n "$hardcode_libdirs"; then
8865 libdir="$hardcode_libdirs"
10361 libdir=$hardcode_libdirs
886610362 eval rpath=\" $hardcode_libdir_flag_spec\"
886710363 fi
8868 finalize_rpath="$rpath"
8869
8870 if test -n "$libobjs" && test "$build_old_libs" = yes; then
10364 finalize_rpath=$rpath
10365
10366 if test -n "$libobjs" && test yes = "$build_old_libs"; then
887110367 # Transform all the library objects into standard objects.
887210368 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
887310369 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
887410370 fi
887510371
8876 func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
10372 func_generate_dlsyms "$outputname" "@PROGRAM@" false
887710373
887810374 # template prelinking step
887910375 if test -n "$prelink_cmds"; then
888010376 func_execute_cmds "$prelink_cmds" 'exit $?'
888110377 fi
888210378
8883 wrappers_required=yes
10379 wrappers_required=:
888410380 case $host in
888510381 *cegcc* | *mingw32ce*)
888610382 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
8887 wrappers_required=no
10383 wrappers_required=false
888810384 ;;
888910385 *cygwin* | *mingw* )
8890 if test "$build_libtool_libs" != yes; then
8891 wrappers_required=no
8892 fi
10386 test yes = "$build_libtool_libs" || wrappers_required=false
889310387 ;;
889410388 *)
8895 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
8896 wrappers_required=no
10389 if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
10390 wrappers_required=false
889710391 fi
889810392 ;;
889910393 esac
8900 if test "$wrappers_required" = no; then
10394 $wrappers_required || {
890110395 # Replace the output file specification.
890210396 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
8903 link_command="$compile_command$compile_rpath"
10397 link_command=$compile_command$compile_rpath
890410398
890510399 # We have no uninstalled library dependencies, so finalize right now.
890610400 exit_status=0
891310407 fi
891410408
891510409 # Delete the generated files.
8916 if test -f "$output_objdir/${outputname}S.${objext}"; then
8917 func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
10410 if test -f "$output_objdir/${outputname}S.$objext"; then
10411 func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
891810412 fi
891910413
892010414 exit $exit_status
8921 fi
10415 }
892210416
892310417 if test -n "$compile_shlibpath$finalize_shlibpath"; then
892410418 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
894810442 fi
894910443 fi
895010444
8951 if test "$no_install" = yes; then
10445 if test yes = "$no_install"; then
895210446 # We don't need to create a wrapper script.
8953 link_command="$compile_var$compile_command$compile_rpath"
10447 link_command=$compile_var$compile_command$compile_rpath
895410448 # Replace the output file specification.
895510449 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
895610450 # Delete the old output file.
896710461 exit $EXIT_SUCCESS
896810462 fi
896910463
8970 if test "$hardcode_action" = relink; then
8971 # Fast installation is not supported
8972 link_command="$compile_var$compile_command$compile_rpath"
8973 relink_command="$finalize_var$finalize_command$finalize_rpath"
8974
8975 func_warning "this platform does not like uninstalled shared libraries"
8976 func_warning "\`$output' will be relinked during installation"
8977 else
8978 if test "$fast_install" != no; then
8979 link_command="$finalize_var$compile_command$finalize_rpath"
8980 if test "$fast_install" = yes; then
8981 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
8982 else
8983 # fast_install is set to needless
8984 relink_command=
8985 fi
8986 else
8987 link_command="$compile_var$compile_command$compile_rpath"
8988 relink_command="$finalize_var$finalize_command$finalize_rpath"
8989 fi
8990 fi
10464 case $hardcode_action,$fast_install in
10465 relink,*)
10466 # Fast installation is not supported
10467 link_command=$compile_var$compile_command$compile_rpath
10468 relink_command=$finalize_var$finalize_command$finalize_rpath
10469
10470 func_warning "this platform does not like uninstalled shared libraries"
10471 func_warning "'$output' will be relinked during installation"
10472 ;;
10473 *,yes)
10474 link_command=$finalize_var$compile_command$finalize_rpath
10475 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
10476 ;;
10477 *,no)
10478 link_command=$compile_var$compile_command$compile_rpath
10479 relink_command=$finalize_var$finalize_command$finalize_rpath
10480 ;;
10481 *,needless)
10482 link_command=$finalize_var$compile_command$finalize_rpath
10483 relink_command=
10484 ;;
10485 esac
899110486
899210487 # Replace the output file specification.
899310488 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
904410539 func_dirname_and_basename "$output" "" "."
904510540 output_name=$func_basename_result
904610541 output_path=$func_dirname_result
9047 cwrappersource="$output_path/$objdir/lt-$output_name.c"
9048 cwrapper="$output_path/$output_name.exe"
10542 cwrappersource=$output_path/$objdir/lt-$output_name.c
10543 cwrapper=$output_path/$output_name.exe
904910544 $RM $cwrappersource $cwrapper
905010545 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
905110546
906610561 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
906710562 $opt_dry_run || {
906810563 # note: this script will not be executed, so do not chmod.
9069 if test "x$build" = "x$host" ; then
10564 if test "x$build" = "x$host"; then
907010565 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
907110566 else
907210567 func_emit_wrapper no > $func_ltwrapper_scriptname_result
908910584 # See if we need to build an old-fashioned archive.
909010585 for oldlib in $oldlibs; do
909110586
9092 if test "$build_libtool_libs" = convenience; then
9093 oldobjs="$libobjs_save $symfileobj"
9094 addlibs="$convenience"
9095 build_libtool_libs=no
9096 else
9097 if test "$build_libtool_libs" = module; then
9098 oldobjs="$libobjs_save"
10587 case $build_libtool_libs in
10588 convenience)
10589 oldobjs="$libobjs_save $symfileobj"
10590 addlibs=$convenience
909910591 build_libtool_libs=no
9100 else
10592 ;;
10593 module)
10594 oldobjs=$libobjs_save
10595 addlibs=$old_convenience
10596 build_libtool_libs=no
10597 ;;
10598 *)
910110599 oldobjs="$old_deplibs $non_pic_objects"
9102 if test "$preload" = yes && test -f "$symfileobj"; then
9103 func_append oldobjs " $symfileobj"
9104 fi
9105 fi
9106 addlibs="$old_convenience"
9107 fi
10600 $preload && test -f "$symfileobj" \
10601 && func_append oldobjs " $symfileobj"
10602 addlibs=$old_convenience
10603 ;;
10604 esac
910810605
910910606 if test -n "$addlibs"; then
9110 gentop="$output_objdir/${outputname}x"
10607 gentop=$output_objdir/${outputname}x
911110608 func_append generated " $gentop"
911210609
911310610 func_extract_archives $gentop $addlibs
911510612 fi
911610613
911710614 # Do each command in the archive commands.
9118 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
10615 if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
911910616 cmds=$old_archive_from_new_cmds
912010617 else
912110618
912210619 # Add any objects from preloaded convenience libraries
912310620 if test -n "$dlprefiles"; then
9124 gentop="$output_objdir/${outputname}x"
10621 gentop=$output_objdir/${outputname}x
912510622 func_append generated " $gentop"
912610623
912710624 func_extract_archives $gentop $dlprefiles
914210639 :
914310640 else
914410641 echo "copying selected object files to avoid basename conflicts..."
9145 gentop="$output_objdir/${outputname}x"
10642 gentop=$output_objdir/${outputname}x
914610643 func_append generated " $gentop"
914710644 func_mkdir_p "$gentop"
914810645 save_oldobjs=$oldobjs
915110648 for obj in $save_oldobjs
915210649 do
915310650 func_basename "$obj"
9154 objbase="$func_basename_result"
10651 objbase=$func_basename_result
915510652 case " $oldobjs " in
915610653 " ") oldobjs=$obj ;;
915710654 *[\ /]"$objbase "*)
922010717 else
922110718 # the above command should be used before it gets too long
922210719 oldobjs=$objlist
9223 if test "$obj" = "$last_oldobj" ; then
10720 if test "$obj" = "$last_oldobj"; then
922410721 RANLIB=$save_RANLIB
922510722 fi
922610723 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9227 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
10724 eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
922810725 objlist=
922910726 len=$len0
923010727 fi
923110728 done
923210729 RANLIB=$save_RANLIB
923310730 oldobjs=$objlist
9234 if test "X$oldobjs" = "X" ; then
10731 if test -z "$oldobjs"; then
923510732 eval cmds=\"\$concat_cmds\"
923610733 else
923710734 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
924810745 case $output in
924910746 *.la)
925010747 old_library=
9251 test "$build_old_libs" = yes && old_library="$libname.$libext"
10748 test yes = "$build_old_libs" && old_library=$libname.$libext
925210749 func_verbose "creating $output"
925310750
925410751 # Preserve any variables that may affect compiler behavior
926310760 fi
926410761 done
926510762 # Quote the link command for shipping.
9266 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
10763 relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
926710764 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
9268 if test "$hardcode_automatic" = yes ; then
10765 if test yes = "$hardcode_automatic"; then
926910766 relink_command=
927010767 fi
927110768
927210769 # Only create the output if not a dry run.
927310770 $opt_dry_run || {
927410771 for installed in no yes; do
9275 if test "$installed" = yes; then
10772 if test yes = "$installed"; then
927610773 if test -z "$install_libdir"; then
927710774 break
927810775 fi
9279 output="$output_objdir/$outputname"i
10776 output=$output_objdir/${outputname}i
928010777 # Replace all uninstalled libtool libraries with the installed ones
928110778 newdependency_libs=
928210779 for deplib in $dependency_libs; do
928310780 case $deplib in
928410781 *.la)
928510782 func_basename "$deplib"
9286 name="$func_basename_result"
10783 name=$func_basename_result
928710784 func_resolve_sysroot "$deplib"
9288 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
10785 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
928910786 test -z "$libdir" && \
9290 func_fatal_error "\`$deplib' is not a valid libtool archive"
10787 func_fatal_error "'$deplib' is not a valid libtool archive"
929110788 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
929210789 ;;
929310790 -L*)
930310800 *) func_append newdependency_libs " $deplib" ;;
930410801 esac
930510802 done
9306 dependency_libs="$newdependency_libs"
10803 dependency_libs=$newdependency_libs
930710804 newdlfiles=
930810805
930910806 for lib in $dlfiles; do
931010807 case $lib in
931110808 *.la)
931210809 func_basename "$lib"
9313 name="$func_basename_result"
9314 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10810 name=$func_basename_result
10811 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
931510812 test -z "$libdir" && \
9316 func_fatal_error "\`$lib' is not a valid libtool archive"
10813 func_fatal_error "'$lib' is not a valid libtool archive"
931710814 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
931810815 ;;
931910816 *) func_append newdlfiles " $lib" ;;
932010817 esac
932110818 done
9322 dlfiles="$newdlfiles"
10819 dlfiles=$newdlfiles
932310820 newdlprefiles=
932410821 for lib in $dlprefiles; do
932510822 case $lib in
932910826 # didn't already link the preopened objects directly into
933010827 # the library:
933110828 func_basename "$lib"
9332 name="$func_basename_result"
9333 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10829 name=$func_basename_result
10830 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
933410831 test -z "$libdir" && \
9335 func_fatal_error "\`$lib' is not a valid libtool archive"
10832 func_fatal_error "'$lib' is not a valid libtool archive"
933610833 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
933710834 ;;
933810835 esac
933910836 done
9340 dlprefiles="$newdlprefiles"
10837 dlprefiles=$newdlprefiles
934110838 else
934210839 newdlfiles=
934310840 for lib in $dlfiles; do
934410841 case $lib in
9345 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
10842 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
934610843 *) abs=`pwd`"/$lib" ;;
934710844 esac
934810845 func_append newdlfiles " $abs"
934910846 done
9350 dlfiles="$newdlfiles"
10847 dlfiles=$newdlfiles
935110848 newdlprefiles=
935210849 for lib in $dlprefiles; do
935310850 case $lib in
9354 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
10851 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
935510852 *) abs=`pwd`"/$lib" ;;
935610853 esac
935710854 func_append newdlprefiles " $abs"
935810855 done
9359 dlprefiles="$newdlprefiles"
10856 dlprefiles=$newdlprefiles
936010857 fi
936110858 $RM $output
936210859 # place dlname in correct position for cygwin
937210869 case $host,$output,$installed,$module,$dlname in
937310870 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
937410871 # If a -bindir argument was supplied, place the dll there.
9375 if test "x$bindir" != x ;
9376 then
10872 if test -n "$bindir"; then
937710873 func_relative_path "$install_libdir" "$bindir"
9378 tdlname=$func_relative_path_result$dlname
10874 tdlname=$func_relative_path_result/$dlname
937910875 else
938010876 # Otherwise fall back on heuristic.
938110877 tdlname=../bin/$dlname
938410880 esac
938510881 $ECHO > $output "\
938610882 # $outputname - a libtool library file
9387 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
10883 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
938810884 #
938910885 # Please DO NOT delete this file!
939010886 # It is necessary for linking the library.
939810894 # The name of the static archive.
939910895 old_library='$old_library'
940010896
9401 # Linker flags that can not go in dependency_libs.
10897 # Linker flags that cannot go in dependency_libs.
940210898 inherited_linker_flags='$new_inherited_linker_flags'
940310899
940410900 # Libraries that this one depends upon.
942410920
942510921 # Directory that this library needs to be installed in:
942610922 libdir='$install_libdir'"
9427 if test "$installed" = no && test "$need_relink" = yes; then
10923 if test no,yes = "$installed,$need_relink"; then
942810924 $ECHO >> $output "\
942910925 relink_command=\"$relink_command\""
943010926 fi
943910935 exit $EXIT_SUCCESS
944010936 }
944110937
9442 { test "$opt_mode" = link || test "$opt_mode" = relink; } &&
9443 func_mode_link ${1+"$@"}
10938 if test link = "$opt_mode" || test relink = "$opt_mode"; then
10939 func_mode_link ${1+"$@"}
10940 fi
944410941
944510942
944610943 # func_mode_uninstall arg...
944710944 func_mode_uninstall ()
944810945 {
9449 $opt_debug
9450 RM="$nonopt"
10946 $debug_cmd
10947
10948 RM=$nonopt
945110949 files=
9452 rmforce=
10950 rmforce=false
945310951 exit_status=0
945410952
945510953 # This variable tells wrapper scripts just to set variables rather
945610954 # than running their programs.
9457 libtool_install_magic="$magic"
10955 libtool_install_magic=$magic
945810956
945910957 for arg
946010958 do
946110959 case $arg in
9462 -f) func_append RM " $arg"; rmforce=yes ;;
10960 -f) func_append RM " $arg"; rmforce=: ;;
946310961 -*) func_append RM " $arg" ;;
946410962 *) func_append files " $arg" ;;
946510963 esac
947210970
947310971 for file in $files; do
947410972 func_dirname "$file" "" "."
9475 dir="$func_dirname_result"
9476 if test "X$dir" = X.; then
9477 odir="$objdir"
10973 dir=$func_dirname_result
10974 if test . = "$dir"; then
10975 odir=$objdir
947810976 else
9479 odir="$dir/$objdir"
10977 odir=$dir/$objdir
948010978 fi
948110979 func_basename "$file"
9482 name="$func_basename_result"
9483 test "$opt_mode" = uninstall && odir="$dir"
10980 name=$func_basename_result
10981 test uninstall = "$opt_mode" && odir=$dir
948410982
948510983 # Remember odir for removal later, being careful to avoid duplicates
9486 if test "$opt_mode" = clean; then
10984 if test clean = "$opt_mode"; then
948710985 case " $rmdirs " in
948810986 *" $odir "*) ;;
948910987 *) func_append rmdirs " $odir" ;;
949810996 elif test -d "$file"; then
949910997 exit_status=1
950010998 continue
9501 elif test "$rmforce" = yes; then
10999 elif $rmforce; then
950211000 continue
950311001 fi
950411002
9505 rmfiles="$file"
11003 rmfiles=$file
950611004
950711005 case $name in
950811006 *.la)
951611014 done
951711015 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
951811016
9519 case "$opt_mode" in
11017 case $opt_mode in
952011018 clean)
952111019 case " $library_names " in
952211020 *" $dlname "*) ;;
952711025 uninstall)
952811026 if test -n "$library_names"; then
952911027 # Do each command in the postuninstall commands.
9530 func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
11028 func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
953111029 fi
953211030
953311031 if test -n "$old_library"; then
953411032 # Do each command in the old_postuninstall commands.
9535 func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
11033 func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
953611034 fi
953711035 # FIXME: should reinstall the best remaining shared library.
953811036 ;;
954811046 func_source $dir/$name
954911047
955011048 # Add PIC object to the list of files to remove.
9551 if test -n "$pic_object" &&
9552 test "$pic_object" != none; then
11049 if test -n "$pic_object" && test none != "$pic_object"; then
955311050 func_append rmfiles " $dir/$pic_object"
955411051 fi
955511052
955611053 # Add non-PIC object to the list of files to remove.
9557 if test -n "$non_pic_object" &&
9558 test "$non_pic_object" != none; then
11054 if test -n "$non_pic_object" && test none != "$non_pic_object"; then
955911055 func_append rmfiles " $dir/$non_pic_object"
956011056 fi
956111057 fi
956211058 ;;
956311059
956411060 *)
9565 if test "$opt_mode" = clean ; then
11061 if test clean = "$opt_mode"; then
956611062 noexename=$name
956711063 case $file in
956811064 *.exe)
958911085
959011086 # note $name still contains .exe if it was in $file originally
959111087 # as does the version of $file that was added into $rmfiles
9592 func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
9593 if test "$fast_install" = yes && test -n "$relink_command"; then
11088 func_append rmfiles " $odir/$name $odir/${name}S.$objext"
11089 if test yes = "$fast_install" && test -n "$relink_command"; then
959411090 func_append rmfiles " $odir/lt-$name"
959511091 fi
9596 if test "X$noexename" != "X$name" ; then
9597 func_append rmfiles " $odir/lt-${noexename}.c"
11092 if test "X$noexename" != "X$name"; then
11093 func_append rmfiles " $odir/lt-$noexename.c"
959811094 fi
959911095 fi
960011096 fi
960311099 func_show_eval "$RM $rmfiles" 'exit_status=1'
960411100 done
960511101
9606 # Try to remove the ${objdir}s in the directories where we deleted files
11102 # Try to remove the $objdir's in the directories where we deleted files
960711103 for dir in $rmdirs; do
960811104 if test -d "$dir"; then
960911105 func_show_eval "rmdir $dir >/dev/null 2>&1"
961311109 exit $exit_status
961411110 }
961511111
9616 { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
9617 func_mode_uninstall ${1+"$@"}
11112 if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
11113 func_mode_uninstall ${1+"$@"}
11114 fi
961811115
961911116 test -z "$opt_mode" && {
9620 help="$generic_help"
11117 help=$generic_help
962111118 func_fatal_help "you must specify a MODE"
962211119 }
962311120
962411121 test -z "$exec_cmd" && \
9625 func_fatal_help "invalid operation mode \`$opt_mode'"
11122 func_fatal_help "invalid operation mode '$opt_mode'"
962611123
962711124 if test -n "$exec_cmd"; then
962811125 eval exec "$exec_cmd"
963311130
963411131
963511132 # The TAGs below are defined such that we never get into a situation
9636 # in which we disable both kinds of libraries. Given conflicting
11133 # where we disable both kinds of libraries. Given conflicting
963711134 # choices, we go for a static library, that is the most portable,
963811135 # since we can't tell whether shared libraries were disabled because
963911136 # the user asked for that or because the platform doesn't support
965611153 # mode:shell-script
965711154 # sh-indentation:2
965811155 # End:
9659 # vi:sw=2
9660
00 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
11 #
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
4 # Foundation, Inc.
2 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
53 # Written by Gordon Matzigkeit, 1996
64 #
75 # This file is free software; the Free Software Foundation gives
97 # modifications, as long as this notice is preserved.
108
119 m4_define([_LT_COPYING], [dnl
12 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
14 # Foundation, Inc.
15 # Written by Gordon Matzigkeit, 1996
10 # Copyright (C) 2014 Free Software Foundation, Inc.
11 # This is free software; see the source for copying conditions. There is NO
12 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 # GNU Libtool is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of of the License, or
17 # (at your option) any later version.
1618 #
17 # This file is part of GNU Libtool.
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program or library that is built
21 # using GNU Libtool, you may include this file under the same
22 # distribution terms that you use for the rest of that program.
1823 #
19 # GNU Libtool is free software; you can redistribute it and/or
20 # modify it under the terms of the GNU General Public License as
21 # published by the Free Software Foundation; either version 2 of
22 # the License, or (at your option) any later version.
23 #
24 # As a special exception to the GNU General Public License,
25 # if you distribute this file as part of a program or library that
26 # is built using GNU Libtool, you may include this file under the
27 # same distribution terms that you use for the rest of that program.
28 #
29 # GNU Libtool is distributed in the hope that it will be useful,
30 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # GNU Libtool is distributed in the hope that it will be useful, but
25 # WITHOUT ANY WARRANTY; without even the implied warranty of
3126 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3227 # GNU General Public License for more details.
3328 #
3429 # You should have received a copy of the GNU General Public License
35 # along with GNU Libtool; see the file COPYING. If not, a copy
36 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
37 # obtained by writing to the Free Software Foundation, Inc.,
38 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 # along with this program. If not, see <http://www.gnu.org/licenses/>.
3931 ])
4032
41 # serial 57 LT_INIT
33 # serial 58 LT_INIT
4234
4335
4436 # LT_PREREQ(VERSION)
6658 # LT_INIT([OPTIONS])
6759 # ------------------
6860 AC_DEFUN([LT_INIT],
69 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
61 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
7062 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
7163 AC_BEFORE([$0], [LT_LANG])dnl
7264 AC_BEFORE([$0], [LT_OUTPUT])dnl
9082 _LT_SET_OPTIONS([$0], [$1])
9183
9284 # This can be used to rebuild libtool when needed
93 LIBTOOL_DEPS="$ltmain"
85 LIBTOOL_DEPS=$ltmain
9486
9587 # Always use our own libtool.
9688 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
110102 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
111103
112104
105 # _LT_PREPARE_CC_BASENAME
106 # -----------------------
107 m4_defun([_LT_PREPARE_CC_BASENAME], [
108 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
109 func_cc_basename ()
110 {
111 for cc_temp in @S|@*""; do
112 case $cc_temp in
113 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
114 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
115 \-*) ;;
116 *) break;;
117 esac
118 done
119 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
120 }
121 ])# _LT_PREPARE_CC_BASENAME
122
123
113124 # _LT_CC_BASENAME(CC)
114125 # -------------------
115 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
126 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
127 # but that macro is also expanded into generated libtool script, which
128 # arranges for $SED and $ECHO to be set by different means.
116129 m4_defun([_LT_CC_BASENAME],
117 [for cc_temp in $1""; do
118 case $cc_temp in
119 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
120 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
121 \-*) ;;
122 *) break;;
123 esac
124 done
125 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
130 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
131 AC_REQUIRE([_LT_DECL_SED])dnl
132 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
133 func_cc_basename $1
134 cc_basename=$func_cc_basename_result
126135 ])
127136
128137
129138 # _LT_FILEUTILS_DEFAULTS
130139 # ----------------------
131140 # It is okay to use these file commands and assume they have been set
132 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
141 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
133142 m4_defun([_LT_FILEUTILS_DEFAULTS],
134143 [: ${CP="cp -f"}
135144 : ${MV="mv -f"}
176185 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
177186 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
178187 m4_require([_LT_WITH_SYSROOT])dnl
188 m4_require([_LT_CMD_TRUNCATE])dnl
179189
180190 _LT_CONFIG_LIBTOOL_INIT([
181 # See if we are running on zsh, and set the options which allow our
191 # See if we are running on zsh, and set the options that allow our
182192 # commands through without removal of \ escapes INIT.
183 if test -n "\${ZSH_VERSION+set}" ; then
193 if test -n "\${ZSH_VERSION+set}"; then
184194 setopt NO_GLOB_SUBST
185195 fi
186196 ])
187 if test -n "${ZSH_VERSION+set}" ; then
197 if test -n "${ZSH_VERSION+set}"; then
188198 setopt NO_GLOB_SUBST
189199 fi
190200
197207 # AIX sometimes has problems with the GCC collect2 program. For some
198208 # reason, if we set the COLLECT_NAMES environment variable, the problems
199209 # vanish in a puff of smoke.
200 if test "X${COLLECT_NAMES+set}" != Xset; then
210 if test set != "${COLLECT_NAMES+set}"; then
201211 COLLECT_NAMES=
202212 export COLLECT_NAMES
203213 fi
208218 ofile=libtool
209219 can_build_shared=yes
210220
211 # All known linkers require a `.a' archive for static linking (except MSVC,
221 # All known linkers require a '.a' archive for static linking (except MSVC,
212222 # which needs '.lib').
213223 libext=a
214224
215 with_gnu_ld="$lt_cv_prog_gnu_ld"
216
217 old_CC="$CC"
218 old_CFLAGS="$CFLAGS"
225 with_gnu_ld=$lt_cv_prog_gnu_ld
226
227 old_CC=$CC
228 old_CFLAGS=$CFLAGS
219229
220230 # Set sane defaults for various variables
221231 test -z "$CC" && CC=cc
268278
269279 # _LT_PROG_LTMAIN
270280 # ---------------
271 # Note that this code is called both from `configure', and `config.status'
281 # Note that this code is called both from 'configure', and 'config.status'
272282 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
273 # `config.status' has no value for ac_aux_dir unless we are using Automake,
283 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
274284 # so we pass a copy along to make sure it has a sensible value anyway.
275285 m4_defun([_LT_PROG_LTMAIN],
276286 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
277287 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
278 ltmain="$ac_aux_dir/ltmain.sh"
288 ltmain=$ac_aux_dir/ltmain.sh
279289 ])# _LT_PROG_LTMAIN
280290
281291
285295
286296 # So that we can recreate a full libtool script including additional
287297 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
288 # in macros and then make a single call at the end using the `libtool'
298 # in macros and then make a single call at the end using the 'libtool'
289299 # label.
290300
291301
420430
421431 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
422432 # ------------------------------------
423 # Quote a variable value, and forward it to `config.status' so that its
424 # declaration there will have the same value as in `configure'. VARNAME
433 # Quote a variable value, and forward it to 'config.status' so that its
434 # declaration there will have the same value as in 'configure'. VARNAME
425435 # must have a single quote delimited value for this to work.
426436 m4_define([_LT_CONFIG_STATUS_DECLARE],
427437 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
445455 # Output comment and list of tags supported by the script
446456 m4_defun([_LT_LIBTOOL_TAGS],
447457 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
448 available_tags="_LT_TAGS"dnl
458 available_tags='_LT_TAGS'dnl
449459 ])
450460
451461
473483 # _LT_LIBTOOL_CONFIG_VARS
474484 # -----------------------
475485 # Produce commented declarations of non-tagged libtool config variables
476 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
486 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
477487 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
478488 # section) are produced by _LT_LIBTOOL_TAG_VARS.
479489 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
499509 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
500510 # variables for single and double quote escaping we saved from calls
501511 # to _LT_DECL, we can put quote escaped variables declarations
502 # into `config.status', and then the shell code to quote escape them in
503 # for loops in `config.status'. Finally, any additional code accumulated
512 # into 'config.status', and then the shell code to quote escape them in
513 # for loops in 'config.status'. Finally, any additional code accumulated
504514 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
505515 m4_defun([_LT_CONFIG_COMMANDS],
506516 [AC_PROVIDE_IFELSE([LT_OUTPUT],
546556 ]], lt_decl_quote_varnames); do
547557 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
548558 *[[\\\\\\\`\\"\\\$]]*)
549 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
559 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
550560 ;;
551561 *)
552562 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
559569 ]], lt_decl_dquote_varnames); do
560570 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
561571 *[[\\\\\\\`\\"\\\$]]*)
562 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
572 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
563573 ;;
564574 *)
565575 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
575585 # Generate a child script FILE with all initialization necessary to
576586 # reuse the environment learned by the parent script, and make the
577587 # file executable. If COMMENT is supplied, it is inserted after the
578 # `#!' sequence but before initialization text begins. After this
588 # '#!' sequence but before initialization text begins. After this
579589 # macro, additional text can be appended to FILE to form the body of
580590 # the child script. The macro ends with non-zero status if the
581591 # file could not be fully written (such as if the disk is full).
597607 _AS_PREPARE
598608 exec AS_MESSAGE_FD>&1
599609 _ASEOF
600 test $lt_write_fail = 0 && chmod +x $1[]dnl
610 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
601611 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
602612
603613 # LT_OUTPUT
620630 } >&AS_MESSAGE_LOG_FD
621631
622632 lt_cl_help="\
623 \`$as_me' creates a local libtool stub from the current configuration,
633 '$as_me' creates a local libtool stub from the current configuration,
624634 for use in further configure time tests before the real libtool is
625635 generated.
626636
642652 This config.lt script is free software; the Free Software Foundation
643653 gives unlimited permision to copy, distribute and modify it."
644654
645 while test $[#] != 0
655 while test 0 != $[#]
646656 do
647657 case $[1] in
648658 --version | --v* | -V )
655665 lt_cl_silent=: ;;
656666
657667 -*) AC_MSG_ERROR([unrecognized option: $[1]
658 Try \`$[0] --help' for more information.]) ;;
668 Try '$[0] --help' for more information.]) ;;
659669
660670 *) AC_MSG_ERROR([unrecognized argument: $[1]
661 Try \`$[0] --help' for more information.]) ;;
671 Try '$[0] --help' for more information.]) ;;
662672 esac
663673 shift
664674 done
684694 # open by configure. Here we exec the FD to /dev/null, effectively closing
685695 # config.log, so it can be properly (re)opened and appended to by config.lt.
686696 lt_cl_success=:
687 test "$silent" = yes &&
697 test yes = "$silent" &&
688698 lt_config_lt_args="$lt_config_lt_args --quiet"
689699 exec AS_MESSAGE_LOG_FD>/dev/null
690700 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
704714 _LT_CONFIG_SAVE_COMMANDS([
705715 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
706716 m4_if(_LT_TAG, [C], [
707 # See if we are running on zsh, and set the options which allow our
717 # See if we are running on zsh, and set the options that allow our
708718 # commands through without removal of \ escapes.
709 if test -n "${ZSH_VERSION+set}" ; then
719 if test -n "${ZSH_VERSION+set}"; then
710720 setopt NO_GLOB_SUBST
711721 fi
712722
713 cfgfile="${ofile}T"
723 cfgfile=${ofile}T
714724 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
715725 $RM "$cfgfile"
716726
717727 cat <<_LT_EOF >> "$cfgfile"
718728 #! $SHELL
719
720 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
721 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
729 # Generated automatically by $as_me ($PACKAGE) $VERSION
722730 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
723731 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
724 #
732
733 # Provide generalized library-building support services.
734 # Written by Gordon Matzigkeit, 1996
735
725736 _LT_COPYING
726737 _LT_LIBTOOL_TAGS
738
739 # Configured defaults for sys_lib_dlsearch_path munging.
740 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
727741
728742 # ### BEGIN LIBTOOL CONFIG
729743 _LT_LIBTOOL_CONFIG_VARS
730744 _LT_LIBTOOL_TAG_VARS
731745 # ### END LIBTOOL CONFIG
746
747 _LT_EOF
748
749 cat <<'_LT_EOF' >> "$cfgfile"
750
751 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
752
753 _LT_PREPARE_MUNGE_PATH_LIST
754 _LT_PREPARE_CC_BASENAME
755
756 # ### END FUNCTIONS SHARED WITH CONFIGURE
732757
733758 _LT_EOF
734759
738763 # AIX sometimes has problems with the GCC collect2 program. For some
739764 # reason, if we set the COLLECT_NAMES environment variable, the problems
740765 # vanish in a puff of smoke.
741 if test "X${COLLECT_NAMES+set}" != Xset; then
766 if test set != "${COLLECT_NAMES+set}"; then
742767 COLLECT_NAMES=
743768 export COLLECT_NAMES
744769 fi
754779 # is reportedly fixed, but why not run on old versions too?
755780 sed '$q' "$ltmain" >> "$cfgfile" \
756781 || (rm -f "$cfgfile"; exit 1)
757
758 _LT_PROG_REPLACE_SHELLFNS
759782
760783 mv -f "$cfgfile" "$ofile" ||
761784 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
774797 [m4_if([$1], [], [
775798 PACKAGE='$PACKAGE'
776799 VERSION='$VERSION'
777 TIMESTAMP='$TIMESTAMP'
778800 RM='$RM'
779801 ofile='$ofile'], [])
780802 ])dnl /_LT_CONFIG_SAVE_COMMANDS
973995
974996 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
975997 [lt_cv_apple_cc_single_mod=no
976 if test -z "${LT_MULTI_MODULE}"; then
998 if test -z "$LT_MULTI_MODULE"; then
977999 # By default we will add the -single_module flag. You can override
9781000 # by either setting the environment variable LT_MULTI_MODULE
9791001 # non-empty at configure time, or by adding -multi_module to the
9911013 cat conftest.err >&AS_MESSAGE_LOG_FD
9921014 # Otherwise, if the output was created with a 0 exit code from
9931015 # the compiler, it worked.
994 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1016 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
9951017 lt_cv_apple_cc_single_mod=yes
9961018 else
9971019 cat conftest.err >&AS_MESSAGE_LOG_FD
10091031 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
10101032 [lt_cv_ld_exported_symbols_list=yes],
10111033 [lt_cv_ld_exported_symbols_list=no])
1012 LDFLAGS="$save_LDFLAGS"
1034 LDFLAGS=$save_LDFLAGS
10131035 ])
10141036
10151037 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
10311053 _lt_result=$?
10321054 if test -s conftest.err && $GREP force_load conftest.err; then
10331055 cat conftest.err >&AS_MESSAGE_LOG_FD
1034 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1056 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10351057 lt_cv_ld_force_load=yes
10361058 else
10371059 cat conftest.err >&AS_MESSAGE_LOG_FD
10411063 ])
10421064 case $host_os in
10431065 rhapsody* | darwin1.[[012]])
1044 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1066 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10451067 darwin1.*)
1046 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1068 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10471069 darwin*) # darwin 5.x on
10481070 # if running on 10.5 or later, the deployment target defaults
10491071 # to the OS version, if on x86, and 10.4, the deployment
10501072 # target defaults to 10.4. Don't you love it?
10511073 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10521074 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1053 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1054 10.[[012]]*)
1055 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1075 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1076 10.[[012]][[,.]]*)
1077 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10561078 10.*)
1057 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1079 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10581080 esac
10591081 ;;
10601082 esac
1061 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1083 if test yes = "$lt_cv_apple_cc_single_mod"; then
10621084 _lt_dar_single_mod='$single_module'
10631085 fi
1064 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1065 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1086 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1087 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10661088 else
1067 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1089 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10681090 fi
1069 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1091 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10701092 _lt_dsymutil='~$DSYMUTIL $lib || :'
10711093 else
10721094 _lt_dsymutil=
10861108 _LT_TAGVAR(hardcode_direct, $1)=no
10871109 _LT_TAGVAR(hardcode_automatic, $1)=yes
10881110 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1089 if test "$lt_cv_ld_force_load" = "yes"; then
1090 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1111 if test yes = "$lt_cv_ld_force_load"; then
1112 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
10911113 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
10921114 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
10931115 else
10941116 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
10951117 fi
10961118 _LT_TAGVAR(link_all_deplibs, $1)=yes
1097 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1119 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
10981120 case $cc_basename in
1099 ifort*) _lt_dar_can_shared=yes ;;
1121 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11001122 *) _lt_dar_can_shared=$GCC ;;
11011123 esac
1102 if test "$_lt_dar_can_shared" = "yes"; then
1124 if test yes = "$_lt_dar_can_shared"; then
11031125 output_verbose_link_cmd=func_echo_all
1104 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1105 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1106 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1107 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1126 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
1127 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1128 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
1129 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
11081130 m4_if([$1], [CXX],
1109 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1110 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1111 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1131 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
1132 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
1133 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
11121134 fi
11131135 ],[])
11141136 else
11281150 # Allow to override them for all tags through lt_cv_aix_libpath.
11291151 m4_defun([_LT_SYS_MODULE_PATH_AIX],
11301152 [m4_require([_LT_DECL_SED])dnl
1131 if test "${lt_cv_aix_libpath+set}" = set; then
1153 if test set = "${lt_cv_aix_libpath+set}"; then
11321154 aix_libpath=$lt_cv_aix_libpath
11331155 else
11341156 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
11461168 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11471169 fi],[])
11481170 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1149 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1171 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
11501172 fi
11511173 ])
11521174 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
11661188 # -----------------------
11671189 # Find how we can fake an echo command that does not interpret backslash.
11681190 # In particular, with Autoconf 2.60 or later we add some code to the start
1169 # of the generated configure script which will find a shell with a builtin
1170 # printf (which we can use as an echo command).
1191 # of the generated configure script that will find a shell with a builtin
1192 # printf (that we can use as an echo command).
11711193 m4_defun([_LT_PROG_ECHO_BACKSLASH],
11721194 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11731195 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11951217 # Invoke $ECHO with all args, space-separated.
11961218 func_echo_all ()
11971219 {
1198 $ECHO "$*"
1220 $ECHO "$*"
11991221 }
12001222
1201 case "$ECHO" in
1223 case $ECHO in
12021224 printf*) AC_MSG_RESULT([printf]) ;;
12031225 print*) AC_MSG_RESULT([print -r]) ;;
12041226 *) AC_MSG_RESULT([cat]) ;;
12241246 AC_DEFUN([_LT_WITH_SYSROOT],
12251247 [AC_MSG_CHECKING([for sysroot])
12261248 AC_ARG_WITH([sysroot],
1227 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1228 (or the compiler's sysroot if not specified).],
1249 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1250 [Search for dependent libraries within DIR (or the compiler's sysroot
1251 if not specified).])],
12291252 [], [with_sysroot=no])
12301253
12311254 dnl lt_sysroot will always be passed unquoted. We quote it here
12321255 dnl in case the user passed a directory name.
12331256 lt_sysroot=
1234 case ${with_sysroot} in #(
1257 case $with_sysroot in #(
12351258 yes)
1236 if test "$GCC" = yes; then
1259 if test yes = "$GCC"; then
12371260 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
12381261 fi
12391262 ;; #(
12431266 no|'')
12441267 ;; #(
12451268 *)
1246 AC_MSG_RESULT([${with_sysroot}])
1269 AC_MSG_RESULT([$with_sysroot])
12471270 AC_MSG_ERROR([The sysroot must be an absolute path.])
12481271 ;;
12491272 esac
12501273
12511274 AC_MSG_RESULT([${lt_sysroot:-no}])
12521275 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1253 [dependent libraries, and in which our libraries should be installed.])])
1276 [dependent libraries, and where our libraries should be installed.])])
12541277
12551278 # _LT_ENABLE_LOCK
12561279 # ---------------
12581281 [AC_ARG_ENABLE([libtool-lock],
12591282 [AS_HELP_STRING([--disable-libtool-lock],
12601283 [avoid locking (might break parallel builds)])])
1261 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1284 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
12621285
12631286 # Some flags need to be propagated to the compiler or linker for good
12641287 # libtool support.
12651288 case $host in
12661289 ia64-*-hpux*)
1267 # Find out which ABI we are using.
1290 # Find out what ABI is being produced by ac_compile, and set mode
1291 # options accordingly.
12681292 echo 'int i;' > conftest.$ac_ext
12691293 if AC_TRY_EVAL(ac_compile); then
12701294 case `/usr/bin/file conftest.$ac_objext` in
12711295 *ELF-32*)
1272 HPUX_IA64_MODE="32"
1296 HPUX_IA64_MODE=32
12731297 ;;
12741298 *ELF-64*)
1275 HPUX_IA64_MODE="64"
1299 HPUX_IA64_MODE=64
12761300 ;;
12771301 esac
12781302 fi
12791303 rm -rf conftest*
12801304 ;;
12811305 *-*-irix6*)
1282 # Find out which ABI we are using.
1306 # Find out what ABI is being produced by ac_compile, and set linker
1307 # options accordingly.
12831308 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
12841309 if AC_TRY_EVAL(ac_compile); then
1285 if test "$lt_cv_prog_gnu_ld" = yes; then
1310 if test yes = "$lt_cv_prog_gnu_ld"; then
12861311 case `/usr/bin/file conftest.$ac_objext` in
12871312 *32-bit*)
12881313 LD="${LD-ld} -melf32bsmip"
13111336 rm -rf conftest*
13121337 ;;
13131338
1339 mips64*-*linux*)
1340 # Find out what ABI is being produced by ac_compile, and set linker
1341 # options accordingly.
1342 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1343 if AC_TRY_EVAL(ac_compile); then
1344 emul=elf
1345 case `/usr/bin/file conftest.$ac_objext` in
1346 *32-bit*)
1347 emul="${emul}32"
1348 ;;
1349 *64-bit*)
1350 emul="${emul}64"
1351 ;;
1352 esac
1353 case `/usr/bin/file conftest.$ac_objext` in
1354 *MSB*)
1355 emul="${emul}btsmip"
1356 ;;
1357 *LSB*)
1358 emul="${emul}ltsmip"
1359 ;;
1360 esac
1361 case `/usr/bin/file conftest.$ac_objext` in
1362 *N32*)
1363 emul="${emul}n32"
1364 ;;
1365 esac
1366 LD="${LD-ld} -m $emul"
1367 fi
1368 rm -rf conftest*
1369 ;;
1370
13141371 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
13151372 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1316 # Find out which ABI we are using.
1373 # Find out what ABI is being produced by ac_compile, and set linker
1374 # options accordingly. Note that the listed cases only cover the
1375 # situations where additional linker options are needed (such as when
1376 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1377 # vice versa); the common cases where no linker options are needed do
1378 # not appear in the list.
13171379 echo 'int i;' > conftest.$ac_ext
13181380 if AC_TRY_EVAL(ac_compile); then
13191381 case `/usr/bin/file conftest.o` in
13321394 ;;
13331395 esac
13341396 ;;
1335 powerpc64le-*)
1397 powerpc64le-*linux*)
13361398 LD="${LD-ld} -m elf32lppclinux"
13371399 ;;
1338 powerpc64-*)
1400 powerpc64-*linux*)
13391401 LD="${LD-ld} -m elf32ppclinux"
13401402 ;;
13411403 s390x-*linux*)
13541416 x86_64-*linux*)
13551417 LD="${LD-ld} -m elf_x86_64"
13561418 ;;
1357 powerpcle-*)
1419 powerpcle-*linux*)
13581420 LD="${LD-ld} -m elf64lppc"
13591421 ;;
1360 powerpc-*)
1422 powerpc-*linux*)
13611423 LD="${LD-ld} -m elf64ppc"
13621424 ;;
13631425 s390*-*linux*|s390*-*tpf*)
13751437
13761438 *-*-sco3.2v5*)
13771439 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1378 SAVE_CFLAGS="$CFLAGS"
1440 SAVE_CFLAGS=$CFLAGS
13791441 CFLAGS="$CFLAGS -belf"
13801442 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
13811443 [AC_LANG_PUSH(C)
13821444 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
13831445 AC_LANG_POP])
1384 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1446 if test yes != "$lt_cv_cc_needs_belf"; then
13851447 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1386 CFLAGS="$SAVE_CFLAGS"
1448 CFLAGS=$SAVE_CFLAGS
13871449 fi
13881450 ;;
13891451 *-*solaris*)
1390 # Find out which ABI we are using.
1452 # Find out what ABI is being produced by ac_compile, and set linker
1453 # options accordingly.
13911454 echo 'int i;' > conftest.$ac_ext
13921455 if AC_TRY_EVAL(ac_compile); then
13931456 case `/usr/bin/file conftest.o` in
13951458 case $lt_cv_prog_gnu_ld in
13961459 yes*)
13971460 case $host in
1398 i?86-*-solaris*)
1461 i?86-*-solaris*|x86_64-*-solaris*)
13991462 LD="${LD-ld} -m elf_x86_64"
14001463 ;;
14011464 sparc*-*-solaris*)
14041467 esac
14051468 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
14061469 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1407 LD="${LD-ld}_sol2"
1470 LD=${LD-ld}_sol2
14081471 fi
14091472 ;;
14101473 *)
14201483 ;;
14211484 esac
14221485
1423 need_locks="$enable_libtool_lock"
1486 need_locks=$enable_libtool_lock
14241487 ])# _LT_ENABLE_LOCK
14251488
14261489
14391502 [echo conftest.$ac_objext > conftest.lst
14401503 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
14411504 AC_TRY_EVAL([lt_ar_try])
1442 if test "$ac_status" -eq 0; then
1505 if test 0 -eq "$ac_status"; then
14431506 # Ensure the archiver fails upon bogus file names.
14441507 rm -f conftest.$ac_objext libconftest.a
14451508 AC_TRY_EVAL([lt_ar_try])
1446 if test "$ac_status" -ne 0; then
1509 if test 0 -ne "$ac_status"; then
14471510 lt_cv_ar_at_file=@
14481511 fi
14491512 fi
14511514 ])
14521515 ])
14531516
1454 if test "x$lt_cv_ar_at_file" = xno; then
1517 if test no = "$lt_cv_ar_at_file"; then
14551518 archiver_list_spec=
14561519 else
14571520 archiver_list_spec=$lt_cv_ar_at_file
14821545
14831546 if test -n "$RANLIB"; then
14841547 case $host_os in
1485 openbsd*)
1548 bitrig* | openbsd*)
14861549 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
14871550 ;;
14881551 *)
15181581 [$2=no
15191582 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
15201583 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1521 lt_compiler_flag="$3"
1584 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
15221585 # Insert the option either (1) after the last *FLAGS variable, or
15231586 # (2) before a word containing "conftest.", or (3) at the end.
15241587 # Note that $ac_compile itself does not contain backslashes and begins
15451608 $RM conftest*
15461609 ])
15471610
1548 if test x"[$]$2" = xyes; then
1611 if test yes = "[$]$2"; then
15491612 m4_if([$5], , :, [$5])
15501613 else
15511614 m4_if([$6], , :, [$6])
15671630 m4_require([_LT_DECL_SED])dnl
15681631 AC_CACHE_CHECK([$1], [$2],
15691632 [$2=no
1570 save_LDFLAGS="$LDFLAGS"
1633 save_LDFLAGS=$LDFLAGS
15711634 LDFLAGS="$LDFLAGS $3"
15721635 echo "$lt_simple_link_test_code" > conftest.$ac_ext
15731636 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
15861649 fi
15871650 fi
15881651 $RM -r conftest*
1589 LDFLAGS="$save_LDFLAGS"
1652 LDFLAGS=$save_LDFLAGS
15901653 ])
15911654
1592 if test x"[$]$2" = xyes; then
1655 if test yes = "[$]$2"; then
15931656 m4_if([$4], , :, [$4])
15941657 else
15951658 m4_if([$5], , :, [$5])
16101673 AC_MSG_CHECKING([the maximum length of command line arguments])
16111674 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
16121675 i=0
1613 teststring="ABCD"
1676 teststring=ABCD
16141677
16151678 case $build_os in
16161679 msdosdjgpp*)
16501713 lt_cv_sys_max_cmd_len=8192;
16511714 ;;
16521715
1653 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1716 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
16541717 # This has been around since 386BSD, at least. Likely further.
16551718 if test -x /sbin/sysctl; then
16561719 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
17011764 *)
17021765 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
17031766 if test -n "$lt_cv_sys_max_cmd_len" && \
1704 test undefined != "$lt_cv_sys_max_cmd_len"; then
1767 test undefined != "$lt_cv_sys_max_cmd_len"; then
17051768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17061769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17071770 else
17081771 # Make teststring a little bigger before we do anything with it.
17091772 # a 1K string should be a reasonable start.
1710 for i in 1 2 3 4 5 6 7 8 ; do
1773 for i in 1 2 3 4 5 6 7 8; do
17111774 teststring=$teststring$teststring
17121775 done
17131776 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
17141777 # If test is not a shell built-in, we'll probably end up computing a
17151778 # maximum length that is only half of the actual maximum length, but
17161779 # we can't tell.
1717 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1780 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
17181781 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1719 test $i != 17 # 1/2 MB should be enough
1782 test 17 != "$i" # 1/2 MB should be enough
17201783 do
17211784 i=`expr $i + 1`
17221785 teststring=$teststring$teststring
17321795 ;;
17331796 esac
17341797 ])
1735 if test -n $lt_cv_sys_max_cmd_len ; then
1798 if test -n "$lt_cv_sys_max_cmd_len"; then
17361799 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
17371800 else
17381801 AC_MSG_RESULT(none)
17601823 # ----------------------------------------------------------------
17611824 m4_defun([_LT_TRY_DLOPEN_SELF],
17621825 [m4_require([_LT_HEADER_DLFCN])dnl
1763 if test "$cross_compiling" = yes; then :
1826 if test yes = "$cross_compiling"; then :
17641827 [$4]
17651828 else
17661829 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18071870 # endif
18081871 #endif
18091872
1810 /* When -fvisbility=hidden is used, assume the code has been annotated
1873 /* When -fvisibility=hidden is used, assume the code has been annotated
18111874 correspondingly for the symbols needed. */
1812 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1875 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
18131876 int fnord () __attribute__((visibility("default")));
18141877 #endif
18151878
18351898 return status;
18361899 }]
18371900 _LT_EOF
1838 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1901 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
18391902 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
18401903 lt_status=$?
18411904 case x$lt_status in
18561919 # ------------------
18571920 AC_DEFUN([LT_SYS_DLOPEN_SELF],
18581921 [m4_require([_LT_HEADER_DLFCN])dnl
1859 if test "x$enable_dlopen" != xyes; then
1922 if test yes != "$enable_dlopen"; then
18601923 enable_dlopen=unknown
18611924 enable_dlopen_self=unknown
18621925 enable_dlopen_self_static=unknown
18661929
18671930 case $host_os in
18681931 beos*)
1869 lt_cv_dlopen="load_add_on"
1932 lt_cv_dlopen=load_add_on
18701933 lt_cv_dlopen_libs=
18711934 lt_cv_dlopen_self=yes
18721935 ;;
18731936
18741937 mingw* | pw32* | cegcc*)
1875 lt_cv_dlopen="LoadLibrary"
1938 lt_cv_dlopen=LoadLibrary
18761939 lt_cv_dlopen_libs=
18771940 ;;
18781941
18791942 cygwin*)
1880 lt_cv_dlopen="dlopen"
1943 lt_cv_dlopen=dlopen
18811944 lt_cv_dlopen_libs=
18821945 ;;
18831946
18841947 darwin*)
1885 # if libdl is installed we need to link against it
1948 # if libdl is installed we need to link against it
18861949 AC_CHECK_LIB([dl], [dlopen],
1887 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1888 lt_cv_dlopen="dyld"
1950 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1951 lt_cv_dlopen=dyld
18891952 lt_cv_dlopen_libs=
18901953 lt_cv_dlopen_self=yes
18911954 ])
18921955 ;;
18931956
1957 tpf*)
1958 # Don't try to run any link tests for TPF. We know it's impossible
1959 # because TPF is a cross-compiler, and we know how we open DSOs.
1960 lt_cv_dlopen=dlopen
1961 lt_cv_dlopen_libs=
1962 lt_cv_dlopen_self=no
1963 ;;
1964
18941965 *)
18951966 AC_CHECK_FUNC([shl_load],
1896 [lt_cv_dlopen="shl_load"],
1967 [lt_cv_dlopen=shl_load],
18971968 [AC_CHECK_LIB([dld], [shl_load],
1898 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1969 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
18991970 [AC_CHECK_FUNC([dlopen],
1900 [lt_cv_dlopen="dlopen"],
1971 [lt_cv_dlopen=dlopen],
19011972 [AC_CHECK_LIB([dl], [dlopen],
1902 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1973 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
19031974 [AC_CHECK_LIB([svld], [dlopen],
1904 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1975 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
19051976 [AC_CHECK_LIB([dld], [dld_link],
1906 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1977 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
19071978 ])
19081979 ])
19091980 ])
19121983 ;;
19131984 esac
19141985
1915 if test "x$lt_cv_dlopen" != xno; then
1986 if test no = "$lt_cv_dlopen"; then
1987 enable_dlopen=no
1988 else
19161989 enable_dlopen=yes
1917 else
1918 enable_dlopen=no
19191990 fi
19201991
19211992 case $lt_cv_dlopen in
19221993 dlopen)
1923 save_CPPFLAGS="$CPPFLAGS"
1924 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1925
1926 save_LDFLAGS="$LDFLAGS"
1994 save_CPPFLAGS=$CPPFLAGS
1995 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1996
1997 save_LDFLAGS=$LDFLAGS
19271998 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
19281999
1929 save_LIBS="$LIBS"
2000 save_LIBS=$LIBS
19302001 LIBS="$lt_cv_dlopen_libs $LIBS"
19312002
19322003 AC_CACHE_CHECK([whether a program can dlopen itself],
19362007 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
19372008 ])
19382009
1939 if test "x$lt_cv_dlopen_self" = xyes; then
2010 if test yes = "$lt_cv_dlopen_self"; then
19402011 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
19412012 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
19422013 lt_cv_dlopen_self_static, [dnl
19462017 ])
19472018 fi
19482019
1949 CPPFLAGS="$save_CPPFLAGS"
1950 LDFLAGS="$save_LDFLAGS"
1951 LIBS="$save_LIBS"
2020 CPPFLAGS=$save_CPPFLAGS
2021 LDFLAGS=$save_LDFLAGS
2022 LIBS=$save_LIBS
19522023 ;;
19532024 esac
19542025
20402111 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
20412112 _LT_COMPILER_C_O([$1])
20422113
2043 hard_links="nottested"
2044 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2114 hard_links=nottested
2115 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
20452116 # do not overwrite the value of need_locks provided by the user
20462117 AC_MSG_CHECKING([if we can lock with hard links])
20472118 hard_links=yes
20512122 ln conftest.a conftest.b 2>&5 || hard_links=no
20522123 ln conftest.a conftest.b 2>/dev/null && hard_links=no
20532124 AC_MSG_RESULT([$hard_links])
2054 if test "$hard_links" = no; then
2055 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2125 if test no = "$hard_links"; then
2126 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
20562127 need_locks=warn
20572128 fi
20582129 else
20792150 _LT_DECL([], [objdir], [0],
20802151 [The name of the directory that contains temporary libtool files])dnl
20812152 m4_pattern_allow([LT_OBJDIR])dnl
2082 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2083 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2153 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2154 [Define to the sub-directory where libtool stores uninstalled libraries.])
20842155 ])# _LT_CHECK_OBJDIR
20852156
20862157
20922163 _LT_TAGVAR(hardcode_action, $1)=
20932164 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
20942165 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2095 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2166 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
20962167
20972168 # We can hardcode non-existent directories.
2098 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2169 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
20992170 # If the only mechanism to avoid hardcoding is shlibpath_var, we
21002171 # have to relink, otherwise we might link with an installed library
21012172 # when we should be linking with a yet-to-be-installed one
2102 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2103 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2173 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2174 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
21042175 # Linking always hardcodes the temporary library directory.
21052176 _LT_TAGVAR(hardcode_action, $1)=relink
21062177 else
21142185 fi
21152186 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
21162187
2117 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2118 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2188 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2189 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
21192190 # Fast installation is not supported
21202191 enable_fast_install=no
2121 elif test "$shlibpath_overrides_runpath" = yes ||
2122 test "$enable_shared" = no; then
2192 elif test yes = "$shlibpath_overrides_runpath" ||
2193 test no = "$enable_shared"; then
21232194 # Fast installation is not necessary
21242195 enable_fast_install=needless
21252196 fi
21432214 # FIXME - insert some real tests, host_os isn't really good enough
21442215 case $host_os in
21452216 darwin*)
2146 if test -n "$STRIP" ; then
2217 if test -n "$STRIP"; then
21472218 striplib="$STRIP -x"
21482219 old_striplib="$STRIP -S"
21492220 AC_MSG_RESULT([yes])
21612232 ])# _LT_CMD_STRIPLIB
21622233
21632234
2235 # _LT_PREPARE_MUNGE_PATH_LIST
2236 # ---------------------------
2237 # Make sure func_munge_path_list() is defined correctly.
2238 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2239 [[# func_munge_path_list VARIABLE PATH
2240 # -----------------------------------
2241 # VARIABLE is name of variable containing _space_ separated list of
2242 # directories to be munged by the contents of PATH, which is string
2243 # having a format:
2244 # "DIR[:DIR]:"
2245 # string "DIR[ DIR]" will be prepended to VARIABLE
2246 # ":DIR[:DIR]"
2247 # string "DIR[ DIR]" will be appended to VARIABLE
2248 # "DIRP[:DIRP]::[DIRA:]DIRA"
2249 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2250 # "DIRA[ DIRA]" will be appended to VARIABLE
2251 # "DIR[:DIR]"
2252 # VARIABLE will be replaced by "DIR[ DIR]"
2253 func_munge_path_list ()
2254 {
2255 case x@S|@2 in
2256 x)
2257 ;;
2258 *:)
2259 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2260 ;;
2261 x:*)
2262 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2263 ;;
2264 *::*)
2265 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2266 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2267 ;;
2268 *)
2269 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2270 ;;
2271 esac
2272 }
2273 ]])# _LT_PREPARE_PATH_LIST
2274
2275
21642276 # _LT_SYS_DYNAMIC_LINKER([TAG])
21652277 # -----------------------------
21662278 # PORTME Fill in your ld.so characteristics
21712283 m4_require([_LT_DECL_OBJDUMP])dnl
21722284 m4_require([_LT_DECL_SED])dnl
21732285 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2286 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
21742287 AC_MSG_CHECKING([dynamic linker characteristics])
21752288 m4_if([$1],
21762289 [], [
2177 if test "$GCC" = yes; then
2290 if test yes = "$GCC"; then
21782291 case $host_os in
2179 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2180 *) lt_awk_arg="/^libraries:/" ;;
2292 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2293 *) lt_awk_arg='/^libraries:/' ;;
21812294 esac
21822295 case $host_os in
2183 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2184 *) lt_sed_strip_eq="s,=/,/,g" ;;
2296 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2297 *) lt_sed_strip_eq='s|=/|/|g' ;;
21852298 esac
21862299 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
21872300 case $lt_search_path_spec in
21972310 ;;
21982311 esac
21992312 # Ok, now we have the path, separated by spaces, we can step through it
2200 # and add multilib dir if necessary.
2313 # and add multilib dir if necessary...
22012314 lt_tmp_lt_search_path_spec=
2202 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2315 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2316 # ...but if some path component already ends with the multilib dir we assume
2317 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2318 case "$lt_multi_os_dir; $lt_search_path_spec " in
2319 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2320 lt_multi_os_dir=
2321 ;;
2322 esac
22032323 for lt_sys_path in $lt_search_path_spec; do
2204 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2205 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2206 else
2324 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2325 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2326 elif test -n "$lt_multi_os_dir"; then
22072327 test -d "$lt_sys_path" && \
22082328 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
22092329 fi
22102330 done
22112331 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2212 BEGIN {RS=" "; FS="/|\n";} {
2213 lt_foo="";
2214 lt_count=0;
2332 BEGIN {RS = " "; FS = "/|\n";} {
2333 lt_foo = "";
2334 lt_count = 0;
22152335 for (lt_i = NF; lt_i > 0; lt_i--) {
22162336 if ($lt_i != "" && $lt_i != ".") {
22172337 if ($lt_i == "..") {
22182338 lt_count++;
22192339 } else {
22202340 if (lt_count == 0) {
2221 lt_foo="/" $lt_i lt_foo;
2341 lt_foo = "/" $lt_i lt_foo;
22222342 } else {
22232343 lt_count--;
22242344 }
22322352 # for these hosts.
22332353 case $host_os in
22342354 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2235 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2355 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
22362356 esac
22372357 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
22382358 else
22412361 library_names_spec=
22422362 libname_spec='lib$name'
22432363 soname_spec=
2244 shrext_cmds=".so"
2364 shrext_cmds=.so
22452365 postinstall_cmds=
22462366 postuninstall_cmds=
22472367 finish_cmds=
22582378 # flags to be left without arguments
22592379 need_version=unknown
22602380
2381 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2382 [User-defined run-time library search path.])
2383
22612384 case $host_os in
22622385 aix3*)
22632386 version_type=linux # correct to gnu/linux during the next big refactor
2264 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2387 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
22652388 shlibpath_var=LIBPATH
22662389
22672390 # AIX 3 has no versioning support, so we append a major version to the name.
2268 soname_spec='${libname}${release}${shared_ext}$major'
2391 soname_spec='$libname$release$shared_ext$major'
22692392 ;;
22702393
22712394 aix[[4-9]]*)
22732396 need_lib_prefix=no
22742397 need_version=no
22752398 hardcode_into_libs=yes
2276 if test "$host_cpu" = ia64; then
2399 if test ia64 = "$host_cpu"; then
22772400 # AIX 5 supports IA64
2278 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2401 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
22792402 shlibpath_var=LD_LIBRARY_PATH
22802403 else
22812404 # With GCC up to 2.95.x, collect2 would create an import file
22822405 # for dependence libraries. The import file would start with
2283 # the line `#! .'. This would cause the generated library to
2284 # depend on `.', always an invalid library. This was fixed in
2406 # the line '#! .'. This would cause the generated library to
2407 # depend on '.', always an invalid library. This was fixed in
22852408 # development snapshots of GCC prior to 3.0.
22862409 case $host_os in
22872410 aix4 | aix4.[[01]] | aix4.[[01]].*)
22882411 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
22892412 echo ' yes '
2290 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2413 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
22912414 :
22922415 else
22932416 can_build_shared=no
22942417 fi
22952418 ;;
22962419 esac
2297 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2420 # Using Import Files as archive members, it is possible to support
2421 # filename-based versioning of shared library archives on AIX. While
2422 # this would work for both with and without runtime linking, it will
2423 # prevent static linking of such archives. So we do filename-based
2424 # shared library versioning with .so extension only, which is used
2425 # when both runtime linking and shared linking is enabled.
2426 # Unfortunately, runtime linking may impact performance, so we do
2427 # not want this to be the default eventually. Also, we use the
2428 # versioned .so libs for executables only if there is the -brtl
2429 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2430 # To allow for filename-based versioning support, we need to create
2431 # libNAME.so.V as an archive file, containing:
2432 # *) an Import File, referring to the versioned filename of the
2433 # archive as well as the shared archive member, telling the
2434 # bitwidth (32 or 64) of that shared object, and providing the
2435 # list of exported symbols of that shared object, eventually
2436 # decorated with the 'weak' keyword
2437 # *) the shared object with the F_LOADONLY flag set, to really avoid
2438 # it being seen by the linker.
2439 # At run time we better use the real file rather than another symlink,
2440 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2441
2442 case $with_aix_soname,$aix_use_runtimelinking in
2443 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
22982444 # soname into executable. Probably we can add versioning support to
22992445 # collect2, so additional links can be useful in future.
2300 if test "$aix_use_runtimelinking" = yes; then
2446 aix,yes) # traditional libtool
2447 dynamic_linker='AIX unversionable lib.so'
23012448 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
23022449 # instead of lib<name>.a to let people know that these are not
23032450 # typical AIX shared libraries.
2304 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2305 else
2451 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2452 ;;
2453 aix,no) # traditional AIX only
2454 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
23062455 # We preserve .a as extension for shared libraries through AIX4.2
23072456 # and later when we are not doing run time linking.
2308 library_names_spec='${libname}${release}.a $libname.a'
2309 soname_spec='${libname}${release}${shared_ext}$major'
2310 fi
2457 library_names_spec='$libname$release.a $libname.a'
2458 soname_spec='$libname$release$shared_ext$major'
2459 ;;
2460 svr4,*) # full svr4 only
2461 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2462 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2463 # We do not specify a path in Import Files, so LIBPATH fires.
2464 shlibpath_overrides_runpath=yes
2465 ;;
2466 *,yes) # both, prefer svr4
2467 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2468 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2469 # unpreferred sharedlib libNAME.a needs extra handling
2470 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2471 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2472 # We do not specify a path in Import Files, so LIBPATH fires.
2473 shlibpath_overrides_runpath=yes
2474 ;;
2475 *,no) # both, prefer aix
2476 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2477 library_names_spec='$libname$release.a $libname.a'
2478 soname_spec='$libname$release$shared_ext$major'
2479 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2480 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2481 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2482 ;;
2483 esac
23112484 shlibpath_var=LIBPATH
23122485 fi
23132486 ;;
23172490 powerpc)
23182491 # Since July 2007 AmigaOS4 officially supports .so libraries.
23192492 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2320 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2493 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23212494 ;;
23222495 m68k)
23232496 library_names_spec='$libname.ixlibrary $libname.a'
23242497 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2325 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
2498 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
23262499 ;;
23272500 esac
23282501 ;;
23292502
23302503 beos*)
2331 library_names_spec='${libname}${shared_ext}'
2504 library_names_spec='$libname$shared_ext'
23322505 dynamic_linker="$host_os ld.so"
23332506 shlibpath_var=LIBRARY_PATH
23342507 ;;
23362509 bsdi[[45]]*)
23372510 version_type=linux # correct to gnu/linux during the next big refactor
23382511 need_version=no
2339 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2340 soname_spec='${libname}${release}${shared_ext}$major'
2512 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2513 soname_spec='$libname$release$shared_ext$major'
23412514 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
23422515 shlibpath_var=LD_LIBRARY_PATH
23432516 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
23492522
23502523 cygwin* | mingw* | pw32* | cegcc*)
23512524 version_type=windows
2352 shrext_cmds=".dll"
2525 shrext_cmds=.dll
23532526 need_version=no
23542527 need_lib_prefix=no
23552528
23582531 # gcc
23592532 library_names_spec='$libname.dll.a'
23602533 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2361 postinstall_cmds='base_file=`basename \${file}`~
2362 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2534 postinstall_cmds='base_file=`basename \$file`~
2535 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
23632536 dldir=$destdir/`dirname \$dlpath`~
23642537 test -d \$dldir || mkdir -p \$dldir~
23652538 $install_prog $dir/$dlname \$dldir/$dlname~
23752548 case $host_os in
23762549 cygwin*)
23772550 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2378 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2551 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
23792552 m4_if([$1], [],[
23802553 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
23812554 ;;
23822555 mingw* | cegcc*)
23832556 # MinGW DLLs use traditional 'lib' prefix
2384 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2557 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
23852558 ;;
23862559 pw32*)
23872560 # pw32 DLLs use 'pw' prefix rather than 'lib'
2388 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2561 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
23892562 ;;
23902563 esac
23912564 dynamic_linker='Win32 ld.exe'
23942567 *,cl*)
23952568 # Native MSVC
23962569 libname_spec='$name'
2397 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2398 library_names_spec='${libname}.dll.lib'
2570 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2571 library_names_spec='$libname.dll.lib'
23992572
24002573 case $build_os in
24012574 mingw*)
24222595 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
24232596 ;;
24242597 *)
2425 sys_lib_search_path_spec="$LIB"
2598 sys_lib_search_path_spec=$LIB
24262599 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
24272600 # It is most probably a Windows format PATH.
24282601 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
24352608 esac
24362609
24372610 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2438 postinstall_cmds='base_file=`basename \${file}`~
2439 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2611 postinstall_cmds='base_file=`basename \$file`~
2612 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
24402613 dldir=$destdir/`dirname \$dlpath`~
24412614 test -d \$dldir || mkdir -p \$dldir~
24422615 $install_prog $dir/$dlname \$dldir/$dlname'
24492622
24502623 *)
24512624 # Assume MSVC wrapper
2452 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2625 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
24532626 dynamic_linker='Win32 ld.exe'
24542627 ;;
24552628 esac
24622635 version_type=darwin
24632636 need_lib_prefix=no
24642637 need_version=no
2465 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2466 soname_spec='${libname}${release}${major}$shared_ext'
2638 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2639 soname_spec='$libname$release$major$shared_ext'
24672640 shlibpath_overrides_runpath=yes
24682641 shlibpath_var=DYLD_LIBRARY_PATH
24692642 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
24762649 version_type=linux # correct to gnu/linux during the next big refactor
24772650 need_lib_prefix=no
24782651 need_version=no
2479 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2480 soname_spec='${libname}${release}${shared_ext}$major'
2652 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2653 soname_spec='$libname$release$shared_ext$major'
24812654 shlibpath_var=LD_LIBRARY_PATH
24822655 ;;
24832656
24952668 version_type=freebsd-$objformat
24962669 case $version_type in
24972670 freebsd-elf*)
2498 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2671 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2672 soname_spec='$libname$release$shared_ext$major'
24992673 need_version=no
25002674 need_lib_prefix=no
25012675 ;;
25022676 freebsd-*)
2503 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2677 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
25042678 need_version=yes
25052679 ;;
25062680 esac
25302704 need_lib_prefix=no
25312705 need_version=no
25322706 dynamic_linker="$host_os runtime_loader"
2533 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2534 soname_spec='${libname}${release}${shared_ext}$major'
2707 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2708 soname_spec='$libname$release$shared_ext$major'
25352709 shlibpath_var=LIBRARY_PATH
2536 shlibpath_overrides_runpath=yes
2710 shlibpath_overrides_runpath=no
25372711 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
25382712 hardcode_into_libs=yes
25392713 ;;
25512725 dynamic_linker="$host_os dld.so"
25522726 shlibpath_var=LD_LIBRARY_PATH
25532727 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2554 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2555 soname_spec='${libname}${release}${shared_ext}$major'
2556 if test "X$HPUX_IA64_MODE" = X32; then
2728 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2729 soname_spec='$libname$release$shared_ext$major'
2730 if test 32 = "$HPUX_IA64_MODE"; then
25572731 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2732 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
25582733 else
25592734 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2735 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
25602736 fi
2561 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
25622737 ;;
25632738 hppa*64*)
25642739 shrext_cmds='.sl'
25662741 dynamic_linker="$host_os dld.sl"
25672742 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
25682743 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2569 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2570 soname_spec='${libname}${release}${shared_ext}$major'
2744 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2745 soname_spec='$libname$release$shared_ext$major'
25712746 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
25722747 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
25732748 ;;
25762751 dynamic_linker="$host_os dld.sl"
25772752 shlibpath_var=SHLIB_PATH
25782753 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2579 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2580 soname_spec='${libname}${release}${shared_ext}$major'
2754 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2755 soname_spec='$libname$release$shared_ext$major'
25812756 ;;
25822757 esac
25832758 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
25902765 version_type=linux # correct to gnu/linux during the next big refactor
25912766 need_lib_prefix=no
25922767 need_version=no
2593 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2594 soname_spec='${libname}${release}${shared_ext}$major'
2768 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2769 soname_spec='$libname$release$shared_ext$major'
25952770 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
25962771 shlibpath_var=LD_LIBRARY_PATH
25972772 shlibpath_overrides_runpath=no
26022777 case $host_os in
26032778 nonstopux*) version_type=nonstopux ;;
26042779 *)
2605 if test "$lt_cv_prog_gnu_ld" = yes; then
2780 if test yes = "$lt_cv_prog_gnu_ld"; then
26062781 version_type=linux # correct to gnu/linux during the next big refactor
26072782 else
26082783 version_type=irix
26102785 esac
26112786 need_lib_prefix=no
26122787 need_version=no
2613 soname_spec='${libname}${release}${shared_ext}$major'
2614 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2788 soname_spec='$libname$release$shared_ext$major'
2789 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
26152790 case $host_os in
26162791 irix5* | nonstopux*)
26172792 libsuff= shlibsuff=
26302805 esac
26312806 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
26322807 shlibpath_overrides_runpath=no
2633 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2634 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2808 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2809 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
26352810 hardcode_into_libs=yes
26362811 ;;
26372812
26382813 # No shared lib support for Linux oldld, aout, or coff.
26392814 linux*oldld* | linux*aout* | linux*coff*)
26402815 dynamic_linker=no
2816 ;;
2817
2818 linux*android*)
2819 version_type=none # Android doesn't support versioned libraries.
2820 need_lib_prefix=no
2821 need_version=no
2822 library_names_spec='$libname$release$shared_ext'
2823 soname_spec='$libname$release$shared_ext'
2824 finish_cmds=
2825 shlibpath_var=LD_LIBRARY_PATH
2826 shlibpath_overrides_runpath=yes
2827
2828 # This implies no fast_install, which is unacceptable.
2829 # Some rework will be needed to allow for fast_install
2830 # before this can be enabled.
2831 hardcode_into_libs=yes
2832
2833 dynamic_linker='Android linker'
2834 # Don't embed -rpath directories since the linker doesn't support them.
2835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
26412836 ;;
26422837
26432838 # This must be glibc/ELF.
26452840 version_type=linux # correct to gnu/linux during the next big refactor
26462841 need_lib_prefix=no
26472842 need_version=no
2648 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2649 soname_spec='${libname}${release}${shared_ext}$major'
2843 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2844 soname_spec='$libname$release$shared_ext$major'
26502845 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
26512846 shlibpath_var=LD_LIBRARY_PATH
26522847 shlibpath_overrides_runpath=no
26712866 # before this can be enabled.
26722867 hardcode_into_libs=yes
26732868
2674 # Append ld.so.conf contents to the search path
2869 # Ideally, we could use ldconfig to report *all* directores which are
2870 # searched for libraries, however this is still not possible. Aside from not
2871 # being certain /sbin/ldconfig is available, command
2872 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2873 # even though it is searched at run-time. Try to do the best guess by
2874 # appending ld.so.conf contents (and includes) to the search path.
26752875 if test -f /etc/ld.so.conf; then
26762876 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
26772877 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
27032903 need_lib_prefix=no
27042904 need_version=no
27052905 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2706 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2906 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
27072907 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
27082908 dynamic_linker='NetBSD (a.out) ld.so'
27092909 else
2710 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2711 soname_spec='${libname}${release}${shared_ext}$major'
2910 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2911 soname_spec='$libname$release$shared_ext$major'
27122912 dynamic_linker='NetBSD ld.elf_so'
27132913 fi
27142914 shlibpath_var=LD_LIBRARY_PATH
27182918
27192919 newsos6)
27202920 version_type=linux # correct to gnu/linux during the next big refactor
2721 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2921 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27222922 shlibpath_var=LD_LIBRARY_PATH
27232923 shlibpath_overrides_runpath=yes
27242924 ;;
27272927 version_type=qnx
27282928 need_lib_prefix=no
27292929 need_version=no
2730 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2731 soname_spec='${libname}${release}${shared_ext}$major'
2930 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2931 soname_spec='$libname$release$shared_ext$major'
27322932 shlibpath_var=LD_LIBRARY_PATH
27332933 shlibpath_overrides_runpath=no
27342934 hardcode_into_libs=yes
27352935 dynamic_linker='ldqnx.so'
27362936 ;;
27372937
2738 openbsd*)
2938 openbsd* | bitrig*)
27392939 version_type=sunos
2740 sys_lib_dlsearch_path_spec="/usr/lib"
2940 sys_lib_dlsearch_path_spec=/usr/lib
27412941 need_lib_prefix=no
2742 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2743 case $host_os in
2744 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2745 *) need_version=no ;;
2746 esac
2747 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2942 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2943 need_version=no
2944 else
2945 need_version=yes
2946 fi
2947 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
27482948 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
27492949 shlibpath_var=LD_LIBRARY_PATH
2750 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2751 case $host_os in
2752 openbsd2.[[89]] | openbsd2.[[89]].*)
2753 shlibpath_overrides_runpath=no
2754 ;;
2755 *)
2756 shlibpath_overrides_runpath=yes
2757 ;;
2758 esac
2759 else
2760 shlibpath_overrides_runpath=yes
2761 fi
2950 shlibpath_overrides_runpath=yes
27622951 ;;
27632952
27642953 os2*)
27652954 libname_spec='$name'
2766 shrext_cmds=".dll"
2955 version_type=windows
2956 shrext_cmds=.dll
2957 need_version=no
27672958 need_lib_prefix=no
2768 library_names_spec='$libname${shared_ext} $libname.a'
2959 # OS/2 can only load a DLL with a base name of 8 characters or less.
2960 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2961 v=$($ECHO $release$versuffix | tr -d .-);
2962 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2963 $ECHO $n$v`$shared_ext'
2964 library_names_spec='${libname}_dll.$libext'
27692965 dynamic_linker='OS/2 ld.exe'
2770 shlibpath_var=LIBPATH
2966 shlibpath_var=BEGINLIBPATH
2967 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2968 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2969 postinstall_cmds='base_file=`basename \$file`~
2970 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2971 dldir=$destdir/`dirname \$dlpath`~
2972 test -d \$dldir || mkdir -p \$dldir~
2973 $install_prog $dir/$dlname \$dldir/$dlname~
2974 chmod a+x \$dldir/$dlname~
2975 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2976 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2977 fi'
2978 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2979 dlpath=$dir/\$dldll~
2980 $RM \$dlpath'
27712981 ;;
27722982
27732983 osf3* | osf4* | osf5*)
27742984 version_type=osf
27752985 need_lib_prefix=no
27762986 need_version=no
2777 soname_spec='${libname}${release}${shared_ext}$major'
2778 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2987 soname_spec='$libname$release$shared_ext$major'
2988 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27792989 shlibpath_var=LD_LIBRARY_PATH
27802990 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2781 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2991 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
27822992 ;;
27832993
27842994 rdos*)
27892999 version_type=linux # correct to gnu/linux during the next big refactor
27903000 need_lib_prefix=no
27913001 need_version=no
2792 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2793 soname_spec='${libname}${release}${shared_ext}$major'
3002 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3003 soname_spec='$libname$release$shared_ext$major'
27943004 shlibpath_var=LD_LIBRARY_PATH
27953005 shlibpath_overrides_runpath=yes
27963006 hardcode_into_libs=yes
28003010
28013011 sunos4*)
28023012 version_type=sunos
2803 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3013 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
28043014 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
28053015 shlibpath_var=LD_LIBRARY_PATH
28063016 shlibpath_overrides_runpath=yes
2807 if test "$with_gnu_ld" = yes; then
3017 if test yes = "$with_gnu_ld"; then
28083018 need_lib_prefix=no
28093019 fi
28103020 need_version=yes
28123022
28133023 sysv4 | sysv4.3*)
28143024 version_type=linux # correct to gnu/linux during the next big refactor
2815 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2816 soname_spec='${libname}${release}${shared_ext}$major'
3025 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3026 soname_spec='$libname$release$shared_ext$major'
28173027 shlibpath_var=LD_LIBRARY_PATH
28183028 case $host_vendor in
28193029 sni)
28343044 ;;
28353045
28363046 sysv4*MP*)
2837 if test -d /usr/nec ;then
3047 if test -d /usr/nec; then
28383048 version_type=linux # correct to gnu/linux during the next big refactor
2839 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2840 soname_spec='$libname${shared_ext}.$major'
3049 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3050 soname_spec='$libname$shared_ext.$major'
28413051 shlibpath_var=LD_LIBRARY_PATH
28423052 fi
28433053 ;;
28443054
28453055 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2846 version_type=freebsd-elf
3056 version_type=sco
28473057 need_lib_prefix=no
28483058 need_version=no
2849 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2850 soname_spec='${libname}${release}${shared_ext}$major'
3059 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3060 soname_spec='$libname$release$shared_ext$major'
28513061 shlibpath_var=LD_LIBRARY_PATH
28523062 shlibpath_overrides_runpath=yes
28533063 hardcode_into_libs=yes
2854 if test "$with_gnu_ld" = yes; then
3064 if test yes = "$with_gnu_ld"; then
28553065 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
28563066 else
28573067 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
28693079 version_type=linux # correct to gnu/linux during the next big refactor
28703080 need_lib_prefix=no
28713081 need_version=no
2872 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3082 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
28733083 shlibpath_var=LD_LIBRARY_PATH
28743084 shlibpath_overrides_runpath=no
28753085 hardcode_into_libs=yes
28773087
28783088 uts4*)
28793089 version_type=linux # correct to gnu/linux during the next big refactor
2880 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2881 soname_spec='${libname}${release}${shared_ext}$major'
3090 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3091 soname_spec='$libname$release$shared_ext$major'
28823092 shlibpath_var=LD_LIBRARY_PATH
28833093 ;;
28843094
28873097 ;;
28883098 esac
28893099 AC_MSG_RESULT([$dynamic_linker])
2890 test "$dynamic_linker" = no && can_build_shared=no
3100 test no = "$dynamic_linker" && can_build_shared=no
28913101
28923102 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2893 if test "$GCC" = yes; then
3103 if test yes = "$GCC"; then
28943104 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
28953105 fi
28963106
2897 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2898 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3107 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3108 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
28993109 fi
2900 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2901 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3110
3111 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3112 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
29023113 fi
3114
3115 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3116 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3117
3118 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3119 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3120
3121 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3122 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
29033123
29043124 _LT_DECL([], [variables_saved_for_relink], [1],
29053125 [Variables whose values should be saved in libtool wrapper scripts and
29333153 [Whether we should hardcode library paths into libraries])
29343154 _LT_DECL([], [sys_lib_search_path_spec], [2],
29353155 [Compile-time system search path for libraries])
2936 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2937 [Run-time system search path for libraries])
3156 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3157 [Detected run-time system search path for libraries])
3158 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3159 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
29383160 ])# _LT_SYS_DYNAMIC_LINKER
29393161
29403162
29413163 # _LT_PATH_TOOL_PREFIX(TOOL)
29423164 # --------------------------
2943 # find a file program which can recognize shared library
3165 # find a file program that can recognize shared library
29443166 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
29453167 [m4_require([_LT_DECL_EGREP])dnl
29463168 AC_MSG_CHECKING([for $1])
29473169 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
29483170 [case $MAGIC_CMD in
29493171 [[\\/*] | ?:[\\/]*])
2950 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3172 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
29513173 ;;
29523174 *)
2953 lt_save_MAGIC_CMD="$MAGIC_CMD"
2954 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3175 lt_save_MAGIC_CMD=$MAGIC_CMD
3176 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
29553177 dnl $ac_dummy forces splitting on constant user-supplied paths.
29563178 dnl POSIX.2 word splitting is done only on the output of word expansions,
29573179 dnl not every word. This closes a longstanding sh security hole.
29583180 ac_dummy="m4_if([$2], , $PATH, [$2])"
29593181 for ac_dir in $ac_dummy; do
2960 IFS="$lt_save_ifs"
3182 IFS=$lt_save_ifs
29613183 test -z "$ac_dir" && ac_dir=.
2962 if test -f $ac_dir/$1; then
2963 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3184 if test -f "$ac_dir/$1"; then
3185 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
29643186 if test -n "$file_magic_test_file"; then
29653187 case $deplibs_check_method in
29663188 "file_magic "*)
29673189 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2968 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3190 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
29693191 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
29703192 $EGREP "$file_magic_regex" > /dev/null; then
29713193 :
29883210 break
29893211 fi
29903212 done
2991 IFS="$lt_save_ifs"
2992 MAGIC_CMD="$lt_save_MAGIC_CMD"
3213 IFS=$lt_save_ifs
3214 MAGIC_CMD=$lt_save_MAGIC_CMD
29933215 ;;
29943216 esac])
2995 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3217 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
29963218 if test -n "$MAGIC_CMD"; then
29973219 AC_MSG_RESULT($MAGIC_CMD)
29983220 else
30103232
30113233 # _LT_PATH_MAGIC
30123234 # --------------
3013 # find a file program which can recognize a shared library
3235 # find a file program that can recognize a shared library
30143236 m4_defun([_LT_PATH_MAGIC],
30153237 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
30163238 if test -z "$lt_cv_path_MAGIC_CMD"; then
30373259 AC_ARG_WITH([gnu-ld],
30383260 [AS_HELP_STRING([--with-gnu-ld],
30393261 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3040 [test "$withval" = no || with_gnu_ld=yes],
3262 [test no = "$withval" || with_gnu_ld=yes],
30413263 [with_gnu_ld=no])dnl
30423264
30433265 ac_prog=ld
3044 if test "$GCC" = yes; then
3266 if test yes = "$GCC"; then
30453267 # Check if gcc -print-prog-name=ld gives a path.
30463268 AC_MSG_CHECKING([for ld used by $CC])
30473269 case $host in
30483270 *-*-mingw*)
3049 # gcc leaves a trailing carriage return which upsets mingw
3271 # gcc leaves a trailing carriage return, which upsets mingw
30503272 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
30513273 *)
30523274 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
30603282 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
30613283 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
30623284 done
3063 test -z "$LD" && LD="$ac_prog"
3285 test -z "$LD" && LD=$ac_prog
30643286 ;;
30653287 "")
30663288 # If it fails, then pretend we aren't using GCC.
30713293 with_gnu_ld=unknown
30723294 ;;
30733295 esac
3074 elif test "$with_gnu_ld" = yes; then
3296 elif test yes = "$with_gnu_ld"; then
30753297 AC_MSG_CHECKING([for GNU ld])
30763298 else
30773299 AC_MSG_CHECKING([for non-GNU ld])
30783300 fi
30793301 AC_CACHE_VAL(lt_cv_path_LD,
30803302 [if test -z "$LD"; then
3081 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3303 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
30823304 for ac_dir in $PATH; do
3083 IFS="$lt_save_ifs"
3305 IFS=$lt_save_ifs
30843306 test -z "$ac_dir" && ac_dir=.
30853307 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3086 lt_cv_path_LD="$ac_dir/$ac_prog"
3308 lt_cv_path_LD=$ac_dir/$ac_prog
30873309 # Check to see if the program is GNU ld. I'd rather use --version,
30883310 # but apparently some variants of GNU ld only accept -v.
30893311 # Break only if it was the GNU/non-GNU ld that we prefer.
30903312 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
30913313 *GNU* | *'with BFD'*)
3092 test "$with_gnu_ld" != no && break
3314 test no != "$with_gnu_ld" && break
30933315 ;;
30943316 *)
3095 test "$with_gnu_ld" != yes && break
3317 test yes != "$with_gnu_ld" && break
30963318 ;;
30973319 esac
30983320 fi
30993321 done
3100 IFS="$lt_save_ifs"
3322 IFS=$lt_save_ifs
31013323 else
3102 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3324 lt_cv_path_LD=$LD # Let the user override the test with a path.
31033325 fi])
3104 LD="$lt_cv_path_LD"
3326 LD=$lt_cv_path_LD
31053327 if test -n "$LD"; then
31063328 AC_MSG_RESULT($LD)
31073329 else
31553377 reload_cmds='$LD$reload_flag -o $output$reload_objs'
31563378 case $host_os in
31573379 cygwin* | mingw* | pw32* | cegcc*)
3158 if test "$GCC" != yes; then
3380 if test yes != "$GCC"; then
31593381 reload_cmds=false
31603382 fi
31613383 ;;
31623384 darwin*)
3163 if test "$GCC" = yes; then
3164 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3385 if test yes = "$GCC"; then
3386 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
31653387 else
31663388 reload_cmds='$LD$reload_flag -o $output$reload_objs'
31673389 fi
31703392 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
31713393 _LT_TAGDECL([], [reload_cmds], [2])dnl
31723394 ])# _LT_CMD_RELOAD
3395
3396
3397 # _LT_PATH_DD
3398 # -----------
3399 # find a working dd
3400 m4_defun([_LT_PATH_DD],
3401 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3402 [printf 0123456789abcdef0123456789abcdef >conftest.i
3403 cat conftest.i conftest.i >conftest2.i
3404 : ${lt_DD:=$DD}
3405 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3406 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3407 cmp -s conftest.i conftest.out \
3408 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3409 fi])
3410 rm -f conftest.i conftest2.i conftest.out])
3411 ])# _LT_PATH_DD
3412
3413
3414 # _LT_CMD_TRUNCATE
3415 # ----------------
3416 # find command to truncate a binary pipe
3417 m4_defun([_LT_CMD_TRUNCATE],
3418 [m4_require([_LT_PATH_DD])
3419 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3420 [printf 0123456789abcdef0123456789abcdef >conftest.i
3421 cat conftest.i conftest.i >conftest2.i
3422 lt_cv_truncate_bin=
3423 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3424 cmp -s conftest.i conftest.out \
3425 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3426 fi
3427 rm -f conftest.i conftest2.i conftest.out
3428 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3429 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3430 [Command to truncate a binary pipe])
3431 ])# _LT_CMD_TRUNCATE
31733432
31743433
31753434 # _LT_CHECK_MAGIC_METHOD
31873446 # Need to set the preceding variable on all platforms that support
31883447 # interlibrary dependencies.
31893448 # 'none' -- dependencies not supported.
3190 # `unknown' -- same as none, but documents that we really don't know.
3449 # 'unknown' -- same as none, but documents that we really don't know.
31913450 # 'pass_all' -- all dependencies passed with no checks.
31923451 # 'test_compile' -- check by making test program.
31933452 # 'file_magic [[regex]]' -- check by looking for files in library path
3194 # which responds to the $file_magic_cmd with a given extended regex.
3195 # If you have `file' or equivalent on your system and you're not sure
3196 # whether `pass_all' will *always* work, you probably want this one.
3453 # that responds to the $file_magic_cmd with a given extended regex.
3454 # If you have 'file' or equivalent on your system and you're not sure
3455 # whether 'pass_all' will *always* work, you probably want this one.
31973456
31983457 case $host_os in
31993458 aix[[4-9]]*)
32203479 # Base MSYS/MinGW do not provide the 'file' command needed by
32213480 # func_win32_libid shell function, so use a weaker test based on 'objdump',
32223481 # unless we find 'file', for example because we are cross-compiling.
3223 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3224 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3482 if ( file / ) >/dev/null 2>&1; then
32253483 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
32263484 lt_cv_file_magic_cmd='func_win32_libid'
32273485 else
33173575 lt_cv_deplibs_check_method=pass_all
33183576 ;;
33193577
3320 openbsd*)
3321 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3578 openbsd* | bitrig*)
3579 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
33223580 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
33233581 else
33243582 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
33713629 tpf*)
33723630 lt_cv_deplibs_check_method=pass_all
33733631 ;;
3632 os2*)
3633 lt_cv_deplibs_check_method=pass_all
3634 ;;
33743635 esac
33753636 ])
33763637
34113672 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
34123673 [if test -n "$NM"; then
34133674 # Let the user override the test.
3414 lt_cv_path_NM="$NM"
3675 lt_cv_path_NM=$NM
34153676 else
3416 lt_nm_to_check="${ac_tool_prefix}nm"
3677 lt_nm_to_check=${ac_tool_prefix}nm
34173678 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
34183679 lt_nm_to_check="$lt_nm_to_check nm"
34193680 fi
34203681 for lt_tmp_nm in $lt_nm_to_check; do
3421 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3682 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
34223683 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3423 IFS="$lt_save_ifs"
3684 IFS=$lt_save_ifs
34243685 test -z "$ac_dir" && ac_dir=.
3425 tmp_nm="$ac_dir/$lt_tmp_nm"
3426 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3686 tmp_nm=$ac_dir/$lt_tmp_nm
3687 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
34273688 # Check to see if the nm accepts a BSD-compat flag.
3428 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3689 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
34293690 # nm: unknown option "B" ignored
34303691 # Tru64's nm complains that /dev/null is an invalid object file
3431 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3432 */dev/null* | *'Invalid file or object type'*)
3692 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3693 case $build_os in
3694 mingw*) lt_bad_file=conftest.nm/nofile ;;
3695 *) lt_bad_file=/dev/null ;;
3696 esac
3697 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3698 *$lt_bad_file* | *'Invalid file or object type'*)
34333699 lt_cv_path_NM="$tmp_nm -B"
3434 break
3700 break 2
34353701 ;;
34363702 *)
34373703 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
34383704 */dev/null*)
34393705 lt_cv_path_NM="$tmp_nm -p"
3440 break
3706 break 2
34413707 ;;
34423708 *)
34433709 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
34483714 esac
34493715 fi
34503716 done
3451 IFS="$lt_save_ifs"
3717 IFS=$lt_save_ifs
34523718 done
34533719 : ${lt_cv_path_NM=no}
34543720 fi])
3455 if test "$lt_cv_path_NM" != "no"; then
3456 NM="$lt_cv_path_NM"
3721 if test no != "$lt_cv_path_NM"; then
3722 NM=$lt_cv_path_NM
34573723 else
34583724 # Didn't find any BSD compatible name lister, look for dumpbin.
34593725 if test -n "$DUMPBIN"; then :
34603726 # Let the user override the test.
34613727 else
34623728 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3463 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3729 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
34643730 *COFF*)
3465 DUMPBIN="$DUMPBIN -symbols"
3731 DUMPBIN="$DUMPBIN -symbols -headers"
34663732 ;;
34673733 *)
34683734 DUMPBIN=:
34703736 esac
34713737 fi
34723738 AC_SUBST([DUMPBIN])
3473 if test "$DUMPBIN" != ":"; then
3474 NM="$DUMPBIN"
3739 if test : != "$DUMPBIN"; then
3740 NM=$DUMPBIN
34753741 fi
34763742 fi
34773743 test -z "$NM" && NM=nm
35173783
35183784 case $host_os in
35193785 cygwin* | mingw* | pw32* | cegcc*)
3520 # two different shell functions defined in ltmain.sh
3521 # decide which to use based on capabilities of $DLLTOOL
3786 # two different shell functions defined in ltmain.sh;
3787 # decide which one to use based on capabilities of $DLLTOOL
35223788 case `$DLLTOOL --help 2>&1` in
35233789 *--identify-strict*)
35243790 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
35303796 ;;
35313797 *)
35323798 # fallback: assume linklib IS sharedlib
3533 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3799 lt_cv_sharedlib_from_linklib_cmd=$ECHO
35343800 ;;
35353801 esac
35363802 ])
35573823 lt_cv_path_mainfest_tool=yes
35583824 fi
35593825 rm -f conftest*])
3560 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3826 if test yes != "$lt_cv_path_mainfest_tool"; then
35613827 MANIFEST_TOOL=:
35623828 fi
35633829 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
35643830 ])# _LT_PATH_MANIFEST_TOOL
3831
3832
3833 # _LT_DLL_DEF_P([FILE])
3834 # ---------------------
3835 # True iff FILE is a Windows DLL '.def' file.
3836 # Keep in sync with func_dll_def_p in the libtool script
3837 AC_DEFUN([_LT_DLL_DEF_P],
3838 [dnl
3839 test DEF = "`$SED -n dnl
3840 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3841 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3842 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3843 -e q dnl Only consider the first "real" line
3844 $1`" dnl
3845 ])# _LT_DLL_DEF_P
35653846
35663847
35673848 # LT_LIB_M
35753856 # These system don't have libm, or don't need it
35763857 ;;
35773858 *-ncr-sysv4.3*)
3578 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3859 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
35793860 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
35803861 ;;
35813862 *)
3582 AC_CHECK_LIB(m, cos, LIBM="-lm")
3863 AC_CHECK_LIB(m, cos, LIBM=-lm)
35833864 ;;
35843865 esac
35853866 AC_SUBST([LIBM])
35983879
35993880 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
36003881
3601 if test "$GCC" = yes; then
3882 if test yes = "$GCC"; then
36023883 case $cc_basename in
36033884 nvcc*)
36043885 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
36503931 symcode='[[ABCDGISTW]]'
36513932 ;;
36523933 hpux*)
3653 if test "$host_cpu" = ia64; then
3934 if test ia64 = "$host_cpu"; then
36543935 symcode='[[ABCDEGRST]]'
36553936 fi
36563937 ;;
36833964 symcode='[[ABCDGIRSTW]]' ;;
36843965 esac
36853966
3967 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3968 # Gets list of data symbols to import.
3969 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3970 # Adjust the below global symbol transforms to fixup imported variables.
3971 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3972 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
3973 lt_c_name_lib_hook="\
3974 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
3975 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
3976 else
3977 # Disable hooks by default.
3978 lt_cv_sys_global_symbol_to_import=
3979 lt_cdecl_hook=
3980 lt_c_name_hook=
3981 lt_c_name_lib_hook=
3982 fi
3983
36863984 # Transform an extracted symbol line into a proper C declaration.
36873985 # Some systems (esp. on ia64) link data and code symbols differently,
36883986 # so use this general approach.
3689 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3987 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
3988 $lt_cdecl_hook\
3989 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3990 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
36903991
36913992 # Transform an extracted symbol line into symbol name and symbol address
3692 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3693 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3993 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
3994 $lt_c_name_hook\
3995 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
3996 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
3997
3998 # Transform an extracted symbol line into symbol name with lib prefix and
3999 # symbol address.
4000 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4001 $lt_c_name_lib_hook\
4002 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4003 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
4004 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
36944005
36954006 # Handle CRLF in mingw tool chain
36964007 opt_cr=
37084019
37094020 # Write the raw and C identifiers.
37104021 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3711 # Fake it for dumpbin and say T for any non-static function
3712 # and D for any global variable.
4022 # Fake it for dumpbin and say T for any non-static function,
4023 # D for any global variable and I for any imported variable.
37134024 # Also find C++ and __fastcall symbols from MSVC++,
37144025 # which start with @ or ?.
37154026 lt_cv_sys_global_symbol_pipe="$AWK ['"\
37164027 " {last_section=section; section=\$ 3};"\
37174028 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
37184029 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4030 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4031 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4032 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
37194033 " \$ 0!~/External *\|/{next};"\
37204034 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
37214035 " {if(hide[section]) next};"\
3722 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3723 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3724 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3725 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4036 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4037 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4038 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4039 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
37264040 " ' prfx=^$ac_symprfx]"
37274041 else
37284042 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
37624076 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
37634077 cat <<_LT_EOF > conftest.$ac_ext
37644078 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3765 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3766 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4079 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4080 /* DATA imports from DLLs on WIN32 can't be const, because runtime
37674081 relocations are performed -- see ld's documentation on pseudo-relocs. */
37684082 # define LT@&t@_DLSYM_CONST
3769 #elif defined(__osf__)
4083 #elif defined __osf__
37704084 /* This system does not cope well with relocations in const data. */
37714085 # define LT@&t@_DLSYM_CONST
37724086 #else
37924106 {
37934107 { "@PROGRAM@", (void *) 0 },
37944108 _LT_EOF
3795 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4109 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
37964110 cat <<\_LT_EOF >> conftest.$ac_ext
37974111 {0, (void *) 0}
37984112 };
38124126 mv conftest.$ac_objext conftstm.$ac_objext
38134127 lt_globsym_save_LIBS=$LIBS
38144128 lt_globsym_save_CFLAGS=$CFLAGS
3815 LIBS="conftstm.$ac_objext"
4129 LIBS=conftstm.$ac_objext
38164130 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3817 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4131 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
38184132 pipe_works=yes
38194133 fi
38204134 LIBS=$lt_globsym_save_LIBS
38354149 rm -rf conftest* conftst*
38364150
38374151 # Do not use the global_symbol_pipe unless it works.
3838 if test "$pipe_works" = yes; then
4152 if test yes = "$pipe_works"; then
38394153 break
38404154 else
38414155 lt_cv_sys_global_symbol_pipe=
38624176 [Take the output of nm and produce a listing of raw symbols and C names])
38634177 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
38644178 [Transform the output of nm in a proper C declaration])
4179 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4180 [Transform the output of nm into a list of symbols to manually relocate])
38654181 _LT_DECL([global_symbol_to_c_name_address],
38664182 [lt_cv_sys_global_symbol_to_c_name_address], [1],
38674183 [Transform the output of nm in a C name address pair])
38684184 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
38694185 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
38704186 [Transform the output of nm in a C name address pair when lib prefix is needed])
4187 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4188 [The name lister interface])
38714189 _LT_DECL([], [nm_file_list_spec], [1],
38724190 [Specify filename containing input files for $NM])
38734191 ]) # _LT_CMD_GLOBAL_SYMBOLS
38834201
38844202 m4_if([$1], [CXX], [
38854203 # C++ specific cases for pic, static, wl, etc.
3886 if test "$GXX" = yes; then
4204 if test yes = "$GXX"; then
38874205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
38884206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
38894207
38904208 case $host_os in
38914209 aix*)
38924210 # All AIX code is PIC.
3893 if test "$host_cpu" = ia64; then
4211 if test ia64 = "$host_cpu"; then
38944212 # AIX 5 now supports IA64 processor
38954213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
38964214 fi
4215 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
38974216 ;;
38984217
38994218 amigaos*)
39044223 ;;
39054224 m68k)
39064225 # FIXME: we need at least 68020 code to build shared libraries, but
3907 # adding the `-m68020' flag to GCC prevents building anything better,
3908 # like `-m68040'.
4226 # adding the '-m68020' flag to GCC prevents building anything better,
4227 # like '-m68040'.
39094228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
39104229 ;;
39114230 esac
39214240 # (--disable-auto-import) libraries
39224241 m4_if([$1], [GCJ], [],
39234242 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4243 case $host_os in
4244 os2*)
4245 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4246 ;;
4247 esac
39244248 ;;
39254249 darwin* | rhapsody*)
39264250 # PIC is the default on this platform
39704294 case $host_os in
39714295 aix[[4-9]]*)
39724296 # All AIX code is PIC.
3973 if test "$host_cpu" = ia64; then
4297 if test ia64 = "$host_cpu"; then
39744298 # AIX 5 now supports IA64 processor
39754299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
39764300 else
40114335 case $cc_basename in
40124336 CC*)
40134337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4014 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4015 if test "$host_cpu" != ia64; then
4338 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4339 if test ia64 != "$host_cpu"; then
40164340 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
40174341 fi
40184342 ;;
40194343 aCC*)
40204344 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4021 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4345 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
40224346 case $host_cpu in
40234347 hppa*64*|ia64*)
40244348 # +Z the default
40554379 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
40564380 ;;
40574381 ecpc* )
4058 # old Intel C++ for x86_64 which still supported -KPIC.
4382 # old Intel C++ for x86_64, which still supported -KPIC.
40594383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40604384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40614385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
42004524 fi
42014525 ],
42024526 [
4203 if test "$GCC" = yes; then
4527 if test yes = "$GCC"; then
42044528 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
42054529 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
42064530
42074531 case $host_os in
42084532 aix*)
42094533 # All AIX code is PIC.
4210 if test "$host_cpu" = ia64; then
4534 if test ia64 = "$host_cpu"; then
42114535 # AIX 5 now supports IA64 processor
42124536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
42134537 fi
4538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42144539 ;;
42154540
42164541 amigaos*)
42214546 ;;
42224547 m68k)
42234548 # FIXME: we need at least 68020 code to build shared libraries, but
4224 # adding the `-m68020' flag to GCC prevents building anything better,
4225 # like `-m68040'.
4549 # adding the '-m68020' flag to GCC prevents building anything better,
4550 # like '-m68040'.
42264551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
42274552 ;;
42284553 esac
42394564 # (--disable-auto-import) libraries
42404565 m4_if([$1], [GCJ], [],
42414566 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4567 case $host_os in
4568 os2*)
4569 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4570 ;;
4571 esac
42424572 ;;
42434573
42444574 darwin* | rhapsody*)
43094639 case $host_os in
43104640 aix*)
43114641 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4312 if test "$host_cpu" = ia64; then
4642 if test ia64 = "$host_cpu"; then
43134643 # AIX 5 now supports IA64 processor
43144644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43154645 else
43174647 fi
43184648 ;;
43194649
4650 darwin* | rhapsody*)
4651 # PIC is the default on this platform
4652 # Common symbols not allowed in MH_DYLIB files
4653 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4654 case $cc_basename in
4655 nagfor*)
4656 # NAG Fortran compiler
4657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4658 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4659 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4660 ;;
4661 esac
4662 ;;
4663
43204664 mingw* | cygwin* | pw32* | os2* | cegcc*)
43214665 # This hack is so that the source file can tell whether it is being
43224666 # built for inclusion in a dll (and should export symbols for example).
43234667 m4_if([$1], [GCJ], [],
43244668 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4669 case $host_os in
4670 os2*)
4671 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4672 ;;
4673 esac
43254674 ;;
43264675
43274676 hpux9* | hpux10* | hpux11*)
43374686 ;;
43384687 esac
43394688 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4340 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4689 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43414690 ;;
43424691
43434692 irix5* | irix6* | nonstopux*)
43484697
43494698 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
43504699 case $cc_basename in
4351 # old Intel for x86_64 which still supported -KPIC.
4700 # old Intel for x86_64, which still supported -KPIC.
43524701 ecc*)
43534702 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43544703 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43724721 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
43734722 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
43744723 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4724 ;;
4725 tcc*)
4726 # Fabrice Bellard et al's Tiny C Compiler
4727 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4728 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4729 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
43754730 ;;
43764731 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
43774732 # Portland Group compilers (*not* the Pentium gcc compiler,
44704825 ;;
44714826
44724827 sysv4*MP*)
4473 if test -d /usr/nec ;then
4828 if test -d /usr/nec; then
44744829 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
44754830 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44764831 fi
44994854 fi
45004855 ])
45014856 case $host_os in
4502 # For platforms which do not support PIC, -DPIC is meaningless:
4857 # For platforms that do not support PIC, -DPIC is meaningless:
45034858 *djgpp*)
45044859 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
45054860 ;;
45654920 case $host_os in
45664921 aix[[4-9]]*)
45674922 # If we're using GNU nm, then we don't want the "-C" option.
4568 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4569 # Also, AIX nm treats weak defined symbols like other global defined
4570 # symbols, whereas GNU nm marks them as "W".
4923 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4924 # Without the "-l" option, or with the "-B" option, AIX nm treats
4925 # weak defined symbols like other global defined symbols, whereas
4926 # GNU nm marks them as "W".
4927 # While the 'weak' keyword is ignored in the Export File, we need
4928 # it in the Import File for the 'aix-soname' feature, so we have
4929 # to replace the "-B" option with "-P" for AIX nm.
45714930 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4572 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4931 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
45734932 else
4574 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4933 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
45754934 fi
45764935 ;;
45774936 pw32*)
4578 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4937 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
45794938 ;;
45804939 cygwin* | mingw* | cegcc*)
45814940 case $cc_basename in
46244983 # included in the symbol list
46254984 _LT_TAGVAR(include_expsyms, $1)=
46264985 # exclude_expsyms can be an extended regexp of symbols to exclude
4627 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4628 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4629 # as well as any symbol that contains `d'.
4986 # it will be wrapped by ' (' and ')$', so one must not match beginning or
4987 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4988 # as well as any symbol that contains 'd'.
46304989 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
46314990 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
46324991 # platforms (ab)use it in PIC code, but their linkers get confused if
46425001 # FIXME: the MSVC++ port hasn't been tested in a loooong time
46435002 # When not using gcc, we currently assume that we are using
46445003 # Microsoft Visual C++.
4645 if test "$GCC" != yes; then
5004 if test yes != "$GCC"; then
46465005 with_gnu_ld=no
46475006 fi
46485007 ;;
46505009 # we just hope/assume this is gcc and not c89 (= MSVC++)
46515010 with_gnu_ld=yes
46525011 ;;
4653 openbsd*)
5012 openbsd* | bitrig*)
46545013 with_gnu_ld=no
46555014 ;;
46565015 linux* | k*bsd*-gnu | gnu*)
46635022 # On some targets, GNU ld is compatible enough with the native linker
46645023 # that we're better off using the native interface for both.
46655024 lt_use_gnu_ld_interface=no
4666 if test "$with_gnu_ld" = yes; then
5025 if test yes = "$with_gnu_ld"; then
46675026 case $host_os in
46685027 aix*)
46695028 # The AIX port of GNU ld has always aspired to compatibility
46855044 esac
46865045 fi
46875046
4688 if test "$lt_use_gnu_ld_interface" = yes; then
5047 if test yes = "$lt_use_gnu_ld_interface"; then
46895048 # If archive_cmds runs LD, not CC, wlarc should be empty
4690 wlarc='${wl}'
5049 wlarc='$wl'
46915050
46925051 # Set some defaults for GNU ld with shared library support. These
46935052 # are reset later if shared libraries are not supported. Putting them
46945053 # here allows them to be overridden if necessary.
46955054 runpath_var=LD_RUN_PATH
4696 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4697 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5056 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
46985057 # ancient GNU ld didn't support --whole-archive et. al.
46995058 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4700 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5059 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
47015060 else
47025061 _LT_TAGVAR(whole_archive_flag_spec, $1)=
47035062 fi
47045063 supports_anon_versioning=no
4705 case `$LD -v 2>&1` in
5064 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
47065065 *GNU\ gold*) supports_anon_versioning=yes ;;
47075066 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
47085067 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
47155074 case $host_os in
47165075 aix[[3-9]]*)
47175076 # On AIX/PPC, the GNU linker is very broken
4718 if test "$host_cpu" != ia64; then
5077 if test ia64 != "$host_cpu"; then
47195078 _LT_TAGVAR(ld_shlibs, $1)=no
47205079 cat <<_LT_EOF 1>&2
47215080
47345093 case $host_cpu in
47355094 powerpc)
47365095 # see comment about AmigaOS4 .so support
4737 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5096 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47385097 _LT_TAGVAR(archive_expsym_cmds, $1)=''
47395098 ;;
47405099 m68k)
47505109 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
47515110 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
47525111 # support --undefined. This deserves some investigation. FIXME
4753 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5112 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47545113 else
47555114 _LT_TAGVAR(ld_shlibs, $1)=no
47565115 fi
47605119 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
47615120 # as there is no search path for DLLs.
47625121 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4763 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5122 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
47645123 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
47655124 _LT_TAGVAR(always_export_symbols, $1)=no
47665125 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
47685127 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
47695128
47705129 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4771 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4772 # If the export-symbols file already is a .def file (1st line
4773 # is EXPORTS), use it as is; otherwise, prepend...
4774 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4775 cp $export_symbols $output_objdir/$soname.def;
4776 else
4777 echo EXPORTS > $output_objdir/$soname.def;
4778 cat $export_symbols >> $output_objdir/$soname.def;
4779 fi~
4780 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5130 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5131 # If the export-symbols file already is a .def file, use it as
5132 # is; otherwise, prepend EXPORTS...
5133 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5134 cp $export_symbols $output_objdir/$soname.def;
5135 else
5136 echo EXPORTS > $output_objdir/$soname.def;
5137 cat $export_symbols >> $output_objdir/$soname.def;
5138 fi~
5139 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
47815140 else
47825141 _LT_TAGVAR(ld_shlibs, $1)=no
47835142 fi
47845143 ;;
47855144
47865145 haiku*)
4787 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5146 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47885147 _LT_TAGVAR(link_all_deplibs, $1)=yes
5148 ;;
5149
5150 os2*)
5151 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5152 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5153 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5154 shrext_cmds=.dll
5155 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5156 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5157 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5158 $ECHO EXPORTS >> $output_objdir/$libname.def~
5159 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5160 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5161 emximp -o $lib $output_objdir/$libname.def'
5162 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5163 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5164 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5165 $ECHO EXPORTS >> $output_objdir/$libname.def~
5166 prefix_cmds="$SED"~
5167 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5168 prefix_cmds="$prefix_cmds -e 1d";
5169 fi~
5170 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5171 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5172 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5173 emximp -o $lib $output_objdir/$libname.def'
5174 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5175 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
47895176 ;;
47905177
47915178 interix[[3-9]]*)
47925179 _LT_TAGVAR(hardcode_direct, $1)=no
47935180 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4794 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4795 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5181 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5182 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
47965183 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
47975184 # Instead, shared libraries are loaded at an image base (0x10000000 by
47985185 # default) and relocated if they conflict, which is a slow very memory
47995186 # consuming and fragmenting process. To avoid this, we pick a random,
48005187 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
48015188 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4802 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4803 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5189 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5190 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
48045191 ;;
48055192
48065193 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
48075194 tmp_diet=no
4808 if test "$host_os" = linux-dietlibc; then
5195 if test linux-dietlibc = "$host_os"; then
48095196 case $cc_basename in
48105197 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
48115198 esac
48125199 fi
48135200 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4814 && test "$tmp_diet" = no
5201 && test no = "$tmp_diet"
48155202 then
48165203 tmp_addflag=' $pic_flag'
48175204 tmp_sharedflag='-shared'
48185205 case $cc_basename,$host_cpu in
48195206 pgcc*) # Portland Group C compiler
4820 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5207 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
48215208 tmp_addflag=' $pic_flag'
48225209 ;;
48235210 pgf77* | pgf90* | pgf95* | pgfortran*)
48245211 # Portland Group f77 and f90 compilers
4825 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5212 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
48265213 tmp_addflag=' $pic_flag -Mnomain' ;;
48275214 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
48285215 tmp_addflag=' -i_dynamic' ;;
48335220 lf95*) # Lahey Fortran 8.1
48345221 _LT_TAGVAR(whole_archive_flag_spec, $1)=
48355222 tmp_sharedflag='--shared' ;;
5223 nagfor*) # NAGFOR 5.3
5224 tmp_sharedflag='-Wl,-shared' ;;
48365225 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
48375226 tmp_sharedflag='-qmkshrobj'
48385227 tmp_addflag= ;;
48395228 nvcc*) # Cuda Compiler Driver 2.2
4840 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5229 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
48415230 _LT_TAGVAR(compiler_needs_object, $1)=yes
48425231 ;;
48435232 esac
48445233 case `$CC -V 2>&1 | sed 5q` in
48455234 *Sun\ C*) # Sun C 5.9
4846 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5235 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
48475236 _LT_TAGVAR(compiler_needs_object, $1)=yes
48485237 tmp_sharedflag='-G' ;;
48495238 *Sun\ F*) # Sun Fortran 8.3
48505239 tmp_sharedflag='-G' ;;
48515240 esac
4852 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4853
4854 if test "x$supports_anon_versioning" = xyes; then
5241 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5242
5243 if test yes = "$supports_anon_versioning"; then
48555244 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4856 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4857 echo "local: *; };" >> $output_objdir/$libname.ver~
4858 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5245 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5246 echo "local: *; };" >> $output_objdir/$libname.ver~
5247 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
48595248 fi
48605249
48615250 case $cc_basename in
5251 tcc*)
5252 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5253 ;;
48625254 xlf* | bgf* | bgxlf* | mpixlf*)
48635255 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
48645256 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4865 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5257 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
48665258 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4867 if test "x$supports_anon_versioning" = xyes; then
5259 if test yes = "$supports_anon_versioning"; then
48685260 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4869 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4870 echo "local: *; };" >> $output_objdir/$libname.ver~
4871 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5261 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5262 echo "local: *; };" >> $output_objdir/$libname.ver~
5263 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
48725264 fi
48735265 ;;
48745266 esac
48825274 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
48835275 wlarc=
48845276 else
4885 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4886 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5277 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5278 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
48875279 fi
48885280 ;;
48895281
49015293
49025294 _LT_EOF
49035295 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4904 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4905 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5296 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5297 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
49065298 else
49075299 _LT_TAGVAR(ld_shlibs, $1)=no
49085300 fi
49145306 _LT_TAGVAR(ld_shlibs, $1)=no
49155307 cat <<_LT_EOF 1>&2
49165308
4917 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5309 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
49185310 *** reliably create shared libraries on SCO systems. Therefore, libtool
49195311 *** is disabling shared libraries support. We urge you to upgrade GNU
49205312 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
49295321 # DT_RUNPATH tag from executables and libraries. But doing so
49305322 # requires that you compile everything twice, which is a pain.
49315323 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4932 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4933 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4934 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5325 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5326 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
49355327 else
49365328 _LT_TAGVAR(ld_shlibs, $1)=no
49375329 fi
49485340
49495341 *)
49505342 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4951 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4952 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5344 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
49535345 else
49545346 _LT_TAGVAR(ld_shlibs, $1)=no
49555347 fi
49565348 ;;
49575349 esac
49585350
4959 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5351 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
49605352 runpath_var=
49615353 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
49625354 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
49725364 # Note: this linker hardcodes the directories in LIBPATH if there
49735365 # are no directories specified by -L.
49745366 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4975 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5367 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
49765368 # Neither direct hardcoding nor static linking is supported with a
49775369 # broken collect2.
49785370 _LT_TAGVAR(hardcode_direct, $1)=unsupported
49805372 ;;
49815373
49825374 aix[[4-9]]*)
4983 if test "$host_cpu" = ia64; then
5375 if test ia64 = "$host_cpu"; then
49845376 # On IA64, the linker does run time linking by default, so we don't
49855377 # have to do anything special.
49865378 aix_use_runtimelinking=no
49875379 exp_sym_flag='-Bexport'
4988 no_entry_flag=""
5380 no_entry_flag=
49895381 else
49905382 # If we're using GNU nm, then we don't want the "-C" option.
4991 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4992 # Also, AIX nm treats weak defined symbols like other global
4993 # defined symbols, whereas GNU nm marks them as "W".
5383 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5384 # Without the "-l" option, or with the "-B" option, AIX nm treats
5385 # weak defined symbols like other global defined symbols, whereas
5386 # GNU nm marks them as "W".
5387 # While the 'weak' keyword is ignored in the Export File, we need
5388 # it in the Import File for the 'aix-soname' feature, so we have
5389 # to replace the "-B" option with "-P" for AIX nm.
49945390 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4995 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5391 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
49965392 else
4997 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5393 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
49985394 fi
49995395 aix_use_runtimelinking=no
50005396
50015397 # Test if we are trying to use run time linking or normal
50025398 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5003 # need to do runtime linking.
5399 # have runtime linking enabled, and use it for executables.
5400 # For shared libraries, we enable/disable runtime linking
5401 # depending on the kind of the shared library created -
5402 # when "with_aix_soname,aix_use_runtimelinking" is:
5403 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5404 # "aix,yes" lib.so shared, rtl:yes, for executables
5405 # lib.a static archive
5406 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5407 # lib.a(lib.so.V) shared, rtl:no, for executables
5408 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5409 # lib.a(lib.so.V) shared, rtl:no
5410 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5411 # lib.a static archive
50045412 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
50055413 for ld_flag in $LDFLAGS; do
5006 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5414 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
50075415 aix_use_runtimelinking=yes
50085416 break
50095417 fi
50105418 done
5419 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5420 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5421 # so we don't have lib.a shared libs to link our executables.
5422 # We have to force runtime linking in this case.
5423 aix_use_runtimelinking=yes
5424 LDFLAGS="$LDFLAGS -Wl,-brtl"
5425 fi
50115426 ;;
50125427 esac
50135428
50265441 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
50275442 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
50285443 _LT_TAGVAR(link_all_deplibs, $1)=yes
5029 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5030
5031 if test "$GCC" = yes; then
5444 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5445 case $with_aix_soname,$aix_use_runtimelinking in
5446 aix,*) ;; # traditional, no import file
5447 svr4,* | *,yes) # use import file
5448 # The Import File defines what to hardcode.
5449 _LT_TAGVAR(hardcode_direct, $1)=no
5450 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5451 ;;
5452 esac
5453
5454 if test yes = "$GCC"; then
50325455 case $host_os in aix4.[[012]]|aix4.[[012]].*)
50335456 # We only want to do this on AIX 4.2 and lower, the check
50345457 # below for broken collect2 doesn't work under 4.3+
5035 collect2name=`${CC} -print-prog-name=collect2`
5458 collect2name=`$CC -print-prog-name=collect2`
50365459 if test -f "$collect2name" &&
50375460 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
50385461 then
50515474 ;;
50525475 esac
50535476 shared_flag='-shared'
5054 if test "$aix_use_runtimelinking" = yes; then
5055 shared_flag="$shared_flag "'${wl}-G'
5477 if test yes = "$aix_use_runtimelinking"; then
5478 shared_flag="$shared_flag "'$wl-G'
50565479 fi
5057 _LT_TAGVAR(link_all_deplibs, $1)=no
5480 # Need to ensure runtime linking is disabled for the traditional
5481 # shared library, or the linker may eventually find shared libraries
5482 # /with/ Import File - we do not want to mix them.
5483 shared_flag_aix='-shared'
5484 shared_flag_svr4='-shared $wl-G'
50585485 else
50595486 # not using gcc
5060 if test "$host_cpu" = ia64; then
5487 if test ia64 = "$host_cpu"; then
50615488 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
50625489 # chokes on -Wl,-G. The following line is correct:
50635490 shared_flag='-G'
50645491 else
5065 if test "$aix_use_runtimelinking" = yes; then
5066 shared_flag='${wl}-G'
5492 if test yes = "$aix_use_runtimelinking"; then
5493 shared_flag='$wl-G'
50675494 else
5068 shared_flag='${wl}-bM:SRE'
5495 shared_flag='$wl-bM:SRE'
50695496 fi
5497 shared_flag_aix='$wl-bM:SRE'
5498 shared_flag_svr4='$wl-G'
50705499 fi
50715500 fi
50725501
5073 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5502 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
50745503 # It seems that -bexpall does not export symbols beginning with
50755504 # underscore (_), so it is better to generate a list of symbols to export.
50765505 _LT_TAGVAR(always_export_symbols, $1)=yes
5077 if test "$aix_use_runtimelinking" = yes; then
5506 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
50785507 # Warning - without using the other runtime loading flags (-brtl),
50795508 # -berok will link without error, but may produce a broken library.
50805509 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
50815510 # Determine the default libpath from the value encoded in an
50825511 # empty executable.
50835512 _LT_SYS_MODULE_PATH_AIX([$1])
5084 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5085 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5513 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5514 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
50865515 else
5087 if test "$host_cpu" = ia64; then
5088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5516 if test ia64 = "$host_cpu"; then
5517 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
50895518 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5090 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5519 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
50915520 else
50925521 # Determine the default libpath from the value encoded in an
50935522 # empty executable.
50945523 _LT_SYS_MODULE_PATH_AIX([$1])
5095 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
50965525 # Warning - without using the other run time loading flags,
50975526 # -berok will link without error, but may produce a broken library.
5098 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5099 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5100 if test "$with_gnu_ld" = yes; then
5527 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5528 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5529 if test yes = "$with_gnu_ld"; then
51015530 # We only use this code for GNU lds that support --whole-archive.
5102 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5531 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
51035532 else
51045533 # Exported symbols can be pulled into shared objects from archives
51055534 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
51065535 fi
51075536 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5108 # This is similar to how AIX traditionally builds its shared libraries.
5109 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5537 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5538 # -brtl affects multiple linker settings, -berok does not and is overridden later
5539 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5540 if test svr4 != "$with_aix_soname"; then
5541 # This is similar to how AIX traditionally builds its shared libraries.
5542 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5543 fi
5544 if test aix != "$with_aix_soname"; then
5545 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5546 else
5547 # used by -dlpreopen to get the symbols
5548 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5549 fi
5550 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
51105551 fi
51115552 fi
51125553 ;;
51155556 case $host_cpu in
51165557 powerpc)
51175558 # see comment about AmigaOS4 .so support
5118 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5559 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51195560 _LT_TAGVAR(archive_expsym_cmds, $1)=''
51205561 ;;
51215562 m68k)
51455586 # Tell ltmain to make .lib files, not .a files.
51465587 libext=lib
51475588 # Tell ltmain to make .dll files, not .so files.
5148 shrext_cmds=".dll"
5589 shrext_cmds=.dll
51495590 # FIXME: Setting linknames here is a bad hack.
5150 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5151 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5152 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5153 else
5154 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5155 fi~
5156 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5157 linknames='
5591 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5592 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5593 cp "$export_symbols" "$output_objdir/$soname.def";
5594 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5595 else
5596 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5597 fi~
5598 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5599 linknames='
51585600 # The linker will not automatically build a static lib if we build a DLL.
51595601 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
51605602 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51635605 # Don't use ranlib
51645606 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
51655607 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5166 lt_tool_outputfile="@TOOL_OUTPUT@"~
5167 case $lt_outputfile in
5168 *.exe|*.EXE) ;;
5169 *)
5170 lt_outputfile="$lt_outputfile.exe"
5171 lt_tool_outputfile="$lt_tool_outputfile.exe"
5172 ;;
5173 esac~
5174 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5175 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5176 $RM "$lt_outputfile.manifest";
5177 fi'
5608 lt_tool_outputfile="@TOOL_OUTPUT@"~
5609 case $lt_outputfile in
5610 *.exe|*.EXE) ;;
5611 *)
5612 lt_outputfile=$lt_outputfile.exe
5613 lt_tool_outputfile=$lt_tool_outputfile.exe
5614 ;;
5615 esac~
5616 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5617 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5618 $RM "$lt_outputfile.manifest";
5619 fi'
51785620 ;;
51795621 *)
51805622 # Assume MSVC wrapper
51835625 # Tell ltmain to make .lib files, not .a files.
51845626 libext=lib
51855627 # Tell ltmain to make .dll files, not .so files.
5186 shrext_cmds=".dll"
5628 shrext_cmds=.dll
51875629 # FIXME: Setting linknames here is a bad hack.
51885630 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
51895631 # The linker will automatically build a .lib file if we build a DLL.
52335675 ;;
52345676
52355677 hpux9*)
5236 if test "$GCC" = yes; then
5237 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5678 if test yes = "$GCC"; then
5679 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
52385680 else
5239 _LT_TAGVAR(archive_cmds, $1)='$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'
5681 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
52405682 fi
5241 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
52425684 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
52435685 _LT_TAGVAR(hardcode_direct, $1)=yes
52445686
52455687 # hardcode_minus_L: Not really in the search PATH,
52465688 # but as the default location of the library.
52475689 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5248 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5690 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
52495691 ;;
52505692
52515693 hpux10*)
5252 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5253 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5694 if test yes,no = "$GCC,$with_gnu_ld"; then
5695 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
52545696 else
52555697 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
52565698 fi
5257 if test "$with_gnu_ld" = no; then
5258 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5699 if test no = "$with_gnu_ld"; then
5700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
52595701 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
52605702 _LT_TAGVAR(hardcode_direct, $1)=yes
52615703 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5262 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
52635705 # hardcode_minus_L: Not really in the search PATH,
52645706 # but as the default location of the library.
52655707 _LT_TAGVAR(hardcode_minus_L, $1)=yes
52675709 ;;
52685710
52695711 hpux11*)
5270 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5712 if test yes,no = "$GCC,$with_gnu_ld"; then
52715713 case $host_cpu in
52725714 hppa*64*)
5273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5715 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
52745716 ;;
52755717 ia64*)
5276 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5718 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
52775719 ;;
52785720 *)
5279 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5721 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
52805722 ;;
52815723 esac
52825724 else
52835725 case $host_cpu in
52845726 hppa*64*)
5285 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5727 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
52865728 ;;
52875729 ia64*)
5288 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5730 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
52895731 ;;
52905732 *)
52915733 m4_if($1, [], [
52935735 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
52945736 _LT_LINKER_OPTION([if $CC understands -b],
52955737 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5296 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5738 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
52975739 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5298 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5740 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
52995741 ;;
53005742 esac
53015743 fi
5302 if test "$with_gnu_ld" = no; then
5303 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5744 if test no = "$with_gnu_ld"; then
5745 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
53045746 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
53055747
53065748 case $host_cpu in
53115753 *)
53125754 _LT_TAGVAR(hardcode_direct, $1)=yes
53135755 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5314 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5756 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
53155757
53165758 # hardcode_minus_L: Not really in the search PATH,
53175759 # but as the default location of the library.
53225764 ;;
53235765
53245766 irix5* | irix6* | nonstopux*)
5325 if test "$GCC" = yes; then
5326 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5767 if test yes = "$GCC"; then
5768 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
53275769 # Try to use the -exported_symbol ld option, if it does not
53285770 # work, assume that -exports_file does not work either and
53295771 # implicitly export all symbols.
53305772 # This should be the same for all languages, so no per-tag cache variable.
53315773 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
53325774 [lt_cv_irix_exported_symbol],
5333 [save_LDFLAGS="$LDFLAGS"
5334 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5775 [save_LDFLAGS=$LDFLAGS
5776 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
53355777 AC_LINK_IFELSE(
53365778 [AC_LANG_SOURCE(
53375779 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
53445786 end]])])],
53455787 [lt_cv_irix_exported_symbol=yes],
53465788 [lt_cv_irix_exported_symbol=no])
5347 LDFLAGS="$save_LDFLAGS"])
5348 if test "$lt_cv_irix_exported_symbol" = yes; then
5349 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5789 LDFLAGS=$save_LDFLAGS])
5790 if test yes = "$lt_cv_irix_exported_symbol"; then
5791 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
53505792 fi
5793 _LT_TAGVAR(link_all_deplibs, $1)=no
53515794 else
5352 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5353 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5795 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5796 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
53545797 fi
53555798 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5356 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5799 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
53575800 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
53585801 _LT_TAGVAR(inherit_rpath, $1)=yes
53595802 _LT_TAGVAR(link_all_deplibs, $1)=yes
5803 ;;
5804
5805 linux*)
5806 case $cc_basename in
5807 tcc*)
5808 # Fabrice Bellard et al's Tiny C Compiler
5809 _LT_TAGVAR(ld_shlibs, $1)=yes
5810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5811 ;;
5812 esac
53605813 ;;
53615814
53625815 netbsd* | netbsdelf*-gnu)
53735826 newsos6)
53745827 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
53755828 _LT_TAGVAR(hardcode_direct, $1)=yes
5376 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
53775830 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
53785831 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53795832 ;;
53815834 *nto* | *qnx*)
53825835 ;;
53835836
5384 openbsd*)
5837 openbsd* | bitrig*)
53855838 if test -f /usr/libexec/ld.so; then
53865839 _LT_TAGVAR(hardcode_direct, $1)=yes
53875840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53885841 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5389 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5842 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
53905843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5391 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5392 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5393 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5844 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5845 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5846 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
53945847 else
5395 case $host_os in
5396 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5397 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5398 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5399 ;;
5400 *)
5401 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5402 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5403 ;;
5404 esac
5848 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
54055850 fi
54065851 else
54075852 _LT_TAGVAR(ld_shlibs, $1)=no
54125857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54135858 _LT_TAGVAR(hardcode_minus_L, $1)=yes
54145859 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5415 _LT_TAGVAR(archive_cmds, $1)='$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'
5416 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5860 shrext_cmds=.dll
5861 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5862 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5863 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5864 $ECHO EXPORTS >> $output_objdir/$libname.def~
5865 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5866 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5867 emximp -o $lib $output_objdir/$libname.def'
5868 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5869 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5870 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5871 $ECHO EXPORTS >> $output_objdir/$libname.def~
5872 prefix_cmds="$SED"~
5873 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5874 prefix_cmds="$prefix_cmds -e 1d";
5875 fi~
5876 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5877 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5878 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5879 emximp -o $lib $output_objdir/$libname.def'
5880 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5881 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
54175882 ;;
54185883
54195884 osf3*)
5420 if test "$GCC" = yes; then
5421 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5422 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5885 if test yes = "$GCC"; then
5886 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5887 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
54235888 else
54245889 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5425 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5890 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
54265891 fi
54275892 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5428 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5893 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
54295894 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
54305895 ;;
54315896
54325897 osf4* | osf5*) # as osf3* with the addition of -msym flag
5433 if test "$GCC" = yes; then
5434 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5435 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5436 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5898 if test yes = "$GCC"; then
5899 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5900 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5901 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
54375902 else
54385903 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5439 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5904 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
54405905 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5441 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5906 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
54425907
54435908 # Both c and cxx compiler support -rpath directly
54445909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
54495914
54505915 solaris*)
54515916 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5452 if test "$GCC" = yes; then
5453 wlarc='${wl}'
5454 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5917 if test yes = "$GCC"; then
5918 wlarc='$wl'
5919 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
54555920 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5456 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5921 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
54575922 else
54585923 case `$CC -V 2>&1` in
54595924 *"Compilers 5.0"*)
54605925 wlarc=''
5461 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5926 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
54625927 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5463 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5928 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
54645929 ;;
54655930 *)
5466 wlarc='${wl}'
5467 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5931 wlarc='$wl'
5932 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
54685933 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5469 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5934 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
54705935 ;;
54715936 esac
54725937 fi
54765941 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
54775942 *)
54785943 # The compiler driver will combine and reorder linker options,
5479 # but understands `-z linker_flag'. GCC discards it without `$wl',
5944 # but understands '-z linker_flag'. GCC discards it without '$wl',
54805945 # but is careful enough not to reorder.
54815946 # Supported since Solaris 2.6 (maybe 2.5.1?)
5482 if test "$GCC" = yes; then
5483 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5947 if test yes = "$GCC"; then
5948 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
54845949 else
54855950 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
54865951 fi
54905955 ;;
54915956
54925957 sunos4*)
5493 if test "x$host_vendor" = xsequent; then
5958 if test sequent = "$host_vendor"; then
54945959 # Use $CC to link under sequent, because it throws in some extra .o
54955960 # files that make .init and .fini sections work.
5496 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5961 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
54975962 else
54985963 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
54995964 fi
55426007 ;;
55436008
55446009 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5545 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6010 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
55466011 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
55476012 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
55486013 runpath_var='LD_RUN_PATH'
55496014
5550 if test "$GCC" = yes; then
5551 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5552 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6015 if test yes = "$GCC"; then
6016 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6017 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55536018 else
5554 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5555 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6019 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6020 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55566021 fi
55576022 ;;
55586023
55596024 sysv5* | sco3.2v5* | sco5v6*)
5560 # Note: We can NOT use -z defs as we might desire, because we do not
6025 # Note: We CANNOT use -z defs as we might desire, because we do not
55616026 # link with -lc, and that would cause any symbols used from libc to
55626027 # always be unresolved, which means just about no library would
55636028 # ever link correctly. If we're not using GNU ld we use -z text
55646029 # though, which does catch some bad symbols but isn't as heavy-handed
55656030 # as -z defs.
5566 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5567 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6031 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6032 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
55686033 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
55696034 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5570 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6035 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
55716036 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
55726037 _LT_TAGVAR(link_all_deplibs, $1)=yes
5573 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6038 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
55746039 runpath_var='LD_RUN_PATH'
55756040
5576 if test "$GCC" = yes; then
5577 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5578 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6041 if test yes = "$GCC"; then
6042 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6043 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55796044 else
5580 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5581 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6045 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6046 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55826047 fi
55836048 ;;
55846049
55936058 ;;
55946059 esac
55956060
5596 if test x$host_vendor = xsni; then
6061 if test sni = "$host_vendor"; then
55976062 case $host in
55986063 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5599 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6064 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
56006065 ;;
56016066 esac
56026067 fi
56036068 fi
56046069 ])
56056070 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5606 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6071 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
56076072
56086073 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
56096074
56206085 # Assume -lc should be added
56216086 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
56226087
5623 if test "$enable_shared" = yes && test "$GCC" = yes; then
6088 if test yes,yes = "$GCC,$enable_shared"; then
56246089 case $_LT_TAGVAR(archive_cmds, $1) in
56256090 *'~'*)
56266091 # FIXME: we may have to deal with multi-command sequences.
57006165 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
57016166 [Whether we need a single "-rpath" flag with a separated argument])
57026167 _LT_TAGDECL([], [hardcode_direct], [0],
5703 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6168 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
57046169 DIR into the resulting binary])
57056170 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5706 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6171 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
57076172 DIR into the resulting binary and the resulting library dependency is
5708 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6173 "absolute", i.e impossible to change by setting $shlibpath_var if the
57096174 library is relocated])
57106175 _LT_TAGDECL([], [hardcode_minus_L], [0],
57116176 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
57466211 # ------------------------
57476212 # Ensure that the configuration variables for a C compiler are suitably
57486213 # defined. These variables are subsequently used by _LT_CONFIG to write
5749 # the compiler configuration to `libtool'.
6214 # the compiler configuration to 'libtool'.
57506215 m4_defun([_LT_LANG_C_CONFIG],
57516216 [m4_require([_LT_DECL_EGREP])dnl
5752 lt_save_CC="$CC"
6217 lt_save_CC=$CC
57536218 AC_LANG_PUSH(C)
57546219
57556220 # Source file extension for C test sources.
57896254 LT_SYS_DLOPEN_SELF
57906255 _LT_CMD_STRIPLIB
57916256
5792 # Report which library types will actually be built
6257 # Report what library types will actually be built
57936258 AC_MSG_CHECKING([if libtool supports shared libraries])
57946259 AC_MSG_RESULT([$can_build_shared])
57956260
57966261 AC_MSG_CHECKING([whether to build shared libraries])
5797 test "$can_build_shared" = "no" && enable_shared=no
6262 test no = "$can_build_shared" && enable_shared=no
57986263
57996264 # On AIX, shared libraries and static libraries use the same namespace, and
58006265 # are all built from PIC.
58016266 case $host_os in
58026267 aix3*)
5803 test "$enable_shared" = yes && enable_static=no
6268 test yes = "$enable_shared" && enable_static=no
58046269 if test -n "$RANLIB"; then
58056270 archive_cmds="$archive_cmds~\$RANLIB \$lib"
58066271 postinstall_cmds='$RANLIB $lib'
58086273 ;;
58096274
58106275 aix[[4-9]]*)
5811 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5812 test "$enable_shared" = yes && enable_static=no
6276 if test ia64 != "$host_cpu"; then
6277 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6278 yes,aix,yes) ;; # shared object as lib.so file only
6279 yes,svr4,*) ;; # shared object as lib.so archive member only
6280 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6281 esac
58136282 fi
58146283 ;;
58156284 esac
58176286
58186287 AC_MSG_CHECKING([whether to build static libraries])
58196288 # Make sure either enable_shared or enable_static is yes.
5820 test "$enable_shared" = yes || enable_static=yes
6289 test yes = "$enable_shared" || enable_static=yes
58216290 AC_MSG_RESULT([$enable_static])
58226291
58236292 _LT_CONFIG($1)
58246293 fi
58256294 AC_LANG_POP
5826 CC="$lt_save_CC"
6295 CC=$lt_save_CC
58276296 ])# _LT_LANG_C_CONFIG
58286297
58296298
58316300 # --------------------------
58326301 # Ensure that the configuration variables for a C++ compiler are suitably
58336302 # defined. These variables are subsequently used by _LT_CONFIG to write
5834 # the compiler configuration to `libtool'.
6303 # the compiler configuration to 'libtool'.
58356304 m4_defun([_LT_LANG_CXX_CONFIG],
58366305 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
58376306 m4_require([_LT_DECL_EGREP])dnl
58386307 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5839 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5840 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5841 (test "X$CXX" != "Xg++"))) ; then
6308 if test -n "$CXX" && ( test no != "$CXX" &&
6309 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6310 (test g++ != "$CXX"))); then
58426311 AC_PROG_CXXCPP
58436312 else
58446313 _lt_caught_CXX_error=yes
58806349 # the CXX compiler isn't working. Some variables (like enable_shared)
58816350 # are currently assumed to apply to all compilers on this platform,
58826351 # and will be corrupted by setting them based on a non-working compiler.
5883 if test "$_lt_caught_CXX_error" != yes; then
6352 if test yes != "$_lt_caught_CXX_error"; then
58846353 # Code to be used in simple compile tests
58856354 lt_simple_compile_test_code="int some_variable = 0;"
58866355
59226391 if test -n "$compiler"; then
59236392 # We don't want -fno-exception when compiling C++ code, so set the
59246393 # no_builtin_flag separately
5925 if test "$GXX" = yes; then
6394 if test yes = "$GXX"; then
59266395 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
59276396 else
59286397 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
59296398 fi
59306399
5931 if test "$GXX" = yes; then
6400 if test yes = "$GXX"; then
59326401 # Set up default GNU C++ configuration
59336402
59346403 LT_PATH_LD
59356404
59366405 # Check if GNU C++ uses GNU ld as the underlying linker, since the
59376406 # archiving commands below assume that GNU ld is being used.
5938 if test "$with_gnu_ld" = yes; then
5939 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5940 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5941
5942 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5943 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6407 if test yes = "$with_gnu_ld"; then
6408 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6409 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6410
6411 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6412 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
59446413
59456414 # If archive_cmds runs LD, not CC, wlarc should be empty
59466415 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
59476416 # investigate it a little bit more. (MM)
5948 wlarc='${wl}'
6417 wlarc='$wl'
59496418
59506419 # ancient GNU ld didn't support --whole-archive et. al.
59516420 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
59526421 $GREP 'no-whole-archive' > /dev/null; then
5953 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6422 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
59546423 else
59556424 _LT_TAGVAR(whole_archive_flag_spec, $1)=
59566425 fi
59866455 _LT_TAGVAR(ld_shlibs, $1)=no
59876456 ;;
59886457 aix[[4-9]]*)
5989 if test "$host_cpu" = ia64; then
6458 if test ia64 = "$host_cpu"; then
59906459 # On IA64, the linker does run time linking by default, so we don't
59916460 # have to do anything special.
59926461 aix_use_runtimelinking=no
59936462 exp_sym_flag='-Bexport'
5994 no_entry_flag=""
6463 no_entry_flag=
59956464 else
59966465 aix_use_runtimelinking=no
59976466
59986467 # Test if we are trying to use run time linking or normal
59996468 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6000 # need to do runtime linking.
6469 # have runtime linking enabled, and use it for executables.
6470 # For shared libraries, we enable/disable runtime linking
6471 # depending on the kind of the shared library created -
6472 # when "with_aix_soname,aix_use_runtimelinking" is:
6473 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6474 # "aix,yes" lib.so shared, rtl:yes, for executables
6475 # lib.a static archive
6476 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6477 # lib.a(lib.so.V) shared, rtl:no, for executables
6478 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6479 # lib.a(lib.so.V) shared, rtl:no
6480 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6481 # lib.a static archive
60016482 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
60026483 for ld_flag in $LDFLAGS; do
60036484 case $ld_flag in
60076488 ;;
60086489 esac
60096490 done
6491 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6492 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6493 # so we don't have lib.a shared libs to link our executables.
6494 # We have to force runtime linking in this case.
6495 aix_use_runtimelinking=yes
6496 LDFLAGS="$LDFLAGS -Wl,-brtl"
6497 fi
60106498 ;;
60116499 esac
60126500
60256513 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
60266514 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
60276515 _LT_TAGVAR(link_all_deplibs, $1)=yes
6028 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6029
6030 if test "$GXX" = yes; then
6516 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6517 case $with_aix_soname,$aix_use_runtimelinking in
6518 aix,*) ;; # no import file
6519 svr4,* | *,yes) # use import file
6520 # The Import File defines what to hardcode.
6521 _LT_TAGVAR(hardcode_direct, $1)=no
6522 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6523 ;;
6524 esac
6525
6526 if test yes = "$GXX"; then
60316527 case $host_os in aix4.[[012]]|aix4.[[012]].*)
60326528 # We only want to do this on AIX 4.2 and lower, the check
60336529 # below for broken collect2 doesn't work under 4.3+
6034 collect2name=`${CC} -print-prog-name=collect2`
6530 collect2name=`$CC -print-prog-name=collect2`
60356531 if test -f "$collect2name" &&
60366532 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
60376533 then
60496545 fi
60506546 esac
60516547 shared_flag='-shared'
6052 if test "$aix_use_runtimelinking" = yes; then
6053 shared_flag="$shared_flag "'${wl}-G'
6548 if test yes = "$aix_use_runtimelinking"; then
6549 shared_flag=$shared_flag' $wl-G'
60546550 fi
6551 # Need to ensure runtime linking is disabled for the traditional
6552 # shared library, or the linker may eventually find shared libraries
6553 # /with/ Import File - we do not want to mix them.
6554 shared_flag_aix='-shared'
6555 shared_flag_svr4='-shared $wl-G'
60556556 else
60566557 # not using gcc
6057 if test "$host_cpu" = ia64; then
6558 if test ia64 = "$host_cpu"; then
60586559 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
60596560 # chokes on -Wl,-G. The following line is correct:
60606561 shared_flag='-G'
60616562 else
6062 if test "$aix_use_runtimelinking" = yes; then
6063 shared_flag='${wl}-G'
6563 if test yes = "$aix_use_runtimelinking"; then
6564 shared_flag='$wl-G'
60646565 else
6065 shared_flag='${wl}-bM:SRE'
6566 shared_flag='$wl-bM:SRE'
60666567 fi
6568 shared_flag_aix='$wl-bM:SRE'
6569 shared_flag_svr4='$wl-G'
60676570 fi
60686571 fi
60696572
6070 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6573 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
60716574 # It seems that -bexpall does not export symbols beginning with
60726575 # underscore (_), so it is better to generate a list of symbols to
60736576 # export.
60746577 _LT_TAGVAR(always_export_symbols, $1)=yes
6075 if test "$aix_use_runtimelinking" = yes; then
6578 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
60766579 # Warning - without using the other runtime loading flags (-brtl),
60776580 # -berok will link without error, but may produce a broken library.
6078 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6581 # The "-G" linker flag allows undefined symbols.
6582 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
60796583 # Determine the default libpath from the value encoded in an empty
60806584 # executable.
60816585 _LT_SYS_MODULE_PATH_AIX([$1])
6082 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6083
6084 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6586 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6587
6588 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
60856589 else
6086 if test "$host_cpu" = ia64; then
6087 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6590 if test ia64 = "$host_cpu"; then
6591 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
60886592 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6089 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6593 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
60906594 else
60916595 # Determine the default libpath from the value encoded in an
60926596 # empty executable.
60936597 _LT_SYS_MODULE_PATH_AIX([$1])
6094 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6598 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
60956599 # Warning - without using the other run time loading flags,
60966600 # -berok will link without error, but may produce a broken library.
6097 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6098 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6099 if test "$with_gnu_ld" = yes; then
6601 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6602 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6603 if test yes = "$with_gnu_ld"; then
61006604 # We only use this code for GNU lds that support --whole-archive.
6101 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6605 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
61026606 else
61036607 # Exported symbols can be pulled into shared objects from archives
61046608 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
61056609 fi
61066610 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6107 # This is similar to how AIX traditionally builds its shared
6108 # libraries.
6109 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6611 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6612 # -brtl affects multiple linker settings, -berok does not and is overridden later
6613 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6614 if test svr4 != "$with_aix_soname"; then
6615 # This is similar to how AIX traditionally builds its shared
6616 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6617 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6618 fi
6619 if test aix != "$with_aix_soname"; then
6620 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6621 else
6622 # used by -dlpreopen to get the symbols
6623 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6624 fi
6625 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
61106626 fi
61116627 fi
61126628 ;;
61166632 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
61176633 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
61186634 # support --undefined. This deserves some investigation. FIXME
6119 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6635 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
61206636 else
61216637 _LT_TAGVAR(ld_shlibs, $1)=no
61226638 fi
61446660 # Tell ltmain to make .lib files, not .a files.
61456661 libext=lib
61466662 # Tell ltmain to make .dll files, not .so files.
6147 shrext_cmds=".dll"
6663 shrext_cmds=.dll
61486664 # FIXME: Setting linknames here is a bad hack.
6149 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6150 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6151 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6152 else
6153 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6154 fi~
6155 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6156 linknames='
6665 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6666 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6667 cp "$export_symbols" "$output_objdir/$soname.def";
6668 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6669 else
6670 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6671 fi~
6672 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6673 linknames='
61576674 # The linker will not automatically build a static lib if we build a DLL.
61586675 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
61596676 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
61606677 # Don't use ranlib
61616678 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
61626679 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6163 lt_tool_outputfile="@TOOL_OUTPUT@"~
6164 case $lt_outputfile in
6165 *.exe|*.EXE) ;;
6166 *)
6167 lt_outputfile="$lt_outputfile.exe"
6168 lt_tool_outputfile="$lt_tool_outputfile.exe"
6169 ;;
6170 esac~
6171 func_to_tool_file "$lt_outputfile"~
6172 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6173 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6174 $RM "$lt_outputfile.manifest";
6175 fi'
6680 lt_tool_outputfile="@TOOL_OUTPUT@"~
6681 case $lt_outputfile in
6682 *.exe|*.EXE) ;;
6683 *)
6684 lt_outputfile=$lt_outputfile.exe
6685 lt_tool_outputfile=$lt_tool_outputfile.exe
6686 ;;
6687 esac~
6688 func_to_tool_file "$lt_outputfile"~
6689 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6690 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6691 $RM "$lt_outputfile.manifest";
6692 fi'
61766693 ;;
61776694 *)
61786695 # g++
61796696 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
61806697 # as there is no search path for DLLs.
61816698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6182 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6699 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
61836700 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
61846701 _LT_TAGVAR(always_export_symbols, $1)=no
61856702 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
61866703
61876704 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6188 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6189 # If the export-symbols file already is a .def file (1st line
6190 # is EXPORTS), use it as is; otherwise, prepend...
6191 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6192 cp $export_symbols $output_objdir/$soname.def;
6193 else
6194 echo EXPORTS > $output_objdir/$soname.def;
6195 cat $export_symbols >> $output_objdir/$soname.def;
6196 fi~
6197 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6705 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6706 # If the export-symbols file already is a .def file, use it as
6707 # is; otherwise, prepend EXPORTS...
6708 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6709 cp $export_symbols $output_objdir/$soname.def;
6710 else
6711 echo EXPORTS > $output_objdir/$soname.def;
6712 cat $export_symbols >> $output_objdir/$soname.def;
6713 fi~
6714 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
61986715 else
61996716 _LT_TAGVAR(ld_shlibs, $1)=no
62006717 fi
62036720 ;;
62046721 darwin* | rhapsody*)
62056722 _LT_DARWIN_LINKER_FEATURES($1)
6723 ;;
6724
6725 os2*)
6726 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6727 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6728 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6729 shrext_cmds=.dll
6730 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6731 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6732 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6733 $ECHO EXPORTS >> $output_objdir/$libname.def~
6734 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6735 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6736 emximp -o $lib $output_objdir/$libname.def'
6737 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6738 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6739 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6740 $ECHO EXPORTS >> $output_objdir/$libname.def~
6741 prefix_cmds="$SED"~
6742 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6743 prefix_cmds="$prefix_cmds -e 1d";
6744 fi~
6745 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6746 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6747 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6748 emximp -o $lib $output_objdir/$libname.def'
6749 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6750 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
62066751 ;;
62076752
62086753 dgux*)
62406785 ;;
62416786
62426787 haiku*)
6243 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
62446789 _LT_TAGVAR(link_all_deplibs, $1)=yes
62456790 ;;
62466791
62476792 hpux9*)
6248 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6793 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
62496794 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6250 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6795 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
62516796 _LT_TAGVAR(hardcode_direct, $1)=yes
62526797 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
62536798 # but as the default
62596804 _LT_TAGVAR(ld_shlibs, $1)=no
62606805 ;;
62616806 aCC*)
6262 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6807 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
62636808 # Commands to make compiler produce verbose output that lists
62646809 # what "hidden" libraries, object files and flags are used when
62656810 # linking a shared library.
62686813 # explicitly linking system object files so we need to strip them
62696814 # from the output so that they don't get included in the library
62706815 # dependencies.
6271 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6816 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
62726817 ;;
62736818 *)
6274 if test "$GXX" = yes; then
6275 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6819 if test yes = "$GXX"; then
6820 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
62766821 else
62776822 # FIXME: insert proper C++ library support
62786823 _LT_TAGVAR(ld_shlibs, $1)=no
62826827 ;;
62836828
62846829 hpux10*|hpux11*)
6285 if test $with_gnu_ld = no; then
6286 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6830 if test no = "$with_gnu_ld"; then
6831 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
62876832 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
62886833
62896834 case $host_cpu in
62906835 hppa*64*|ia64*)
62916836 ;;
62926837 *)
6293 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6838 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
62946839 ;;
62956840 esac
62966841 fi
63166861 aCC*)
63176862 case $host_cpu in
63186863 hppa*64*)
6319 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6864 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63206865 ;;
63216866 ia64*)
6322 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6867 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63236868 ;;
63246869 *)
6325 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6870 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63266871 ;;
63276872 esac
63286873 # Commands to make compiler produce verbose output that lists
63336878 # explicitly linking system object files so we need to strip them
63346879 # from the output so that they don't get included in the library
63356880 # dependencies.
6336 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6881 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
63376882 ;;
63386883 *)
6339 if test "$GXX" = yes; then
6340 if test $with_gnu_ld = no; then
6884 if test yes = "$GXX"; then
6885 if test no = "$with_gnu_ld"; then
63416886 case $host_cpu in
63426887 hppa*64*)
6343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63446889 ;;
63456890 ia64*)
6346 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6891 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63476892 ;;
63486893 *)
6349 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6894 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63506895 ;;
63516896 esac
63526897 fi
63616906 interix[[3-9]]*)
63626907 _LT_TAGVAR(hardcode_direct, $1)=no
63636908 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6364 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6365 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6910 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
63666911 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
63676912 # Instead, shared libraries are loaded at an image base (0x10000000 by
63686913 # default) and relocated if they conflict, which is a slow very memory
63696914 # consuming and fragmenting process. To avoid this, we pick a random,
63706915 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
63716916 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6372 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6373 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6918 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
63746919 ;;
63756920 irix5* | irix6*)
63766921 case $cc_basename in
63776922 CC*)
63786923 # SGI C++
6379 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
63806925
63816926 # Archives containing C++ object files must be created using
63826927 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
63856930 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
63866931 ;;
63876932 *)
6388 if test "$GXX" = yes; then
6389 if test "$with_gnu_ld" = no; then
6390 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6933 if test yes = "$GXX"; then
6934 if test no = "$with_gnu_ld"; then
6935 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
63916936 else
6392 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6937 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
63936938 fi
63946939 fi
63956940 _LT_TAGVAR(link_all_deplibs, $1)=yes
63966941 ;;
63976942 esac
6398 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
63996944 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
64006945 _LT_TAGVAR(inherit_rpath, $1)=yes
64016946 ;;
64086953 # KCC will only create a shared library if the output file
64096954 # ends with ".so" (or ".sl" for HP-UX), so rename the library
64106955 # to its proper name (with version) after linking.
6411 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6412 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6956 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6957 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
64136958 # Commands to make compiler produce verbose output that lists
64146959 # what "hidden" libraries, object files and flags are used when
64156960 # linking a shared library.
64186963 # explicitly linking system object files so we need to strip them
64196964 # from the output so that they don't get included in the library
64206965 # dependencies.
6421 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6422
6423 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6424 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6966 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6967
6968 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6969 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
64256970
64266971 # Archives containing C++ object files must be created using
64276972 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
64356980 # earlier do not add the objects themselves.
64366981 case `$CC -V 2>&1` in
64376982 *"Version 7."*)
6438 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6439 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6983 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6984 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
64406985 ;;
64416986 *) # Version 8.0 or newer
64426987 tmp_idyn=
64436988 case $host_cpu in
64446989 ia64*) tmp_idyn=' -i_dynamic';;
64456990 esac
6446 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6447 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6991 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6992 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
64486993 ;;
64496994 esac
64506995 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6451 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6452 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6453 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6996 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6997 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6998 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
64546999 ;;
64557000 pgCC* | pgcpp*)
64567001 # Portland Group C++ compiler
64577002 case `$CC -V` in
64587003 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
64597004 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6460 rm -rf $tpldir~
6461 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6462 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7005 rm -rf $tpldir~
7006 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7007 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
64637008 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6464 rm -rf $tpldir~
6465 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6466 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6467 $RANLIB $oldlib'
7009 rm -rf $tpldir~
7010 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7011 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7012 $RANLIB $oldlib'
64687013 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6469 rm -rf $tpldir~
6470 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6471 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7014 rm -rf $tpldir~
7015 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7016 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
64727017 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6473 rm -rf $tpldir~
6474 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6475 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7018 rm -rf $tpldir~
7019 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7020 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
64767021 ;;
64777022 *) # Version 6 and above use weak symbols
6478 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6479 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7023 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7024 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
64807025 ;;
64817026 esac
64827027
6483 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6484 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6485 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7028 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7029 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7030 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
64867031 ;;
64877032 cxx*)
64887033 # Compaq C++
6489 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6490 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
7034 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7035 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
64917036
64927037 runpath_var=LD_RUN_PATH
64937038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
65017046 # explicitly linking system object files so we need to strip them
65027047 # from the output so that they don't get included in the library
65037048 # dependencies.
6504 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7049 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
65057050 ;;
65067051 xl* | mpixl* | bgxl*)
65077052 # IBM XL 8.0 on PPC, with GNU ld
6508 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6509 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6510 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6511 if test "x$supports_anon_versioning" = xyes; then
7053 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7054 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7055 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7056 if test yes = "$supports_anon_versioning"; then
65127057 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6513 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6514 echo "local: *; };" >> $output_objdir/$libname.ver~
6515 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7058 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7059 echo "local: *; };" >> $output_objdir/$libname.ver~
7060 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
65167061 fi
65177062 ;;
65187063 *)
65207065 *Sun\ C*)
65217066 # Sun C++ 5.9
65227067 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6523 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6524 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7068 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7069 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
65257070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6526 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7071 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
65277072 _LT_TAGVAR(compiler_needs_object, $1)=yes
65287073
65297074 # Not sure whether something based on
65817126 _LT_TAGVAR(ld_shlibs, $1)=yes
65827127 ;;
65837128
6584 openbsd2*)
6585 # C++ shared libraries are fairly broken
6586 _LT_TAGVAR(ld_shlibs, $1)=no
6587 ;;
6588
6589 openbsd*)
7129 openbsd* | bitrig*)
65907130 if test -f /usr/libexec/ld.so; then
65917131 _LT_TAGVAR(hardcode_direct, $1)=yes
65927132 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65937133 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
65947134 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6595 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6596 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6597 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6598 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6599 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7136 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7137 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
7138 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7139 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
66007140 fi
66017141 output_verbose_link_cmd=func_echo_all
66027142 else
66127152 # KCC will only create a shared library if the output file
66137153 # ends with ".so" (or ".sl" for HP-UX), so rename the library
66147154 # to its proper name (with version) after linking.
6615 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6616
6617 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7155 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7156
7157 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
66187158 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
66197159
66207160 # Archives containing C++ object files must be created using
66327172 cxx*)
66337173 case $host in
66347174 osf3*)
6635 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6636 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6637 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7175 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7176 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
66387178 ;;
66397179 *)
66407180 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6641 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7181 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
66427182 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6643 echo "-hidden">> $lib.exp~
6644 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
6645 $RM $lib.exp'
7183 echo "-hidden">> $lib.exp~
7184 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
7185 $RM $lib.exp'
66467186 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
66477187 ;;
66487188 esac
66577197 # explicitly linking system object files so we need to strip them
66587198 # from the output so that they don't get included in the library
66597199 # dependencies.
6660 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7200 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
66617201 ;;
66627202 *)
6663 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6664 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7203 if test yes,no = "$GXX,$with_gnu_ld"; then
7204 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
66657205 case $host in
66667206 osf3*)
6667 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7207 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
66687208 ;;
66697209 *)
6670 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7210 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
66717211 ;;
66727212 esac
66737213
6674 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7214 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
66757215 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
66767216
66777217 # Commands to make compiler produce verbose output that lists
67177257 # Sun C++ 4.2, 5.x and Centerline C++
67187258 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
67197259 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6720 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7260 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
67217261 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6722 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7262 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
67237263
67247264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
67257265 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
67277267 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
67287268 *)
67297269 # The compiler driver will combine and reorder linker options,
6730 # but understands `-z linker_flag'.
7270 # but understands '-z linker_flag'.
67317271 # Supported since Solaris 2.6 (maybe 2.5.1?)
67327272 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
67337273 ;;
67447284 ;;
67457285 gcx*)
67467286 # Green Hills C++ Compiler
6747 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
67487288
67497289 # The C++ compiler must be used to create the archive.
67507290 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
67517291 ;;
67527292 *)
67537293 # GNU C++ compiler with Solaris linker
6754 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6755 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7294 if test yes,no = "$GXX,$with_gnu_ld"; then
7295 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
67567296 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6757 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
67587298 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6759 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7299 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
67607300
67617301 # Commands to make compiler produce verbose output that lists
67627302 # what "hidden" libraries, object files and flags are used when
67637303 # linking a shared library.
67647304 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
67657305 else
6766 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7306 # g++ 2.7 appears to require '-G' NOT '-shared' on this
67677307 # platform.
6768 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7308 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
67697309 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6770 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7310 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
67717311
67727312 # Commands to make compiler produce verbose output that lists
67737313 # what "hidden" libraries, object files and flags are used when
67757315 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
67767316 fi
67777317
6778 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
67797319 case $host_os in
67807320 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
67817321 *)
6782 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7322 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
67837323 ;;
67847324 esac
67857325 fi
67887328 ;;
67897329
67907330 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6791 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7331 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
67927332 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
67937333 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
67947334 runpath_var='LD_RUN_PATH'
67957335
67967336 case $cc_basename in
67977337 CC*)
6798 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6799 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7338 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7339 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68007340 ;;
68017341 *)
6802 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6803 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7342 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7343 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68047344 ;;
68057345 esac
68067346 ;;
68077347
68087348 sysv5* | sco3.2v5* | sco5v6*)
6809 # Note: We can NOT use -z defs as we might desire, because we do not
7349 # Note: We CANNOT use -z defs as we might desire, because we do not
68107350 # link with -lc, and that would cause any symbols used from libc to
68117351 # always be unresolved, which means just about no library would
68127352 # ever link correctly. If we're not using GNU ld we use -z text
68137353 # though, which does catch some bad symbols but isn't as heavy-handed
68147354 # as -z defs.
6815 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6816 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7355 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7356 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
68177357 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
68187358 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6819 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
68207360 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
68217361 _LT_TAGVAR(link_all_deplibs, $1)=yes
6822 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7362 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
68237363 runpath_var='LD_RUN_PATH'
68247364
68257365 case $cc_basename in
68267366 CC*)
6827 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6828 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7367 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7368 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68297369 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6830 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7370 '"$_LT_TAGVAR(old_archive_cmds, $1)"
68317371 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6832 '"$_LT_TAGVAR(reload_cmds, $1)"
7372 '"$_LT_TAGVAR(reload_cmds, $1)"
68337373 ;;
68347374 *)
6835 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6836 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7375 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7376 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68377377 ;;
68387378 esac
68397379 ;;
68647404 esac
68657405
68667406 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6867 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6868
6869 _LT_TAGVAR(GCC, $1)="$GXX"
6870 _LT_TAGVAR(LD, $1)="$LD"
7407 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7408
7409 _LT_TAGVAR(GCC, $1)=$GXX
7410 _LT_TAGVAR(LD, $1)=$LD
68717411
68727412 ## CAVEAT EMPTOR:
68737413 ## There is no encapsulation within the following macros, do not change
68947434 lt_cv_path_LD=$lt_save_path_LD
68957435 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
68967436 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6897 fi # test "$_lt_caught_CXX_error" != yes
7437 fi # test yes != "$_lt_caught_CXX_error"
68987438
68997439 AC_LANG_POP
69007440 ])# _LT_LANG_CXX_CONFIG
69167456 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
69177457 func_stripname_cnf ()
69187458 {
6919 case ${2} in
6920 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6921 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7459 case @S|@2 in
7460 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7461 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
69227462 esac
69237463 } # func_stripname_cnf
69247464 ])# _LT_FUNC_STRIPNAME_CNF
7465
69257466
69267467 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
69277468 # ---------------------------------
70067547 pre_test_object_deps_done=no
70077548
70087549 for p in `eval "$output_verbose_link_cmd"`; do
7009 case ${prev}${p} in
7550 case $prev$p in
70107551
70117552 -L* | -R* | -l*)
70127553 # Some compilers place space between "-{L,R}" and the path.
70137554 # Remove the space.
7014 if test $p = "-L" ||
7015 test $p = "-R"; then
7555 if test x-L = "$p" ||
7556 test x-R = "$p"; then
70167557 prev=$p
70177558 continue
70187559 fi
70287569 case $p in
70297570 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
70307571 esac
7031 if test "$pre_test_object_deps_done" = no; then
7032 case ${prev} in
7572 if test no = "$pre_test_object_deps_done"; then
7573 case $prev in
70337574 -L | -R)
70347575 # Internal compiler library paths should come after those
70357576 # provided the user. The postdeps already come after the
70367577 # user supplied libs so there is no need to process them.
70377578 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7038 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7579 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
70397580 else
7040 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7581 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
70417582 fi
70427583 ;;
70437584 # The "-l" case would never come before the object being
70457586 esac
70467587 else
70477588 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7048 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7589 _LT_TAGVAR(postdeps, $1)=$prev$p
70497590 else
7050 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7591 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
70517592 fi
70527593 fi
70537594 prev=
70627603 continue
70637604 fi
70647605
7065 if test "$pre_test_object_deps_done" = no; then
7606 if test no = "$pre_test_object_deps_done"; then
70667607 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7067 _LT_TAGVAR(predep_objects, $1)="$p"
7608 _LT_TAGVAR(predep_objects, $1)=$p
70687609 else
70697610 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
70707611 fi
70717612 else
70727613 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7073 _LT_TAGVAR(postdep_objects, $1)="$p"
7614 _LT_TAGVAR(postdep_objects, $1)=$p
70747615 else
70757616 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
70767617 fi
71017642 _LT_TAGVAR(postdep_objects,$1)=
71027643 _LT_TAGVAR(postdeps,$1)=
71037644 ;;
7104
7105 linux*)
7106 case `$CC -V 2>&1 | sed 5q` in
7107 *Sun\ C*)
7108 # Sun C++ 5.9
7109
7110 # The more standards-conforming stlport4 library is
7111 # incompatible with the Cstd library. Avoid specifying
7112 # it if it's in CXXFLAGS. Ignore libCrun as
7113 # -library=stlport4 depends on it.
7114 case " $CXX $CXXFLAGS " in
7115 *" -library=stlport4 "*)
7116 solaris_use_stlport4=yes
7117 ;;
7118 esac
7119
7120 if test "$solaris_use_stlport4" != yes; then
7121 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7122 fi
7123 ;;
7124 esac
7125 ;;
7126
7127 solaris*)
7128 case $cc_basename in
7129 CC* | sunCC*)
7130 # The more standards-conforming stlport4 library is
7131 # incompatible with the Cstd library. Avoid specifying
7132 # it if it's in CXXFLAGS. Ignore libCrun as
7133 # -library=stlport4 depends on it.
7134 case " $CXX $CXXFLAGS " in
7135 *" -library=stlport4 "*)
7136 solaris_use_stlport4=yes
7137 ;;
7138 esac
7139
7140 # Adding this requires a known-good setup of shared libraries for
7141 # Sun compiler versions before 5.6, else PIC objects from an old
7142 # archive will be linked into the output, leading to subtle bugs.
7143 if test "$solaris_use_stlport4" != yes; then
7144 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7145 fi
7146 ;;
7147 esac
7148 ;;
71497645 esac
71507646 ])
71517647
71547650 esac
71557651 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
71567652 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7157 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7653 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
71587654 fi
71597655 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
71607656 [The directories searched by this compiler when creating a shared library])
71747670 # --------------------------
71757671 # Ensure that the configuration variables for a Fortran 77 compiler are
71767672 # suitably defined. These variables are subsequently used by _LT_CONFIG
7177 # to write the compiler configuration to `libtool'.
7673 # to write the compiler configuration to 'libtool'.
71787674 m4_defun([_LT_LANG_F77_CONFIG],
71797675 [AC_LANG_PUSH(Fortran 77)
7180 if test -z "$F77" || test "X$F77" = "Xno"; then
7676 if test -z "$F77" || test no = "$F77"; then
71817677 _lt_disable_F77=yes
71827678 fi
71837679
72147710 # the F77 compiler isn't working. Some variables (like enable_shared)
72157711 # are currently assumed to apply to all compilers on this platform,
72167712 # and will be corrupted by setting them based on a non-working compiler.
7217 if test "$_lt_disable_F77" != yes; then
7713 if test yes != "$_lt_disable_F77"; then
72187714 # Code to be used in simple compile tests
72197715 lt_simple_compile_test_code="\
72207716 subroutine t
72367732 _LT_LINKER_BOILERPLATE
72377733
72387734 # Allow CC to be a program name with arguments.
7239 lt_save_CC="$CC"
7735 lt_save_CC=$CC
72407736 lt_save_GCC=$GCC
72417737 lt_save_CFLAGS=$CFLAGS
72427738 CC=${F77-"f77"}
72507746 AC_MSG_RESULT([$can_build_shared])
72517747
72527748 AC_MSG_CHECKING([whether to build shared libraries])
7253 test "$can_build_shared" = "no" && enable_shared=no
7749 test no = "$can_build_shared" && enable_shared=no
72547750
72557751 # On AIX, shared libraries and static libraries use the same namespace, and
72567752 # are all built from PIC.
72577753 case $host_os in
72587754 aix3*)
7259 test "$enable_shared" = yes && enable_static=no
7755 test yes = "$enable_shared" && enable_static=no
72607756 if test -n "$RANLIB"; then
72617757 archive_cmds="$archive_cmds~\$RANLIB \$lib"
72627758 postinstall_cmds='$RANLIB $lib'
72637759 fi
72647760 ;;
72657761 aix[[4-9]]*)
7266 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7267 test "$enable_shared" = yes && enable_static=no
7762 if test ia64 != "$host_cpu"; then
7763 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7764 yes,aix,yes) ;; # shared object as lib.so file only
7765 yes,svr4,*) ;; # shared object as lib.so archive member only
7766 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7767 esac
72687768 fi
72697769 ;;
72707770 esac
72727772
72737773 AC_MSG_CHECKING([whether to build static libraries])
72747774 # Make sure either enable_shared or enable_static is yes.
7275 test "$enable_shared" = yes || enable_static=yes
7775 test yes = "$enable_shared" || enable_static=yes
72767776 AC_MSG_RESULT([$enable_static])
72777777
7278 _LT_TAGVAR(GCC, $1)="$G77"
7279 _LT_TAGVAR(LD, $1)="$LD"
7778 _LT_TAGVAR(GCC, $1)=$G77
7779 _LT_TAGVAR(LD, $1)=$LD
72807780
72817781 ## CAVEAT EMPTOR:
72827782 ## There is no encapsulation within the following macros, do not change
72937793 fi # test -n "$compiler"
72947794
72957795 GCC=$lt_save_GCC
7296 CC="$lt_save_CC"
7297 CFLAGS="$lt_save_CFLAGS"
7298 fi # test "$_lt_disable_F77" != yes
7796 CC=$lt_save_CC
7797 CFLAGS=$lt_save_CFLAGS
7798 fi # test yes != "$_lt_disable_F77"
72997799
73007800 AC_LANG_POP
73017801 ])# _LT_LANG_F77_CONFIG
73057805 # -------------------------
73067806 # Ensure that the configuration variables for a Fortran compiler are
73077807 # suitably defined. These variables are subsequently used by _LT_CONFIG
7308 # to write the compiler configuration to `libtool'.
7808 # to write the compiler configuration to 'libtool'.
73097809 m4_defun([_LT_LANG_FC_CONFIG],
73107810 [AC_LANG_PUSH(Fortran)
73117811
7312 if test -z "$FC" || test "X$FC" = "Xno"; then
7812 if test -z "$FC" || test no = "$FC"; then
73137813 _lt_disable_FC=yes
73147814 fi
73157815
73467846 # the FC compiler isn't working. Some variables (like enable_shared)
73477847 # are currently assumed to apply to all compilers on this platform,
73487848 # and will be corrupted by setting them based on a non-working compiler.
7349 if test "$_lt_disable_FC" != yes; then
7849 if test yes != "$_lt_disable_FC"; then
73507850 # Code to be used in simple compile tests
73517851 lt_simple_compile_test_code="\
73527852 subroutine t
73687868 _LT_LINKER_BOILERPLATE
73697869
73707870 # Allow CC to be a program name with arguments.
7371 lt_save_CC="$CC"
7871 lt_save_CC=$CC
73727872 lt_save_GCC=$GCC
73737873 lt_save_CFLAGS=$CFLAGS
73747874 CC=${FC-"f95"}
73847884 AC_MSG_RESULT([$can_build_shared])
73857885
73867886 AC_MSG_CHECKING([whether to build shared libraries])
7387 test "$can_build_shared" = "no" && enable_shared=no
7887 test no = "$can_build_shared" && enable_shared=no
73887888
73897889 # On AIX, shared libraries and static libraries use the same namespace, and
73907890 # are all built from PIC.
73917891 case $host_os in
73927892 aix3*)
7393 test "$enable_shared" = yes && enable_static=no
7893 test yes = "$enable_shared" && enable_static=no
73947894 if test -n "$RANLIB"; then
73957895 archive_cmds="$archive_cmds~\$RANLIB \$lib"
73967896 postinstall_cmds='$RANLIB $lib'
73977897 fi
73987898 ;;
73997899 aix[[4-9]]*)
7400 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7401 test "$enable_shared" = yes && enable_static=no
7900 if test ia64 != "$host_cpu"; then
7901 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7902 yes,aix,yes) ;; # shared object as lib.so file only
7903 yes,svr4,*) ;; # shared object as lib.so archive member only
7904 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7905 esac
74027906 fi
74037907 ;;
74047908 esac
74067910
74077911 AC_MSG_CHECKING([whether to build static libraries])
74087912 # Make sure either enable_shared or enable_static is yes.
7409 test "$enable_shared" = yes || enable_static=yes
7913 test yes = "$enable_shared" || enable_static=yes
74107914 AC_MSG_RESULT([$enable_static])
74117915
7412 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7413 _LT_TAGVAR(LD, $1)="$LD"
7916 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7917 _LT_TAGVAR(LD, $1)=$LD
74147918
74157919 ## CAVEAT EMPTOR:
74167920 ## There is no encapsulation within the following macros, do not change
74307934 GCC=$lt_save_GCC
74317935 CC=$lt_save_CC
74327936 CFLAGS=$lt_save_CFLAGS
7433 fi # test "$_lt_disable_FC" != yes
7937 fi # test yes != "$_lt_disable_FC"
74347938
74357939 AC_LANG_POP
74367940 ])# _LT_LANG_FC_CONFIG
74407944 # --------------------------
74417945 # Ensure that the configuration variables for the GNU Java Compiler compiler
74427946 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7443 # to write the compiler configuration to `libtool'.
7947 # to write the compiler configuration to 'libtool'.
74447948 m4_defun([_LT_LANG_GCJ_CONFIG],
74457949 [AC_REQUIRE([LT_PROG_GCJ])dnl
74467950 AC_LANG_SAVE
74747978 CFLAGS=$GCJFLAGS
74757979 compiler=$CC
74767980 _LT_TAGVAR(compiler, $1)=$CC
7477 _LT_TAGVAR(LD, $1)="$LD"
7981 _LT_TAGVAR(LD, $1)=$LD
74787982 _LT_CC_BASENAME([$compiler])
74797983
74807984 # GCJ did not exist at the time GCC didn't implicitly link libc in.
75118015 # --------------------------
75128016 # Ensure that the configuration variables for the GNU Go compiler
75138017 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7514 # to write the compiler configuration to `libtool'.
8018 # to write the compiler configuration to 'libtool'.
75158019 m4_defun([_LT_LANG_GO_CONFIG],
75168020 [AC_REQUIRE([LT_PROG_GO])dnl
75178021 AC_LANG_SAVE
75458049 CFLAGS=$GOFLAGS
75468050 compiler=$CC
75478051 _LT_TAGVAR(compiler, $1)=$CC
7548 _LT_TAGVAR(LD, $1)="$LD"
8052 _LT_TAGVAR(LD, $1)=$LD
75498053 _LT_CC_BASENAME([$compiler])
75508054
75518055 # Go did not exist at the time GCC didn't implicitly link libc in.
75828086 # -------------------------
75838087 # Ensure that the configuration variables for the Windows resource compiler
75848088 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7585 # to write the compiler configuration to `libtool'.
8089 # to write the compiler configuration to 'libtool'.
75868090 m4_defun([_LT_LANG_RC_CONFIG],
75878091 [AC_REQUIRE([LT_PROG_RC])dnl
75888092 AC_LANG_SAVE
75988102 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
75998103
76008104 # Code to be used in simple link tests
7601 lt_simple_link_test_code="$lt_simple_compile_test_code"
8105 lt_simple_link_test_code=$lt_simple_compile_test_code
76028106
76038107 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
76048108 _LT_TAG_COMPILER
76088112 _LT_LINKER_BOILERPLATE
76098113
76108114 # Allow CC to be a program name with arguments.
7611 lt_save_CC="$CC"
8115 lt_save_CC=$CC
76128116 lt_save_CFLAGS=$CFLAGS
76138117 lt_save_GCC=$GCC
76148118 GCC=
76378141 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
76388142 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
76398143 [AC_CHECK_TOOL(GCJ, gcj,)
7640 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8144 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
76418145 AC_SUBST(GCJFLAGS)])])[]dnl
76428146 ])
76438147
77488252 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
77498253 # along with /bin/sed that truncates output.
77508254 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7751 test ! -f $lt_ac_sed && continue
8255 test ! -f "$lt_ac_sed" && continue
77528256 cat /dev/null > conftest.in
77538257 lt_ac_count=0
77548258 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
77658269 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
77668270 cmp -s conftest.out conftest.nl || break
77678271 # 10000 chars as input seems more than enough
7768 test $lt_ac_count -gt 10 && break
8272 test 10 -lt "$lt_ac_count" && break
77698273 lt_ac_count=`expr $lt_ac_count + 1`
7770 if test $lt_ac_count -gt $lt_ac_max; then
8274 if test "$lt_ac_count" -gt "$lt_ac_max"; then
77718275 lt_ac_max=$lt_ac_count
77728276 lt_cv_path_SED=$lt_ac_sed
77738277 fi
77918295 # Find out whether the shell is Bourne or XSI compatible,
77928296 # or has some other useful features.
77938297 m4_defun([_LT_CHECK_SHELL_FEATURES],
7794 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7795 # Try some XSI features
7796 xsi_shell=no
7797 ( _lt_dummy="a/b/c"
7798 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7799 = c,a/b,b/c, \
7800 && eval 'test $(( 1 + 1 )) -eq 2 \
7801 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7802 && xsi_shell=yes
7803 AC_MSG_RESULT([$xsi_shell])
7804 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7805
7806 AC_MSG_CHECKING([whether the shell understands "+="])
7807 lt_shell_append=no
7808 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7809 >/dev/null 2>&1 \
7810 && lt_shell_append=yes
7811 AC_MSG_RESULT([$lt_shell_append])
7812 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7813
7814 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8298 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
78158299 lt_unset=unset
78168300 else
78178301 lt_unset=false
78358319 ])# _LT_CHECK_SHELL_FEATURES
78368320
78378321
7838 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7839 # ------------------------------------------------------
7840 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7841 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7842 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7843 [dnl {
7844 sed -e '/^$1 ()$/,/^} # $1 /c\
7845 $1 ()\
7846 {\
7847 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7848 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7849 && mv -f "$cfgfile.tmp" "$cfgfile" \
7850 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7851 test 0 -eq $? || _lt_function_replace_fail=:
7852 ])
7853
7854
7855 # _LT_PROG_REPLACE_SHELLFNS
7856 # -------------------------
7857 # Replace existing portable implementations of several shell functions with
7858 # equivalent extended shell implementations where those features are available..
7859 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7860 [if test x"$xsi_shell" = xyes; then
7861 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7862 case ${1} in
7863 */*) func_dirname_result="${1%/*}${2}" ;;
7864 * ) func_dirname_result="${3}" ;;
7865 esac])
7866
7867 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7868 func_basename_result="${1##*/}"])
7869
7870 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7871 case ${1} in
7872 */*) func_dirname_result="${1%/*}${2}" ;;
7873 * ) func_dirname_result="${3}" ;;
7874 esac
7875 func_basename_result="${1##*/}"])
7876
7877 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7878 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7879 # positional parameters, so assign one to ordinary parameter first.
7880 func_stripname_result=${3}
7881 func_stripname_result=${func_stripname_result#"${1}"}
7882 func_stripname_result=${func_stripname_result%"${2}"}])
7883
7884 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7885 func_split_long_opt_name=${1%%=*}
7886 func_split_long_opt_arg=${1#*=}])
7887
7888 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7889 func_split_short_opt_arg=${1#??}
7890 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7891
7892 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7893 case ${1} in
7894 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7895 *) func_lo2o_result=${1} ;;
7896 esac])
7897
7898 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7899
7900 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7901
7902 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7903 fi
7904
7905 if test x"$lt_shell_append" = xyes; then
7906 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7907
7908 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7909 func_quote_for_eval "${2}"
7910 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7911 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7912
7913 # Save a `func_append' function call where possible by direct use of '+='
7914 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7915 && mv -f "$cfgfile.tmp" "$cfgfile" \
7916 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7917 test 0 -eq $? || _lt_function_replace_fail=:
7918 else
7919 # Save a `func_append' function call even when '+=' is not available
7920 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7921 && mv -f "$cfgfile.tmp" "$cfgfile" \
7922 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7923 test 0 -eq $? || _lt_function_replace_fail=:
7924 fi
7925
7926 if test x"$_lt_function_replace_fail" = x":"; then
7927 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7928 fi
7929 ])
7930
79318322 # _LT_PATH_CONVERSION_FUNCTIONS
79328323 # -----------------------------
7933 # Determine which file name conversion functions should be used by
8324 # Determine what file name conversion functions should be used by
79348325 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
79358326 # for certain cross-compile configurations and native mingw.
79368327 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
00 # Helper functions for option handling. -*- Autoconf -*-
11 #
2 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
3 # Inc.
2 # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
3 # Foundation, Inc.
44 # Written by Gary V. Vaughan, 2004
55 #
66 # This file is free software; the Free Software Foundation gives
77 # unlimited permission to copy and/or distribute it, with or without
88 # modifications, as long as this notice is preserved.
99
10 # serial 7 ltoptions.m4
10 # serial 8 ltoptions.m4
1111
1212 # This is to help aclocal find these macros, as it can't see m4_define.
1313 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
2828 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
2929 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
3030 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option `$2'])])[]dnl
31 [m4_warning([Unknown $1 option '$2'])])[]dnl
3232 ])
3333
3434
7474 dnl
7575 dnl If no reference was made to various pairs of opposing options, then
7676 dnl we run the default mode handler for the pair. For example, if neither
77 dnl `shared' nor `disable-shared' was passed, we enable building of shared
77 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
7878 dnl archives by default:
7979 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8080 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8181 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8282 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
83 [_LT_ENABLE_FAST_INSTALL])
84 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
85 [_LT_WITH_AIX_SONAME([aix])])
8486 ])
8587 ])# _LT_SET_OPTIONS
8688
111113 [_LT_SET_OPTION([LT_INIT], [dlopen])
112114 AC_DIAGNOSE([obsolete],
113115 [$0: Remove this warning and the call to _LT_SET_OPTION when you
114 put the `dlopen' option into LT_INIT's first parameter.])
116 put the 'dlopen' option into LT_INIT's first parameter.])
115117 ])
116118
117119 dnl aclocal-1.4 backwards compatibility:
147149 _LT_SET_OPTION([LT_INIT], [win32-dll])
148150 AC_DIAGNOSE([obsolete],
149151 [$0: Remove this warning and the call to _LT_SET_OPTION when you
150 put the `win32-dll' option into LT_INIT's first parameter.])
152 put the 'win32-dll' option into LT_INIT's first parameter.])
151153 ])
152154
153155 dnl aclocal-1.4 backwards compatibility:
156158
157159 # _LT_ENABLE_SHARED([DEFAULT])
158160 # ----------------------------
159 # implement the --enable-shared flag, and supports the `shared' and
160 # `disable-shared' LT_INIT options.
161 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
161 # implement the --enable-shared flag, and supports the 'shared' and
162 # 'disable-shared' LT_INIT options.
163 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
162164 m4_define([_LT_ENABLE_SHARED],
163165 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
164166 AC_ARG_ENABLE([shared],
171173 *)
172174 enable_shared=no
173175 # Look at the argument we got. We use all the common list separators.
174 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
176 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
175177 for pkg in $enableval; do
176 IFS="$lt_save_ifs"
178 IFS=$lt_save_ifs
177179 if test "X$pkg" = "X$p"; then
178180 enable_shared=yes
179181 fi
180182 done
181 IFS="$lt_save_ifs"
183 IFS=$lt_save_ifs
182184 ;;
183185 esac],
184186 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
210212
211213 # _LT_ENABLE_STATIC([DEFAULT])
212214 # ----------------------------
213 # implement the --enable-static flag, and support the `static' and
214 # `disable-static' LT_INIT options.
215 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
215 # implement the --enable-static flag, and support the 'static' and
216 # 'disable-static' LT_INIT options.
217 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
216218 m4_define([_LT_ENABLE_STATIC],
217219 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
218220 AC_ARG_ENABLE([static],
225227 *)
226228 enable_static=no
227229 # Look at the argument we got. We use all the common list separators.
228 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
230 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
229231 for pkg in $enableval; do
230 IFS="$lt_save_ifs"
232 IFS=$lt_save_ifs
231233 if test "X$pkg" = "X$p"; then
232234 enable_static=yes
233235 fi
234236 done
235 IFS="$lt_save_ifs"
237 IFS=$lt_save_ifs
236238 ;;
237239 esac],
238240 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
264266
265267 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
266268 # ----------------------------------
267 # implement the --enable-fast-install flag, and support the `fast-install'
268 # and `disable-fast-install' LT_INIT options.
269 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
269 # implement the --enable-fast-install flag, and support the 'fast-install'
270 # and 'disable-fast-install' LT_INIT options.
271 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
270272 m4_define([_LT_ENABLE_FAST_INSTALL],
271273 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
272274 AC_ARG_ENABLE([fast-install],
279281 *)
280282 enable_fast_install=no
281283 # Look at the argument we got. We use all the common list separators.
282 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
284 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
283285 for pkg in $enableval; do
284 IFS="$lt_save_ifs"
286 IFS=$lt_save_ifs
285287 if test "X$pkg" = "X$p"; then
286288 enable_fast_install=yes
287289 fi
288290 done
289 IFS="$lt_save_ifs"
291 IFS=$lt_save_ifs
290292 ;;
291293 esac],
292294 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
303305 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
304306 AC_DIAGNOSE([obsolete],
305307 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
306 the `fast-install' option into LT_INIT's first parameter.])
308 the 'fast-install' option into LT_INIT's first parameter.])
307309 ])
308310
309311 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
310312 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
311313 AC_DIAGNOSE([obsolete],
312314 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
313 the `disable-fast-install' option into LT_INIT's first parameter.])
315 the 'disable-fast-install' option into LT_INIT's first parameter.])
314316 ])
315317
316318 dnl aclocal-1.4 backwards compatibility:
318320 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
319321
320322
323 # _LT_WITH_AIX_SONAME([DEFAULT])
324 # ----------------------------------
325 # implement the --with-aix-soname flag, and support the `aix-soname=aix'
326 # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
327 # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
328 m4_define([_LT_WITH_AIX_SONAME],
329 [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
330 shared_archive_member_spec=
331 case $host,$enable_shared in
332 power*-*-aix[[5-9]]*,yes)
333 AC_MSG_CHECKING([which variant of shared library versioning to provide])
334 AC_ARG_WITH([aix-soname],
335 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
336 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
337 [case $withval in
338 aix|svr4|both)
339 ;;
340 *)
341 AC_MSG_ERROR([Unknown argument to --with-aix-soname])
342 ;;
343 esac
344 lt_cv_with_aix_soname=$with_aix_soname],
345 [AC_CACHE_VAL([lt_cv_with_aix_soname],
346 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
347 with_aix_soname=$lt_cv_with_aix_soname])
348 AC_MSG_RESULT([$with_aix_soname])
349 if test aix != "$with_aix_soname"; then
350 # For the AIX way of multilib, we name the shared archive member
351 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
352 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
353 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
354 # the AIX toolchain works better with OBJECT_MODE set (default 32).
355 if test 64 = "${OBJECT_MODE-32}"; then
356 shared_archive_member_spec=shr_64
357 else
358 shared_archive_member_spec=shr
359 fi
360 fi
361 ;;
362 *)
363 with_aix_soname=aix
364 ;;
365 esac
366
367 _LT_DECL([], [shared_archive_member_spec], [0],
368 [Shared archive member basename, for filename based shared library versioning on AIX])dnl
369 ])# _LT_WITH_AIX_SONAME
370
371 LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
372 LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
373 LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
374
375
321376 # _LT_WITH_PIC([MODE])
322377 # --------------------
323 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
378 # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
324379 # LT_INIT options.
325 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
380 # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
326381 m4_define([_LT_WITH_PIC],
327382 [AC_ARG_WITH([pic],
328383 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
333388 *)
334389 pic_mode=default
335390 # Look at the argument we got. We use all the common list separators.
336 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
391 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
337392 for lt_pkg in $withval; do
338 IFS="$lt_save_ifs"
393 IFS=$lt_save_ifs
339394 if test "X$lt_pkg" = "X$lt_p"; then
340395 pic_mode=yes
341396 fi
342397 done
343 IFS="$lt_save_ifs"
398 IFS=$lt_save_ifs
344399 ;;
345400 esac],
346 [pic_mode=default])
347
348 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
401 [pic_mode=m4_default([$1], [default])])
349402
350403 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
351404 ])# _LT_WITH_PIC
358411 [_LT_SET_OPTION([LT_INIT], [pic-only])
359412 AC_DIAGNOSE([obsolete],
360413 [$0: Remove this warning and the call to _LT_SET_OPTION when you
361 put the `pic-only' option into LT_INIT's first parameter.])
414 put the 'pic-only' option into LT_INIT's first parameter.])
362415 ])
363416
364417 dnl aclocal-1.4 backwards compatibility:
00 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
11 #
2 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
2 # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
3 # Foundation, Inc.
34 # Written by Gary V. Vaughan, 2004
45 #
56 # This file is free software; the Free Software Foundation gives
3233 # ------------
3334 # Manipulate m4 lists.
3435 # These macros are necessary as long as will still need to support
35 # Autoconf-2.59 which quotes differently.
36 # Autoconf-2.59, which quotes differently.
3637 m4_define([lt_car], [[$1]])
3738 m4_define([lt_cdr],
3839 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
4344
4445 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
4546 # ------------------------------------------
46 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
47 # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
4748 # Note that neither SEPARATOR nor STRING are expanded; they are appended
4849 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
4950 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
00 # ltversion.m4 -- version numbers -*- Autoconf -*-
11 #
2 # Copyright (C) 2004 Free Software Foundation, Inc.
2 # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
33 # Written by Scott James Remnant, 2004
44 #
55 # This file is free software; the Free Software Foundation gives
88
99 # @configure_input@
1010
11 # serial 3337 ltversion.m4
11 # serial 4179 ltversion.m4
1212 # This file is part of GNU Libtool
1313
14 m4_define([LT_PACKAGE_VERSION], [2.4.2])
15 m4_define([LT_PACKAGE_REVISION], [1.3337])
14 m4_define([LT_PACKAGE_VERSION], [2.4.6])
15 m4_define([LT_PACKAGE_REVISION], [2.4.6])
1616
1717 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4.2'
19 macro_revision='1.3337'
18 [macro_version='2.4.6'
19 macro_revision='2.4.6'
2020 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
2121 _LT_DECL(, macro_revision, 0)
2222 ])
00 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
11 #
2 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
2 # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
3 # Foundation, Inc.
34 # Written by Scott James Remnant, 2004.
45 #
56 # This file is free software; the Free Software Foundation gives
1011
1112 # These exist entirely to fool aclocal when bootstrapping libtool.
1213 #
13 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
14 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
1415 # which have later been changed to m4_define as they aren't part of the
1516 # exported API, or moved to Autoconf or Automake where they belong.
1617 #
2425 # included after everything else. This provides aclocal with the
2526 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
2627 # because those macros already exist, or will be overwritten later.
27 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
28 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
2829 #
2930 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
3031 # Yes, that means every name once taken will need to remain here until
0 # Makefile.in generated by automake 1.14.1 from Makefile.am.
0 # Makefile.in generated by automake 1.15 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
1313
1414 @SET_MAKE@
1515 VPATH = @srcdir@
16 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
16 am__is_gnu_make = { \
17 if test -z '$(MAKELEVEL)'; then \
18 false; \
19 elif test -n '$(MAKE_HOST)'; then \
20 true; \
21 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
22 true; \
23 else \
24 false; \
25 fi; \
26 }
1727 am__make_running_with_option = \
1828 case $${target_option-} in \
1929 ?) ;; \
7787 build_triplet = @build@
7888 host_triplet = @host@
7989 subdir = man
80 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
8190 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
8291 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
8392 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
8594 $(top_srcdir)/m4/ax_prog_doxygen.m4 $(top_srcdir)/configure.ac
8695 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
8796 $(ACLOCAL_M4)
97 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
8898 mkinstalldirs = $(install_sh) -d
8999 CONFIG_HEADER = $(top_builddir)/geo_config.h
90100 CONFIG_CLEAN_FILES =
144154 ETAGS = etags
145155 CTAGS = ctags
146156 DIST_SUBDIRS = $(SUBDIRS)
157 am__DIST_COMMON = $(srcdir)/Makefile.in
147158 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
148159 am__relativize = \
149160 dir0=`pwd`; \
241252 LIPO = @LIPO@
242253 LN_S = @LN_S@
243254 LTLIBOBJS = @LTLIBOBJS@
255 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
244256 MAINT = @MAINT@
245257 MAKEINFO = @MAKEINFO@
246258 MANIFEST_TOOL = @MANIFEST_TOOL@
316328 prefix = @prefix@
317329 program_transform_name = @program_transform_name@
318330 psdir = @psdir@
331 runstatedir = @runstatedir@
319332 sbindir = @sbindir@
320333 sharedstatedir = @sharedstatedir@
321334 srcdir = @srcdir@
340353 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
341354 $(am__cd) $(top_srcdir) && \
342355 $(AUTOMAKE) --gnu man/Makefile
343 .PRECIOUS: Makefile
344356 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
345357 @case '$?' in \
346358 *config.status*) \
635647 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
636648 ps ps-am tags tags-am uninstall uninstall-am
637649
650 .PRECIOUS: Makefile
651
638652
639653 # Tell versions [3.59,3.63) of GNU make to not export all variables.
640654 # Otherwise a system limit (for SysV at least) may be exceeded.
0 # Makefile.in generated by automake 1.14.1 from Makefile.am.
0 # Makefile.in generated by automake 1.15 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
1313
1414 @SET_MAKE@
1515 VPATH = @srcdir@
16 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
16 am__is_gnu_make = { \
17 if test -z '$(MAKELEVEL)'; then \
18 false; \
19 elif test -n '$(MAKE_HOST)'; then \
20 true; \
21 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
22 true; \
23 else \
24 false; \
25 fi; \
26 }
1727 am__make_running_with_option = \
1828 case $${target_option-} in \
1929 ?) ;; \
7787 build_triplet = @build@
7888 host_triplet = @host@
7989 subdir = man/man1
80 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
8190 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
8291 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
8392 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
8594 $(top_srcdir)/m4/ax_prog_doxygen.m4 $(top_srcdir)/configure.ac
8695 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
8796 $(ACLOCAL_M4)
97 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
8898 mkinstalldirs = $(install_sh) -d
8999 CONFIG_HEADER = $(top_builddir)/geo_config.h
90100 CONFIG_CLEAN_FILES =
140150 NROFF = nroff
141151 MANS = $(man_MANS)
142152 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
153 am__DIST_COMMON = $(srcdir)/Makefile.in
143154 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
144155 ACLOCAL = @ACLOCAL@
145156 AMTAR = @AMTAR@
212223 LIPO = @LIPO@
213224 LN_S = @LN_S@
214225 LTLIBOBJS = @LTLIBOBJS@
226 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
215227 MAINT = @MAINT@
216228 MAKEINFO = @MAKEINFO@
217229 MANIFEST_TOOL = @MANIFEST_TOOL@
287299 prefix = @prefix@
288300 program_transform_name = @program_transform_name@
289301 psdir = @psdir@
302 runstatedir = @runstatedir@
290303 sbindir = @sbindir@
291304 sharedstatedir = @sharedstatedir@
292305 srcdir = @srcdir@
312325 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/man1/Makefile'; \
313326 $(am__cd) $(top_srcdir) && \
314327 $(AUTOMAKE) --gnu man/man1/Makefile
315 .PRECIOUS: Makefile
316328 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
317329 @case '$?' in \
318330 *config.status*) \
536548 ps ps-am tags-am uninstall uninstall-am uninstall-man \
537549 uninstall-man1
538550
551 .PRECIOUS: Makefile
552
539553
540554 # Tell versions [3.59,3.63) of GNU make to not export all variables.
541555 # Otherwise a system limit (for SysV at least) may be exceeded.
22
33 scriptversion=2013-10-28.13; # UTC
44
5 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
5 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
66 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
77
88 # This program is free software; you can redistribute it and/or modify