aclocal.m4 revision 2d8abe4f
1ba6a1819Smrg# generated automatically by aclocal 1.10 -*- Autoconf -*- 2ba6a1819Smrg 3ba6a1819Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4ba6a1819Smrg# 2005, 2006 Free Software Foundation, Inc. 5ba6a1819Smrg# This file is free software; the Free Software Foundation 6ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 7ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 8ba6a1819Smrg 9ba6a1819Smrg# This program is distributed in the hope that it will be useful, 10ba6a1819Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ba6a1819Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ba6a1819Smrg# PARTICULAR PURPOSE. 13ba6a1819Smrg 14ba6a1819Smrgm4_if(m4_PACKAGE_VERSION, [2.61],, 15ba6a1819Smrg[m4_fatal([this file was generated for autoconf 2.61. 16ba6a1819SmrgYou have another version of autoconf. If you want to use that, 17ba6a1819Smrgyou should regenerate the build system entirely.], [63])]) 18ba6a1819Smrg 192d8abe4fSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 202d8abe4fSmrgdnl 212d8abe4fSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 222d8abe4fSmrgdnl 232d8abe4fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 242d8abe4fSmrgdnl copy of this software and associated documentation files (the 252d8abe4fSmrgdnl "Software"), to deal in the Software without restriction, including 262d8abe4fSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 272d8abe4fSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 282d8abe4fSmrgdnl to whom the Software is furnished to do so, provided that the above 292d8abe4fSmrgdnl copyright notice(s) and this permission notice appear in all copies of 302d8abe4fSmrgdnl the Software and that both the above copyright notice(s) and this 312d8abe4fSmrgdnl permission notice appear in supporting documentation. 322d8abe4fSmrgdnl 332d8abe4fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 342d8abe4fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 352d8abe4fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 362d8abe4fSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 372d8abe4fSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 382d8abe4fSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 392d8abe4fSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 402d8abe4fSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 412d8abe4fSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 422d8abe4fSmrgdnl 432d8abe4fSmrgdnl Except as contained in this notice, the name of a copyright holder 442d8abe4fSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 452d8abe4fSmrgdnl or other dealings in this Software without prior written authorization 462d8abe4fSmrgdnl of the copyright holder. 472d8abe4fSmrg 482d8abe4fSmrg# XORG_MACROS_VERSION(required-version) 492d8abe4fSmrg# ------------------------------------- 502d8abe4fSmrg# Minimum version: 1.1.0 512d8abe4fSmrg# 522d8abe4fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 532d8abe4fSmrg# your configure.ac with the minimum required version, such as: 542d8abe4fSmrg# XORG_MACROS_VERSION(1.1) 552d8abe4fSmrg# 562d8abe4fSmrg# To force at least a version with this macro defined, also add: 572d8abe4fSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 582d8abe4fSmrg# 592d8abe4fSmrg# 602d8abe4fSmrg# See the "minimum version" comment for each macro you use to see what 612d8abe4fSmrg# version you require. 622d8abe4fSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 632d8abe4fSmrg [XORG_MACROS_needed_version=$1 642d8abe4fSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 652d8abe4fSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 662d8abe4fSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 672d8abe4fSmrg [XORG_MACROS_version=1.2.1 682d8abe4fSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 692d8abe4fSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 702d8abe4fSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 712d8abe4fSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 722d8abe4fSmrg fi 732d8abe4fSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 742d8abe4fSmrg AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 752d8abe4fSmrg fi 762d8abe4fSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 772d8abe4fSmrg]) # XORG_MACROS_VERSION 782d8abe4fSmrg 792d8abe4fSmrg# XORG_PROG_RAWCPP() 802d8abe4fSmrg# ------------------ 812d8abe4fSmrg# Minimum version: 1.0.0 822d8abe4fSmrg# 832d8abe4fSmrg# Find cpp program and necessary flags for use in pre-processing text files 842d8abe4fSmrg# such as man pages and config files 852d8abe4fSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 862d8abe4fSmrgAC_REQUIRE([AC_PROG_CPP]) 872d8abe4fSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 882d8abe4fSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 892d8abe4fSmrg 902d8abe4fSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 912d8abe4fSmrg# which is not the best choice for supporting other OS'es, but covers most 922d8abe4fSmrg# of the ones we need for now. 932d8abe4fSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 942d8abe4fSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 952d8abe4fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 962d8abe4fSmrg AC_MSG_RESULT([no]) 972d8abe4fSmrgelse 982d8abe4fSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 992d8abe4fSmrg RAWCPPFLAGS=-undef 1002d8abe4fSmrg AC_MSG_RESULT([yes]) 1012d8abe4fSmrg # under Cygwin unix is still defined even with -undef 1022d8abe4fSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1032d8abe4fSmrg RAWCPPFLAGS="-undef -ansi" 1042d8abe4fSmrg AC_MSG_RESULT([yes, with -ansi]) 1052d8abe4fSmrg else 1062d8abe4fSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1072d8abe4fSmrg fi 1082d8abe4fSmrgfi 1092d8abe4fSmrgrm -f conftest.$ac_ext 1102d8abe4fSmrg 1112d8abe4fSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1122d8abe4fSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1132d8abe4fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1142d8abe4fSmrg AC_MSG_RESULT([no]) 1152d8abe4fSmrgelse 1162d8abe4fSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1172d8abe4fSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1182d8abe4fSmrg AC_MSG_RESULT([yes]) 1192d8abe4fSmrg else 1202d8abe4fSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1212d8abe4fSmrg fi 1222d8abe4fSmrgfi 1232d8abe4fSmrgrm -f conftest.$ac_ext 1242d8abe4fSmrgAC_SUBST(RAWCPPFLAGS) 1252d8abe4fSmrg]) # XORG_PROG_RAWCPP 1262d8abe4fSmrg 1272d8abe4fSmrg# XORG_MANPAGE_SECTIONS() 1282d8abe4fSmrg# ----------------------- 1292d8abe4fSmrg# Minimum version: 1.0.0 1302d8abe4fSmrg# 1312d8abe4fSmrg# Determine which sections man pages go in for the different man page types 1322d8abe4fSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1332d8abe4fSmrg# Not sure if there's any better way than just hardcoding by OS name. 1342d8abe4fSmrg# Override default settings by setting environment variables 1352d8abe4fSmrg 1362d8abe4fSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1372d8abe4fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1382d8abe4fSmrg 1392d8abe4fSmrgif test x$APP_MAN_SUFFIX = x ; then 1402d8abe4fSmrg APP_MAN_SUFFIX=1 1412d8abe4fSmrgfi 1422d8abe4fSmrgif test x$APP_MAN_DIR = x ; then 1432d8abe4fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1442d8abe4fSmrgfi 1452d8abe4fSmrg 1462d8abe4fSmrgif test x$LIB_MAN_SUFFIX = x ; then 1472d8abe4fSmrg LIB_MAN_SUFFIX=3 1482d8abe4fSmrgfi 1492d8abe4fSmrgif test x$LIB_MAN_DIR = x ; then 1502d8abe4fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1512d8abe4fSmrgfi 1522d8abe4fSmrg 1532d8abe4fSmrgif test x$FILE_MAN_SUFFIX = x ; then 1542d8abe4fSmrg case $host_os in 1552d8abe4fSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 1562d8abe4fSmrg *) FILE_MAN_SUFFIX=5 ;; 1572d8abe4fSmrg esac 1582d8abe4fSmrgfi 1592d8abe4fSmrgif test x$FILE_MAN_DIR = x ; then 1602d8abe4fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1612d8abe4fSmrgfi 1622d8abe4fSmrg 1632d8abe4fSmrgif test x$MISC_MAN_SUFFIX = x ; then 1642d8abe4fSmrg case $host_os in 1652d8abe4fSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 1662d8abe4fSmrg *) MISC_MAN_SUFFIX=7 ;; 1672d8abe4fSmrg esac 1682d8abe4fSmrgfi 1692d8abe4fSmrgif test x$MISC_MAN_DIR = x ; then 1702d8abe4fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1712d8abe4fSmrgfi 1722d8abe4fSmrg 1732d8abe4fSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1742d8abe4fSmrg case $host_os in 1752d8abe4fSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1762d8abe4fSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1772d8abe4fSmrg esac 1782d8abe4fSmrgfi 1792d8abe4fSmrgif test x$DRIVER_MAN_DIR = x ; then 1802d8abe4fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1812d8abe4fSmrgfi 1822d8abe4fSmrg 1832d8abe4fSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1842d8abe4fSmrg case $host_os in 1852d8abe4fSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1862d8abe4fSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1872d8abe4fSmrg esac 1882d8abe4fSmrgfi 1892d8abe4fSmrgif test x$ADMIN_MAN_DIR = x ; then 1902d8abe4fSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1912d8abe4fSmrgfi 1922d8abe4fSmrg 1932d8abe4fSmrg 1942d8abe4fSmrgAC_SUBST([APP_MAN_SUFFIX]) 1952d8abe4fSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1962d8abe4fSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1972d8abe4fSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1982d8abe4fSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1992d8abe4fSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 2002d8abe4fSmrgAC_SUBST([APP_MAN_DIR]) 2012d8abe4fSmrgAC_SUBST([LIB_MAN_DIR]) 2022d8abe4fSmrgAC_SUBST([FILE_MAN_DIR]) 2032d8abe4fSmrgAC_SUBST([MISC_MAN_DIR]) 2042d8abe4fSmrgAC_SUBST([DRIVER_MAN_DIR]) 2052d8abe4fSmrgAC_SUBST([ADMIN_MAN_DIR]) 2062d8abe4fSmrg]) # XORG_MANPAGE_SECTIONS 2072d8abe4fSmrg 2082d8abe4fSmrg# XORG_CHECK_LINUXDOC 2092d8abe4fSmrg# ------------------- 2102d8abe4fSmrg# Minimum version: 1.0.0 2112d8abe4fSmrg# 2122d8abe4fSmrg# Defines the variable MAKE_TEXT if the necessary tools and 2132d8abe4fSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 2142d8abe4fSmrg# Whether or not the necessary tools and files are found can be checked 2152d8abe4fSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 2162d8abe4fSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 2172d8abe4fSmrgif test x$XORG_SGML_PATH = x ; then 2182d8abe4fSmrg XORG_SGML_PATH=$prefix/share/sgml 2192d8abe4fSmrgfi 2202d8abe4fSmrgHAVE_DEFS_ENT= 2212d8abe4fSmrg 2222d8abe4fSmrgif test x"$cross_compiling" = x"yes" ; then 2232d8abe4fSmrg HAVE_DEFS_ENT=no 2242d8abe4fSmrgelse 2252d8abe4fSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 2262d8abe4fSmrgfi 2272d8abe4fSmrg 2282d8abe4fSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 2292d8abe4fSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 2302d8abe4fSmrg 2312d8abe4fSmrgAC_MSG_CHECKING([Whether to build documentation]) 2322d8abe4fSmrg 2332d8abe4fSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 2342d8abe4fSmrg BUILDDOC=yes 2352d8abe4fSmrgelse 2362d8abe4fSmrg BUILDDOC=no 2372d8abe4fSmrgfi 2382d8abe4fSmrg 2392d8abe4fSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 2402d8abe4fSmrg 2412d8abe4fSmrgAC_MSG_RESULT([$BUILDDOC]) 2422d8abe4fSmrg 2432d8abe4fSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 2442d8abe4fSmrg 2452d8abe4fSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 2462d8abe4fSmrg BUILDPDFDOC=yes 2472d8abe4fSmrgelse 2482d8abe4fSmrg BUILDPDFDOC=no 2492d8abe4fSmrgfi 2502d8abe4fSmrg 2512d8abe4fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 2522d8abe4fSmrg 2532d8abe4fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 2542d8abe4fSmrg 2552d8abe4fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 2562d8abe4fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 2572d8abe4fSmrgMAKE_PDF="$PS2PDF" 2582d8abe4fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 2592d8abe4fSmrg 2602d8abe4fSmrgAC_SUBST(MAKE_TEXT) 2612d8abe4fSmrgAC_SUBST(MAKE_PS) 2622d8abe4fSmrgAC_SUBST(MAKE_PDF) 2632d8abe4fSmrgAC_SUBST(MAKE_HTML) 2642d8abe4fSmrg]) # XORG_CHECK_LINUXDOC 2652d8abe4fSmrg 2662d8abe4fSmrg# XORG_CHECK_DOCBOOK 2672d8abe4fSmrg# ------------------- 2682d8abe4fSmrg# Minimum version: 1.0.0 2692d8abe4fSmrg# 2702d8abe4fSmrg# Checks for the ability to build output formats from SGML DocBook source. 2712d8abe4fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 2722d8abe4fSmrg# indicates whether the necessary tools and files are found and, if set, 2732d8abe4fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 2742d8abe4fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 2752d8abe4fSmrgif test x$XORG_SGML_PATH = x ; then 2762d8abe4fSmrg XORG_SGML_PATH=$prefix/share/sgml 2772d8abe4fSmrgfi 2782d8abe4fSmrgHAVE_DEFS_ENT= 2792d8abe4fSmrgBUILDTXTDOC=no 2802d8abe4fSmrgBUILDPDFDOC=no 2812d8abe4fSmrgBUILDPSDOC=no 2822d8abe4fSmrgBUILDHTMLDOC=no 2832d8abe4fSmrg 2842d8abe4fSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 2852d8abe4fSmrg 2862d8abe4fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 2872d8abe4fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 2882d8abe4fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 2892d8abe4fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 2902d8abe4fSmrg 2912d8abe4fSmrgAC_MSG_CHECKING([Whether to build text documentation]) 2922d8abe4fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 2932d8abe4fSmrg test x$BUILD_TXTDOC != xno; then 2942d8abe4fSmrg BUILDTXTDOC=yes 2952d8abe4fSmrgfi 2962d8abe4fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 2972d8abe4fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 2982d8abe4fSmrg 2992d8abe4fSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 3002d8abe4fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 3012d8abe4fSmrg test x$BUILD_PDFDOC != xno; then 3022d8abe4fSmrg BUILDPDFDOC=yes 3032d8abe4fSmrgfi 3042d8abe4fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 3052d8abe4fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 3062d8abe4fSmrg 3072d8abe4fSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 3082d8abe4fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 3092d8abe4fSmrg test x$BUILD_PSDOC != xno; then 3102d8abe4fSmrg BUILDPSDOC=yes 3112d8abe4fSmrgfi 3122d8abe4fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 3132d8abe4fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 3142d8abe4fSmrg 3152d8abe4fSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 3162d8abe4fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 3172d8abe4fSmrg test x$BUILD_HTMLDOC != xno; then 3182d8abe4fSmrg BUILDHTMLDOC=yes 3192d8abe4fSmrgfi 3202d8abe4fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 3212d8abe4fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 3222d8abe4fSmrg 3232d8abe4fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 3242d8abe4fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 3252d8abe4fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 3262d8abe4fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 3272d8abe4fSmrg 3282d8abe4fSmrgAC_SUBST(MAKE_TEXT) 3292d8abe4fSmrgAC_SUBST(MAKE_PS) 3302d8abe4fSmrgAC_SUBST(MAKE_PDF) 3312d8abe4fSmrgAC_SUBST(MAKE_HTML) 3322d8abe4fSmrg]) # XORG_CHECK_DOCBOOK 3332d8abe4fSmrg 3342d8abe4fSmrg# XORG_CHECK_MALLOC_ZERO 3352d8abe4fSmrg# ---------------------- 3362d8abe4fSmrg# Minimum version: 1.0.0 3372d8abe4fSmrg# 3382d8abe4fSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 3392d8abe4fSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 3402d8abe4fSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 3412d8abe4fSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 3422d8abe4fSmrgAC_ARG_ENABLE(malloc0returnsnull, 3432d8abe4fSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 3442d8abe4fSmrg [malloc(0) returns NULL (default: auto)]), 3452d8abe4fSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 3462d8abe4fSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 3472d8abe4fSmrg 3482d8abe4fSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 3492d8abe4fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 3502d8abe4fSmrg AC_RUN_IFELSE([ 3512d8abe4fSmrgchar *malloc(); 3522d8abe4fSmrgchar *realloc(); 3532d8abe4fSmrgchar *calloc(); 3542d8abe4fSmrgmain() { 3552d8abe4fSmrg char *m0, *r0, *c0, *p; 3562d8abe4fSmrg m0 = malloc(0); 3572d8abe4fSmrg p = malloc(10); 3582d8abe4fSmrg r0 = realloc(p,0); 3592d8abe4fSmrg c0 = calloc(0); 3602d8abe4fSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 3612d8abe4fSmrg}], 3622d8abe4fSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 3632d8abe4fSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 3642d8abe4fSmrgfi 3652d8abe4fSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 3662d8abe4fSmrg 3672d8abe4fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 3682d8abe4fSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 3692d8abe4fSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 3702d8abe4fSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 3712d8abe4fSmrgelse 3722d8abe4fSmrg MALLOC_ZERO_CFLAGS="" 3732d8abe4fSmrg XMALLOC_ZERO_CFLAGS="" 3742d8abe4fSmrg XTMALLOC_ZERO_CFLAGS="" 3752d8abe4fSmrgfi 3762d8abe4fSmrg 3772d8abe4fSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 3782d8abe4fSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 3792d8abe4fSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 3802d8abe4fSmrg]) # XORG_CHECK_MALLOC_ZERO 3812d8abe4fSmrg 3822d8abe4fSmrg# XORG_WITH_LINT() 3832d8abe4fSmrg# ---------------- 3842d8abe4fSmrg# Minimum version: 1.1.0 3852d8abe4fSmrg# 3862d8abe4fSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 3872d8abe4fSmrg# is specified. (Use --with-lint=sparse for sparse.) 3882d8abe4fSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 3892d8abe4fSmrg# Sets $LINT_FLAGS to flags to pass to source checker 3902d8abe4fSmrg# Sets LINT automake conditional if enabled (default: disabled) 3912d8abe4fSmrg# 3922d8abe4fSmrgAC_DEFUN([XORG_WITH_LINT],[ 3932d8abe4fSmrg 3942d8abe4fSmrg# Allow checking code with lint, sparse, etc. 3952d8abe4fSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 3962d8abe4fSmrg [Use a lint-style source code checker (default: disabled)])], 3972d8abe4fSmrg [use_lint=$withval], [use_lint=no]) 3982d8abe4fSmrgif test "x$use_lint" = "xyes" ; then 3992d8abe4fSmrg LINT="lint" 4002d8abe4fSmrgelse 4012d8abe4fSmrg LINT="$use_lint" 4022d8abe4fSmrgfi 4032d8abe4fSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 4042d8abe4fSmrg case $LINT in 4052d8abe4fSmrg lint|*/lint) 4062d8abe4fSmrg case $host_os in 4072d8abe4fSmrg solaris*) 4082d8abe4fSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 4092d8abe4fSmrg ;; 4102d8abe4fSmrg esac 4112d8abe4fSmrg ;; 4122d8abe4fSmrg esac 4132d8abe4fSmrgfi 4142d8abe4fSmrg 4152d8abe4fSmrgAC_SUBST(LINT) 4162d8abe4fSmrgAC_SUBST(LINT_FLAGS) 4172d8abe4fSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 4182d8abe4fSmrg 4192d8abe4fSmrg]) # XORG_WITH_LINT 4202d8abe4fSmrg 4212d8abe4fSmrg# XORG_LINT_LIBRARY(LIBNAME) 4222d8abe4fSmrg# -------------------------- 4232d8abe4fSmrg# Minimum version: 1.1.0 4242d8abe4fSmrg# 4252d8abe4fSmrg# Sets up flags for building lint libraries for checking programs that call 4262d8abe4fSmrg# functions in the library. 4272d8abe4fSmrg# Disabled by default, enable with --enable-lint-library 4282d8abe4fSmrg# Sets: 4292d8abe4fSmrg# @LINTLIB@ - name of lint library file to make 4302d8abe4fSmrg# MAKE_LINT_LIB - automake conditional 4312d8abe4fSmrg# 4322d8abe4fSmrg 4332d8abe4fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 4342d8abe4fSmrgAC_REQUIRE([XORG_WITH_LINT]) 4352d8abe4fSmrg# Build lint "library" for more indepth checks of programs calling this library 4362d8abe4fSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 4372d8abe4fSmrg [Create lint library (default: disabled)])], 4382d8abe4fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 4392d8abe4fSmrgif test "x$make_lint_lib" != "xno" ; then 4402d8abe4fSmrg if test "x$LINT" = "xno" ; then 4412d8abe4fSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 4422d8abe4fSmrg fi 4432d8abe4fSmrg if test "x$make_lint_lib" = "xyes" ; then 4442d8abe4fSmrg LINTLIB=llib-l$1.ln 4452d8abe4fSmrg else 4462d8abe4fSmrg LINTLIB=$make_lint_lib 4472d8abe4fSmrg fi 4482d8abe4fSmrgfi 4492d8abe4fSmrgAC_SUBST(LINTLIB) 4502d8abe4fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 4512d8abe4fSmrg 4522d8abe4fSmrg]) # XORG_LINT_LIBRARY 4532d8abe4fSmrg 4542d8abe4fSmrg# XORG_CWARNFLAGS 4552d8abe4fSmrg# --------------- 4562d8abe4fSmrg# Minimum version: 1.2.0 4572d8abe4fSmrg# 4582d8abe4fSmrg# Defines CWARNFLAGS to enable C compiler warnings. 4592d8abe4fSmrg# 4602d8abe4fSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 4612d8abe4fSmrgAC_REQUIRE([AC_PROG_CC]) 4622d8abe4fSmrgif test "x$GCC" = xyes ; then 4632d8abe4fSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 4642d8abe4fSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 4652d8abe4fSmrg-Wbad-function-cast" 4662d8abe4fSmrg case `gcc -dumpversion` in 4672d8abe4fSmrg 3.4.* | 4.*) 4682d8abe4fSmrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 4692d8abe4fSmrg ;; 4702d8abe4fSmrg esac 4712d8abe4fSmrgelse 4722d8abe4fSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 4732d8abe4fSmrg if test "x$SUNCC" = "xyes"; then 4742d8abe4fSmrg CWARNFLAGS="-v" 4752d8abe4fSmrg fi 4762d8abe4fSmrgfi 4772d8abe4fSmrgAC_SUBST(CWARNFLAGS) 4782d8abe4fSmrg]) # XORG_CWARNFLAGS 4792d8abe4fSmrgdnl Copyright 2005 Red Hat, Inc 4802d8abe4fSmrgdnl 4812d8abe4fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 4822d8abe4fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 4832d8abe4fSmrgdnl the above copyright notice appear in all copies and that both that 4842d8abe4fSmrgdnl copyright notice and this permission notice appear in supporting 4852d8abe4fSmrgdnl documentation. 4862d8abe4fSmrgdnl 4872d8abe4fSmrgdnl The above copyright notice and this permission notice shall be included 4882d8abe4fSmrgdnl in all copies or substantial portions of the Software. 4892d8abe4fSmrgdnl 4902d8abe4fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 4912d8abe4fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 4922d8abe4fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 4932d8abe4fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 4942d8abe4fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 4952d8abe4fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 4962d8abe4fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 4972d8abe4fSmrgdnl 4982d8abe4fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 4992d8abe4fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 5002d8abe4fSmrgdnl other dealings in this Software without prior written authorization 5012d8abe4fSmrgdnl from the copyright holders. 5022d8abe4fSmrgdnl 5032d8abe4fSmrg 5042d8abe4fSmrg# XORG_RELEASE_VERSION 5052d8abe4fSmrg# -------------------- 5062d8abe4fSmrg# Adds --with/without-release-string and changes the PACKAGE and 5072d8abe4fSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 5082d8abe4fSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 5092d8abe4fSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 5102d8abe4fSmrg 5112d8abe4fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 5122d8abe4fSmrg AC_ARG_WITH(release-version, 5132d8abe4fSmrg AC_HELP_STRING([--with-release-version=STRING], 5142d8abe4fSmrg [Use release version string in package name]), 5152d8abe4fSmrg [RELEASE_VERSION="$withval"], 5162d8abe4fSmrg [RELEASE_VERSION=""]) 5172d8abe4fSmrg if test "x$RELEASE_VERSION" != "x"; then 5182d8abe4fSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 5192d8abe4fSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 5202d8abe4fSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 5212d8abe4fSmrg fi 5222d8abe4fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 5232d8abe4fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 5242d8abe4fSmrg [Major version of this package]) 5252d8abe4fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 5262d8abe4fSmrg if test "x$PVM" = "x"; then 5272d8abe4fSmrg PVM="0" 5282d8abe4fSmrg fi 5292d8abe4fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 5302d8abe4fSmrg [$PVM], 5312d8abe4fSmrg [Minor version of this package]) 5322d8abe4fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 5332d8abe4fSmrg if test "x$PVP" = "x"; then 5342d8abe4fSmrg PVP="0" 5352d8abe4fSmrg fi 5362d8abe4fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 5372d8abe4fSmrg [$PVP], 5382d8abe4fSmrg [Patch version of this package]) 5392d8abe4fSmrg]) 5402d8abe4fSmrg 5412d8abe4fSmrg# XORG_CHANGELOG() 5422d8abe4fSmrg# ---------------- 5432d8abe4fSmrg# Minimum version: 1.2.0 5442d8abe4fSmrg# 5452d8abe4fSmrg# Defines the variable CHANGELOG_CMD as the command to generate 5462d8abe4fSmrg# ChangeLog from git. 5472d8abe4fSmrg# 5482d8abe4fSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 5492d8abe4fSmrg# 5502d8abe4fSmrgAC_DEFUN([XORG_CHANGELOG], [ 5512d8abe4fSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 5522d8abe4fSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 5532d8abe4fSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 5542d8abe4fSmrgAC_SUBST([CHANGELOG_CMD]) 5552d8abe4fSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 5562d8abe4fSmrg]) # XORG_CHANGELOG 5572d8abe4fSmrg 558ba6a1819Smrg# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. 559ba6a1819Smrg# 560ba6a1819Smrg# This file is free software; the Free Software Foundation 561ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 562ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 563ba6a1819Smrg 564ba6a1819Smrg# AM_AUTOMAKE_VERSION(VERSION) 565ba6a1819Smrg# ---------------------------- 566ba6a1819Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 567ba6a1819Smrg# generated from the m4 files accompanying Automake X.Y. 568ba6a1819Smrg# (This private macro should not be called outside this file.) 569ba6a1819SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 570ba6a1819Smrg[am__api_version='1.10' 571ba6a1819Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 572ba6a1819Smrgdnl require some minimum version. Point them to the right macro. 573ba6a1819Smrgm4_if([$1], [1.10], [], 574ba6a1819Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 575ba6a1819Smrg]) 576ba6a1819Smrg 577ba6a1819Smrg# _AM_AUTOCONF_VERSION(VERSION) 578ba6a1819Smrg# ----------------------------- 579ba6a1819Smrg# aclocal traces this macro to find the Autoconf version. 580ba6a1819Smrg# This is a private macro too. Using m4_define simplifies 581ba6a1819Smrg# the logic in aclocal, which can simply ignore this definition. 582ba6a1819Smrgm4_define([_AM_AUTOCONF_VERSION], []) 583ba6a1819Smrg 584ba6a1819Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 585ba6a1819Smrg# ------------------------------- 586ba6a1819Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 587ba6a1819Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 588ba6a1819SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 589ba6a1819Smrg[AM_AUTOMAKE_VERSION([1.10])dnl 590ba6a1819Smrg_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) 591ba6a1819Smrg 592ba6a1819Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 593ba6a1819Smrg 594ba6a1819Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 595ba6a1819Smrg# 596ba6a1819Smrg# This file is free software; the Free Software Foundation 597ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 598ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 599ba6a1819Smrg 600ba6a1819Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 601ba6a1819Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 602ba6a1819Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 603ba6a1819Smrg# 604ba6a1819Smrg# Of course, Automake must honor this variable whenever it calls a 605ba6a1819Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 606ba6a1819Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 607ba6a1819Smrg# depending on how configure is run. This is pretty annoying, since 608ba6a1819Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 609ba6a1819Smrg# source directory, any form will work fine, but in subdirectories a 610ba6a1819Smrg# relative path needs to be adjusted first. 611ba6a1819Smrg# 612ba6a1819Smrg# $ac_aux_dir/missing 613ba6a1819Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 614ba6a1819Smrg# $top_srcdir/$ac_aux_dir/missing 615ba6a1819Smrg# fails if $ac_aux_dir is absolute, 616ba6a1819Smrg# fails when called from a subdirectory in a VPATH build with 617ba6a1819Smrg# a relative $ac_aux_dir 618ba6a1819Smrg# 619ba6a1819Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 620ba6a1819Smrg# are both prefixed by $srcdir. In an in-source build this is usually 621ba6a1819Smrg# harmless because $srcdir is `.', but things will broke when you 622ba6a1819Smrg# start a VPATH build or use an absolute $srcdir. 623ba6a1819Smrg# 624ba6a1819Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 625ba6a1819Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 626ba6a1819Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 627ba6a1819Smrg# and then we would define $MISSING as 628ba6a1819Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 629ba6a1819Smrg# This will work as long as MISSING is not called from configure, because 630ba6a1819Smrg# unfortunately $(top_srcdir) has no meaning in configure. 631ba6a1819Smrg# However there are other variables, like CC, which are often used in 632ba6a1819Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 633ba6a1819Smrg# 634ba6a1819Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 635ba6a1819Smrg# absolute PATH. The drawback is that using absolute paths prevent a 636ba6a1819Smrg# configured tree to be moved without reconfiguration. 637ba6a1819Smrg 638ba6a1819SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 639ba6a1819Smrg[dnl Rely on autoconf to set up CDPATH properly. 640ba6a1819SmrgAC_PREREQ([2.50])dnl 641ba6a1819Smrg# expand $ac_aux_dir to an absolute path 642ba6a1819Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 643ba6a1819Smrg]) 644ba6a1819Smrg 645ba6a1819Smrg# AM_CONDITIONAL -*- Autoconf -*- 646ba6a1819Smrg 647ba6a1819Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 648ba6a1819Smrg# Free Software Foundation, Inc. 649ba6a1819Smrg# 650ba6a1819Smrg# This file is free software; the Free Software Foundation 651ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 652ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 653ba6a1819Smrg 654ba6a1819Smrg# serial 8 655ba6a1819Smrg 656ba6a1819Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 657ba6a1819Smrg# ------------------------------------- 658ba6a1819Smrg# Define a conditional. 659ba6a1819SmrgAC_DEFUN([AM_CONDITIONAL], 660ba6a1819Smrg[AC_PREREQ(2.52)dnl 661ba6a1819Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 662ba6a1819Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 663ba6a1819SmrgAC_SUBST([$1_TRUE])dnl 664ba6a1819SmrgAC_SUBST([$1_FALSE])dnl 665ba6a1819Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 666ba6a1819Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 667ba6a1819Smrgif $2; then 668ba6a1819Smrg $1_TRUE= 669ba6a1819Smrg $1_FALSE='#' 670ba6a1819Smrgelse 671ba6a1819Smrg $1_TRUE='#' 672ba6a1819Smrg $1_FALSE= 673ba6a1819Smrgfi 674ba6a1819SmrgAC_CONFIG_COMMANDS_PRE( 675ba6a1819Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 676ba6a1819Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 677ba6a1819SmrgUsually this means the macro was only invoked conditionally.]]) 678ba6a1819Smrgfi])]) 679ba6a1819Smrg 680ba6a1819Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 681ba6a1819Smrg# Free Software Foundation, Inc. 682ba6a1819Smrg# 683ba6a1819Smrg# This file is free software; the Free Software Foundation 684ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 685ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 686ba6a1819Smrg 687ba6a1819Smrg# serial 9 688ba6a1819Smrg 689ba6a1819Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 690ba6a1819Smrg# written in clear, in which case automake, when reading aclocal.m4, 691ba6a1819Smrg# will think it sees a *use*, and therefore will trigger all it's 692ba6a1819Smrg# C support machinery. Also note that it means that autoscan, seeing 693ba6a1819Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 694ba6a1819Smrg 695ba6a1819Smrg 696ba6a1819Smrg# _AM_DEPENDENCIES(NAME) 697ba6a1819Smrg# ---------------------- 698ba6a1819Smrg# See how the compiler implements dependency checking. 699ba6a1819Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 700ba6a1819Smrg# We try a few techniques and use that to set a single cache variable. 701ba6a1819Smrg# 702ba6a1819Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 703ba6a1819Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 704ba6a1819Smrg# dependency, and given that the user is not expected to run this macro, 705ba6a1819Smrg# just rely on AC_PROG_CC. 706ba6a1819SmrgAC_DEFUN([_AM_DEPENDENCIES], 707ba6a1819Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 708ba6a1819SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 709ba6a1819SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 710ba6a1819SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 711ba6a1819Smrg 712ba6a1819Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 713ba6a1819Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 714ba6a1819Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 715ba6a1819Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 716ba6a1819Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 717ba6a1819Smrg [depcc="$$1" am_compiler_list=]) 718ba6a1819Smrg 719ba6a1819SmrgAC_CACHE_CHECK([dependency style of $depcc], 720ba6a1819Smrg [am_cv_$1_dependencies_compiler_type], 721ba6a1819Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 722ba6a1819Smrg # We make a subdir and do the tests there. Otherwise we can end up 723ba6a1819Smrg # making bogus files that we don't know about and never remove. For 724ba6a1819Smrg # instance it was reported that on HP-UX the gcc test will end up 725ba6a1819Smrg # making a dummy file named `D' -- because `-MD' means `put the output 726ba6a1819Smrg # in D'. 727ba6a1819Smrg mkdir conftest.dir 728ba6a1819Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 729ba6a1819Smrg # using a relative directory. 730ba6a1819Smrg cp "$am_depcomp" conftest.dir 731ba6a1819Smrg cd conftest.dir 732ba6a1819Smrg # We will build objects and dependencies in a subdirectory because 733ba6a1819Smrg # it helps to detect inapplicable dependency modes. For instance 734ba6a1819Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 735ba6a1819Smrg # side effect of compilation, but ICC will put the dependencies in 736ba6a1819Smrg # the current directory while Tru64 will put them in the object 737ba6a1819Smrg # directory. 738ba6a1819Smrg mkdir sub 739ba6a1819Smrg 740ba6a1819Smrg am_cv_$1_dependencies_compiler_type=none 741ba6a1819Smrg if test "$am_compiler_list" = ""; then 742ba6a1819Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 743ba6a1819Smrg fi 744ba6a1819Smrg for depmode in $am_compiler_list; do 745ba6a1819Smrg # Setup a source with many dependencies, because some compilers 746ba6a1819Smrg # like to wrap large dependency lists on column 80 (with \), and 747ba6a1819Smrg # we should not choose a depcomp mode which is confused by this. 748ba6a1819Smrg # 749ba6a1819Smrg # We need to recreate these files for each test, as the compiler may 750ba6a1819Smrg # overwrite some of them when testing with obscure command lines. 751ba6a1819Smrg # This happens at least with the AIX C compiler. 752ba6a1819Smrg : > sub/conftest.c 753ba6a1819Smrg for i in 1 2 3 4 5 6; do 754ba6a1819Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 755ba6a1819Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 756ba6a1819Smrg # Solaris 8's {/usr,}/bin/sh. 757ba6a1819Smrg touch sub/conftst$i.h 758ba6a1819Smrg done 759ba6a1819Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 760ba6a1819Smrg 761ba6a1819Smrg case $depmode in 762ba6a1819Smrg nosideeffect) 763ba6a1819Smrg # after this tag, mechanisms are not by side-effect, so they'll 764ba6a1819Smrg # only be used when explicitly requested 765ba6a1819Smrg if test "x$enable_dependency_tracking" = xyes; then 766ba6a1819Smrg continue 767ba6a1819Smrg else 768ba6a1819Smrg break 769ba6a1819Smrg fi 770ba6a1819Smrg ;; 771ba6a1819Smrg none) break ;; 772ba6a1819Smrg esac 773ba6a1819Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 774ba6a1819Smrg # mode. It turns out that the SunPro C++ compiler does not properly 775ba6a1819Smrg # handle `-M -o', and we need to detect this. 776ba6a1819Smrg if depmode=$depmode \ 777ba6a1819Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 778ba6a1819Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 779ba6a1819Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 780ba6a1819Smrg >/dev/null 2>conftest.err && 781ba6a1819Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 782ba6a1819Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 783ba6a1819Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 784ba6a1819Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 785ba6a1819Smrg # icc doesn't choke on unknown options, it will just issue warnings 786ba6a1819Smrg # or remarks (even with -Werror). So we grep stderr for any message 787ba6a1819Smrg # that says an option was ignored or not supported. 788ba6a1819Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 789ba6a1819Smrg # icc: Command line warning: ignoring option '-M'; no argument required 790ba6a1819Smrg # The diagnosis changed in icc 8.0: 791ba6a1819Smrg # icc: Command line remark: option '-MP' not supported 792ba6a1819Smrg if (grep 'ignoring option' conftest.err || 793ba6a1819Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 794ba6a1819Smrg am_cv_$1_dependencies_compiler_type=$depmode 795ba6a1819Smrg break 796ba6a1819Smrg fi 797ba6a1819Smrg fi 798ba6a1819Smrg done 799ba6a1819Smrg 800ba6a1819Smrg cd .. 801ba6a1819Smrg rm -rf conftest.dir 802ba6a1819Smrgelse 803ba6a1819Smrg am_cv_$1_dependencies_compiler_type=none 804ba6a1819Smrgfi 805ba6a1819Smrg]) 806ba6a1819SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 807ba6a1819SmrgAM_CONDITIONAL([am__fastdep$1], [ 808ba6a1819Smrg test "x$enable_dependency_tracking" != xno \ 809ba6a1819Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 810ba6a1819Smrg]) 811ba6a1819Smrg 812ba6a1819Smrg 813ba6a1819Smrg# AM_SET_DEPDIR 814ba6a1819Smrg# ------------- 815ba6a1819Smrg# Choose a directory name for dependency files. 816ba6a1819Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 817ba6a1819SmrgAC_DEFUN([AM_SET_DEPDIR], 818ba6a1819Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 819ba6a1819SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 820ba6a1819Smrg]) 821ba6a1819Smrg 822ba6a1819Smrg 823ba6a1819Smrg# AM_DEP_TRACK 824ba6a1819Smrg# ------------ 825ba6a1819SmrgAC_DEFUN([AM_DEP_TRACK], 826ba6a1819Smrg[AC_ARG_ENABLE(dependency-tracking, 827ba6a1819Smrg[ --disable-dependency-tracking speeds up one-time build 828ba6a1819Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 829ba6a1819Smrgif test "x$enable_dependency_tracking" != xno; then 830ba6a1819Smrg am_depcomp="$ac_aux_dir/depcomp" 831ba6a1819Smrg AMDEPBACKSLASH='\' 832ba6a1819Smrgfi 833ba6a1819SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 834ba6a1819SmrgAC_SUBST([AMDEPBACKSLASH])dnl 835ba6a1819Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 836ba6a1819Smrg]) 837ba6a1819Smrg 838ba6a1819Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 839ba6a1819Smrg 840ba6a1819Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 841ba6a1819Smrg# Free Software Foundation, Inc. 842ba6a1819Smrg# 843ba6a1819Smrg# This file is free software; the Free Software Foundation 844ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 845ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 846ba6a1819Smrg 847ba6a1819Smrg#serial 3 848ba6a1819Smrg 849ba6a1819Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 850ba6a1819Smrg# ------------------------------ 851ba6a1819SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 852ba6a1819Smrg[for mf in $CONFIG_FILES; do 853ba6a1819Smrg # Strip MF so we end up with the name of the file. 854ba6a1819Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 855ba6a1819Smrg # Check whether this is an Automake generated Makefile or not. 856ba6a1819Smrg # We used to match only the files named `Makefile.in', but 857ba6a1819Smrg # some people rename them; so instead we look at the file content. 858ba6a1819Smrg # Grep'ing the first line is not enough: some people post-process 859ba6a1819Smrg # each Makefile.in and add a new line on top of each file to say so. 860ba6a1819Smrg # Grep'ing the whole file is not good either: AIX grep has a line 861ba6a1819Smrg # limit of 2048, but all sed's we know have understand at least 4000. 862ba6a1819Smrg if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then 863ba6a1819Smrg dirpart=`AS_DIRNAME("$mf")` 864ba6a1819Smrg else 865ba6a1819Smrg continue 866ba6a1819Smrg fi 867ba6a1819Smrg # Extract the definition of DEPDIR, am__include, and am__quote 868ba6a1819Smrg # from the Makefile without running `make'. 869ba6a1819Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 870ba6a1819Smrg test -z "$DEPDIR" && continue 871ba6a1819Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 872ba6a1819Smrg test -z "am__include" && continue 873ba6a1819Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 874ba6a1819Smrg # When using ansi2knr, U may be empty or an underscore; expand it 875ba6a1819Smrg U=`sed -n 's/^U = //p' < "$mf"` 876ba6a1819Smrg # Find all dependency output files, they are included files with 877ba6a1819Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 878ba6a1819Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 879ba6a1819Smrg # expansion. 880ba6a1819Smrg for file in `sed -n " 881ba6a1819Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 882ba6a1819Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 883ba6a1819Smrg # Make sure the directory exists. 884ba6a1819Smrg test -f "$dirpart/$file" && continue 885ba6a1819Smrg fdir=`AS_DIRNAME(["$file"])` 886ba6a1819Smrg AS_MKDIR_P([$dirpart/$fdir]) 887ba6a1819Smrg # echo "creating $dirpart/$file" 888ba6a1819Smrg echo '# dummy' > "$dirpart/$file" 889ba6a1819Smrg done 890ba6a1819Smrgdone 891ba6a1819Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 892ba6a1819Smrg 893ba6a1819Smrg 894ba6a1819Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 895ba6a1819Smrg# ----------------------------- 896ba6a1819Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 897ba6a1819Smrg# 898ba6a1819Smrg# This code is only required when automatic dependency tracking 899ba6a1819Smrg# is enabled. FIXME. This creates each `.P' file that we will 900ba6a1819Smrg# need in order to bootstrap the dependency handling code. 901ba6a1819SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 902ba6a1819Smrg[AC_CONFIG_COMMANDS([depfiles], 903ba6a1819Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 904ba6a1819Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 905ba6a1819Smrg]) 906ba6a1819Smrg 907ba6a1819Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 908ba6a1819Smrg# Free Software Foundation, Inc. 909ba6a1819Smrg# 910ba6a1819Smrg# This file is free software; the Free Software Foundation 911ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 912ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 913ba6a1819Smrg 914ba6a1819Smrg# serial 8 915ba6a1819Smrg 916ba6a1819Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 917ba6a1819SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 918ba6a1819Smrg 919ba6a1819Smrg# Do all the work for Automake. -*- Autoconf -*- 920ba6a1819Smrg 921ba6a1819Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 922ba6a1819Smrg# 2005, 2006 Free Software Foundation, Inc. 923ba6a1819Smrg# 924ba6a1819Smrg# This file is free software; the Free Software Foundation 925ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 926ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 927ba6a1819Smrg 928ba6a1819Smrg# serial 12 929ba6a1819Smrg 930ba6a1819Smrg# This macro actually does too much. Some checks are only needed if 931ba6a1819Smrg# your package does certain things. But this isn't really a big deal. 932ba6a1819Smrg 933ba6a1819Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 934ba6a1819Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 935ba6a1819Smrg# ----------------------------------------------- 936ba6a1819Smrg# The call with PACKAGE and VERSION arguments is the old style 937ba6a1819Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 938ba6a1819Smrg# and VERSION should now be passed to AC_INIT and removed from 939ba6a1819Smrg# the call to AM_INIT_AUTOMAKE. 940ba6a1819Smrg# We support both call styles for the transition. After 941ba6a1819Smrg# the next Automake release, Autoconf can make the AC_INIT 942ba6a1819Smrg# arguments mandatory, and then we can depend on a new Autoconf 943ba6a1819Smrg# release and drop the old call support. 944ba6a1819SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 945ba6a1819Smrg[AC_PREREQ([2.60])dnl 946ba6a1819Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 947ba6a1819Smrgdnl the ones we care about. 948ba6a1819Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 949ba6a1819SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 950ba6a1819SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 951ba6a1819Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 952ba6a1819Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 953ba6a1819Smrg # is not polluted with repeated "-I." 954ba6a1819Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 955ba6a1819Smrg # test to see if srcdir already configured 956ba6a1819Smrg if test -f $srcdir/config.status; then 957ba6a1819Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 958ba6a1819Smrg fi 959ba6a1819Smrgfi 960ba6a1819Smrg 961ba6a1819Smrg# test whether we have cygpath 962ba6a1819Smrgif test -z "$CYGPATH_W"; then 963ba6a1819Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 964ba6a1819Smrg CYGPATH_W='cygpath -w' 965ba6a1819Smrg else 966ba6a1819Smrg CYGPATH_W=echo 967ba6a1819Smrg fi 968ba6a1819Smrgfi 969ba6a1819SmrgAC_SUBST([CYGPATH_W]) 970ba6a1819Smrg 971ba6a1819Smrg# Define the identity of the package. 972ba6a1819Smrgdnl Distinguish between old-style and new-style calls. 973ba6a1819Smrgm4_ifval([$2], 974ba6a1819Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 975ba6a1819Smrg AC_SUBST([PACKAGE], [$1])dnl 976ba6a1819Smrg AC_SUBST([VERSION], [$2])], 977ba6a1819Smrg[_AM_SET_OPTIONS([$1])dnl 978ba6a1819Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 979ba6a1819Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 980ba6a1819Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 981ba6a1819Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 982ba6a1819Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 983ba6a1819Smrg 984ba6a1819Smrg_AM_IF_OPTION([no-define],, 985ba6a1819Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 986ba6a1819Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 987ba6a1819Smrg 988ba6a1819Smrg# Some tools Automake needs. 989ba6a1819SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 990ba6a1819SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 991ba6a1819SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 992ba6a1819SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 993ba6a1819SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 994ba6a1819SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 995ba6a1819SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 996ba6a1819SmrgAM_PROG_INSTALL_SH 997ba6a1819SmrgAM_PROG_INSTALL_STRIP 998ba6a1819SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 999ba6a1819Smrg# We need awk for the "check" target. The system "awk" is bad on 1000ba6a1819Smrg# some platforms. 1001ba6a1819SmrgAC_REQUIRE([AC_PROG_AWK])dnl 1002ba6a1819SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1003ba6a1819SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1004ba6a1819Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1005ba6a1819Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1006ba6a1819Smrg [_AM_PROG_TAR([v7])])]) 1007ba6a1819Smrg_AM_IF_OPTION([no-dependencies],, 1008ba6a1819Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1009ba6a1819Smrg [_AM_DEPENDENCIES(CC)], 1010ba6a1819Smrg [define([AC_PROG_CC], 1011ba6a1819Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1012ba6a1819SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1013ba6a1819Smrg [_AM_DEPENDENCIES(CXX)], 1014ba6a1819Smrg [define([AC_PROG_CXX], 1015ba6a1819Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1016ba6a1819SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 1017ba6a1819Smrg [_AM_DEPENDENCIES(OBJC)], 1018ba6a1819Smrg [define([AC_PROG_OBJC], 1019ba6a1819Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 1020ba6a1819Smrg]) 1021ba6a1819Smrg]) 1022ba6a1819Smrg 1023ba6a1819Smrg 1024ba6a1819Smrg# When config.status generates a header, we must update the stamp-h file. 1025ba6a1819Smrg# This file resides in the same directory as the config header 1026ba6a1819Smrg# that is generated. The stamp files are numbered to have different names. 1027ba6a1819Smrg 1028ba6a1819Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1029ba6a1819Smrg# loop where config.status creates the headers, so we can generate 1030ba6a1819Smrg# our stamp files there. 1031ba6a1819SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1032ba6a1819Smrg[# Compute $1's index in $config_headers. 1033ba6a1819Smrg_am_stamp_count=1 1034ba6a1819Smrgfor _am_header in $config_headers :; do 1035ba6a1819Smrg case $_am_header in 1036ba6a1819Smrg $1 | $1:* ) 1037ba6a1819Smrg break ;; 1038ba6a1819Smrg * ) 1039ba6a1819Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1040ba6a1819Smrg esac 1041ba6a1819Smrgdone 1042ba6a1819Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 1043ba6a1819Smrg 1044ba6a1819Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1045ba6a1819Smrg# 1046ba6a1819Smrg# This file is free software; the Free Software Foundation 1047ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1048ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1049ba6a1819Smrg 1050ba6a1819Smrg# AM_PROG_INSTALL_SH 1051ba6a1819Smrg# ------------------ 1052ba6a1819Smrg# Define $install_sh. 1053ba6a1819SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 1054ba6a1819Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1055ba6a1819Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 1056ba6a1819SmrgAC_SUBST(install_sh)]) 1057ba6a1819Smrg 1058ba6a1819Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 1059ba6a1819Smrg# 1060ba6a1819Smrg# This file is free software; the Free Software Foundation 1061ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1062ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1063ba6a1819Smrg 1064ba6a1819Smrg# serial 2 1065ba6a1819Smrg 1066ba6a1819Smrg# Check whether the underlying file-system supports filenames 1067ba6a1819Smrg# with a leading dot. For instance MS-DOS doesn't. 1068ba6a1819SmrgAC_DEFUN([AM_SET_LEADING_DOT], 1069ba6a1819Smrg[rm -rf .tst 2>/dev/null 1070ba6a1819Smrgmkdir .tst 2>/dev/null 1071ba6a1819Smrgif test -d .tst; then 1072ba6a1819Smrg am__leading_dot=. 1073ba6a1819Smrgelse 1074ba6a1819Smrg am__leading_dot=_ 1075ba6a1819Smrgfi 1076ba6a1819Smrgrmdir .tst 2>/dev/null 1077ba6a1819SmrgAC_SUBST([am__leading_dot])]) 1078ba6a1819Smrg 1079ba6a1819Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 1080ba6a1819Smrg# From Jim Meyering 1081ba6a1819Smrg 1082ba6a1819Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 1083ba6a1819Smrg# Free Software Foundation, Inc. 1084ba6a1819Smrg# 1085ba6a1819Smrg# This file is free software; the Free Software Foundation 1086ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1087ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1088ba6a1819Smrg 1089ba6a1819Smrg# serial 4 1090ba6a1819Smrg 1091ba6a1819SmrgAC_DEFUN([AM_MAINTAINER_MODE], 1092ba6a1819Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 1093ba6a1819Smrg dnl maintainer-mode is disabled by default 1094ba6a1819Smrg AC_ARG_ENABLE(maintainer-mode, 1095ba6a1819Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 1096ba6a1819Smrg (and sometimes confusing) to the casual installer], 1097ba6a1819Smrg USE_MAINTAINER_MODE=$enableval, 1098ba6a1819Smrg USE_MAINTAINER_MODE=no) 1099ba6a1819Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 1100ba6a1819Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 1101ba6a1819Smrg MAINT=$MAINTAINER_MODE_TRUE 1102ba6a1819Smrg AC_SUBST(MAINT)dnl 1103ba6a1819Smrg] 1104ba6a1819Smrg) 1105ba6a1819Smrg 1106ba6a1819SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 1107ba6a1819Smrg 1108ba6a1819Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1109ba6a1819Smrg 1110ba6a1819Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 1111ba6a1819Smrg# 1112ba6a1819Smrg# This file is free software; the Free Software Foundation 1113ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1114ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1115ba6a1819Smrg 1116ba6a1819Smrg# serial 3 1117ba6a1819Smrg 1118ba6a1819Smrg# AM_MAKE_INCLUDE() 1119ba6a1819Smrg# ----------------- 1120ba6a1819Smrg# Check to see how make treats includes. 1121ba6a1819SmrgAC_DEFUN([AM_MAKE_INCLUDE], 1122ba6a1819Smrg[am_make=${MAKE-make} 1123ba6a1819Smrgcat > confinc << 'END' 1124ba6a1819Smrgam__doit: 1125ba6a1819Smrg @echo done 1126ba6a1819Smrg.PHONY: am__doit 1127ba6a1819SmrgEND 1128ba6a1819Smrg# If we don't find an include directive, just comment out the code. 1129ba6a1819SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 1130ba6a1819Smrgam__include="#" 1131ba6a1819Smrgam__quote= 1132ba6a1819Smrg_am_result=none 1133ba6a1819Smrg# First try GNU make style include. 1134ba6a1819Smrgecho "include confinc" > confmf 1135ba6a1819Smrg# We grep out `Entering directory' and `Leaving directory' 1136ba6a1819Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 1137ba6a1819Smrg# In particular we don't look at `^make:' because GNU make might 1138ba6a1819Smrg# be invoked under some other name (usually "gmake"), in which 1139ba6a1819Smrg# case it prints its new name instead of `make'. 1140ba6a1819Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 1141ba6a1819Smrg am__include=include 1142ba6a1819Smrg am__quote= 1143ba6a1819Smrg _am_result=GNU 1144ba6a1819Smrgfi 1145ba6a1819Smrg# Now try BSD make style include. 1146ba6a1819Smrgif test "$am__include" = "#"; then 1147ba6a1819Smrg echo '.include "confinc"' > confmf 1148ba6a1819Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 1149ba6a1819Smrg am__include=.include 1150ba6a1819Smrg am__quote="\"" 1151ba6a1819Smrg _am_result=BSD 1152ba6a1819Smrg fi 1153ba6a1819Smrgfi 1154ba6a1819SmrgAC_SUBST([am__include]) 1155ba6a1819SmrgAC_SUBST([am__quote]) 1156ba6a1819SmrgAC_MSG_RESULT([$_am_result]) 1157ba6a1819Smrgrm -f confinc confmf 1158ba6a1819Smrg]) 1159ba6a1819Smrg 1160ba6a1819Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1161ba6a1819Smrg 1162ba6a1819Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 1163ba6a1819Smrg# Free Software Foundation, Inc. 1164ba6a1819Smrg# 1165ba6a1819Smrg# This file is free software; the Free Software Foundation 1166ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1167ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1168ba6a1819Smrg 1169ba6a1819Smrg# serial 5 1170ba6a1819Smrg 1171ba6a1819Smrg# AM_MISSING_PROG(NAME, PROGRAM) 1172ba6a1819Smrg# ------------------------------ 1173ba6a1819SmrgAC_DEFUN([AM_MISSING_PROG], 1174ba6a1819Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1175ba6a1819Smrg$1=${$1-"${am_missing_run}$2"} 1176ba6a1819SmrgAC_SUBST($1)]) 1177ba6a1819Smrg 1178ba6a1819Smrg 1179ba6a1819Smrg# AM_MISSING_HAS_RUN 1180ba6a1819Smrg# ------------------ 1181ba6a1819Smrg# Define MISSING if not defined so far and test if it supports --run. 1182ba6a1819Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 1183ba6a1819SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 1184ba6a1819Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1185ba6a1819SmrgAC_REQUIRE_AUX_FILE([missing])dnl 1186ba6a1819Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 1187ba6a1819Smrg# Use eval to expand $SHELL 1188ba6a1819Smrgif eval "$MISSING --run true"; then 1189ba6a1819Smrg am_missing_run="$MISSING --run " 1190ba6a1819Smrgelse 1191ba6a1819Smrg am_missing_run= 1192ba6a1819Smrg AC_MSG_WARN([`missing' script is too old or missing]) 1193ba6a1819Smrgfi 1194ba6a1819Smrg]) 1195ba6a1819Smrg 1196ba6a1819Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 1197ba6a1819Smrg# 1198ba6a1819Smrg# This file is free software; the Free Software Foundation 1199ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1200ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1201ba6a1819Smrg 1202ba6a1819Smrg# AM_PROG_MKDIR_P 1203ba6a1819Smrg# --------------- 1204ba6a1819Smrg# Check for `mkdir -p'. 1205ba6a1819SmrgAC_DEFUN([AM_PROG_MKDIR_P], 1206ba6a1819Smrg[AC_PREREQ([2.60])dnl 1207ba6a1819SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1208ba6a1819Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 1209ba6a1819Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 1210ba6a1819Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 1211ba6a1819Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 1212ba6a1819Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 1213ba6a1819Smrgdnl adjustment using top_builddir (which is defined more often than 1214ba6a1819Smrgdnl MKDIR_P). 1215ba6a1819SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 1216ba6a1819Smrgcase $mkdir_p in 1217ba6a1819Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 1218ba6a1819Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 1219ba6a1819Smrgesac 1220ba6a1819Smrg]) 1221ba6a1819Smrg 1222ba6a1819Smrg# Helper functions for option handling. -*- Autoconf -*- 1223ba6a1819Smrg 1224ba6a1819Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 1225ba6a1819Smrg# 1226ba6a1819Smrg# This file is free software; the Free Software Foundation 1227ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1228ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1229ba6a1819Smrg 1230ba6a1819Smrg# serial 3 1231ba6a1819Smrg 1232ba6a1819Smrg# _AM_MANGLE_OPTION(NAME) 1233ba6a1819Smrg# ----------------------- 1234ba6a1819SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1235ba6a1819Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1236ba6a1819Smrg 1237ba6a1819Smrg# _AM_SET_OPTION(NAME) 1238ba6a1819Smrg# ------------------------------ 1239ba6a1819Smrg# Set option NAME. Presently that only means defining a flag for this option. 1240ba6a1819SmrgAC_DEFUN([_AM_SET_OPTION], 1241ba6a1819Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1242ba6a1819Smrg 1243ba6a1819Smrg# _AM_SET_OPTIONS(OPTIONS) 1244ba6a1819Smrg# ---------------------------------- 1245ba6a1819Smrg# OPTIONS is a space-separated list of Automake options. 1246ba6a1819SmrgAC_DEFUN([_AM_SET_OPTIONS], 1247ba6a1819Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1248ba6a1819Smrg 1249ba6a1819Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1250ba6a1819Smrg# ------------------------------------------- 1251ba6a1819Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1252ba6a1819SmrgAC_DEFUN([_AM_IF_OPTION], 1253ba6a1819Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1254ba6a1819Smrg 1255ba6a1819Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1256ba6a1819Smrg 1257ba6a1819Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 1258ba6a1819Smrg# Free Software Foundation, Inc. 1259ba6a1819Smrg# 1260ba6a1819Smrg# This file is free software; the Free Software Foundation 1261ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1262ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1263ba6a1819Smrg 1264ba6a1819Smrg# serial 4 1265ba6a1819Smrg 1266ba6a1819Smrg# AM_SANITY_CHECK 1267ba6a1819Smrg# --------------- 1268ba6a1819SmrgAC_DEFUN([AM_SANITY_CHECK], 1269ba6a1819Smrg[AC_MSG_CHECKING([whether build environment is sane]) 1270ba6a1819Smrg# Just in case 1271ba6a1819Smrgsleep 1 1272ba6a1819Smrgecho timestamp > conftest.file 1273ba6a1819Smrg# Do `set' in a subshell so we don't clobber the current shell's 1274ba6a1819Smrg# arguments. Must try -L first in case configure is actually a 1275ba6a1819Smrg# symlink; some systems play weird games with the mod time of symlinks 1276ba6a1819Smrg# (eg FreeBSD returns the mod time of the symlink's containing 1277ba6a1819Smrg# directory). 1278ba6a1819Smrgif ( 1279ba6a1819Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 1280ba6a1819Smrg if test "$[*]" = "X"; then 1281ba6a1819Smrg # -L didn't work. 1282ba6a1819Smrg set X `ls -t $srcdir/configure conftest.file` 1283ba6a1819Smrg fi 1284ba6a1819Smrg rm -f conftest.file 1285ba6a1819Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1286ba6a1819Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1287ba6a1819Smrg 1288ba6a1819Smrg # If neither matched, then we have a broken ls. This can happen 1289ba6a1819Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1290ba6a1819Smrg # broken ls alias from the environment. This has actually 1291ba6a1819Smrg # happened. Such a system could not be considered "sane". 1292ba6a1819Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1293ba6a1819Smrgalias in your environment]) 1294ba6a1819Smrg fi 1295ba6a1819Smrg 1296ba6a1819Smrg test "$[2]" = conftest.file 1297ba6a1819Smrg ) 1298ba6a1819Smrgthen 1299ba6a1819Smrg # Ok. 1300ba6a1819Smrg : 1301ba6a1819Smrgelse 1302ba6a1819Smrg AC_MSG_ERROR([newly created file is older than distributed files! 1303ba6a1819SmrgCheck your system clock]) 1304ba6a1819Smrgfi 1305ba6a1819SmrgAC_MSG_RESULT(yes)]) 1306ba6a1819Smrg 1307ba6a1819Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1308ba6a1819Smrg# 1309ba6a1819Smrg# This file is free software; the Free Software Foundation 1310ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1311ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1312ba6a1819Smrg 1313ba6a1819Smrg# AM_PROG_INSTALL_STRIP 1314ba6a1819Smrg# --------------------- 1315ba6a1819Smrg# One issue with vendor `install' (even GNU) is that you can't 1316ba6a1819Smrg# specify the program used to strip binaries. This is especially 1317ba6a1819Smrg# annoying in cross-compiling environments, where the build's strip 1318ba6a1819Smrg# is unlikely to handle the host's binaries. 1319ba6a1819Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1320ba6a1819Smrg# always use install-sh in `make install-strip', and initialize 1321ba6a1819Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 1322ba6a1819SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1323ba6a1819Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1324ba6a1819Smrg# Installed binaries are usually stripped using `strip' when the user 1325ba6a1819Smrg# run `make install-strip'. However `strip' might not be the right 1326ba6a1819Smrg# tool to use in cross-compilation environments, therefore Automake 1327ba6a1819Smrg# will honor the `STRIP' environment variable to overrule this program. 1328ba6a1819Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1329ba6a1819Smrgif test "$cross_compiling" != no; then 1330ba6a1819Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1331ba6a1819Smrgfi 1332ba6a1819SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1333ba6a1819SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1334ba6a1819Smrg 1335ba6a1819Smrg# Copyright (C) 2006 Free Software Foundation, Inc. 1336ba6a1819Smrg# 1337ba6a1819Smrg# This file is free software; the Free Software Foundation 1338ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1339ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1340ba6a1819Smrg 1341ba6a1819Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1342ba6a1819Smrg# --------------------------- 1343ba6a1819Smrg# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. 1344ba6a1819Smrg# This macro is traced by Automake. 1345ba6a1819SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1346ba6a1819Smrg 1347ba6a1819Smrg# Check how to create a tarball. -*- Autoconf -*- 1348ba6a1819Smrg 1349ba6a1819Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 1350ba6a1819Smrg# 1351ba6a1819Smrg# This file is free software; the Free Software Foundation 1352ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1353ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1354ba6a1819Smrg 1355ba6a1819Smrg# serial 2 1356ba6a1819Smrg 1357ba6a1819Smrg# _AM_PROG_TAR(FORMAT) 1358ba6a1819Smrg# -------------------- 1359ba6a1819Smrg# Check how to create a tarball in format FORMAT. 1360ba6a1819Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 1361ba6a1819Smrg# 1362ba6a1819Smrg# Substitute a variable $(am__tar) that is a command 1363ba6a1819Smrg# writing to stdout a FORMAT-tarball containing the directory 1364ba6a1819Smrg# $tardir. 1365ba6a1819Smrg# tardir=directory && $(am__tar) > result.tar 1366ba6a1819Smrg# 1367ba6a1819Smrg# Substitute a variable $(am__untar) that extract such 1368ba6a1819Smrg# a tarball read from stdin. 1369ba6a1819Smrg# $(am__untar) < result.tar 1370ba6a1819SmrgAC_DEFUN([_AM_PROG_TAR], 1371ba6a1819Smrg[# Always define AMTAR for backward compatibility. 1372ba6a1819SmrgAM_MISSING_PROG([AMTAR], [tar]) 1373ba6a1819Smrgm4_if([$1], [v7], 1374ba6a1819Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 1375ba6a1819Smrg [m4_case([$1], [ustar],, [pax],, 1376ba6a1819Smrg [m4_fatal([Unknown tar format])]) 1377ba6a1819SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 1378ba6a1819Smrg# Loop over all known methods to create a tar archive until one works. 1379ba6a1819Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1380ba6a1819Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1381ba6a1819Smrg# Do not fold the above two line into one, because Tru64 sh and 1382ba6a1819Smrg# Solaris sh will not grok spaces in the rhs of `-'. 1383ba6a1819Smrgfor _am_tool in $_am_tools 1384ba6a1819Smrgdo 1385ba6a1819Smrg case $_am_tool in 1386ba6a1819Smrg gnutar) 1387ba6a1819Smrg for _am_tar in tar gnutar gtar; 1388ba6a1819Smrg do 1389ba6a1819Smrg AM_RUN_LOG([$_am_tar --version]) && break 1390ba6a1819Smrg done 1391ba6a1819Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1392ba6a1819Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1393ba6a1819Smrg am__untar="$_am_tar -xf -" 1394ba6a1819Smrg ;; 1395ba6a1819Smrg plaintar) 1396ba6a1819Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1397ba6a1819Smrg # ustar tarball either. 1398ba6a1819Smrg (tar --version) >/dev/null 2>&1 && continue 1399ba6a1819Smrg am__tar='tar chf - "$$tardir"' 1400ba6a1819Smrg am__tar_='tar chf - "$tardir"' 1401ba6a1819Smrg am__untar='tar xf -' 1402ba6a1819Smrg ;; 1403ba6a1819Smrg pax) 1404ba6a1819Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1405ba6a1819Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1406ba6a1819Smrg am__untar='pax -r' 1407ba6a1819Smrg ;; 1408ba6a1819Smrg cpio) 1409ba6a1819Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1410ba6a1819Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1411ba6a1819Smrg am__untar='cpio -i -H $1 -d' 1412ba6a1819Smrg ;; 1413ba6a1819Smrg none) 1414ba6a1819Smrg am__tar=false 1415ba6a1819Smrg am__tar_=false 1416ba6a1819Smrg am__untar=false 1417ba6a1819Smrg ;; 1418ba6a1819Smrg esac 1419ba6a1819Smrg 1420ba6a1819Smrg # If the value was cached, stop now. We just wanted to have am__tar 1421ba6a1819Smrg # and am__untar set. 1422ba6a1819Smrg test -n "${am_cv_prog_tar_$1}" && break 1423ba6a1819Smrg 1424ba6a1819Smrg # tar/untar a dummy directory, and stop if the command works 1425ba6a1819Smrg rm -rf conftest.dir 1426ba6a1819Smrg mkdir conftest.dir 1427ba6a1819Smrg echo GrepMe > conftest.dir/file 1428ba6a1819Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1429ba6a1819Smrg rm -rf conftest.dir 1430ba6a1819Smrg if test -s conftest.tar; then 1431ba6a1819Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1432ba6a1819Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1433ba6a1819Smrg fi 1434ba6a1819Smrgdone 1435ba6a1819Smrgrm -rf conftest.dir 1436ba6a1819Smrg 1437ba6a1819SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1438ba6a1819SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1439ba6a1819SmrgAC_SUBST([am__tar]) 1440ba6a1819SmrgAC_SUBST([am__untar]) 1441ba6a1819Smrg]) # _AM_PROG_TAR 1442ba6a1819Smrg 14432d8abe4fSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1444ba6a1819Smrgdnl 1445ba6a1819Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 1446ba6a1819Smrgdnl 1447ba6a1819Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1448ba6a1819Smrgdnl copy of this software and associated documentation files (the 1449ba6a1819Smrgdnl "Software"), to deal in the Software without restriction, including 1450ba6a1819Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 1451ba6a1819Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 1452ba6a1819Smrgdnl to whom the Software is furnished to do so, provided that the above 1453ba6a1819Smrgdnl copyright notice(s) and this permission notice appear in all copies of 1454ba6a1819Smrgdnl the Software and that both the above copyright notice(s) and this 1455ba6a1819Smrgdnl permission notice appear in supporting documentation. 1456ba6a1819Smrgdnl 1457ba6a1819Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1458ba6a1819Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1459ba6a1819Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 1460ba6a1819Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 1461ba6a1819Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 1462ba6a1819Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 1463ba6a1819Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 1464ba6a1819Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 1465ba6a1819Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1466ba6a1819Smrgdnl 1467ba6a1819Smrgdnl Except as contained in this notice, the name of a copyright holder 1468ba6a1819Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 1469ba6a1819Smrgdnl or other dealings in this Software without prior written authorization 1470ba6a1819Smrgdnl of the copyright holder. 1471ba6a1819Smrg 1472ba6a1819Smrg# XORG_MACROS_VERSION(required-version) 1473ba6a1819Smrg# ------------------------------------- 1474ba6a1819Smrg# Minimum version: 1.1.0 1475ba6a1819Smrg# 1476ba6a1819Smrg# If you're using a macro added in Version 1.1 or newer, include this in 1477ba6a1819Smrg# your configure.ac with the minimum required version, such as: 1478ba6a1819Smrg# XORG_MACROS_VERSION(1.1) 1479ba6a1819Smrg# 14802d8abe4fSmrg# To ensure that this macro is defined, also add: 14812d8abe4fSmrg# m4_ifndef([XORG_MACROS_VERSION], 14822d8abe4fSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1483ba6a1819Smrg# 1484ba6a1819Smrg# 1485ba6a1819Smrg# See the "minimum version" comment for each macro you use to see what 1486ba6a1819Smrg# version you require. 14872d8abe4fSmrgm4_defun([XORG_MACROS_VERSION],[ 14882d8abe4fSmrgm4_define([vers_have], [1.2.2]) 14892d8abe4fSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 14902d8abe4fSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 14912d8abe4fSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 14922d8abe4fSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 14932d8abe4fSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 14942d8abe4fSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 14952d8abe4fSmrgm4_undefine([vers_have]) 14962d8abe4fSmrgm4_undefine([maj_have]) 14972d8abe4fSmrgm4_undefine([maj_needed]) 1498ba6a1819Smrg]) # XORG_MACROS_VERSION 1499ba6a1819Smrg 1500ba6a1819Smrg# XORG_PROG_RAWCPP() 1501ba6a1819Smrg# ------------------ 1502ba6a1819Smrg# Minimum version: 1.0.0 1503ba6a1819Smrg# 1504ba6a1819Smrg# Find cpp program and necessary flags for use in pre-processing text files 1505ba6a1819Smrg# such as man pages and config files 1506ba6a1819SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1507ba6a1819SmrgAC_REQUIRE([AC_PROG_CPP]) 1508ba6a1819SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1509ba6a1819Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1510ba6a1819Smrg 1511ba6a1819Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1512ba6a1819Smrg# which is not the best choice for supporting other OS'es, but covers most 1513ba6a1819Smrg# of the ones we need for now. 1514ba6a1819SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1515ba6a1819SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1516ba6a1819Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1517ba6a1819Smrg AC_MSG_RESULT([no]) 1518ba6a1819Smrgelse 1519ba6a1819Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1520ba6a1819Smrg RAWCPPFLAGS=-undef 1521ba6a1819Smrg AC_MSG_RESULT([yes]) 15222d8abe4fSmrg # under Cygwin unix is still defined even with -undef 15232d8abe4fSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 15242d8abe4fSmrg RAWCPPFLAGS="-undef -ansi" 15252d8abe4fSmrg AC_MSG_RESULT([yes, with -ansi]) 1526ba6a1819Smrg else 1527ba6a1819Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1528ba6a1819Smrg fi 1529ba6a1819Smrgfi 1530ba6a1819Smrgrm -f conftest.$ac_ext 1531ba6a1819Smrg 1532ba6a1819SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1533ba6a1819SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1534ba6a1819Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1535ba6a1819Smrg AC_MSG_RESULT([no]) 1536ba6a1819Smrgelse 1537ba6a1819Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1538ba6a1819Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1539ba6a1819Smrg AC_MSG_RESULT([yes]) 1540ba6a1819Smrg else 1541ba6a1819Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1542ba6a1819Smrg fi 1543ba6a1819Smrgfi 1544ba6a1819Smrgrm -f conftest.$ac_ext 1545ba6a1819SmrgAC_SUBST(RAWCPPFLAGS) 1546ba6a1819Smrg]) # XORG_PROG_RAWCPP 1547ba6a1819Smrg 1548ba6a1819Smrg# XORG_MANPAGE_SECTIONS() 1549ba6a1819Smrg# ----------------------- 1550ba6a1819Smrg# Minimum version: 1.0.0 1551ba6a1819Smrg# 1552ba6a1819Smrg# Determine which sections man pages go in for the different man page types 1553ba6a1819Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1554ba6a1819Smrg# Not sure if there's any better way than just hardcoding by OS name. 1555ba6a1819Smrg# Override default settings by setting environment variables 1556ba6a1819Smrg 1557ba6a1819SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1558ba6a1819SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1559ba6a1819Smrg 1560ba6a1819Smrgif test x$APP_MAN_SUFFIX = x ; then 1561ba6a1819Smrg APP_MAN_SUFFIX=1 1562ba6a1819Smrgfi 1563ba6a1819Smrgif test x$APP_MAN_DIR = x ; then 1564ba6a1819Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1565ba6a1819Smrgfi 1566ba6a1819Smrg 1567ba6a1819Smrgif test x$LIB_MAN_SUFFIX = x ; then 1568ba6a1819Smrg LIB_MAN_SUFFIX=3 1569ba6a1819Smrgfi 1570ba6a1819Smrgif test x$LIB_MAN_DIR = x ; then 1571ba6a1819Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1572ba6a1819Smrgfi 1573ba6a1819Smrg 1574ba6a1819Smrgif test x$FILE_MAN_SUFFIX = x ; then 1575ba6a1819Smrg case $host_os in 1576ba6a1819Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 1577ba6a1819Smrg *) FILE_MAN_SUFFIX=5 ;; 1578ba6a1819Smrg esac 1579ba6a1819Smrgfi 1580ba6a1819Smrgif test x$FILE_MAN_DIR = x ; then 1581ba6a1819Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1582ba6a1819Smrgfi 1583ba6a1819Smrg 1584ba6a1819Smrgif test x$MISC_MAN_SUFFIX = x ; then 1585ba6a1819Smrg case $host_os in 1586ba6a1819Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 1587ba6a1819Smrg *) MISC_MAN_SUFFIX=7 ;; 1588ba6a1819Smrg esac 1589ba6a1819Smrgfi 1590ba6a1819Smrgif test x$MISC_MAN_DIR = x ; then 1591ba6a1819Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1592ba6a1819Smrgfi 1593ba6a1819Smrg 1594ba6a1819Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1595ba6a1819Smrg case $host_os in 1596ba6a1819Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1597ba6a1819Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1598ba6a1819Smrg esac 1599ba6a1819Smrgfi 1600ba6a1819Smrgif test x$DRIVER_MAN_DIR = x ; then 1601ba6a1819Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1602ba6a1819Smrgfi 1603ba6a1819Smrg 1604ba6a1819Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1605ba6a1819Smrg case $host_os in 1606ba6a1819Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1607ba6a1819Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1608ba6a1819Smrg esac 1609ba6a1819Smrgfi 1610ba6a1819Smrgif test x$ADMIN_MAN_DIR = x ; then 1611ba6a1819Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1612ba6a1819Smrgfi 1613ba6a1819Smrg 1614ba6a1819Smrg 1615ba6a1819SmrgAC_SUBST([APP_MAN_SUFFIX]) 1616ba6a1819SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1617ba6a1819SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1618ba6a1819SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1619ba6a1819SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1620ba6a1819SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1621ba6a1819SmrgAC_SUBST([APP_MAN_DIR]) 1622ba6a1819SmrgAC_SUBST([LIB_MAN_DIR]) 1623ba6a1819SmrgAC_SUBST([FILE_MAN_DIR]) 1624ba6a1819SmrgAC_SUBST([MISC_MAN_DIR]) 1625ba6a1819SmrgAC_SUBST([DRIVER_MAN_DIR]) 1626ba6a1819SmrgAC_SUBST([ADMIN_MAN_DIR]) 1627ba6a1819Smrg]) # XORG_MANPAGE_SECTIONS 1628ba6a1819Smrg 1629ba6a1819Smrg# XORG_CHECK_LINUXDOC 1630ba6a1819Smrg# ------------------- 1631ba6a1819Smrg# Minimum version: 1.0.0 1632ba6a1819Smrg# 1633ba6a1819Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1634ba6a1819Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1635ba6a1819Smrg# Whether or not the necessary tools and files are found can be checked 1636ba6a1819Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1637ba6a1819SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 16382d8abe4fSmrgif test x$XORG_SGML_PATH = x ; then 16392d8abe4fSmrg XORG_SGML_PATH=$prefix/share/sgml 16402d8abe4fSmrgfi 1641ba6a1819SmrgHAVE_DEFS_ENT= 1642ba6a1819Smrg 1643ba6a1819Smrgif test x"$cross_compiling" = x"yes" ; then 1644ba6a1819Smrg HAVE_DEFS_ENT=no 1645ba6a1819Smrgelse 1646ba6a1819Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1647ba6a1819Smrgfi 1648ba6a1819Smrg 1649ba6a1819SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1650ba6a1819SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 1651ba6a1819Smrg 1652ba6a1819SmrgAC_MSG_CHECKING([Whether to build documentation]) 1653ba6a1819Smrg 1654ba6a1819Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 1655ba6a1819Smrg BUILDDOC=yes 1656ba6a1819Smrgelse 1657ba6a1819Smrg BUILDDOC=no 1658ba6a1819Smrgfi 1659ba6a1819Smrg 1660ba6a1819SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1661ba6a1819Smrg 1662ba6a1819SmrgAC_MSG_RESULT([$BUILDDOC]) 1663ba6a1819Smrg 1664ba6a1819SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 1665ba6a1819Smrg 1666ba6a1819Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 1667ba6a1819Smrg BUILDPDFDOC=yes 1668ba6a1819Smrgelse 1669ba6a1819Smrg BUILDPDFDOC=no 1670ba6a1819Smrgfi 1671ba6a1819Smrg 1672ba6a1819SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1673ba6a1819Smrg 1674ba6a1819SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1675ba6a1819Smrg 1676ba6a1819SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 1677ba6a1819SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1678ba6a1819SmrgMAKE_PDF="$PS2PDF" 1679ba6a1819SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1680ba6a1819Smrg 1681ba6a1819SmrgAC_SUBST(MAKE_TEXT) 1682ba6a1819SmrgAC_SUBST(MAKE_PS) 1683ba6a1819SmrgAC_SUBST(MAKE_PDF) 1684ba6a1819SmrgAC_SUBST(MAKE_HTML) 1685ba6a1819Smrg]) # XORG_CHECK_LINUXDOC 1686ba6a1819Smrg 1687ba6a1819Smrg# XORG_CHECK_DOCBOOK 1688ba6a1819Smrg# ------------------- 1689ba6a1819Smrg# Minimum version: 1.0.0 1690ba6a1819Smrg# 1691ba6a1819Smrg# Checks for the ability to build output formats from SGML DocBook source. 1692ba6a1819Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1693ba6a1819Smrg# indicates whether the necessary tools and files are found and, if set, 1694ba6a1819Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1695ba6a1819SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 16962d8abe4fSmrgif test x$XORG_SGML_PATH = x ; then 16972d8abe4fSmrg XORG_SGML_PATH=$prefix/share/sgml 16982d8abe4fSmrgfi 1699ba6a1819SmrgHAVE_DEFS_ENT= 1700ba6a1819SmrgBUILDTXTDOC=no 1701ba6a1819SmrgBUILDPDFDOC=no 1702ba6a1819SmrgBUILDPSDOC=no 1703ba6a1819SmrgBUILDHTMLDOC=no 1704ba6a1819Smrg 1705ba6a1819SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1706ba6a1819Smrg 1707ba6a1819SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1708ba6a1819SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1709ba6a1819SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1710ba6a1819SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1711ba6a1819Smrg 1712ba6a1819SmrgAC_MSG_CHECKING([Whether to build text documentation]) 1713ba6a1819Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 1714ba6a1819Smrg test x$BUILD_TXTDOC != xno; then 1715ba6a1819Smrg BUILDTXTDOC=yes 1716ba6a1819Smrgfi 1717ba6a1819SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1718ba6a1819SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1719ba6a1819Smrg 1720ba6a1819SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 1721ba6a1819Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 1722ba6a1819Smrg test x$BUILD_PDFDOC != xno; then 1723ba6a1819Smrg BUILDPDFDOC=yes 1724ba6a1819Smrgfi 1725ba6a1819SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1726ba6a1819SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1727ba6a1819Smrg 1728ba6a1819SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 1729ba6a1819Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 1730ba6a1819Smrg test x$BUILD_PSDOC != xno; then 1731ba6a1819Smrg BUILDPSDOC=yes 1732ba6a1819Smrgfi 1733ba6a1819SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1734ba6a1819SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1735ba6a1819Smrg 1736ba6a1819SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 1737ba6a1819Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 1738ba6a1819Smrg test x$BUILD_HTMLDOC != xno; then 1739ba6a1819Smrg BUILDHTMLDOC=yes 1740ba6a1819Smrgfi 1741ba6a1819SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1742ba6a1819SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1743ba6a1819Smrg 1744ba6a1819SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1745ba6a1819SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1746ba6a1819SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1747ba6a1819SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1748ba6a1819Smrg 1749ba6a1819SmrgAC_SUBST(MAKE_TEXT) 1750ba6a1819SmrgAC_SUBST(MAKE_PS) 1751ba6a1819SmrgAC_SUBST(MAKE_PDF) 1752ba6a1819SmrgAC_SUBST(MAKE_HTML) 1753ba6a1819Smrg]) # XORG_CHECK_DOCBOOK 1754ba6a1819Smrg 1755ba6a1819Smrg# XORG_CHECK_MALLOC_ZERO 1756ba6a1819Smrg# ---------------------- 1757ba6a1819Smrg# Minimum version: 1.0.0 1758ba6a1819Smrg# 1759ba6a1819Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1760ba6a1819Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1761ba6a1819Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1762ba6a1819SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1763ba6a1819SmrgAC_ARG_ENABLE(malloc0returnsnull, 1764ba6a1819Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 1765ba6a1819Smrg [malloc(0) returns NULL (default: auto)]), 1766ba6a1819Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1767ba6a1819Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1768ba6a1819Smrg 1769ba6a1819SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1770ba6a1819Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1771ba6a1819Smrg AC_RUN_IFELSE([ 1772ba6a1819Smrgchar *malloc(); 1773ba6a1819Smrgchar *realloc(); 1774ba6a1819Smrgchar *calloc(); 1775ba6a1819Smrgmain() { 1776ba6a1819Smrg char *m0, *r0, *c0, *p; 1777ba6a1819Smrg m0 = malloc(0); 1778ba6a1819Smrg p = malloc(10); 1779ba6a1819Smrg r0 = realloc(p,0); 1780ba6a1819Smrg c0 = calloc(0); 1781ba6a1819Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1782ba6a1819Smrg}], 1783ba6a1819Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1784ba6a1819Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 1785ba6a1819Smrgfi 1786ba6a1819SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1787ba6a1819Smrg 1788ba6a1819Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1789ba6a1819Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1790ba6a1819Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1791ba6a1819Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1792ba6a1819Smrgelse 1793ba6a1819Smrg MALLOC_ZERO_CFLAGS="" 1794ba6a1819Smrg XMALLOC_ZERO_CFLAGS="" 1795ba6a1819Smrg XTMALLOC_ZERO_CFLAGS="" 1796ba6a1819Smrgfi 1797ba6a1819Smrg 1798ba6a1819SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1799ba6a1819SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1800ba6a1819SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1801ba6a1819Smrg]) # XORG_CHECK_MALLOC_ZERO 1802ba6a1819Smrg 1803ba6a1819Smrg# XORG_WITH_LINT() 1804ba6a1819Smrg# ---------------- 1805ba6a1819Smrg# Minimum version: 1.1.0 1806ba6a1819Smrg# 1807ba6a1819Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 1808ba6a1819Smrg# is specified. (Use --with-lint=sparse for sparse.) 1809ba6a1819Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 1810ba6a1819Smrg# Sets $LINT_FLAGS to flags to pass to source checker 1811ba6a1819Smrg# Sets LINT automake conditional if enabled (default: disabled) 1812ba6a1819Smrg# 1813ba6a1819SmrgAC_DEFUN([XORG_WITH_LINT],[ 1814ba6a1819Smrg 1815ba6a1819Smrg# Allow checking code with lint, sparse, etc. 1816ba6a1819SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 1817ba6a1819Smrg [Use a lint-style source code checker (default: disabled)])], 1818ba6a1819Smrg [use_lint=$withval], [use_lint=no]) 1819ba6a1819Smrgif test "x$use_lint" = "xyes" ; then 1820ba6a1819Smrg LINT="lint" 1821ba6a1819Smrgelse 1822ba6a1819Smrg LINT="$use_lint" 1823ba6a1819Smrgfi 1824ba6a1819Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 1825ba6a1819Smrg case $LINT in 1826ba6a1819Smrg lint|*/lint) 1827ba6a1819Smrg case $host_os in 1828ba6a1819Smrg solaris*) 1829ba6a1819Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1830ba6a1819Smrg ;; 1831ba6a1819Smrg esac 1832ba6a1819Smrg ;; 1833ba6a1819Smrg esac 1834ba6a1819Smrgfi 1835ba6a1819Smrg 1836ba6a1819SmrgAC_SUBST(LINT) 1837ba6a1819SmrgAC_SUBST(LINT_FLAGS) 1838ba6a1819SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 1839ba6a1819Smrg 1840ba6a1819Smrg]) # XORG_WITH_LINT 1841ba6a1819Smrg 1842ba6a1819Smrg# XORG_LINT_LIBRARY(LIBNAME) 1843ba6a1819Smrg# -------------------------- 1844ba6a1819Smrg# Minimum version: 1.1.0 1845ba6a1819Smrg# 1846ba6a1819Smrg# Sets up flags for building lint libraries for checking programs that call 1847ba6a1819Smrg# functions in the library. 1848ba6a1819Smrg# Disabled by default, enable with --enable-lint-library 1849ba6a1819Smrg# Sets: 1850ba6a1819Smrg# @LINTLIB@ - name of lint library file to make 1851ba6a1819Smrg# MAKE_LINT_LIB - automake conditional 1852ba6a1819Smrg# 1853ba6a1819Smrg 1854ba6a1819SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1855ba6a1819SmrgAC_REQUIRE([XORG_WITH_LINT]) 1856ba6a1819Smrg# Build lint "library" for more indepth checks of programs calling this library 1857ba6a1819SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 1858ba6a1819Smrg [Create lint library (default: disabled)])], 1859ba6a1819Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1860ba6a1819Smrgif test "x$make_lint_lib" != "xno" ; then 1861ba6a1819Smrg if test "x$LINT" = "xno" ; then 1862ba6a1819Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1863ba6a1819Smrg fi 1864ba6a1819Smrg if test "x$make_lint_lib" = "xyes" ; then 1865ba6a1819Smrg LINTLIB=llib-l$1.ln 1866ba6a1819Smrg else 1867ba6a1819Smrg LINTLIB=$make_lint_lib 1868ba6a1819Smrg fi 1869ba6a1819Smrgfi 1870ba6a1819SmrgAC_SUBST(LINTLIB) 1871ba6a1819SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1872ba6a1819Smrg 1873ba6a1819Smrg]) # XORG_LINT_LIBRARY 1874ba6a1819Smrg 18752d8abe4fSmrg# XORG_CWARNFLAGS 18762d8abe4fSmrg# --------------- 18772d8abe4fSmrg# Minimum version: 1.2.0 18782d8abe4fSmrg# 18792d8abe4fSmrg# Defines CWARNFLAGS to enable C compiler warnings. 18802d8abe4fSmrg# 18812d8abe4fSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 18822d8abe4fSmrgAC_REQUIRE([AC_PROG_CC]) 18832d8abe4fSmrgif test "x$GCC" = xyes ; then 18842d8abe4fSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 18852d8abe4fSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 18862d8abe4fSmrg-Wbad-function-cast" 18872d8abe4fSmrg case `$CC -dumpversion` in 18882d8abe4fSmrg 3.4.* | 4.*) 18892d8abe4fSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 18902d8abe4fSmrg ;; 18912d8abe4fSmrg esac 18922d8abe4fSmrgelse 18932d8abe4fSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 18942d8abe4fSmrg if test "x$SUNCC" = "xyes"; then 18952d8abe4fSmrg CWARNFLAGS="-v" 18962d8abe4fSmrg fi 18972d8abe4fSmrgfi 18982d8abe4fSmrgAC_SUBST(CWARNFLAGS) 18992d8abe4fSmrg]) # XORG_CWARNFLAGS 1900ba6a1819Smrgdnl Copyright 2005 Red Hat, Inc 1901ba6a1819Smrgdnl 1902ba6a1819Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1903ba6a1819Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1904ba6a1819Smrgdnl the above copyright notice appear in all copies and that both that 1905ba6a1819Smrgdnl copyright notice and this permission notice appear in supporting 1906ba6a1819Smrgdnl documentation. 1907ba6a1819Smrgdnl 1908ba6a1819Smrgdnl The above copyright notice and this permission notice shall be included 1909ba6a1819Smrgdnl in all copies or substantial portions of the Software. 1910ba6a1819Smrgdnl 1911ba6a1819Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1912ba6a1819Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1913ba6a1819Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1914ba6a1819Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1915ba6a1819Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1916ba6a1819Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1917ba6a1819Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1918ba6a1819Smrgdnl 1919ba6a1819Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1920ba6a1819Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1921ba6a1819Smrgdnl other dealings in this Software without prior written authorization 1922ba6a1819Smrgdnl from the copyright holders. 1923ba6a1819Smrgdnl 1924ba6a1819Smrg 1925ba6a1819Smrg# XORG_RELEASE_VERSION 1926ba6a1819Smrg# -------------------- 1927ba6a1819Smrg# Adds --with/without-release-string and changes the PACKAGE and 1928ba6a1819Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 1929ba6a1819Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 1930ba6a1819Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1931ba6a1819Smrg 1932ba6a1819SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1933ba6a1819Smrg AC_ARG_WITH(release-version, 1934ba6a1819Smrg AC_HELP_STRING([--with-release-version=STRING], 1935ba6a1819Smrg [Use release version string in package name]), 1936ba6a1819Smrg [RELEASE_VERSION="$withval"], 1937ba6a1819Smrg [RELEASE_VERSION=""]) 1938ba6a1819Smrg if test "x$RELEASE_VERSION" != "x"; then 1939ba6a1819Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 1940ba6a1819Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1941ba6a1819Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1942ba6a1819Smrg fi 1943ba6a1819Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1944ba6a1819Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1945ba6a1819Smrg [Major version of this package]) 1946ba6a1819Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1947ba6a1819Smrg if test "x$PVM" = "x"; then 1948ba6a1819Smrg PVM="0" 1949ba6a1819Smrg fi 1950ba6a1819Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1951ba6a1819Smrg [$PVM], 1952ba6a1819Smrg [Minor version of this package]) 1953ba6a1819Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1954ba6a1819Smrg if test "x$PVP" = "x"; then 1955ba6a1819Smrg PVP="0" 1956ba6a1819Smrg fi 1957ba6a1819Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1958ba6a1819Smrg [$PVP], 1959ba6a1819Smrg [Patch version of this package]) 1960ba6a1819Smrg]) 1961ba6a1819Smrg 19622d8abe4fSmrg# XORG_CHANGELOG() 19632d8abe4fSmrg# ---------------- 19642d8abe4fSmrg# Minimum version: 1.2.0 19652d8abe4fSmrg# 19662d8abe4fSmrg# Defines the variable CHANGELOG_CMD as the command to generate 19672d8abe4fSmrg# ChangeLog from git. 19682d8abe4fSmrg# 19692d8abe4fSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 19702d8abe4fSmrg# 19712d8abe4fSmrgAC_DEFUN([XORG_CHANGELOG], [ 19722d8abe4fSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 19732d8abe4fSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 19742d8abe4fSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 19752d8abe4fSmrgAC_SUBST([CHANGELOG_CMD]) 19762d8abe4fSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 19772d8abe4fSmrg]) # XORG_CHANGELOG 19782d8abe4fSmrg 1979ba6a1819Smrgdnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ 1980ba6a1819Smrgdnl 1981ba6a1819Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 1982ba6a1819Smrgdnl 1983ba6a1819Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1984ba6a1819Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1985ba6a1819Smrgdnl the above copyright notice appear in all copies and that both that 1986ba6a1819Smrgdnl copyright notice and this permission notice appear in supporting 1987ba6a1819Smrgdnl documentation. 1988ba6a1819Smrgdnl 1989ba6a1819Smrgdnl The above copyright notice and this permission notice shall be included 1990ba6a1819Smrgdnl in all copies or substantial portions of the Software. 1991ba6a1819Smrgdnl 1992ba6a1819Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1993ba6a1819Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1994ba6a1819Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1995ba6a1819Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1996ba6a1819Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1997ba6a1819Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1998ba6a1819Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1999ba6a1819Smrgdnl 2000ba6a1819Smrgdnl Except as contained in this notice, the name of the copyright holders shall 2001ba6a1819Smrgdnl not be used in advertising or otherwise to promote the sale, use or 2002ba6a1819Smrgdnl other dealings in this Software without prior written authorization 2003ba6a1819Smrgdnl from the copyright holders. 2004ba6a1819Smrgdnl 2005ba6a1819Smrg 2006ba6a1819Smrg# XTRANS_TCP_FLAGS() 2007ba6a1819Smrg# ------------------ 2008ba6a1819Smrg# Find needed libraries for TCP sockets, and check for IPv6 support 2009ba6a1819SmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 2010ba6a1819Smrg # SVR4 hides these in libraries other than libc 2011ba6a1819Smrg AC_SEARCH_LIBS(socket, [socket]) 2012ba6a1819Smrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 20132d8abe4fSmrg AC_HAVE_LIBRARY([ws2_32]) 2014ba6a1819Smrg 2015ba6a1819Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 2016ba6a1819Smrg AC_ARG_ENABLE(ipv6, 20172d8abe4fSmrg AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 2018ba6a1819Smrg [IPV6CONN=$enableval], 2019ba6a1819Smrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 2020ba6a1819Smrg AC_MSG_CHECKING([if IPv6 support should be built]) 2021ba6a1819Smrg if test "$IPV6CONN" = "yes"; then 2022ba6a1819Smrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 2023ba6a1819Smrg fi 2024ba6a1819Smrg AC_MSG_RESULT($IPV6CONN) 2025ba6a1819Smrg 2026ba6a1819Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in 2027ba6a1819Smrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 2028ba6a1819Smrg AC_DEFINE([BSD44SOCKETS],1, 2029ba6a1819Smrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 2030ba6a1819Smrg#include <sys/types.h> 2031ba6a1819Smrg#include <sys/socket.h> 2032ba6a1819Smrg#include <netinet/in.h> 2033ba6a1819Smrg ]) 2034ba6a1819Smrg 2035ba6a1819Smrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 2036ba6a1819Smrg AC_CHECK_TYPES([socklen_t], [], [], [ 2037ba6a1819SmrgAC_INCLUDES_DEFAULT 2038ba6a1819Smrg#include <sys/socket.h>]) 2039ba6a1819Smrg 2040ba6a1819Smrg]) # XTRANS_TCP_FLAGS 2041ba6a1819Smrg 2042ba6a1819Smrg# XTRANS_CONNECTION_FLAGS() 2043ba6a1819Smrg# ------------------------- 2044ba6a1819Smrg# Standard checks for which Xtrans transports to use by the Xorg packages 2045ba6a1819Smrg# that use Xtrans functions 2046ba6a1819SmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 2047ba6a1819Smrg AC_REQUIRE([AC_CANONICAL_HOST]) 2048ba6a1819Smrg AC_REQUIRE([AC_TYPE_SIGNAL]) 2049ba6a1819Smrg [case $host_os in 2050ba6a1819Smrg mingw*) unixdef="no" ;; 2051ba6a1819Smrg *) unixdef="yes" ;; 2052ba6a1819Smrg esac] 2053ba6a1819Smrg AC_ARG_ENABLE(unix-transport, 2054ba6a1819Smrg AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 2055ba6a1819Smrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 2056ba6a1819Smrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 2057ba6a1819Smrg if test "$UNIXCONN" = "yes"; then 2058ba6a1819Smrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 2059ba6a1819Smrg fi 2060ba6a1819Smrg AC_MSG_RESULT($UNIXCONN) 2061ba6a1819Smrg AC_ARG_ENABLE(tcp-transport, 2062ba6a1819Smrg AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 2063ba6a1819Smrg [TCPCONN=$enableval], [TCPCONN=yes]) 2064ba6a1819Smrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 2065ba6a1819Smrg AC_MSG_RESULT($TCPCONN) 2066ba6a1819Smrg if test "$TCPCONN" = "yes"; then 2067ba6a1819Smrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 2068ba6a1819Smrg XTRANS_TCP_FLAGS 2069ba6a1819Smrg fi 2070ba6a1819Smrg [case $host_os in 2071ba6a1819Smrg solaris*|sco*|sysv4*) localdef="yes" ;; 2072ba6a1819Smrg *) localdef="no" ;; 2073ba6a1819Smrg esac] 2074ba6a1819Smrg AC_ARG_ENABLE(local-transport, 2075ba6a1819Smrg AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 2076ba6a1819Smrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 2077ba6a1819Smrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 2078ba6a1819Smrg AC_MSG_RESULT($LOCALCONN) 2079ba6a1819Smrg if test "$LOCALCONN" = "yes"; then 2080ba6a1819Smrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 2081ba6a1819Smrg fi 2082ba6a1819Smrg 2083ba6a1819Smrg]) # XTRANS_CONNECTION_FLAGS 2084ba6a1819Smrg 2085ba6a1819Smrg 2086ba6a1819Smrg# XTRANS_SECURE_RPC_FLAGS() 2087ba6a1819Smrg# ------------------------- 2088ba6a1819Smrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 2089ba6a1819Smrg# so that any necessary networking libraries are already found 2090ba6a1819SmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 2091ba6a1819Smrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 2092ba6a1819Smrg AC_ARG_ENABLE(secure-rpc, 2093ba6a1819Smrg AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 2094ba6a1819Smrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 2095ba6a1819Smrg 2096ba6a1819Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 2097ba6a1819Smrg FOUND_SECURE_RPC="no" 2098ba6a1819Smrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 2099ba6a1819Smrg [FOUND_SECURE_RPC="yes"]) 2100ba6a1819Smrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 2101ba6a1819Smrg if test "x$SECURE_RPC" = "xyes" ; then 2102ba6a1819Smrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 2103ba6a1819Smrg fi 2104ba6a1819Smrg SECURE_RPC="no" 2105ba6a1819Smrg else 2106ba6a1819Smrg dnl FreeBSD keeps getsecretkey in librpcsvc 2107ba6a1819Smrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 2108ba6a1819Smrg SECURE_RPC="yes" 2109ba6a1819Smrg fi 2110ba6a1819Smrg fi 2111ba6a1819Smrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 2112ba6a1819Smrg if test "x$SECURE_RPC" = "xyes" ; then 2113ba6a1819Smrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 2114ba6a1819Smrg fi 2115ba6a1819Smrg AC_MSG_RESULT($SECURE_RPC) 2116ba6a1819Smrg]) # XTRANS_SECURE_RPC_FLAGS 2117ba6a1819Smrg 2118ba6a1819Smrg 2119ba6a1819Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2120ba6a1819Smrg 2121ba6a1819Smrg# serial 48 AC_PROG_LIBTOOL 2122ba6a1819Smrg 2123ba6a1819Smrg 2124ba6a1819Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 2125ba6a1819Smrg# ----------------------------------------------------------- 2126ba6a1819Smrg# If this macro is not defined by Autoconf, define it here. 2127ba6a1819Smrgm4_ifdef([AC_PROVIDE_IFELSE], 2128ba6a1819Smrg [], 2129ba6a1819Smrg [m4_define([AC_PROVIDE_IFELSE], 2130ba6a1819Smrg [m4_ifdef([AC_PROVIDE_$1], 2131ba6a1819Smrg [$2], [$3])])]) 2132ba6a1819Smrg 2133ba6a1819Smrg 2134ba6a1819Smrg# AC_PROG_LIBTOOL 2135ba6a1819Smrg# --------------- 2136ba6a1819SmrgAC_DEFUN([AC_PROG_LIBTOOL], 2137ba6a1819Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 2138ba6a1819Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 2139ba6a1819Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 2140ba6a1819Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 2141ba6a1819Smrg [AC_LIBTOOL_CXX], 2142ba6a1819Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 2143ba6a1819Smrg ])]) 2144ba6a1819Smrgdnl And a similar setup for Fortran 77 support 2145ba6a1819Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 2146ba6a1819Smrg [AC_LIBTOOL_F77], 2147ba6a1819Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 2148ba6a1819Smrg])]) 2149ba6a1819Smrg 2150ba6a1819Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 2151ba6a1819Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 2152ba6a1819Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 2153ba6a1819Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 2154ba6a1819Smrg [AC_LIBTOOL_GCJ], 2155ba6a1819Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 2156ba6a1819Smrg [AC_LIBTOOL_GCJ], 2157ba6a1819Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 2158ba6a1819Smrg [AC_LIBTOOL_GCJ], 2159ba6a1819Smrg [ifdef([AC_PROG_GCJ], 2160ba6a1819Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 2161ba6a1819Smrg ifdef([A][M_PROG_GCJ], 2162ba6a1819Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 2163ba6a1819Smrg ifdef([LT_AC_PROG_GCJ], 2164ba6a1819Smrg [define([LT_AC_PROG_GCJ], 2165ba6a1819Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 2166ba6a1819Smrg])])# AC_PROG_LIBTOOL 2167ba6a1819Smrg 2168ba6a1819Smrg 2169ba6a1819Smrg# _AC_PROG_LIBTOOL 2170ba6a1819Smrg# ---------------- 2171ba6a1819SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 2172ba6a1819Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 2173ba6a1819SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 2174ba6a1819SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 2175ba6a1819SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 2176ba6a1819Smrg 2177ba6a1819Smrg# This can be used to rebuild libtool when needed 2178ba6a1819SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 2179ba6a1819Smrg 2180ba6a1819Smrg# Always use our own libtool. 2181ba6a1819SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 2182ba6a1819SmrgAC_SUBST(LIBTOOL)dnl 2183ba6a1819Smrg 2184ba6a1819Smrg# Prevent multiple expansion 2185ba6a1819Smrgdefine([AC_PROG_LIBTOOL], []) 2186ba6a1819Smrg])# _AC_PROG_LIBTOOL 2187ba6a1819Smrg 2188ba6a1819Smrg 2189ba6a1819Smrg# AC_LIBTOOL_SETUP 2190ba6a1819Smrg# ---------------- 2191ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 2192ba6a1819Smrg[AC_PREREQ(2.50)dnl 2193ba6a1819SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 2194ba6a1819SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 2195ba6a1819SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 2196ba6a1819SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2197ba6a1819SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2198ba6a1819SmrgAC_REQUIRE([AC_PROG_CC])dnl 2199ba6a1819SmrgAC_REQUIRE([AC_PROG_LD])dnl 2200ba6a1819SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 2201ba6a1819SmrgAC_REQUIRE([AC_PROG_NM])dnl 2202ba6a1819Smrg 2203ba6a1819SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 2204ba6a1819SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 2205ba6a1819Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 2206ba6a1819SmrgAC_REQUIRE([AC_OBJEXT])dnl 2207ba6a1819SmrgAC_REQUIRE([AC_EXEEXT])dnl 2208ba6a1819Smrgdnl 2209ba6a1819Smrg 2210ba6a1819SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 2211ba6a1819SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 2212ba6a1819SmrgAC_LIBTOOL_OBJDIR 2213ba6a1819Smrg 2214ba6a1819SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 2215ba6a1819Smrg_LT_AC_PROG_ECHO_BACKSLASH 2216ba6a1819Smrg 2217ba6a1819Smrgcase $host_os in 2218ba6a1819Smrgaix3*) 2219ba6a1819Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2220ba6a1819Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2221ba6a1819Smrg # vanish in a puff of smoke. 2222ba6a1819Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 2223ba6a1819Smrg COLLECT_NAMES= 2224ba6a1819Smrg export COLLECT_NAMES 2225ba6a1819Smrg fi 2226ba6a1819Smrg ;; 2227ba6a1819Smrgesac 2228ba6a1819Smrg 2229ba6a1819Smrg# Sed substitution that helps us do robust quoting. It backslashifies 2230ba6a1819Smrg# metacharacters that are still active within double-quoted strings. 2231ba6a1819SmrgXsed='sed -e 1s/^X//' 2232ba6a1819Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 2233ba6a1819Smrg 2234ba6a1819Smrg# Same as above, but do not quote variable references. 2235ba6a1819Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 2236ba6a1819Smrg 2237ba6a1819Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2238ba6a1819Smrg# double_quote_subst'ed string. 2239ba6a1819Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2240ba6a1819Smrg 2241ba6a1819Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2242ba6a1819Smrgno_glob_subst='s/\*/\\\*/g' 2243ba6a1819Smrg 2244ba6a1819Smrg# Constants: 2245ba6a1819Smrgrm="rm -f" 2246ba6a1819Smrg 2247ba6a1819Smrg# Global variables: 2248ba6a1819Smrgdefault_ofile=libtool 2249ba6a1819Smrgcan_build_shared=yes 2250ba6a1819Smrg 2251ba6a1819Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 2252ba6a1819Smrg# which needs '.lib'). 2253ba6a1819Smrglibext=a 2254ba6a1819Smrgltmain="$ac_aux_dir/ltmain.sh" 2255ba6a1819Smrgofile="$default_ofile" 2256ba6a1819Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2257ba6a1819Smrg 2258ba6a1819SmrgAC_CHECK_TOOL(AR, ar, false) 2259ba6a1819SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 2260ba6a1819SmrgAC_CHECK_TOOL(STRIP, strip, :) 2261ba6a1819Smrg 2262ba6a1819Smrgold_CC="$CC" 2263ba6a1819Smrgold_CFLAGS="$CFLAGS" 2264ba6a1819Smrg 2265ba6a1819Smrg# Set sane defaults for various variables 2266ba6a1819Smrgtest -z "$AR" && AR=ar 2267ba6a1819Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 2268ba6a1819Smrgtest -z "$AS" && AS=as 2269ba6a1819Smrgtest -z "$CC" && CC=cc 2270ba6a1819Smrgtest -z "$LTCC" && LTCC=$CC 2271ba6a1819Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2272ba6a1819Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 2273ba6a1819Smrgtest -z "$LD" && LD=ld 2274ba6a1819Smrgtest -z "$LN_S" && LN_S="ln -s" 2275ba6a1819Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2276ba6a1819Smrgtest -z "$NM" && NM=nm 2277ba6a1819Smrgtest -z "$SED" && SED=sed 2278ba6a1819Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 2279ba6a1819Smrgtest -z "$RANLIB" && RANLIB=: 2280ba6a1819Smrgtest -z "$STRIP" && STRIP=: 2281ba6a1819Smrgtest -z "$ac_objext" && ac_objext=o 2282ba6a1819Smrg 2283ba6a1819Smrg# Determine commands to create old-style static archives. 2284ba6a1819Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 2285ba6a1819Smrgold_postinstall_cmds='chmod 644 $oldlib' 2286ba6a1819Smrgold_postuninstall_cmds= 2287ba6a1819Smrg 2288ba6a1819Smrgif test -n "$RANLIB"; then 2289ba6a1819Smrg case $host_os in 2290ba6a1819Smrg openbsd*) 2291ba6a1819Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 2292ba6a1819Smrg ;; 2293ba6a1819Smrg *) 2294ba6a1819Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 2295ba6a1819Smrg ;; 2296ba6a1819Smrg esac 2297ba6a1819Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 2298ba6a1819Smrgfi 2299ba6a1819Smrg 2300ba6a1819Smrg_LT_CC_BASENAME([$compiler]) 2301ba6a1819Smrg 2302ba6a1819Smrg# Only perform the check for file, if the check method requires it 2303ba6a1819Smrgcase $deplibs_check_method in 2304ba6a1819Smrgfile_magic*) 2305ba6a1819Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2306ba6a1819Smrg AC_PATH_MAGIC 2307ba6a1819Smrg fi 2308ba6a1819Smrg ;; 2309ba6a1819Smrgesac 2310ba6a1819Smrg 2311ba6a1819SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 2312ba6a1819SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 2313ba6a1819Smrgenable_win32_dll=yes, enable_win32_dll=no) 2314ba6a1819Smrg 2315ba6a1819SmrgAC_ARG_ENABLE([libtool-lock], 2316ba6a1819Smrg [AC_HELP_STRING([--disable-libtool-lock], 2317ba6a1819Smrg [avoid locking (might break parallel builds)])]) 2318ba6a1819Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2319ba6a1819Smrg 2320ba6a1819SmrgAC_ARG_WITH([pic], 2321ba6a1819Smrg [AC_HELP_STRING([--with-pic], 2322ba6a1819Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 2323ba6a1819Smrg [pic_mode="$withval"], 2324ba6a1819Smrg [pic_mode=default]) 2325ba6a1819Smrgtest -z "$pic_mode" && pic_mode=default 2326ba6a1819Smrg 2327ba6a1819Smrg# Use C for the default configuration in the libtool script 2328ba6a1819Smrgtagname= 2329ba6a1819SmrgAC_LIBTOOL_LANG_C_CONFIG 2330ba6a1819Smrg_LT_AC_TAGCONFIG 2331ba6a1819Smrg])# AC_LIBTOOL_SETUP 2332ba6a1819Smrg 2333ba6a1819Smrg 2334ba6a1819Smrg# _LT_AC_SYS_COMPILER 2335ba6a1819Smrg# ------------------- 2336ba6a1819SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 2337ba6a1819Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2338ba6a1819Smrg 2339ba6a1819Smrg# If no C compiler was specified, use CC. 2340ba6a1819SmrgLTCC=${LTCC-"$CC"} 2341ba6a1819Smrg 2342ba6a1819Smrg# If no C compiler flags were specified, use CFLAGS. 2343ba6a1819SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2344ba6a1819Smrg 2345ba6a1819Smrg# Allow CC to be a program name with arguments. 2346ba6a1819Smrgcompiler=$CC 2347ba6a1819Smrg])# _LT_AC_SYS_COMPILER 2348ba6a1819Smrg 2349ba6a1819Smrg 2350ba6a1819Smrg# _LT_CC_BASENAME(CC) 2351ba6a1819Smrg# ------------------- 2352ba6a1819Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2353ba6a1819SmrgAC_DEFUN([_LT_CC_BASENAME], 2354ba6a1819Smrg[for cc_temp in $1""; do 2355ba6a1819Smrg case $cc_temp in 2356ba6a1819Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2357ba6a1819Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2358ba6a1819Smrg \-*) ;; 2359ba6a1819Smrg *) break;; 2360ba6a1819Smrg esac 2361ba6a1819Smrgdone 2362ba6a1819Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 2363ba6a1819Smrg]) 2364ba6a1819Smrg 2365ba6a1819Smrg 2366ba6a1819Smrg# _LT_COMPILER_BOILERPLATE 2367ba6a1819Smrg# ------------------------ 2368ba6a1819Smrg# Check for compiler boilerplate output or warnings with 2369ba6a1819Smrg# the simple compiler test code. 2370ba6a1819SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 2371ba6a1819Smrg[ac_outfile=conftest.$ac_objext 2372ba6a1819Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 2373ba6a1819Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2374ba6a1819Smrg_lt_compiler_boilerplate=`cat conftest.err` 2375ba6a1819Smrg$rm conftest* 2376ba6a1819Smrg])# _LT_COMPILER_BOILERPLATE 2377ba6a1819Smrg 2378ba6a1819Smrg 2379ba6a1819Smrg# _LT_LINKER_BOILERPLATE 2380ba6a1819Smrg# ---------------------- 2381ba6a1819Smrg# Check for linker boilerplate output or warnings with 2382ba6a1819Smrg# the simple link test code. 2383ba6a1819SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 2384ba6a1819Smrg[ac_outfile=conftest.$ac_objext 2385ba6a1819Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 2386ba6a1819Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2387ba6a1819Smrg_lt_linker_boilerplate=`cat conftest.err` 2388ba6a1819Smrg$rm conftest* 2389ba6a1819Smrg])# _LT_LINKER_BOILERPLATE 2390ba6a1819Smrg 2391ba6a1819Smrg 2392ba6a1819Smrg# _LT_AC_SYS_LIBPATH_AIX 2393ba6a1819Smrg# ---------------------- 2394ba6a1819Smrg# Links a minimal program and checks the executable 2395ba6a1819Smrg# for the system default hardcoded library path. In most cases, 2396ba6a1819Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 2397ba6a1819Smrg# the location of the communication and MPI libs are included too. 2398ba6a1819Smrg# If we don't find anything, use the default library path according 2399ba6a1819Smrg# to the aix ld manual. 2400ba6a1819SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 2401ba6a1819Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 2402ba6a1819Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 2403ba6a1819Smrg}'` 2404ba6a1819Smrg# Check for a 64-bit object if we didn't find anything. 2405ba6a1819Smrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 2406ba6a1819Smrg}'`; fi],[]) 2407ba6a1819Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 2408ba6a1819Smrg])# _LT_AC_SYS_LIBPATH_AIX 2409ba6a1819Smrg 2410ba6a1819Smrg 2411ba6a1819Smrg# _LT_AC_SHELL_INIT(ARG) 2412ba6a1819Smrg# ---------------------- 2413ba6a1819SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 2414ba6a1819Smrg[ifdef([AC_DIVERSION_NOTICE], 2415ba6a1819Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 2416ba6a1819Smrg [AC_DIVERT_PUSH(NOTICE)]) 2417ba6a1819Smrg$1 2418ba6a1819SmrgAC_DIVERT_POP 2419ba6a1819Smrg])# _LT_AC_SHELL_INIT 2420ba6a1819Smrg 2421ba6a1819Smrg 2422ba6a1819Smrg# _LT_AC_PROG_ECHO_BACKSLASH 2423ba6a1819Smrg# -------------------------- 2424ba6a1819Smrg# Add some code to the start of the generated configure script which 2425ba6a1819Smrg# will find an echo command which doesn't interpret backslashes. 2426ba6a1819SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 2427ba6a1819Smrg[_LT_AC_SHELL_INIT([ 2428ba6a1819Smrg# Check that we are running under the correct shell. 2429ba6a1819SmrgSHELL=${CONFIG_SHELL-/bin/sh} 2430ba6a1819Smrg 2431ba6a1819Smrgcase X$ECHO in 2432ba6a1819SmrgX*--fallback-echo) 2433ba6a1819Smrg # Remove one level of quotation (which was required for Make). 2434ba6a1819Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 2435ba6a1819Smrg ;; 2436ba6a1819Smrgesac 2437ba6a1819Smrg 2438ba6a1819Smrgecho=${ECHO-echo} 2439ba6a1819Smrgif test "X[$]1" = X--no-reexec; then 2440ba6a1819Smrg # Discard the --no-reexec flag, and continue. 2441ba6a1819Smrg shift 2442ba6a1819Smrgelif test "X[$]1" = X--fallback-echo; then 2443ba6a1819Smrg # Avoid inline document here, it may be left over 2444ba6a1819Smrg : 2445ba6a1819Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 2446ba6a1819Smrg # Yippee, $echo works! 2447ba6a1819Smrg : 2448ba6a1819Smrgelse 2449ba6a1819Smrg # Restart under the correct shell. 2450ba6a1819Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 2451ba6a1819Smrgfi 2452ba6a1819Smrg 2453ba6a1819Smrgif test "X[$]1" = X--fallback-echo; then 2454ba6a1819Smrg # used as fallback echo 2455ba6a1819Smrg shift 2456ba6a1819Smrg cat <<EOF 2457ba6a1819Smrg[$]* 2458ba6a1819SmrgEOF 2459ba6a1819Smrg exit 0 2460ba6a1819Smrgfi 2461ba6a1819Smrg 2462ba6a1819Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 2463ba6a1819Smrg# if CDPATH is set. 2464ba6a1819Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 2465ba6a1819Smrg 2466ba6a1819Smrgif test -z "$ECHO"; then 2467ba6a1819Smrgif test "X${echo_test_string+set}" != Xset; then 2468ba6a1819Smrg# find a string as large as possible, as long as the shell can cope with it 2469ba6a1819Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 2470ba6a1819Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 2471ba6a1819Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 2472ba6a1819Smrg echo_test_string=`eval $cmd` && 2473ba6a1819Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 2474ba6a1819Smrg then 2475ba6a1819Smrg break 2476ba6a1819Smrg fi 2477ba6a1819Smrg done 2478ba6a1819Smrgfi 2479ba6a1819Smrg 2480ba6a1819Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 2481ba6a1819Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 2482ba6a1819Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 2483ba6a1819Smrg : 2484ba6a1819Smrgelse 2485ba6a1819Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 2486ba6a1819Smrg # backslashes. This makes it impossible to quote backslashes using 2487ba6a1819Smrg # echo "$something" | sed 's/\\/\\\\/g' 2488ba6a1819Smrg # 2489ba6a1819Smrg # So, first we look for a working echo in the user's PATH. 2490ba6a1819Smrg 2491ba6a1819Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2492ba6a1819Smrg for dir in $PATH /usr/ucb; do 2493ba6a1819Smrg IFS="$lt_save_ifs" 2494ba6a1819Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 2495ba6a1819Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 2496ba6a1819Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 2497ba6a1819Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 2498ba6a1819Smrg echo="$dir/echo" 2499ba6a1819Smrg break 2500ba6a1819Smrg fi 2501ba6a1819Smrg done 2502ba6a1819Smrg IFS="$lt_save_ifs" 2503ba6a1819Smrg 2504ba6a1819Smrg if test "X$echo" = Xecho; then 2505ba6a1819Smrg # We didn't find a better echo, so look for alternatives. 2506ba6a1819Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 2507ba6a1819Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 2508ba6a1819Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 2509ba6a1819Smrg # This shell has a builtin print -r that does the trick. 2510ba6a1819Smrg echo='print -r' 2511ba6a1819Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 2512ba6a1819Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 2513ba6a1819Smrg # If we have ksh, try running configure again with it. 2514ba6a1819Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 2515ba6a1819Smrg export ORIGINAL_CONFIG_SHELL 2516ba6a1819Smrg CONFIG_SHELL=/bin/ksh 2517ba6a1819Smrg export CONFIG_SHELL 2518ba6a1819Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 2519ba6a1819Smrg else 2520ba6a1819Smrg # Try using printf. 2521ba6a1819Smrg echo='printf %s\n' 2522ba6a1819Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 2523ba6a1819Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 2524ba6a1819Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 2525ba6a1819Smrg # Cool, printf works 2526ba6a1819Smrg : 2527ba6a1819Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 2528ba6a1819Smrg test "X$echo_testing_string" = 'X\t' && 2529ba6a1819Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 2530ba6a1819Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 2531ba6a1819Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 2532ba6a1819Smrg export CONFIG_SHELL 2533ba6a1819Smrg SHELL="$CONFIG_SHELL" 2534ba6a1819Smrg export SHELL 2535ba6a1819Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 2536ba6a1819Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 2537ba6a1819Smrg test "X$echo_testing_string" = 'X\t' && 2538ba6a1819Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 2539ba6a1819Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 2540ba6a1819Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 2541ba6a1819Smrg else 2542ba6a1819Smrg # maybe with a smaller string... 2543ba6a1819Smrg prev=: 2544ba6a1819Smrg 2545ba6a1819Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 2546ba6a1819Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 2547ba6a1819Smrg then 2548ba6a1819Smrg break 2549ba6a1819Smrg fi 2550ba6a1819Smrg prev="$cmd" 2551ba6a1819Smrg done 2552ba6a1819Smrg 2553ba6a1819Smrg if test "$prev" != 'sed 50q "[$]0"'; then 2554ba6a1819Smrg echo_test_string=`eval $prev` 2555ba6a1819Smrg export echo_test_string 2556ba6a1819Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 2557ba6a1819Smrg else 2558ba6a1819Smrg # Oops. We lost completely, so just stick with echo. 2559ba6a1819Smrg echo=echo 2560ba6a1819Smrg fi 2561ba6a1819Smrg fi 2562ba6a1819Smrg fi 2563ba6a1819Smrg fi 2564ba6a1819Smrgfi 2565ba6a1819Smrgfi 2566ba6a1819Smrg 2567ba6a1819Smrg# Copy echo and quote the copy suitably for passing to libtool from 2568ba6a1819Smrg# the Makefile, instead of quoting the original, which is used later. 2569ba6a1819SmrgECHO=$echo 2570ba6a1819Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 2571ba6a1819Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 2572ba6a1819Smrgfi 2573ba6a1819Smrg 2574ba6a1819SmrgAC_SUBST(ECHO) 2575ba6a1819Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 2576ba6a1819Smrg 2577ba6a1819Smrg 2578ba6a1819Smrg# _LT_AC_LOCK 2579ba6a1819Smrg# ----------- 2580ba6a1819SmrgAC_DEFUN([_LT_AC_LOCK], 2581ba6a1819Smrg[AC_ARG_ENABLE([libtool-lock], 2582ba6a1819Smrg [AC_HELP_STRING([--disable-libtool-lock], 2583ba6a1819Smrg [avoid locking (might break parallel builds)])]) 2584ba6a1819Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2585ba6a1819Smrg 2586ba6a1819Smrg# Some flags need to be propagated to the compiler or linker for good 2587ba6a1819Smrg# libtool support. 2588ba6a1819Smrgcase $host in 2589ba6a1819Smrgia64-*-hpux*) 2590ba6a1819Smrg # Find out which ABI we are using. 2591ba6a1819Smrg echo 'int i;' > conftest.$ac_ext 2592ba6a1819Smrg if AC_TRY_EVAL(ac_compile); then 2593ba6a1819Smrg case `/usr/bin/file conftest.$ac_objext` in 2594ba6a1819Smrg *ELF-32*) 2595ba6a1819Smrg HPUX_IA64_MODE="32" 2596ba6a1819Smrg ;; 2597ba6a1819Smrg *ELF-64*) 2598ba6a1819Smrg HPUX_IA64_MODE="64" 2599ba6a1819Smrg ;; 2600ba6a1819Smrg esac 2601ba6a1819Smrg fi 2602ba6a1819Smrg rm -rf conftest* 2603ba6a1819Smrg ;; 2604ba6a1819Smrg*-*-irix6*) 2605ba6a1819Smrg # Find out which ABI we are using. 2606ba6a1819Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 2607ba6a1819Smrg if AC_TRY_EVAL(ac_compile); then 2608ba6a1819Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 2609ba6a1819Smrg case `/usr/bin/file conftest.$ac_objext` in 2610ba6a1819Smrg *32-bit*) 2611ba6a1819Smrg LD="${LD-ld} -melf32bsmip" 2612ba6a1819Smrg ;; 2613ba6a1819Smrg *N32*) 2614ba6a1819Smrg LD="${LD-ld} -melf32bmipn32" 2615ba6a1819Smrg ;; 2616ba6a1819Smrg *64-bit*) 2617ba6a1819Smrg LD="${LD-ld} -melf64bmip" 2618ba6a1819Smrg ;; 2619ba6a1819Smrg esac 2620ba6a1819Smrg else 2621ba6a1819Smrg case `/usr/bin/file conftest.$ac_objext` in 2622ba6a1819Smrg *32-bit*) 2623ba6a1819Smrg LD="${LD-ld} -32" 2624ba6a1819Smrg ;; 2625ba6a1819Smrg *N32*) 2626ba6a1819Smrg LD="${LD-ld} -n32" 2627ba6a1819Smrg ;; 2628ba6a1819Smrg *64-bit*) 2629ba6a1819Smrg LD="${LD-ld} -64" 2630ba6a1819Smrg ;; 2631ba6a1819Smrg esac 2632ba6a1819Smrg fi 2633ba6a1819Smrg fi 2634ba6a1819Smrg rm -rf conftest* 2635ba6a1819Smrg ;; 2636ba6a1819Smrg 2637ba6a1819Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 2638ba6a1819Smrg # Find out which ABI we are using. 2639ba6a1819Smrg echo 'int i;' > conftest.$ac_ext 2640ba6a1819Smrg if AC_TRY_EVAL(ac_compile); then 2641ba6a1819Smrg case `/usr/bin/file conftest.o` in 2642ba6a1819Smrg *32-bit*) 2643ba6a1819Smrg case $host in 2644ba6a1819Smrg x86_64-*linux*) 2645ba6a1819Smrg LD="${LD-ld} -m elf_i386" 2646ba6a1819Smrg ;; 2647ba6a1819Smrg ppc64-*linux*|powerpc64-*linux*) 2648ba6a1819Smrg LD="${LD-ld} -m elf32ppclinux" 2649ba6a1819Smrg ;; 2650ba6a1819Smrg s390x-*linux*) 2651ba6a1819Smrg LD="${LD-ld} -m elf_s390" 2652ba6a1819Smrg ;; 2653ba6a1819Smrg sparc64-*linux*) 2654ba6a1819Smrg LD="${LD-ld} -m elf32_sparc" 2655ba6a1819Smrg ;; 2656ba6a1819Smrg esac 2657ba6a1819Smrg ;; 2658ba6a1819Smrg *64-bit*) 2659ba6a1819Smrg case $host in 2660ba6a1819Smrg x86_64-*linux*) 2661ba6a1819Smrg LD="${LD-ld} -m elf_x86_64" 2662ba6a1819Smrg ;; 2663ba6a1819Smrg ppc*-*linux*|powerpc*-*linux*) 2664ba6a1819Smrg LD="${LD-ld} -m elf64ppc" 2665ba6a1819Smrg ;; 2666ba6a1819Smrg s390*-*linux*) 2667ba6a1819Smrg LD="${LD-ld} -m elf64_s390" 2668ba6a1819Smrg ;; 2669ba6a1819Smrg sparc*-*linux*) 2670ba6a1819Smrg LD="${LD-ld} -m elf64_sparc" 2671ba6a1819Smrg ;; 2672ba6a1819Smrg esac 2673ba6a1819Smrg ;; 2674ba6a1819Smrg esac 2675ba6a1819Smrg fi 2676ba6a1819Smrg rm -rf conftest* 2677ba6a1819Smrg ;; 2678ba6a1819Smrg 2679ba6a1819Smrg*-*-sco3.2v5*) 2680ba6a1819Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2681ba6a1819Smrg SAVE_CFLAGS="$CFLAGS" 2682ba6a1819Smrg CFLAGS="$CFLAGS -belf" 2683ba6a1819Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2684ba6a1819Smrg [AC_LANG_PUSH(C) 2685ba6a1819Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2686ba6a1819Smrg AC_LANG_POP]) 2687ba6a1819Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2688ba6a1819Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2689ba6a1819Smrg CFLAGS="$SAVE_CFLAGS" 2690ba6a1819Smrg fi 2691ba6a1819Smrg ;; 2692ba6a1819Smrgsparc*-*solaris*) 2693ba6a1819Smrg # Find out which ABI we are using. 2694ba6a1819Smrg echo 'int i;' > conftest.$ac_ext 2695ba6a1819Smrg if AC_TRY_EVAL(ac_compile); then 2696ba6a1819Smrg case `/usr/bin/file conftest.o` in 2697ba6a1819Smrg *64-bit*) 2698ba6a1819Smrg case $lt_cv_prog_gnu_ld in 2699ba6a1819Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 2700ba6a1819Smrg *) LD="${LD-ld} -64" ;; 2701ba6a1819Smrg esac 2702ba6a1819Smrg ;; 2703ba6a1819Smrg esac 2704ba6a1819Smrg fi 2705ba6a1819Smrg rm -rf conftest* 2706ba6a1819Smrg ;; 2707ba6a1819Smrg 2708ba6a1819SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 2709ba6a1819Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 2710ba6a1819Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 2711ba6a1819Smrg AC_CHECK_TOOL(AS, as, false) 2712ba6a1819Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 2713ba6a1819Smrg ;; 2714ba6a1819Smrg ]) 2715ba6a1819Smrgesac 2716ba6a1819Smrg 2717ba6a1819Smrgneed_locks="$enable_libtool_lock" 2718ba6a1819Smrg 2719ba6a1819Smrg])# _LT_AC_LOCK 2720ba6a1819Smrg 2721ba6a1819Smrg 2722ba6a1819Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2723ba6a1819Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2724ba6a1819Smrg# ---------------------------------------------------------------- 2725ba6a1819Smrg# Check whether the given compiler option works 2726ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 2727ba6a1819Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 2728ba6a1819SmrgAC_CACHE_CHECK([$1], [$2], 2729ba6a1819Smrg [$2=no 2730ba6a1819Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2731ba6a1819Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 2732ba6a1819Smrg lt_compiler_flag="$3" 2733ba6a1819Smrg # Insert the option either (1) after the last *FLAGS variable, or 2734ba6a1819Smrg # (2) before a word containing "conftest.", or (3) at the end. 2735ba6a1819Smrg # Note that $ac_compile itself does not contain backslashes and begins 2736ba6a1819Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2737ba6a1819Smrg # The option is referenced via a variable to avoid confusing sed. 2738ba6a1819Smrg lt_compile=`echo "$ac_compile" | $SED \ 2739ba6a1819Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2740ba6a1819Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2741ba6a1819Smrg -e 's:$: $lt_compiler_flag:'` 2742ba6a1819Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2743ba6a1819Smrg (eval "$lt_compile" 2>conftest.err) 2744ba6a1819Smrg ac_status=$? 2745ba6a1819Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2746ba6a1819Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2747ba6a1819Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 2748ba6a1819Smrg # The compiler can only warn and ignore the option if not recognized 2749ba6a1819Smrg # So say no if there are warnings other than the usual output. 2750ba6a1819Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 2751ba6a1819Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2752ba6a1819Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2753ba6a1819Smrg $2=yes 2754ba6a1819Smrg fi 2755ba6a1819Smrg fi 2756ba6a1819Smrg $rm conftest* 2757ba6a1819Smrg]) 2758ba6a1819Smrg 2759ba6a1819Smrgif test x"[$]$2" = xyes; then 2760ba6a1819Smrg ifelse([$5], , :, [$5]) 2761ba6a1819Smrgelse 2762ba6a1819Smrg ifelse([$6], , :, [$6]) 2763ba6a1819Smrgfi 2764ba6a1819Smrg])# AC_LIBTOOL_COMPILER_OPTION 2765ba6a1819Smrg 2766ba6a1819Smrg 2767ba6a1819Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2768ba6a1819Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 2769ba6a1819Smrg# ------------------------------------------------------------ 2770ba6a1819Smrg# Check whether the given compiler option works 2771ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 2772ba6a1819Smrg[AC_CACHE_CHECK([$1], [$2], 2773ba6a1819Smrg [$2=no 2774ba6a1819Smrg save_LDFLAGS="$LDFLAGS" 2775ba6a1819Smrg LDFLAGS="$LDFLAGS $3" 2776ba6a1819Smrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 2777ba6a1819Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2778ba6a1819Smrg # The linker can only warn and ignore the option if not recognized 2779ba6a1819Smrg # So say no if there are warnings 2780ba6a1819Smrg if test -s conftest.err; then 2781ba6a1819Smrg # Append any errors to the config.log. 2782ba6a1819Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 2783ba6a1819Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 2784ba6a1819Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2785ba6a1819Smrg if diff conftest.exp conftest.er2 >/dev/null; then 2786ba6a1819Smrg $2=yes 2787ba6a1819Smrg fi 2788ba6a1819Smrg else 2789ba6a1819Smrg $2=yes 2790ba6a1819Smrg fi 2791ba6a1819Smrg fi 2792ba6a1819Smrg $rm conftest* 2793ba6a1819Smrg LDFLAGS="$save_LDFLAGS" 2794ba6a1819Smrg]) 2795ba6a1819Smrg 2796ba6a1819Smrgif test x"[$]$2" = xyes; then 2797ba6a1819Smrg ifelse([$4], , :, [$4]) 2798ba6a1819Smrgelse 2799ba6a1819Smrg ifelse([$5], , :, [$5]) 2800ba6a1819Smrgfi 2801ba6a1819Smrg])# AC_LIBTOOL_LINKER_OPTION 2802ba6a1819Smrg 2803ba6a1819Smrg 2804ba6a1819Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 2805ba6a1819Smrg# -------------------------- 2806ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 2807ba6a1819Smrg[# find the maximum length of command line arguments 2808ba6a1819SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 2809ba6a1819SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2810ba6a1819Smrg i=0 2811ba6a1819Smrg teststring="ABCD" 2812ba6a1819Smrg 2813ba6a1819Smrg case $build_os in 2814ba6a1819Smrg msdosdjgpp*) 2815ba6a1819Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 2816ba6a1819Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 2817ba6a1819Smrg # during glob expansion). Even if it were fixed, the result of this 2818ba6a1819Smrg # check would be larger than it should be. 2819ba6a1819Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 2820ba6a1819Smrg ;; 2821ba6a1819Smrg 2822ba6a1819Smrg gnu*) 2823ba6a1819Smrg # Under GNU Hurd, this test is not required because there is 2824ba6a1819Smrg # no limit to the length of command line arguments. 2825ba6a1819Smrg # Libtool will interpret -1 as no limit whatsoever 2826ba6a1819Smrg lt_cv_sys_max_cmd_len=-1; 2827ba6a1819Smrg ;; 2828ba6a1819Smrg 2829ba6a1819Smrg cygwin* | mingw*) 2830ba6a1819Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 2831ba6a1819Smrg # about 5 minutes as the teststring grows exponentially. 2832ba6a1819Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 2833ba6a1819Smrg # you end up with a "frozen" computer, even though with patience 2834ba6a1819Smrg # the test eventually succeeds (with a max line length of 256k). 2835ba6a1819Smrg # Instead, let's just punt: use the minimum linelength reported by 2836ba6a1819Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 2837ba6a1819Smrg lt_cv_sys_max_cmd_len=8192; 2838ba6a1819Smrg ;; 2839ba6a1819Smrg 2840ba6a1819Smrg amigaos*) 2841ba6a1819Smrg # On AmigaOS with pdksh, this test takes hours, literally. 2842ba6a1819Smrg # So we just punt and use a minimum line length of 8192. 2843ba6a1819Smrg lt_cv_sys_max_cmd_len=8192; 2844ba6a1819Smrg ;; 2845ba6a1819Smrg 2846ba6a1819Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2847ba6a1819Smrg # This has been around since 386BSD, at least. Likely further. 2848ba6a1819Smrg if test -x /sbin/sysctl; then 2849ba6a1819Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2850ba6a1819Smrg elif test -x /usr/sbin/sysctl; then 2851ba6a1819Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2852ba6a1819Smrg else 2853ba6a1819Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2854ba6a1819Smrg fi 2855ba6a1819Smrg # And add a safety zone 2856ba6a1819Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2857ba6a1819Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2858ba6a1819Smrg ;; 2859ba6a1819Smrg 2860ba6a1819Smrg interix*) 2861ba6a1819Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 2862ba6a1819Smrg lt_cv_sys_max_cmd_len=196608 2863ba6a1819Smrg ;; 2864ba6a1819Smrg 2865ba6a1819Smrg osf*) 2866ba6a1819Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2867ba6a1819Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2868ba6a1819Smrg # nice to cause kernel panics so lets avoid the loop below. 2869ba6a1819Smrg # First set a reasonable default. 2870ba6a1819Smrg lt_cv_sys_max_cmd_len=16384 2871ba6a1819Smrg # 2872ba6a1819Smrg if test -x /sbin/sysconfig; then 2873ba6a1819Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2874ba6a1819Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 2875ba6a1819Smrg esac 2876ba6a1819Smrg fi 2877ba6a1819Smrg ;; 2878ba6a1819Smrg sco3.2v5*) 2879ba6a1819Smrg lt_cv_sys_max_cmd_len=102400 2880ba6a1819Smrg ;; 2881ba6a1819Smrg sysv5* | sco5v6* | sysv4.2uw2*) 2882ba6a1819Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2883ba6a1819Smrg if test -n "$kargmax"; then 2884ba6a1819Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2885ba6a1819Smrg else 2886ba6a1819Smrg lt_cv_sys_max_cmd_len=32768 2887ba6a1819Smrg fi 2888ba6a1819Smrg ;; 2889ba6a1819Smrg *) 2890ba6a1819Smrg # If test is not a shell built-in, we'll probably end up computing a 2891ba6a1819Smrg # maximum length that is only half of the actual maximum length, but 2892ba6a1819Smrg # we can't tell. 2893ba6a1819Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2894ba6a1819Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 2895ba6a1819Smrg = "XX$teststring") >/dev/null 2>&1 && 2896ba6a1819Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 2897ba6a1819Smrg lt_cv_sys_max_cmd_len=$new_result && 2898ba6a1819Smrg test $i != 17 # 1/2 MB should be enough 2899ba6a1819Smrg do 2900ba6a1819Smrg i=`expr $i + 1` 2901ba6a1819Smrg teststring=$teststring$teststring 2902ba6a1819Smrg done 2903ba6a1819Smrg teststring= 2904ba6a1819Smrg # Add a significant safety factor because C++ compilers can tack on massive 2905ba6a1819Smrg # amounts of additional arguments before passing them to the linker. 2906ba6a1819Smrg # It appears as though 1/2 is a usable value. 2907ba6a1819Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2908ba6a1819Smrg ;; 2909ba6a1819Smrg esac 2910ba6a1819Smrg]) 2911ba6a1819Smrgif test -n $lt_cv_sys_max_cmd_len ; then 2912ba6a1819Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2913ba6a1819Smrgelse 2914ba6a1819Smrg AC_MSG_RESULT(none) 2915ba6a1819Smrgfi 2916ba6a1819Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 2917ba6a1819Smrg 2918ba6a1819Smrg 2919ba6a1819Smrg# _LT_AC_CHECK_DLFCN 2920ba6a1819Smrg# ------------------ 2921ba6a1819SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 2922ba6a1819Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 2923ba6a1819Smrg])# _LT_AC_CHECK_DLFCN 2924ba6a1819Smrg 2925ba6a1819Smrg 2926ba6a1819Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2927ba6a1819Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2928ba6a1819Smrg# --------------------------------------------------------------------- 2929ba6a1819SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 2930ba6a1819Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 2931ba6a1819Smrgif test "$cross_compiling" = yes; then : 2932ba6a1819Smrg [$4] 2933ba6a1819Smrgelse 2934ba6a1819Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2935ba6a1819Smrg lt_status=$lt_dlunknown 2936ba6a1819Smrg cat > conftest.$ac_ext <<EOF 2937ba6a1819Smrg[#line __oline__ "configure" 2938ba6a1819Smrg#include "confdefs.h" 2939ba6a1819Smrg 2940ba6a1819Smrg#if HAVE_DLFCN_H 2941ba6a1819Smrg#include <dlfcn.h> 2942ba6a1819Smrg#endif 2943ba6a1819Smrg 2944ba6a1819Smrg#include <stdio.h> 2945ba6a1819Smrg 2946ba6a1819Smrg#ifdef RTLD_GLOBAL 2947ba6a1819Smrg# define LT_DLGLOBAL RTLD_GLOBAL 2948ba6a1819Smrg#else 2949ba6a1819Smrg# ifdef DL_GLOBAL 2950ba6a1819Smrg# define LT_DLGLOBAL DL_GLOBAL 2951ba6a1819Smrg# else 2952ba6a1819Smrg# define LT_DLGLOBAL 0 2953ba6a1819Smrg# endif 2954ba6a1819Smrg#endif 2955ba6a1819Smrg 2956ba6a1819Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2957ba6a1819Smrg find out it does not work in some platform. */ 2958ba6a1819Smrg#ifndef LT_DLLAZY_OR_NOW 2959ba6a1819Smrg# ifdef RTLD_LAZY 2960ba6a1819Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 2961ba6a1819Smrg# else 2962ba6a1819Smrg# ifdef DL_LAZY 2963ba6a1819Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 2964ba6a1819Smrg# else 2965ba6a1819Smrg# ifdef RTLD_NOW 2966ba6a1819Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 2967ba6a1819Smrg# else 2968ba6a1819Smrg# ifdef DL_NOW 2969ba6a1819Smrg# define LT_DLLAZY_OR_NOW DL_NOW 2970ba6a1819Smrg# else 2971ba6a1819Smrg# define LT_DLLAZY_OR_NOW 0 2972ba6a1819Smrg# endif 2973ba6a1819Smrg# endif 2974ba6a1819Smrg# endif 2975ba6a1819Smrg# endif 2976ba6a1819Smrg#endif 2977ba6a1819Smrg 2978ba6a1819Smrg#ifdef __cplusplus 2979ba6a1819Smrgextern "C" void exit (int); 2980ba6a1819Smrg#endif 2981ba6a1819Smrg 2982ba6a1819Smrgvoid fnord() { int i=42;} 2983ba6a1819Smrgint main () 2984ba6a1819Smrg{ 2985ba6a1819Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2986ba6a1819Smrg int status = $lt_dlunknown; 2987ba6a1819Smrg 2988ba6a1819Smrg if (self) 2989ba6a1819Smrg { 2990ba6a1819Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2991ba6a1819Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2992ba6a1819Smrg /* dlclose (self); */ 2993ba6a1819Smrg } 2994ba6a1819Smrg else 2995ba6a1819Smrg puts (dlerror ()); 2996ba6a1819Smrg 2997ba6a1819Smrg exit (status); 2998ba6a1819Smrg}] 2999ba6a1819SmrgEOF 3000ba6a1819Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 3001ba6a1819Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 3002ba6a1819Smrg lt_status=$? 3003ba6a1819Smrg case x$lt_status in 3004ba6a1819Smrg x$lt_dlno_uscore) $1 ;; 3005ba6a1819Smrg x$lt_dlneed_uscore) $2 ;; 3006ba6a1819Smrg x$lt_dlunknown|x*) $3 ;; 3007ba6a1819Smrg esac 3008ba6a1819Smrg else : 3009ba6a1819Smrg # compilation failed 3010ba6a1819Smrg $3 3011ba6a1819Smrg fi 3012ba6a1819Smrgfi 3013ba6a1819Smrgrm -fr conftest* 3014ba6a1819Smrg])# _LT_AC_TRY_DLOPEN_SELF 3015ba6a1819Smrg 3016ba6a1819Smrg 3017ba6a1819Smrg# AC_LIBTOOL_DLOPEN_SELF 3018ba6a1819Smrg# ---------------------- 3019ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 3020ba6a1819Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 3021ba6a1819Smrgif test "x$enable_dlopen" != xyes; then 3022ba6a1819Smrg enable_dlopen=unknown 3023ba6a1819Smrg enable_dlopen_self=unknown 3024ba6a1819Smrg enable_dlopen_self_static=unknown 3025ba6a1819Smrgelse 3026ba6a1819Smrg lt_cv_dlopen=no 3027ba6a1819Smrg lt_cv_dlopen_libs= 3028ba6a1819Smrg 3029ba6a1819Smrg case $host_os in 3030ba6a1819Smrg beos*) 3031ba6a1819Smrg lt_cv_dlopen="load_add_on" 3032ba6a1819Smrg lt_cv_dlopen_libs= 3033ba6a1819Smrg lt_cv_dlopen_self=yes 3034ba6a1819Smrg ;; 3035ba6a1819Smrg 3036ba6a1819Smrg mingw* | pw32*) 3037ba6a1819Smrg lt_cv_dlopen="LoadLibrary" 3038ba6a1819Smrg lt_cv_dlopen_libs= 3039ba6a1819Smrg ;; 3040ba6a1819Smrg 3041ba6a1819Smrg cygwin*) 3042ba6a1819Smrg lt_cv_dlopen="dlopen" 3043ba6a1819Smrg lt_cv_dlopen_libs= 3044ba6a1819Smrg ;; 3045ba6a1819Smrg 3046ba6a1819Smrg darwin*) 3047ba6a1819Smrg # if libdl is installed we need to link against it 3048ba6a1819Smrg AC_CHECK_LIB([dl], [dlopen], 3049ba6a1819Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 3050ba6a1819Smrg lt_cv_dlopen="dyld" 3051ba6a1819Smrg lt_cv_dlopen_libs= 3052ba6a1819Smrg lt_cv_dlopen_self=yes 3053ba6a1819Smrg ]) 3054ba6a1819Smrg ;; 3055ba6a1819Smrg 3056ba6a1819Smrg *) 3057ba6a1819Smrg AC_CHECK_FUNC([shl_load], 3058ba6a1819Smrg [lt_cv_dlopen="shl_load"], 3059ba6a1819Smrg [AC_CHECK_LIB([dld], [shl_load], 3060ba6a1819Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 3061ba6a1819Smrg [AC_CHECK_FUNC([dlopen], 3062ba6a1819Smrg [lt_cv_dlopen="dlopen"], 3063ba6a1819Smrg [AC_CHECK_LIB([dl], [dlopen], 3064ba6a1819Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 3065ba6a1819Smrg [AC_CHECK_LIB([svld], [dlopen], 3066ba6a1819Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 3067ba6a1819Smrg [AC_CHECK_LIB([dld], [dld_link], 3068ba6a1819Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 3069ba6a1819Smrg ]) 3070ba6a1819Smrg ]) 3071ba6a1819Smrg ]) 3072ba6a1819Smrg ]) 3073ba6a1819Smrg ]) 3074ba6a1819Smrg ;; 3075ba6a1819Smrg esac 3076ba6a1819Smrg 3077ba6a1819Smrg if test "x$lt_cv_dlopen" != xno; then 3078ba6a1819Smrg enable_dlopen=yes 3079ba6a1819Smrg else 3080ba6a1819Smrg enable_dlopen=no 3081ba6a1819Smrg fi 3082ba6a1819Smrg 3083ba6a1819Smrg case $lt_cv_dlopen in 3084ba6a1819Smrg dlopen) 3085ba6a1819Smrg save_CPPFLAGS="$CPPFLAGS" 3086ba6a1819Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 3087ba6a1819Smrg 3088ba6a1819Smrg save_LDFLAGS="$LDFLAGS" 3089ba6a1819Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 3090ba6a1819Smrg 3091ba6a1819Smrg save_LIBS="$LIBS" 3092ba6a1819Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 3093ba6a1819Smrg 3094ba6a1819Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 3095ba6a1819Smrg lt_cv_dlopen_self, [dnl 3096ba6a1819Smrg _LT_AC_TRY_DLOPEN_SELF( 3097ba6a1819Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 3098ba6a1819Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 3099ba6a1819Smrg ]) 3100ba6a1819Smrg 3101ba6a1819Smrg if test "x$lt_cv_dlopen_self" = xyes; then 3102ba6a1819Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 3103ba6a1819Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 3104ba6a1819Smrg lt_cv_dlopen_self_static, [dnl 3105ba6a1819Smrg _LT_AC_TRY_DLOPEN_SELF( 3106ba6a1819Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 3107ba6a1819Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 3108ba6a1819Smrg ]) 3109ba6a1819Smrg fi 3110ba6a1819Smrg 3111ba6a1819Smrg CPPFLAGS="$save_CPPFLAGS" 3112ba6a1819Smrg LDFLAGS="$save_LDFLAGS" 3113ba6a1819Smrg LIBS="$save_LIBS" 3114ba6a1819Smrg ;; 3115ba6a1819Smrg esac 3116ba6a1819Smrg 3117ba6a1819Smrg case $lt_cv_dlopen_self in 3118ba6a1819Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 3119ba6a1819Smrg *) enable_dlopen_self=unknown ;; 3120ba6a1819Smrg esac 3121ba6a1819Smrg 3122ba6a1819Smrg case $lt_cv_dlopen_self_static in 3123ba6a1819Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 3124ba6a1819Smrg *) enable_dlopen_self_static=unknown ;; 3125ba6a1819Smrg esac 3126ba6a1819Smrgfi 3127ba6a1819Smrg])# AC_LIBTOOL_DLOPEN_SELF 3128ba6a1819Smrg 3129ba6a1819Smrg 3130ba6a1819Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 3131ba6a1819Smrg# --------------------------------- 3132ba6a1819Smrg# Check to see if options -c and -o are simultaneously supported by compiler 3133ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 3134ba6a1819Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 3135ba6a1819SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3136ba6a1819Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3137ba6a1819Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3138ba6a1819Smrg $rm -r conftest 2>/dev/null 3139ba6a1819Smrg mkdir conftest 3140ba6a1819Smrg cd conftest 3141ba6a1819Smrg mkdir out 3142ba6a1819Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 3143ba6a1819Smrg 3144ba6a1819Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 3145ba6a1819Smrg # Insert the option either (1) after the last *FLAGS variable, or 3146ba6a1819Smrg # (2) before a word containing "conftest.", or (3) at the end. 3147ba6a1819Smrg # Note that $ac_compile itself does not contain backslashes and begins 3148ba6a1819Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 3149ba6a1819Smrg lt_compile=`echo "$ac_compile" | $SED \ 3150ba6a1819Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3151ba6a1819Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3152ba6a1819Smrg -e 's:$: $lt_compiler_flag:'` 3153ba6a1819Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3154ba6a1819Smrg (eval "$lt_compile" 2>out/conftest.err) 3155ba6a1819Smrg ac_status=$? 3156ba6a1819Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 3157ba6a1819Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3158ba6a1819Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 3159ba6a1819Smrg then 3160ba6a1819Smrg # The compiler can only warn and ignore the option if not recognized 3161ba6a1819Smrg # So say no if there are warnings 3162ba6a1819Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 3163ba6a1819Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3164ba6a1819Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3165ba6a1819Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3166ba6a1819Smrg fi 3167ba6a1819Smrg fi 3168ba6a1819Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 3169ba6a1819Smrg $rm conftest* 3170ba6a1819Smrg # SGI C++ compiler will create directory out/ii_files/ for 3171ba6a1819Smrg # template instantiation 3172ba6a1819Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 3173ba6a1819Smrg $rm out/* && rmdir out 3174ba6a1819Smrg cd .. 3175ba6a1819Smrg rmdir conftest 3176ba6a1819Smrg $rm conftest* 3177ba6a1819Smrg]) 3178ba6a1819Smrg])# AC_LIBTOOL_PROG_CC_C_O 3179ba6a1819Smrg 3180ba6a1819Smrg 3181ba6a1819Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 3182ba6a1819Smrg# ----------------------------------------- 3183ba6a1819Smrg# Check to see if we can do hard links to lock some files if needed 3184ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 3185ba6a1819Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 3186ba6a1819Smrg 3187ba6a1819Smrghard_links="nottested" 3188ba6a1819Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3189ba6a1819Smrg # do not overwrite the value of need_locks provided by the user 3190ba6a1819Smrg AC_MSG_CHECKING([if we can lock with hard links]) 3191ba6a1819Smrg hard_links=yes 3192ba6a1819Smrg $rm conftest* 3193ba6a1819Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 3194ba6a1819Smrg touch conftest.a 3195ba6a1819Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 3196ba6a1819Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 3197ba6a1819Smrg AC_MSG_RESULT([$hard_links]) 3198ba6a1819Smrg if test "$hard_links" = no; then 3199ba6a1819Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3200ba6a1819Smrg need_locks=warn 3201ba6a1819Smrg fi 3202ba6a1819Smrgelse 3203ba6a1819Smrg need_locks=no 3204ba6a1819Smrgfi 3205ba6a1819Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 3206ba6a1819Smrg 3207ba6a1819Smrg 3208ba6a1819Smrg# AC_LIBTOOL_OBJDIR 3209ba6a1819Smrg# ----------------- 3210ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 3211ba6a1819Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3212ba6a1819Smrg[rm -f .libs 2>/dev/null 3213ba6a1819Smrgmkdir .libs 2>/dev/null 3214ba6a1819Smrgif test -d .libs; then 3215ba6a1819Smrg lt_cv_objdir=.libs 3216ba6a1819Smrgelse 3217ba6a1819Smrg # MS-DOS does not allow filenames that begin with a dot. 3218ba6a1819Smrg lt_cv_objdir=_libs 3219ba6a1819Smrgfi 3220ba6a1819Smrgrmdir .libs 2>/dev/null]) 3221ba6a1819Smrgobjdir=$lt_cv_objdir 3222ba6a1819Smrg])# AC_LIBTOOL_OBJDIR 3223ba6a1819Smrg 3224ba6a1819Smrg 3225ba6a1819Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 3226ba6a1819Smrg# ---------------------------------------------- 3227ba6a1819Smrg# Check hardcoding attributes. 3228ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 3229ba6a1819Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3230ba6a1819Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 3231ba6a1819Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 3232ba6a1819Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 3233ba6a1819Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3234ba6a1819Smrg 3235ba6a1819Smrg # We can hardcode non-existant directories. 3236ba6a1819Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 3237ba6a1819Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 3238ba6a1819Smrg # have to relink, otherwise we might link with an installed library 3239ba6a1819Smrg # when we should be linking with a yet-to-be-installed one 3240ba6a1819Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3241ba6a1819Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 3242ba6a1819Smrg # Linking always hardcodes the temporary library directory. 3243ba6a1819Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 3244ba6a1819Smrg else 3245ba6a1819Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 3246ba6a1819Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 3247ba6a1819Smrg fi 3248ba6a1819Smrgelse 3249ba6a1819Smrg # We cannot hardcode anything, or else we can only hardcode existing 3250ba6a1819Smrg # directories. 3251ba6a1819Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 3252ba6a1819Smrgfi 3253ba6a1819SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 3254ba6a1819Smrg 3255ba6a1819Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 3256ba6a1819Smrg # Fast installation is not supported 3257ba6a1819Smrg enable_fast_install=no 3258ba6a1819Smrgelif test "$shlibpath_overrides_runpath" = yes || 3259ba6a1819Smrg test "$enable_shared" = no; then 3260ba6a1819Smrg # Fast installation is not necessary 3261ba6a1819Smrg enable_fast_install=needless 3262ba6a1819Smrgfi 3263ba6a1819Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 3264ba6a1819Smrg 3265ba6a1819Smrg 3266ba6a1819Smrg# AC_LIBTOOL_SYS_LIB_STRIP 3267ba6a1819Smrg# ------------------------ 3268ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 3269ba6a1819Smrg[striplib= 3270ba6a1819Smrgold_striplib= 3271ba6a1819SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 3272ba6a1819Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 3273ba6a1819Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3274ba6a1819Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3275ba6a1819Smrg AC_MSG_RESULT([yes]) 3276ba6a1819Smrgelse 3277ba6a1819Smrg# FIXME - insert some real tests, host_os isn't really good enough 3278ba6a1819Smrg case $host_os in 3279ba6a1819Smrg darwin*) 3280ba6a1819Smrg if test -n "$STRIP" ; then 3281ba6a1819Smrg striplib="$STRIP -x" 3282ba6a1819Smrg AC_MSG_RESULT([yes]) 3283ba6a1819Smrg else 3284ba6a1819Smrg AC_MSG_RESULT([no]) 3285ba6a1819Smrgfi 3286ba6a1819Smrg ;; 3287ba6a1819Smrg *) 3288ba6a1819Smrg AC_MSG_RESULT([no]) 3289ba6a1819Smrg ;; 3290ba6a1819Smrg esac 3291ba6a1819Smrgfi 3292ba6a1819Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 3293ba6a1819Smrg 3294ba6a1819Smrg 3295ba6a1819Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 3296ba6a1819Smrg# ----------------------------- 3297ba6a1819Smrg# PORTME Fill in your ld.so characteristics 3298ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 3299ba6a1819Smrg[AC_MSG_CHECKING([dynamic linker characteristics]) 3300ba6a1819Smrglibrary_names_spec= 3301ba6a1819Smrglibname_spec='lib$name' 3302ba6a1819Smrgsoname_spec= 3303ba6a1819Smrgshrext_cmds=".so" 3304ba6a1819Smrgpostinstall_cmds= 3305ba6a1819Smrgpostuninstall_cmds= 3306ba6a1819Smrgfinish_cmds= 3307ba6a1819Smrgfinish_eval= 3308ba6a1819Smrgshlibpath_var= 3309ba6a1819Smrgshlibpath_overrides_runpath=unknown 3310ba6a1819Smrgversion_type=none 3311ba6a1819Smrgdynamic_linker="$host_os ld.so" 3312ba6a1819Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 3313ba6a1819Smrgif test "$GCC" = yes; then 3314ba6a1819Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 3315ba6a1819Smrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 3316ba6a1819Smrg # if the path contains ";" then we assume it to be the separator 3317ba6a1819Smrg # otherwise default to the standard path separator (i.e. ":") - it is 3318ba6a1819Smrg # assumed that no part of a normal pathname contains ";" but that should 3319ba6a1819Smrg # okay in the real world where ";" in dirpaths is itself problematic. 3320ba6a1819Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3321ba6a1819Smrg else 3322ba6a1819Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3323ba6a1819Smrg fi 3324ba6a1819Smrgelse 3325ba6a1819Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3326ba6a1819Smrgfi 3327ba6a1819Smrgneed_lib_prefix=unknown 3328ba6a1819Smrghardcode_into_libs=no 3329ba6a1819Smrg 3330ba6a1819Smrg# when you set need_version to no, make sure it does not cause -set_version 3331ba6a1819Smrg# flags to be left without arguments 3332ba6a1819Smrgneed_version=unknown 3333ba6a1819Smrg 3334ba6a1819Smrgcase $host_os in 3335ba6a1819Smrgaix3*) 3336ba6a1819Smrg version_type=linux 3337ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3338ba6a1819Smrg shlibpath_var=LIBPATH 3339ba6a1819Smrg 3340ba6a1819Smrg # AIX 3 has no versioning support, so we append a major version to the name. 3341ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3342ba6a1819Smrg ;; 3343ba6a1819Smrg 3344ba6a1819Smrgaix4* | aix5*) 3345ba6a1819Smrg version_type=linux 3346ba6a1819Smrg need_lib_prefix=no 3347ba6a1819Smrg need_version=no 3348ba6a1819Smrg hardcode_into_libs=yes 3349ba6a1819Smrg if test "$host_cpu" = ia64; then 3350ba6a1819Smrg # AIX 5 supports IA64 3351ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3352ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3353ba6a1819Smrg else 3354ba6a1819Smrg # With GCC up to 2.95.x, collect2 would create an import file 3355ba6a1819Smrg # for dependence libraries. The import file would start with 3356ba6a1819Smrg # the line `#! .'. This would cause the generated library to 3357ba6a1819Smrg # depend on `.', always an invalid library. This was fixed in 3358ba6a1819Smrg # development snapshots of GCC prior to 3.0. 3359ba6a1819Smrg case $host_os in 3360ba6a1819Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 3361ba6a1819Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3362ba6a1819Smrg echo ' yes ' 3363ba6a1819Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 3364ba6a1819Smrg : 3365ba6a1819Smrg else 3366ba6a1819Smrg can_build_shared=no 3367ba6a1819Smrg fi 3368ba6a1819Smrg ;; 3369ba6a1819Smrg esac 3370ba6a1819Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3371ba6a1819Smrg # soname into executable. Probably we can add versioning support to 3372ba6a1819Smrg # collect2, so additional links can be useful in future. 3373ba6a1819Smrg if test "$aix_use_runtimelinking" = yes; then 3374ba6a1819Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3375ba6a1819Smrg # instead of lib<name>.a to let people know that these are not 3376ba6a1819Smrg # typical AIX shared libraries. 3377ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3378ba6a1819Smrg else 3379ba6a1819Smrg # We preserve .a as extension for shared libraries through AIX4.2 3380ba6a1819Smrg # and later when we are not doing run time linking. 3381ba6a1819Smrg library_names_spec='${libname}${release}.a $libname.a' 3382ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3383ba6a1819Smrg fi 3384ba6a1819Smrg shlibpath_var=LIBPATH 3385ba6a1819Smrg fi 3386ba6a1819Smrg ;; 3387ba6a1819Smrg 3388ba6a1819Smrgamigaos*) 3389ba6a1819Smrg library_names_spec='$libname.ixlibrary $libname.a' 3390ba6a1819Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 3391ba6a1819Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 3392ba6a1819Smrg ;; 3393ba6a1819Smrg 3394ba6a1819Smrgbeos*) 3395ba6a1819Smrg library_names_spec='${libname}${shared_ext}' 3396ba6a1819Smrg dynamic_linker="$host_os ld.so" 3397ba6a1819Smrg shlibpath_var=LIBRARY_PATH 3398ba6a1819Smrg ;; 3399ba6a1819Smrg 3400ba6a1819Smrgbsdi[[45]]*) 3401ba6a1819Smrg version_type=linux 3402ba6a1819Smrg need_version=no 3403ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3404ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3405ba6a1819Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3406ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3407ba6a1819Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3408ba6a1819Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3409ba6a1819Smrg # the default ld.so.conf also contains /usr/contrib/lib and 3410ba6a1819Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3411ba6a1819Smrg # libtool to hard-code these into programs 3412ba6a1819Smrg ;; 3413ba6a1819Smrg 3414ba6a1819Smrgcygwin* | mingw* | pw32*) 3415ba6a1819Smrg version_type=windows 3416ba6a1819Smrg shrext_cmds=".dll" 3417ba6a1819Smrg need_version=no 3418ba6a1819Smrg need_lib_prefix=no 3419ba6a1819Smrg 3420ba6a1819Smrg case $GCC,$host_os in 3421ba6a1819Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 3422ba6a1819Smrg library_names_spec='$libname.dll.a' 3423ba6a1819Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 3424ba6a1819Smrg postinstall_cmds='base_file=`basename \${file}`~ 3425ba6a1819Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 3426ba6a1819Smrg dldir=$destdir/`dirname \$dlpath`~ 3427ba6a1819Smrg test -d \$dldir || mkdir -p \$dldir~ 3428ba6a1819Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 3429ba6a1819Smrg chmod a+x \$dldir/$dlname' 3430ba6a1819Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3431ba6a1819Smrg dlpath=$dir/\$dldll~ 3432ba6a1819Smrg $rm \$dlpath' 3433ba6a1819Smrg shlibpath_overrides_runpath=yes 3434ba6a1819Smrg 3435ba6a1819Smrg case $host_os in 3436ba6a1819Smrg cygwin*) 3437ba6a1819Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3438ba6a1819Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3439ba6a1819Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 3440ba6a1819Smrg ;; 3441ba6a1819Smrg mingw*) 3442ba6a1819Smrg # MinGW DLLs use traditional 'lib' prefix 3443ba6a1819Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3444ba6a1819Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 3445ba6a1819Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 3446ba6a1819Smrg # It is most probably a Windows format PATH printed by 3447ba6a1819Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 3448ba6a1819Smrg # path with ; separators, and with drive letters. We can handle the 3449ba6a1819Smrg # drive letters (cygwin fileutils understands them), so leave them, 3450ba6a1819Smrg # especially as we might pass files found there to a mingw objdump, 3451ba6a1819Smrg # which wouldn't understand a cygwinified path. Ahh. 3452ba6a1819Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3453ba6a1819Smrg else 3454ba6a1819Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3455ba6a1819Smrg fi 3456ba6a1819Smrg ;; 3457ba6a1819Smrg pw32*) 3458ba6a1819Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 3459ba6a1819Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3460ba6a1819Smrg ;; 3461ba6a1819Smrg esac 3462ba6a1819Smrg ;; 3463ba6a1819Smrg 3464ba6a1819Smrg *) 3465ba6a1819Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3466ba6a1819Smrg ;; 3467ba6a1819Smrg esac 3468ba6a1819Smrg dynamic_linker='Win32 ld.exe' 3469ba6a1819Smrg # FIXME: first we should search . and the directory the executable is in 3470ba6a1819Smrg shlibpath_var=PATH 3471ba6a1819Smrg ;; 3472ba6a1819Smrg 3473ba6a1819Smrgdarwin* | rhapsody*) 3474ba6a1819Smrg dynamic_linker="$host_os dyld" 3475ba6a1819Smrg version_type=darwin 3476ba6a1819Smrg need_lib_prefix=no 3477ba6a1819Smrg need_version=no 3478ba6a1819Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3479ba6a1819Smrg soname_spec='${libname}${release}${major}$shared_ext' 3480ba6a1819Smrg shlibpath_overrides_runpath=yes 3481ba6a1819Smrg shlibpath_var=DYLD_LIBRARY_PATH 3482ba6a1819Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3483ba6a1819Smrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 3484ba6a1819Smrg if test "$GCC" = yes; then 3485ba6a1819Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` 3486ba6a1819Smrg else 3487ba6a1819Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 3488ba6a1819Smrg fi 3489ba6a1819Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3490ba6a1819Smrg ;; 3491ba6a1819Smrg 3492ba6a1819Smrgdgux*) 3493ba6a1819Smrg version_type=linux 3494ba6a1819Smrg need_lib_prefix=no 3495ba6a1819Smrg need_version=no 3496ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3497ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3498ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3499ba6a1819Smrg ;; 3500ba6a1819Smrg 3501ba6a1819Smrgfreebsd1*) 3502ba6a1819Smrg dynamic_linker=no 3503ba6a1819Smrg ;; 3504ba6a1819Smrg 3505ba6a1819Smrgkfreebsd*-gnu) 3506ba6a1819Smrg version_type=linux 3507ba6a1819Smrg need_lib_prefix=no 3508ba6a1819Smrg need_version=no 3509ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3510ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3511ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3512ba6a1819Smrg shlibpath_overrides_runpath=no 3513ba6a1819Smrg hardcode_into_libs=yes 3514ba6a1819Smrg dynamic_linker='GNU ld.so' 3515ba6a1819Smrg ;; 3516ba6a1819Smrg 3517ba6a1819Smrgfreebsd* | dragonfly*) 3518ba6a1819Smrg # DragonFly does not have aout. When/if they implement a new 3519ba6a1819Smrg # versioning mechanism, adjust this. 3520ba6a1819Smrg if test -x /usr/bin/objformat; then 3521ba6a1819Smrg objformat=`/usr/bin/objformat` 3522ba6a1819Smrg else 3523ba6a1819Smrg case $host_os in 3524ba6a1819Smrg freebsd[[123]]*) objformat=aout ;; 3525ba6a1819Smrg *) objformat=elf ;; 3526ba6a1819Smrg esac 3527ba6a1819Smrg fi 3528ba6a1819Smrg version_type=freebsd-$objformat 3529ba6a1819Smrg case $version_type in 3530ba6a1819Smrg freebsd-elf*) 3531ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3532ba6a1819Smrg need_version=no 3533ba6a1819Smrg need_lib_prefix=no 3534ba6a1819Smrg ;; 3535ba6a1819Smrg freebsd-*) 3536ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3537ba6a1819Smrg need_version=yes 3538ba6a1819Smrg ;; 3539ba6a1819Smrg esac 3540ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3541ba6a1819Smrg case $host_os in 3542ba6a1819Smrg freebsd2*) 3543ba6a1819Smrg shlibpath_overrides_runpath=yes 3544ba6a1819Smrg ;; 3545ba6a1819Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3546ba6a1819Smrg shlibpath_overrides_runpath=yes 3547ba6a1819Smrg hardcode_into_libs=yes 3548ba6a1819Smrg ;; 3549ba6a1819Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3550ba6a1819Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3551ba6a1819Smrg shlibpath_overrides_runpath=no 3552ba6a1819Smrg hardcode_into_libs=yes 3553ba6a1819Smrg ;; 3554ba6a1819Smrg freebsd*) # from 4.6 on 3555ba6a1819Smrg shlibpath_overrides_runpath=yes 3556ba6a1819Smrg hardcode_into_libs=yes 3557ba6a1819Smrg ;; 3558ba6a1819Smrg esac 3559ba6a1819Smrg ;; 3560ba6a1819Smrg 3561ba6a1819Smrggnu*) 3562ba6a1819Smrg version_type=linux 3563ba6a1819Smrg need_lib_prefix=no 3564ba6a1819Smrg need_version=no 3565ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3566ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3567ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3568ba6a1819Smrg hardcode_into_libs=yes 3569ba6a1819Smrg ;; 3570ba6a1819Smrg 3571ba6a1819Smrghpux9* | hpux10* | hpux11*) 3572ba6a1819Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 3573ba6a1819Smrg # link against other versions. 3574ba6a1819Smrg version_type=sunos 3575ba6a1819Smrg need_lib_prefix=no 3576ba6a1819Smrg need_version=no 3577ba6a1819Smrg case $host_cpu in 3578ba6a1819Smrg ia64*) 3579ba6a1819Smrg shrext_cmds='.so' 3580ba6a1819Smrg hardcode_into_libs=yes 3581ba6a1819Smrg dynamic_linker="$host_os dld.so" 3582ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3583ba6a1819Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3584ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3585ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3586ba6a1819Smrg if test "X$HPUX_IA64_MODE" = X32; then 3587ba6a1819Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3588ba6a1819Smrg else 3589ba6a1819Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3590ba6a1819Smrg fi 3591ba6a1819Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3592ba6a1819Smrg ;; 3593ba6a1819Smrg hppa*64*) 3594ba6a1819Smrg shrext_cmds='.sl' 3595ba6a1819Smrg hardcode_into_libs=yes 3596ba6a1819Smrg dynamic_linker="$host_os dld.sl" 3597ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3598ba6a1819Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3599ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3600ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3601ba6a1819Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3602ba6a1819Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3603ba6a1819Smrg ;; 3604ba6a1819Smrg *) 3605ba6a1819Smrg shrext_cmds='.sl' 3606ba6a1819Smrg dynamic_linker="$host_os dld.sl" 3607ba6a1819Smrg shlibpath_var=SHLIB_PATH 3608ba6a1819Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3609ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3610ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3611ba6a1819Smrg ;; 3612ba6a1819Smrg esac 3613ba6a1819Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 3614ba6a1819Smrg postinstall_cmds='chmod 555 $lib' 3615ba6a1819Smrg ;; 3616ba6a1819Smrg 3617ba6a1819Smrginterix3*) 3618ba6a1819Smrg version_type=linux 3619ba6a1819Smrg need_lib_prefix=no 3620ba6a1819Smrg need_version=no 3621ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3622ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3623ba6a1819Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3624ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3625ba6a1819Smrg shlibpath_overrides_runpath=no 3626ba6a1819Smrg hardcode_into_libs=yes 3627ba6a1819Smrg ;; 3628ba6a1819Smrg 3629ba6a1819Smrgirix5* | irix6* | nonstopux*) 3630ba6a1819Smrg case $host_os in 3631ba6a1819Smrg nonstopux*) version_type=nonstopux ;; 3632ba6a1819Smrg *) 3633ba6a1819Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 3634ba6a1819Smrg version_type=linux 3635ba6a1819Smrg else 3636ba6a1819Smrg version_type=irix 3637ba6a1819Smrg fi ;; 3638ba6a1819Smrg esac 3639ba6a1819Smrg need_lib_prefix=no 3640ba6a1819Smrg need_version=no 3641ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3642ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3643ba6a1819Smrg case $host_os in 3644ba6a1819Smrg irix5* | nonstopux*) 3645ba6a1819Smrg libsuff= shlibsuff= 3646ba6a1819Smrg ;; 3647ba6a1819Smrg *) 3648ba6a1819Smrg case $LD in # libtool.m4 will add one of these switches to LD 3649ba6a1819Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3650ba6a1819Smrg libsuff= shlibsuff= libmagic=32-bit;; 3651ba6a1819Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3652ba6a1819Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 3653ba6a1819Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3654ba6a1819Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 3655ba6a1819Smrg *) libsuff= shlibsuff= libmagic=never-match;; 3656ba6a1819Smrg esac 3657ba6a1819Smrg ;; 3658ba6a1819Smrg esac 3659ba6a1819Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3660ba6a1819Smrg shlibpath_overrides_runpath=no 3661ba6a1819Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3662ba6a1819Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3663ba6a1819Smrg hardcode_into_libs=yes 3664ba6a1819Smrg ;; 3665ba6a1819Smrg 3666ba6a1819Smrg# No shared lib support for Linux oldld, aout, or coff. 3667ba6a1819Smrglinux*oldld* | linux*aout* | linux*coff*) 3668ba6a1819Smrg dynamic_linker=no 3669ba6a1819Smrg ;; 3670ba6a1819Smrg 3671ba6a1819Smrg# This must be Linux ELF. 3672ba6a1819Smrglinux*) 3673ba6a1819Smrg version_type=linux 3674ba6a1819Smrg need_lib_prefix=no 3675ba6a1819Smrg need_version=no 3676ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3677ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3678ba6a1819Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3679ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3680ba6a1819Smrg shlibpath_overrides_runpath=no 3681ba6a1819Smrg # This implies no fast_install, which is unacceptable. 3682ba6a1819Smrg # Some rework will be needed to allow for fast_install 3683ba6a1819Smrg # before this can be enabled. 3684ba6a1819Smrg hardcode_into_libs=yes 3685ba6a1819Smrg 3686ba6a1819Smrg # Append ld.so.conf contents to the search path 3687ba6a1819Smrg if test -f /etc/ld.so.conf; then 3688ba6a1819Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 3689ba6a1819Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3690ba6a1819Smrg fi 3691ba6a1819Smrg 3692ba6a1819Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 3693ba6a1819Smrg # powerpc, because MkLinux only supported shared libraries with the 3694ba6a1819Smrg # GNU dynamic linker. Since this was broken with cross compilers, 3695ba6a1819Smrg # most powerpc-linux boxes support dynamic linking these days and 3696ba6a1819Smrg # people can always --disable-shared, the test was removed, and we 3697ba6a1819Smrg # assume the GNU/Linux dynamic linker is in use. 3698ba6a1819Smrg dynamic_linker='GNU/Linux ld.so' 3699ba6a1819Smrg ;; 3700ba6a1819Smrg 3701ba6a1819Smrgknetbsd*-gnu) 3702ba6a1819Smrg version_type=linux 3703ba6a1819Smrg need_lib_prefix=no 3704ba6a1819Smrg need_version=no 3705ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3706ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3707ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3708ba6a1819Smrg shlibpath_overrides_runpath=no 3709ba6a1819Smrg hardcode_into_libs=yes 3710ba6a1819Smrg dynamic_linker='GNU ld.so' 3711ba6a1819Smrg ;; 3712ba6a1819Smrg 3713ba6a1819Smrgnetbsd*) 3714ba6a1819Smrg version_type=sunos 3715ba6a1819Smrg need_lib_prefix=no 3716ba6a1819Smrg need_version=no 3717ba6a1819Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3718ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3719ba6a1819Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3720ba6a1819Smrg dynamic_linker='NetBSD (a.out) ld.so' 3721ba6a1819Smrg else 3722ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3723ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3724ba6a1819Smrg dynamic_linker='NetBSD ld.elf_so' 3725ba6a1819Smrg fi 3726ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3727ba6a1819Smrg shlibpath_overrides_runpath=yes 3728ba6a1819Smrg hardcode_into_libs=yes 3729ba6a1819Smrg ;; 3730ba6a1819Smrg 3731ba6a1819Smrgnewsos6) 3732ba6a1819Smrg version_type=linux 3733ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3734ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3735ba6a1819Smrg shlibpath_overrides_runpath=yes 3736ba6a1819Smrg ;; 3737ba6a1819Smrg 3738ba6a1819Smrgnto-qnx*) 3739ba6a1819Smrg version_type=linux 3740ba6a1819Smrg need_lib_prefix=no 3741ba6a1819Smrg need_version=no 3742ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3743ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3744ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3745ba6a1819Smrg shlibpath_overrides_runpath=yes 3746ba6a1819Smrg ;; 3747ba6a1819Smrg 3748ba6a1819Smrgopenbsd*) 3749ba6a1819Smrg version_type=sunos 3750ba6a1819Smrg sys_lib_dlsearch_path_spec="/usr/lib" 3751ba6a1819Smrg need_lib_prefix=no 3752ba6a1819Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3753ba6a1819Smrg case $host_os in 3754ba6a1819Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3755ba6a1819Smrg *) need_version=no ;; 3756ba6a1819Smrg esac 3757ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3758ba6a1819Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3759ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3760ba6a1819Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3761ba6a1819Smrg case $host_os in 3762ba6a1819Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 3763ba6a1819Smrg shlibpath_overrides_runpath=no 3764ba6a1819Smrg ;; 3765ba6a1819Smrg *) 3766ba6a1819Smrg shlibpath_overrides_runpath=yes 3767ba6a1819Smrg ;; 3768ba6a1819Smrg esac 3769ba6a1819Smrg else 3770ba6a1819Smrg shlibpath_overrides_runpath=yes 3771ba6a1819Smrg fi 3772ba6a1819Smrg ;; 3773ba6a1819Smrg 3774ba6a1819Smrgos2*) 3775ba6a1819Smrg libname_spec='$name' 3776ba6a1819Smrg shrext_cmds=".dll" 3777ba6a1819Smrg need_lib_prefix=no 3778ba6a1819Smrg library_names_spec='$libname${shared_ext} $libname.a' 3779ba6a1819Smrg dynamic_linker='OS/2 ld.exe' 3780ba6a1819Smrg shlibpath_var=LIBPATH 3781ba6a1819Smrg ;; 3782ba6a1819Smrg 3783ba6a1819Smrgosf3* | osf4* | osf5*) 3784ba6a1819Smrg version_type=osf 3785ba6a1819Smrg need_lib_prefix=no 3786ba6a1819Smrg need_version=no 3787ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3788ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3789ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3790ba6a1819Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3791ba6a1819Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3792ba6a1819Smrg ;; 3793ba6a1819Smrg 3794ba6a1819Smrgsolaris*) 3795ba6a1819Smrg version_type=linux 3796ba6a1819Smrg need_lib_prefix=no 3797ba6a1819Smrg need_version=no 3798ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3799ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3800ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3801ba6a1819Smrg shlibpath_overrides_runpath=yes 3802ba6a1819Smrg hardcode_into_libs=yes 3803ba6a1819Smrg # ldd complains unless libraries are executable 3804ba6a1819Smrg postinstall_cmds='chmod +x $lib' 3805ba6a1819Smrg ;; 3806ba6a1819Smrg 3807ba6a1819Smrgsunos4*) 3808ba6a1819Smrg version_type=sunos 3809ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3810ba6a1819Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3811ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3812ba6a1819Smrg shlibpath_overrides_runpath=yes 3813ba6a1819Smrg if test "$with_gnu_ld" = yes; then 3814ba6a1819Smrg need_lib_prefix=no 3815ba6a1819Smrg fi 3816ba6a1819Smrg need_version=yes 3817ba6a1819Smrg ;; 3818ba6a1819Smrg 3819ba6a1819Smrgsysv4 | sysv4.3*) 3820ba6a1819Smrg version_type=linux 3821ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3822ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3823ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3824ba6a1819Smrg case $host_vendor in 3825ba6a1819Smrg sni) 3826ba6a1819Smrg shlibpath_overrides_runpath=no 3827ba6a1819Smrg need_lib_prefix=no 3828ba6a1819Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 3829ba6a1819Smrg runpath_var=LD_RUN_PATH 3830ba6a1819Smrg ;; 3831ba6a1819Smrg siemens) 3832ba6a1819Smrg need_lib_prefix=no 3833ba6a1819Smrg ;; 3834ba6a1819Smrg motorola) 3835ba6a1819Smrg need_lib_prefix=no 3836ba6a1819Smrg need_version=no 3837ba6a1819Smrg shlibpath_overrides_runpath=no 3838ba6a1819Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3839ba6a1819Smrg ;; 3840ba6a1819Smrg esac 3841ba6a1819Smrg ;; 3842ba6a1819Smrg 3843ba6a1819Smrgsysv4*MP*) 3844ba6a1819Smrg if test -d /usr/nec ;then 3845ba6a1819Smrg version_type=linux 3846ba6a1819Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3847ba6a1819Smrg soname_spec='$libname${shared_ext}.$major' 3848ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3849ba6a1819Smrg fi 3850ba6a1819Smrg ;; 3851ba6a1819Smrg 3852ba6a1819Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3853ba6a1819Smrg version_type=freebsd-elf 3854ba6a1819Smrg need_lib_prefix=no 3855ba6a1819Smrg need_version=no 3856ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3857ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3858ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3859ba6a1819Smrg hardcode_into_libs=yes 3860ba6a1819Smrg if test "$with_gnu_ld" = yes; then 3861ba6a1819Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3862ba6a1819Smrg shlibpath_overrides_runpath=no 3863ba6a1819Smrg else 3864ba6a1819Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3865ba6a1819Smrg shlibpath_overrides_runpath=yes 3866ba6a1819Smrg case $host_os in 3867ba6a1819Smrg sco3.2v5*) 3868ba6a1819Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3869ba6a1819Smrg ;; 3870ba6a1819Smrg esac 3871ba6a1819Smrg fi 3872ba6a1819Smrg sys_lib_dlsearch_path_spec='/usr/lib' 3873ba6a1819Smrg ;; 3874ba6a1819Smrg 3875ba6a1819Smrguts4*) 3876ba6a1819Smrg version_type=linux 3877ba6a1819Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3878ba6a1819Smrg soname_spec='${libname}${release}${shared_ext}$major' 3879ba6a1819Smrg shlibpath_var=LD_LIBRARY_PATH 3880ba6a1819Smrg ;; 3881ba6a1819Smrg 3882ba6a1819Smrg*) 3883ba6a1819Smrg dynamic_linker=no 3884ba6a1819Smrg ;; 3885ba6a1819Smrgesac 3886ba6a1819SmrgAC_MSG_RESULT([$dynamic_linker]) 3887ba6a1819Smrgtest "$dynamic_linker" = no && can_build_shared=no 3888ba6a1819Smrg 3889ba6a1819Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3890ba6a1819Smrgif test "$GCC" = yes; then 3891ba6a1819Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3892ba6a1819Smrgfi 3893ba6a1819Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 3894ba6a1819Smrg 3895ba6a1819Smrg 3896ba6a1819Smrg# _LT_AC_TAGCONFIG 3897ba6a1819Smrg# ---------------- 3898ba6a1819SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 3899ba6a1819Smrg[AC_ARG_WITH([tags], 3900ba6a1819Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 3901ba6a1819Smrg [include additional configurations @<:@automatic@:>@])], 3902ba6a1819Smrg [tagnames="$withval"]) 3903ba6a1819Smrg 3904ba6a1819Smrgif test -f "$ltmain" && test -n "$tagnames"; then 3905ba6a1819Smrg if test ! -f "${ofile}"; then 3906ba6a1819Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 3907ba6a1819Smrg fi 3908ba6a1819Smrg 3909ba6a1819Smrg if test -z "$LTCC"; then 3910ba6a1819Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 3911ba6a1819Smrg if test -z "$LTCC"; then 3912ba6a1819Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 3913ba6a1819Smrg else 3914ba6a1819Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 3915ba6a1819Smrg fi 3916ba6a1819Smrg fi 3917ba6a1819Smrg if test -z "$LTCFLAGS"; then 3918ba6a1819Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 3919ba6a1819Smrg fi 3920ba6a1819Smrg 3921ba6a1819Smrg # Extract list of available tagged configurations in $ofile. 3922ba6a1819Smrg # Note that this assumes the entire list is on one line. 3923ba6a1819Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 3924ba6a1819Smrg 3925ba6a1819Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3926ba6a1819Smrg for tagname in $tagnames; do 3927ba6a1819Smrg IFS="$lt_save_ifs" 3928ba6a1819Smrg # Check whether tagname contains only valid characters 3929ba6a1819Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 3930ba6a1819Smrg "") ;; 3931ba6a1819Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 3932ba6a1819Smrg ;; 3933ba6a1819Smrg esac 3934ba6a1819Smrg 3935ba6a1819Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 3936ba6a1819Smrg then 3937ba6a1819Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 3938ba6a1819Smrg fi 3939ba6a1819Smrg 3940ba6a1819Smrg # Update the list of available tags. 3941ba6a1819Smrg if test -n "$tagname"; then 3942ba6a1819Smrg echo appending configuration tag \"$tagname\" to $ofile 3943ba6a1819Smrg 3944ba6a1819Smrg case $tagname in 3945ba6a1819Smrg CXX) 3946ba6a1819Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 3947ba6a1819Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 3948ba6a1819Smrg (test "X$CXX" != "Xg++"))) ; then 3949ba6a1819Smrg AC_LIBTOOL_LANG_CXX_CONFIG 3950ba6a1819Smrg else 3951ba6a1819Smrg tagname="" 3952ba6a1819Smrg fi 3953ba6a1819Smrg ;; 3954ba6a1819Smrg 3955ba6a1819Smrg F77) 3956ba6a1819Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 3957ba6a1819Smrg AC_LIBTOOL_LANG_F77_CONFIG 3958ba6a1819Smrg else 3959ba6a1819Smrg tagname="" 3960ba6a1819Smrg fi 3961ba6a1819Smrg ;; 3962ba6a1819Smrg 3963ba6a1819Smrg GCJ) 3964ba6a1819Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 3965ba6a1819Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 3966ba6a1819Smrg else 3967ba6a1819Smrg tagname="" 3968ba6a1819Smrg fi 3969ba6a1819Smrg ;; 3970ba6a1819Smrg 3971ba6a1819Smrg RC) 3972ba6a1819Smrg AC_LIBTOOL_LANG_RC_CONFIG 3973ba6a1819Smrg ;; 3974ba6a1819Smrg 3975ba6a1819Smrg *) 3976ba6a1819Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 3977ba6a1819Smrg ;; 3978ba6a1819Smrg esac 3979ba6a1819Smrg 3980ba6a1819Smrg # Append the new tag name to the list of available tags. 3981ba6a1819Smrg if test -n "$tagname" ; then 3982ba6a1819Smrg available_tags="$available_tags $tagname" 3983ba6a1819Smrg fi 3984ba6a1819Smrg fi 3985ba6a1819Smrg done 3986ba6a1819Smrg IFS="$lt_save_ifs" 3987ba6a1819Smrg 3988ba6a1819Smrg # Now substitute the updated list of available tags. 3989ba6a1819Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 3990ba6a1819Smrg mv "${ofile}T" "$ofile" 3991ba6a1819Smrg chmod +x "$ofile" 3992ba6a1819Smrg else 3993ba6a1819Smrg rm -f "${ofile}T" 3994ba6a1819Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 3995ba6a1819Smrg fi 3996ba6a1819Smrgfi 3997ba6a1819Smrg])# _LT_AC_TAGCONFIG 3998ba6a1819Smrg 3999ba6a1819Smrg 4000ba6a1819Smrg# AC_LIBTOOL_DLOPEN 4001ba6a1819Smrg# ----------------- 4002ba6a1819Smrg# enable checks for dlopen support 4003ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 4004ba6a1819Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 4005ba6a1819Smrg])# AC_LIBTOOL_DLOPEN 4006ba6a1819Smrg 4007ba6a1819Smrg 4008ba6a1819Smrg# AC_LIBTOOL_WIN32_DLL 4009ba6a1819Smrg# -------------------- 4010ba6a1819Smrg# declare package support for building win32 DLLs 4011ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 4012ba6a1819Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 4013ba6a1819Smrg])# AC_LIBTOOL_WIN32_DLL 4014ba6a1819Smrg 4015ba6a1819Smrg 4016ba6a1819Smrg# AC_ENABLE_SHARED([DEFAULT]) 4017ba6a1819Smrg# --------------------------- 4018ba6a1819Smrg# implement the --enable-shared flag 4019ba6a1819Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 4020ba6a1819SmrgAC_DEFUN([AC_ENABLE_SHARED], 4021ba6a1819Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 4022ba6a1819SmrgAC_ARG_ENABLE([shared], 4023ba6a1819Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 4024ba6a1819Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 4025ba6a1819Smrg [p=${PACKAGE-default} 4026ba6a1819Smrg case $enableval in 4027ba6a1819Smrg yes) enable_shared=yes ;; 4028ba6a1819Smrg no) enable_shared=no ;; 4029ba6a1819Smrg *) 4030ba6a1819Smrg enable_shared=no 4031ba6a1819Smrg # Look at the argument we got. We use all the common list separators. 4032ba6a1819Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 4033ba6a1819Smrg for pkg in $enableval; do 4034ba6a1819Smrg IFS="$lt_save_ifs" 4035ba6a1819Smrg if test "X$pkg" = "X$p"; then 4036ba6a1819Smrg enable_shared=yes 4037ba6a1819Smrg fi 4038ba6a1819Smrg done 4039ba6a1819Smrg IFS="$lt_save_ifs" 4040ba6a1819Smrg ;; 4041ba6a1819Smrg esac], 4042ba6a1819Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 4043ba6a1819Smrg])# AC_ENABLE_SHARED 4044ba6a1819Smrg 4045ba6a1819Smrg 4046ba6a1819Smrg# AC_DISABLE_SHARED 4047ba6a1819Smrg# ----------------- 4048ba6a1819Smrg# set the default shared flag to --disable-shared 4049ba6a1819SmrgAC_DEFUN([AC_DISABLE_SHARED], 4050ba6a1819Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4051ba6a1819SmrgAC_ENABLE_SHARED(no) 4052ba6a1819Smrg])# AC_DISABLE_SHARED 4053ba6a1819Smrg 4054ba6a1819Smrg 4055ba6a1819Smrg# AC_ENABLE_STATIC([DEFAULT]) 4056ba6a1819Smrg# --------------------------- 4057ba6a1819Smrg# implement the --enable-static flag 4058ba6a1819Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 4059ba6a1819SmrgAC_DEFUN([AC_ENABLE_STATIC], 4060ba6a1819Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 4061ba6a1819SmrgAC_ARG_ENABLE([static], 4062ba6a1819Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 4063ba6a1819Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 4064ba6a1819Smrg [p=${PACKAGE-default} 4065ba6a1819Smrg case $enableval in 4066ba6a1819Smrg yes) enable_static=yes ;; 4067ba6a1819Smrg no) enable_static=no ;; 4068ba6a1819Smrg *) 4069ba6a1819Smrg enable_static=no 4070ba6a1819Smrg # Look at the argument we got. We use all the common list separators. 4071ba6a1819Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 4072ba6a1819Smrg for pkg in $enableval; do 4073ba6a1819Smrg IFS="$lt_save_ifs" 4074ba6a1819Smrg if test "X$pkg" = "X$p"; then 4075ba6a1819Smrg enable_static=yes 4076ba6a1819Smrg fi 4077ba6a1819Smrg done 4078ba6a1819Smrg IFS="$lt_save_ifs" 4079ba6a1819Smrg ;; 4080ba6a1819Smrg esac], 4081ba6a1819Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 4082ba6a1819Smrg])# AC_ENABLE_STATIC 4083ba6a1819Smrg 4084ba6a1819Smrg 4085ba6a1819Smrg# AC_DISABLE_STATIC 4086ba6a1819Smrg# ----------------- 4087ba6a1819Smrg# set the default static flag to --disable-static 4088ba6a1819SmrgAC_DEFUN([AC_DISABLE_STATIC], 4089ba6a1819Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4090ba6a1819SmrgAC_ENABLE_STATIC(no) 4091ba6a1819Smrg])# AC_DISABLE_STATIC 4092ba6a1819Smrg 4093ba6a1819Smrg 4094ba6a1819Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 4095ba6a1819Smrg# --------------------------------- 4096ba6a1819Smrg# implement the --enable-fast-install flag 4097ba6a1819Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 4098ba6a1819SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 4099ba6a1819Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 4100ba6a1819SmrgAC_ARG_ENABLE([fast-install], 4101ba6a1819Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 4102ba6a1819Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 4103ba6a1819Smrg [p=${PACKAGE-default} 4104ba6a1819Smrg case $enableval in 4105ba6a1819Smrg yes) enable_fast_install=yes ;; 4106ba6a1819Smrg no) enable_fast_install=no ;; 4107ba6a1819Smrg *) 4108ba6a1819Smrg enable_fast_install=no 4109ba6a1819Smrg # Look at the argument we got. We use all the common list separators. 4110ba6a1819Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 4111ba6a1819Smrg for pkg in $enableval; do 4112ba6a1819Smrg IFS="$lt_save_ifs" 4113ba6a1819Smrg if test "X$pkg" = "X$p"; then 4114ba6a1819Smrg enable_fast_install=yes 4115ba6a1819Smrg fi 4116ba6a1819Smrg done 4117ba6a1819Smrg IFS="$lt_save_ifs" 4118ba6a1819Smrg ;; 4119ba6a1819Smrg esac], 4120ba6a1819Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 4121ba6a1819Smrg])# AC_ENABLE_FAST_INSTALL 4122ba6a1819Smrg 4123ba6a1819Smrg 4124ba6a1819Smrg# AC_DISABLE_FAST_INSTALL 4125ba6a1819Smrg# ----------------------- 4126ba6a1819Smrg# set the default to --disable-fast-install 4127ba6a1819SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 4128ba6a1819Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4129ba6a1819SmrgAC_ENABLE_FAST_INSTALL(no) 4130ba6a1819Smrg])# AC_DISABLE_FAST_INSTALL 4131ba6a1819Smrg 4132ba6a1819Smrg 4133ba6a1819Smrg# AC_LIBTOOL_PICMODE([MODE]) 4134ba6a1819Smrg# -------------------------- 4135ba6a1819Smrg# implement the --with-pic flag 4136ba6a1819Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 4137ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 4138ba6a1819Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4139ba6a1819Smrgpic_mode=ifelse($#,1,$1,default) 4140ba6a1819Smrg])# AC_LIBTOOL_PICMODE 4141ba6a1819Smrg 4142ba6a1819Smrg 4143ba6a1819Smrg# AC_PROG_EGREP 4144ba6a1819Smrg# ------------- 4145ba6a1819Smrg# This is predefined starting with Autoconf 2.54, so this conditional 4146ba6a1819Smrg# definition can be removed once we require Autoconf 2.54 or later. 4147ba6a1819Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 4148ba6a1819Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 4149ba6a1819Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 4150ba6a1819Smrg then ac_cv_prog_egrep='grep -E' 4151ba6a1819Smrg else ac_cv_prog_egrep='egrep' 4152ba6a1819Smrg fi]) 4153ba6a1819Smrg EGREP=$ac_cv_prog_egrep 4154ba6a1819Smrg AC_SUBST([EGREP]) 4155ba6a1819Smrg])]) 4156ba6a1819Smrg 4157ba6a1819Smrg 4158ba6a1819Smrg# AC_PATH_TOOL_PREFIX 4159ba6a1819Smrg# ------------------- 4160ba6a1819Smrg# find a file program which can recognise shared library 4161ba6a1819SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 4162ba6a1819Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 4163ba6a1819SmrgAC_MSG_CHECKING([for $1]) 4164ba6a1819SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 4165ba6a1819Smrg[case $MAGIC_CMD in 4166ba6a1819Smrg[[\\/*] | ?:[\\/]*]) 4167ba6a1819Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4168ba6a1819Smrg ;; 4169ba6a1819Smrg*) 4170ba6a1819Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 4171ba6a1819Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4172ba6a1819Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 4173ba6a1819Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 4174ba6a1819Smrgdnl not every word. This closes a longstanding sh security hole. 4175ba6a1819Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 4176ba6a1819Smrg for ac_dir in $ac_dummy; do 4177ba6a1819Smrg IFS="$lt_save_ifs" 4178ba6a1819Smrg test -z "$ac_dir" && ac_dir=. 4179ba6a1819Smrg if test -f $ac_dir/$1; then 4180ba6a1819Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4181ba6a1819Smrg if test -n "$file_magic_test_file"; then 4182ba6a1819Smrg case $deplibs_check_method in 4183ba6a1819Smrg "file_magic "*) 4184ba6a1819Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 4185ba6a1819Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4186ba6a1819Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4187ba6a1819Smrg $EGREP "$file_magic_regex" > /dev/null; then 4188ba6a1819Smrg : 4189ba6a1819Smrg else 4190ba6a1819Smrg cat <<EOF 1>&2 4191ba6a1819Smrg 4192ba6a1819Smrg*** Warning: the command libtool uses to detect shared libraries, 4193ba6a1819Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 4194ba6a1819Smrg*** The result is that libtool may fail to recognize shared libraries 4195ba6a1819Smrg*** as such. This will affect the creation of libtool libraries that 4196ba6a1819Smrg*** depend on shared libraries, but programs linked with such libtool 4197ba6a1819Smrg*** libraries will work regardless of this problem. Nevertheless, you 4198ba6a1819Smrg*** may want to report the problem to your system manager and/or to 4199ba6a1819Smrg*** bug-libtool@gnu.org 4200ba6a1819Smrg 4201ba6a1819SmrgEOF 4202ba6a1819Smrg fi ;; 4203ba6a1819Smrg esac 4204ba6a1819Smrg fi 4205ba6a1819Smrg break 4206ba6a1819Smrg fi 4207ba6a1819Smrg done 4208ba6a1819Smrg IFS="$lt_save_ifs" 4209ba6a1819Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 4210ba6a1819Smrg ;; 4211ba6a1819Smrgesac]) 4212ba6a1819SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4213ba6a1819Smrgif test -n "$MAGIC_CMD"; then 4214ba6a1819Smrg AC_MSG_RESULT($MAGIC_CMD) 4215ba6a1819Smrgelse 4216ba6a1819Smrg AC_MSG_RESULT(no) 4217ba6a1819Smrgfi 4218ba6a1819Smrg])# AC_PATH_TOOL_PREFIX 4219ba6a1819Smrg 4220ba6a1819Smrg 4221ba6a1819Smrg# AC_PATH_MAGIC 4222ba6a1819Smrg# ------------- 4223ba6a1819Smrg# find a file program which can recognise a shared library 4224ba6a1819SmrgAC_DEFUN([AC_PATH_MAGIC], 4225ba6a1819Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4226ba6a1819Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 4227ba6a1819Smrg if test -n "$ac_tool_prefix"; then 4228ba6a1819Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4229ba6a1819Smrg else 4230ba6a1819Smrg MAGIC_CMD=: 4231ba6a1819Smrg fi 4232ba6a1819Smrgfi 4233ba6a1819Smrg])# AC_PATH_MAGIC 4234ba6a1819Smrg 4235ba6a1819Smrg 4236ba6a1819Smrg# AC_PROG_LD 4237ba6a1819Smrg# ---------- 4238ba6a1819Smrg# find the pathname to the GNU or non-GNU linker 4239ba6a1819SmrgAC_DEFUN([AC_PROG_LD], 4240ba6a1819Smrg[AC_ARG_WITH([gnu-ld], 4241ba6a1819Smrg [AC_HELP_STRING([--with-gnu-ld], 4242ba6a1819Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4243ba6a1819Smrg [test "$withval" = no || with_gnu_ld=yes], 4244ba6a1819Smrg [with_gnu_ld=no]) 4245ba6a1819SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 4246ba6a1819SmrgAC_REQUIRE([AC_PROG_CC])dnl 4247ba6a1819SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 4248ba6a1819SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 4249ba6a1819Smrgac_prog=ld 4250ba6a1819Smrgif test "$GCC" = yes; then 4251ba6a1819Smrg # Check if gcc -print-prog-name=ld gives a path. 4252ba6a1819Smrg AC_MSG_CHECKING([for ld used by $CC]) 4253ba6a1819Smrg case $host in 4254ba6a1819Smrg *-*-mingw*) 4255ba6a1819Smrg # gcc leaves a trailing carriage return which upsets mingw 4256ba6a1819Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4257ba6a1819Smrg *) 4258ba6a1819Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4259ba6a1819Smrg esac 4260ba6a1819Smrg case $ac_prog in 4261ba6a1819Smrg # Accept absolute paths. 4262ba6a1819Smrg [[\\/]]* | ?:[[\\/]]*) 4263ba6a1819Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 4264ba6a1819Smrg # Canonicalize the pathname of ld 4265ba6a1819Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 4266ba6a1819Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 4267ba6a1819Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 4268ba6a1819Smrg done 4269ba6a1819Smrg test -z "$LD" && LD="$ac_prog" 4270ba6a1819Smrg ;; 4271ba6a1819Smrg "") 4272ba6a1819Smrg # If it fails, then pretend we aren't using GCC. 4273ba6a1819Smrg ac_prog=ld 4274ba6a1819Smrg ;; 4275ba6a1819Smrg *) 4276ba6a1819Smrg # If it is relative, then search for the first ld in PATH. 4277ba6a1819Smrg with_gnu_ld=unknown 4278ba6a1819Smrg ;; 4279ba6a1819Smrg esac 4280ba6a1819Smrgelif test "$with_gnu_ld" = yes; then 4281ba6a1819Smrg AC_MSG_CHECKING([for GNU ld]) 4282ba6a1819Smrgelse 4283ba6a1819Smrg AC_MSG_CHECKING([for non-GNU ld]) 4284ba6a1819Smrgfi 4285ba6a1819SmrgAC_CACHE_VAL(lt_cv_path_LD, 4286ba6a1819Smrg[if test -z "$LD"; then 4287ba6a1819Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4288ba6a1819Smrg for ac_dir in $PATH; do 4289ba6a1819Smrg IFS="$lt_save_ifs" 4290ba6a1819Smrg test -z "$ac_dir" && ac_dir=. 4291ba6a1819Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4292ba6a1819Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 4293ba6a1819Smrg # Check to see if the program is GNU ld. I'd rather use --version, 4294ba6a1819Smrg # but apparently some variants of GNU ld only accept -v. 4295ba6a1819Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 4296ba6a1819Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4297ba6a1819Smrg *GNU* | *'with BFD'*) 4298ba6a1819Smrg test "$with_gnu_ld" != no && break 4299ba6a1819Smrg ;; 4300ba6a1819Smrg *) 4301ba6a1819Smrg test "$with_gnu_ld" != yes && break 4302ba6a1819Smrg ;; 4303ba6a1819Smrg esac 4304ba6a1819Smrg fi 4305ba6a1819Smrg done 4306ba6a1819Smrg IFS="$lt_save_ifs" 4307ba6a1819Smrgelse 4308ba6a1819Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 4309ba6a1819Smrgfi]) 4310ba6a1819SmrgLD="$lt_cv_path_LD" 4311ba6a1819Smrgif test -n "$LD"; then 4312ba6a1819Smrg AC_MSG_RESULT($LD) 4313ba6a1819Smrgelse 4314ba6a1819Smrg AC_MSG_RESULT(no) 4315ba6a1819Smrgfi 4316ba6a1819Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4317ba6a1819SmrgAC_PROG_LD_GNU 4318ba6a1819Smrg])# AC_PROG_LD 4319ba6a1819Smrg 4320ba6a1819Smrg 4321ba6a1819Smrg# AC_PROG_LD_GNU 4322ba6a1819Smrg# -------------- 4323ba6a1819SmrgAC_DEFUN([AC_PROG_LD_GNU], 4324ba6a1819Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 4325ba6a1819SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4326ba6a1819Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4327ba6a1819Smrgcase `$LD -v 2>&1 </dev/null` in 4328ba6a1819Smrg*GNU* | *'with BFD'*) 4329ba6a1819Smrg lt_cv_prog_gnu_ld=yes 4330ba6a1819Smrg ;; 4331ba6a1819Smrg*) 4332ba6a1819Smrg lt_cv_prog_gnu_ld=no 4333ba6a1819Smrg ;; 4334ba6a1819Smrgesac]) 4335ba6a1819Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 4336ba6a1819Smrg])# AC_PROG_LD_GNU 4337ba6a1819Smrg 4338ba6a1819Smrg 4339ba6a1819Smrg# AC_PROG_LD_RELOAD_FLAG 4340ba6a1819Smrg# ---------------------- 4341ba6a1819Smrg# find reload flag for linker 4342ba6a1819Smrg# -- PORTME Some linkers may need a different reload flag. 4343ba6a1819SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 4344ba6a1819Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 4345ba6a1819Smrg lt_cv_ld_reload_flag, 4346ba6a1819Smrg [lt_cv_ld_reload_flag='-r']) 4347ba6a1819Smrgreload_flag=$lt_cv_ld_reload_flag 4348ba6a1819Smrgcase $reload_flag in 4349ba6a1819Smrg"" | " "*) ;; 4350ba6a1819Smrg*) reload_flag=" $reload_flag" ;; 4351ba6a1819Smrgesac 4352ba6a1819Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 4353ba6a1819Smrgcase $host_os in 4354ba6a1819Smrg darwin*) 4355ba6a1819Smrg if test "$GCC" = yes; then 4356ba6a1819Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4357ba6a1819Smrg else 4358ba6a1819Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 4359ba6a1819Smrg fi 4360ba6a1819Smrg ;; 4361ba6a1819Smrgesac 4362ba6a1819Smrg])# AC_PROG_LD_RELOAD_FLAG 4363ba6a1819Smrg 4364ba6a1819Smrg 4365ba6a1819Smrg# AC_DEPLIBS_CHECK_METHOD 4366ba6a1819Smrg# ----------------------- 4367ba6a1819Smrg# how to check for library dependencies 4368ba6a1819Smrg# -- PORTME fill in with the dynamic library characteristics 4369ba6a1819SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 4370ba6a1819Smrg[AC_CACHE_CHECK([how to recognise dependent libraries], 4371ba6a1819Smrglt_cv_deplibs_check_method, 4372ba6a1819Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 4373ba6a1819Smrglt_cv_file_magic_test_file= 4374ba6a1819Smrglt_cv_deplibs_check_method='unknown' 4375ba6a1819Smrg# Need to set the preceding variable on all platforms that support 4376ba6a1819Smrg# interlibrary dependencies. 4377ba6a1819Smrg# 'none' -- dependencies not supported. 4378ba6a1819Smrg# `unknown' -- same as none, but documents that we really don't know. 4379ba6a1819Smrg# 'pass_all' -- all dependencies passed with no checks. 4380ba6a1819Smrg# 'test_compile' -- check by making test program. 4381ba6a1819Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 4382ba6a1819Smrg# which responds to the $file_magic_cmd with a given extended regex. 4383ba6a1819Smrg# If you have `file' or equivalent on your system and you're not sure 4384ba6a1819Smrg# whether `pass_all' will *always* work, you probably want this one. 4385ba6a1819Smrg 4386ba6a1819Smrgcase $host_os in 4387ba6a1819Smrgaix4* | aix5*) 4388ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4389ba6a1819Smrg ;; 4390ba6a1819Smrg 4391ba6a1819Smrgbeos*) 4392ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4393ba6a1819Smrg ;; 4394ba6a1819Smrg 4395ba6a1819Smrgbsdi[[45]]*) 4396ba6a1819Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4397ba6a1819Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 4398ba6a1819Smrg lt_cv_file_magic_test_file=/shlib/libc.so 4399ba6a1819Smrg ;; 4400ba6a1819Smrg 4401ba6a1819Smrgcygwin*) 4402ba6a1819Smrg # func_win32_libid is a shell function defined in ltmain.sh 4403ba6a1819Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4404ba6a1819Smrg lt_cv_file_magic_cmd='func_win32_libid' 4405ba6a1819Smrg ;; 4406ba6a1819Smrg 4407ba6a1819Smrgmingw* | pw32*) 4408ba6a1819Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 4409ba6a1819Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 4410ba6a1819Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 4411ba6a1819Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 4412ba6a1819Smrg ;; 4413ba6a1819Smrg 4414ba6a1819Smrgdarwin* | rhapsody*) 4415ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4416ba6a1819Smrg ;; 4417ba6a1819Smrg 4418ba6a1819Smrgfreebsd* | kfreebsd*-gnu | dragonfly*) 4419ba6a1819Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 4420ba6a1819Smrg case $host_cpu in 4421ba6a1819Smrg i*86 ) 4422ba6a1819Smrg # Not sure whether the presence of OpenBSD here was a mistake. 4423ba6a1819Smrg # Let's accept both of them until this is cleared up. 4424ba6a1819Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4425ba6a1819Smrg lt_cv_file_magic_cmd=/usr/bin/file 4426ba6a1819Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4427ba6a1819Smrg ;; 4428ba6a1819Smrg esac 4429ba6a1819Smrg else 4430ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4431ba6a1819Smrg fi 4432ba6a1819Smrg ;; 4433ba6a1819Smrg 4434ba6a1819Smrggnu*) 4435ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4436ba6a1819Smrg ;; 4437ba6a1819Smrg 4438ba6a1819Smrghpux10.20* | hpux11*) 4439ba6a1819Smrg lt_cv_file_magic_cmd=/usr/bin/file 4440ba6a1819Smrg case $host_cpu in 4441ba6a1819Smrg ia64*) 4442ba6a1819Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4443ba6a1819Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4444ba6a1819Smrg ;; 4445ba6a1819Smrg hppa*64*) 4446ba6a1819Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 4447ba6a1819Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4448ba6a1819Smrg ;; 4449ba6a1819Smrg *) 4450ba6a1819Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 4451ba6a1819Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 4452ba6a1819Smrg ;; 4453ba6a1819Smrg esac 4454ba6a1819Smrg ;; 4455ba6a1819Smrg 4456ba6a1819Smrginterix3*) 4457ba6a1819Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4458ba6a1819Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4459ba6a1819Smrg ;; 4460ba6a1819Smrg 4461ba6a1819Smrgirix5* | irix6* | nonstopux*) 4462ba6a1819Smrg case $LD in 4463ba6a1819Smrg *-32|*"-32 ") libmagic=32-bit;; 4464ba6a1819Smrg *-n32|*"-n32 ") libmagic=N32;; 4465ba6a1819Smrg *-64|*"-64 ") libmagic=64-bit;; 4466ba6a1819Smrg *) libmagic=never-match;; 4467ba6a1819Smrg esac 4468ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4469ba6a1819Smrg ;; 4470ba6a1819Smrg 4471ba6a1819Smrg# This must be Linux ELF. 4472ba6a1819Smrglinux*) 4473ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4474ba6a1819Smrg ;; 4475ba6a1819Smrg 4476ba6a1819Smrgnetbsd*) 4477ba6a1819Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 4478ba6a1819Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4479ba6a1819Smrg else 4480ba6a1819Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4481ba6a1819Smrg fi 4482ba6a1819Smrg ;; 4483ba6a1819Smrg 4484ba6a1819Smrgnewos6*) 4485ba6a1819Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4486ba6a1819Smrg lt_cv_file_magic_cmd=/usr/bin/file 4487ba6a1819Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 4488ba6a1819Smrg ;; 4489ba6a1819Smrg 4490ba6a1819Smrgnto-qnx*) 4491ba6a1819Smrg lt_cv_deplibs_check_method=unknown 4492ba6a1819Smrg ;; 4493ba6a1819Smrg 4494ba6a1819Smrgopenbsd*) 4495ba6a1819Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4496ba6a1819Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4497ba6a1819Smrg else 4498ba6a1819Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4499ba6a1819Smrg fi 4500ba6a1819Smrg ;; 4501ba6a1819Smrg 4502ba6a1819Smrgosf3* | osf4* | osf5*) 4503ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4504ba6a1819Smrg ;; 4505ba6a1819Smrg 4506ba6a1819Smrgsolaris*) 4507ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4508ba6a1819Smrg ;; 4509ba6a1819Smrg 4510ba6a1819Smrgsysv4 | sysv4.3*) 4511ba6a1819Smrg case $host_vendor in 4512ba6a1819Smrg motorola) 4513ba6a1819Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' 4514ba6a1819Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4515ba6a1819Smrg ;; 4516ba6a1819Smrg ncr) 4517ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4518ba6a1819Smrg ;; 4519ba6a1819Smrg sequent) 4520ba6a1819Smrg lt_cv_file_magic_cmd='/bin/file' 4521ba6a1819Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4522ba6a1819Smrg ;; 4523ba6a1819Smrg sni) 4524ba6a1819Smrg lt_cv_file_magic_cmd='/bin/file' 4525ba6a1819Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4526ba6a1819Smrg lt_cv_file_magic_test_file=/lib/libc.so 4527ba6a1819Smrg ;; 4528ba6a1819Smrg siemens) 4529ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4530ba6a1819Smrg ;; 4531ba6a1819Smrg pc) 4532ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4533ba6a1819Smrg ;; 4534ba6a1819Smrg esac 4535ba6a1819Smrg ;; 4536ba6a1819Smrg 4537ba6a1819Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4538ba6a1819Smrg lt_cv_deplibs_check_method=pass_all 4539ba6a1819Smrg ;; 4540ba6a1819Smrgesac 4541ba6a1819Smrg]) 4542ba6a1819Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 4543ba6a1819Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 4544ba6a1819Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4545ba6a1819Smrg])# AC_DEPLIBS_CHECK_METHOD 4546ba6a1819Smrg 4547ba6a1819Smrg 4548ba6a1819Smrg# AC_PROG_NM 4549ba6a1819Smrg# ---------- 4550ba6a1819Smrg# find the pathname to a BSD-compatible name lister 4551ba6a1819SmrgAC_DEFUN([AC_PROG_NM], 4552ba6a1819Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 4553ba6a1819Smrg[if test -n "$NM"; then 4554ba6a1819Smrg # Let the user override the test. 4555ba6a1819Smrg lt_cv_path_NM="$NM" 4556ba6a1819Smrgelse 4557ba6a1819Smrg lt_nm_to_check="${ac_tool_prefix}nm" 4558ba6a1819Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4559ba6a1819Smrg lt_nm_to_check="$lt_nm_to_check nm" 4560ba6a1819Smrg fi 4561ba6a1819Smrg for lt_tmp_nm in $lt_nm_to_check; do 4562ba6a1819Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4563ba6a1819Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4564ba6a1819Smrg IFS="$lt_save_ifs" 4565ba6a1819Smrg test -z "$ac_dir" && ac_dir=. 4566ba6a1819Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 4567ba6a1819Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4568ba6a1819Smrg # Check to see if the nm accepts a BSD-compat flag. 4569ba6a1819Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4570ba6a1819Smrg # nm: unknown option "B" ignored 4571ba6a1819Smrg # Tru64's nm complains that /dev/null is an invalid object file 4572ba6a1819Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4573ba6a1819Smrg */dev/null* | *'Invalid file or object type'*) 4574ba6a1819Smrg lt_cv_path_NM="$tmp_nm -B" 4575ba6a1819Smrg break 4576ba6a1819Smrg ;; 4577ba6a1819Smrg *) 4578ba6a1819Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4579ba6a1819Smrg */dev/null*) 4580ba6a1819Smrg lt_cv_path_NM="$tmp_nm -p" 4581ba6a1819Smrg break 4582ba6a1819Smrg ;; 4583ba6a1819Smrg *) 4584ba6a1819Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4585ba6a1819Smrg continue # so that we can try to find one that supports BSD flags 4586ba6a1819Smrg ;; 4587ba6a1819Smrg esac 4588ba6a1819Smrg ;; 4589ba6a1819Smrg esac 4590ba6a1819Smrg fi 4591ba6a1819Smrg done 4592ba6a1819Smrg IFS="$lt_save_ifs" 4593ba6a1819Smrg done 4594ba6a1819Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 4595ba6a1819Smrgfi]) 4596ba6a1819SmrgNM="$lt_cv_path_NM" 4597ba6a1819Smrg])# AC_PROG_NM 4598ba6a1819Smrg 4599ba6a1819Smrg 4600ba6a1819Smrg# AC_CHECK_LIBM 4601ba6a1819Smrg# ------------- 4602ba6a1819Smrg# check for math library 4603ba6a1819SmrgAC_DEFUN([AC_CHECK_LIBM], 4604ba6a1819Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4605ba6a1819SmrgLIBM= 4606ba6a1819Smrgcase $host in 4607ba6a1819Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 4608ba6a1819Smrg # These system don't have libm, or don't need it 4609ba6a1819Smrg ;; 4610ba6a1819Smrg*-ncr-sysv4.3*) 4611ba6a1819Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4612ba6a1819Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4613ba6a1819Smrg ;; 4614ba6a1819Smrg*) 4615ba6a1819Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 4616ba6a1819Smrg ;; 4617ba6a1819Smrgesac 4618ba6a1819Smrg])# AC_CHECK_LIBM 4619ba6a1819Smrg 4620ba6a1819Smrg 4621ba6a1819Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 4622ba6a1819Smrg# ----------------------------------- 4623ba6a1819Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 4624ba6a1819Smrg# LTDLINCL to the include flags for the libltdl header and adds 4625ba6a1819Smrg# --enable-ltdl-convenience to the configure arguments. Note that 4626ba6a1819Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 4627ba6a1819Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 4628ba6a1819Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 4629ba6a1819Smrg# (note the single quotes!). If your package is not flat and you're not 4630ba6a1819Smrg# using automake, define top_builddir and top_srcdir appropriately in 4631ba6a1819Smrg# the Makefiles. 4632ba6a1819SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 4633ba6a1819Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4634ba6a1819Smrg case $enable_ltdl_convenience in 4635ba6a1819Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 4636ba6a1819Smrg "") enable_ltdl_convenience=yes 4637ba6a1819Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 4638ba6a1819Smrg esac 4639ba6a1819Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 4640ba6a1819Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 4641ba6a1819Smrg # For backwards non-gettext consistent compatibility... 4642ba6a1819Smrg INCLTDL="$LTDLINCL" 4643ba6a1819Smrg])# AC_LIBLTDL_CONVENIENCE 4644ba6a1819Smrg 4645ba6a1819Smrg 4646ba6a1819Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 4647ba6a1819Smrg# ----------------------------------- 4648ba6a1819Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 4649ba6a1819Smrg# LTDLINCL to the include flags for the libltdl header and adds 4650ba6a1819Smrg# --enable-ltdl-install to the configure arguments. Note that 4651ba6a1819Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 4652ba6a1819Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 4653ba6a1819Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 4654ba6a1819Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 4655ba6a1819Smrg# flat and you're not using automake, define top_builddir and top_srcdir 4656ba6a1819Smrg# appropriately in the Makefiles. 4657ba6a1819Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 4658ba6a1819SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 4659ba6a1819Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4660ba6a1819Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 4661ba6a1819Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 4662ba6a1819Smrg [if test x"$enable_ltdl_install" = xno; then 4663ba6a1819Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 4664ba6a1819Smrg else 4665ba6a1819Smrg enable_ltdl_install=yes 4666ba6a1819Smrg fi 4667ba6a1819Smrg ]) 4668ba6a1819Smrg if test x"$enable_ltdl_install" = x"yes"; then 4669ba6a1819Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 4670ba6a1819Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 4671ba6a1819Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 4672ba6a1819Smrg else 4673ba6a1819Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 4674ba6a1819Smrg LIBLTDL="-lltdl" 4675ba6a1819Smrg LTDLINCL= 4676ba6a1819Smrg fi 4677ba6a1819Smrg # For backwards non-gettext consistent compatibility... 4678ba6a1819Smrg INCLTDL="$LTDLINCL" 4679ba6a1819Smrg])# AC_LIBLTDL_INSTALLABLE 4680ba6a1819Smrg 4681ba6a1819Smrg 4682ba6a1819Smrg# AC_LIBTOOL_CXX 4683ba6a1819Smrg# -------------- 4684ba6a1819Smrg# enable support for C++ libraries 4685ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_CXX], 4686ba6a1819Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 4687ba6a1819Smrg])# AC_LIBTOOL_CXX 4688ba6a1819Smrg 4689ba6a1819Smrg 4690ba6a1819Smrg# _LT_AC_LANG_CXX 4691ba6a1819Smrg# --------------- 4692ba6a1819SmrgAC_DEFUN([_LT_AC_LANG_CXX], 4693ba6a1819Smrg[AC_REQUIRE([AC_PROG_CXX]) 4694ba6a1819SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 4695ba6a1819Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 4696ba6a1819Smrg])# _LT_AC_LANG_CXX 4697ba6a1819Smrg 4698ba6a1819Smrg# _LT_AC_PROG_CXXCPP 4699ba6a1819Smrg# ------------------ 4700ba6a1819SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 4701ba6a1819Smrg[ 4702ba6a1819SmrgAC_REQUIRE([AC_PROG_CXX]) 4703ba6a1819Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 4704ba6a1819Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 4705ba6a1819Smrg (test "X$CXX" != "Xg++"))) ; then 4706ba6a1819Smrg AC_PROG_CXXCPP 4707ba6a1819Smrgfi 4708ba6a1819Smrg])# _LT_AC_PROG_CXXCPP 4709ba6a1819Smrg 4710ba6a1819Smrg# AC_LIBTOOL_F77 4711ba6a1819Smrg# -------------- 4712ba6a1819Smrg# enable support for Fortran 77 libraries 4713ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_F77], 4714ba6a1819Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 4715ba6a1819Smrg])# AC_LIBTOOL_F77 4716ba6a1819Smrg 4717ba6a1819Smrg 4718ba6a1819Smrg# _LT_AC_LANG_F77 4719ba6a1819Smrg# --------------- 4720ba6a1819SmrgAC_DEFUN([_LT_AC_LANG_F77], 4721ba6a1819Smrg[AC_REQUIRE([AC_PROG_F77]) 4722ba6a1819Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 4723ba6a1819Smrg])# _LT_AC_LANG_F77 4724ba6a1819Smrg 4725ba6a1819Smrg 4726ba6a1819Smrg# AC_LIBTOOL_GCJ 4727ba6a1819Smrg# -------------- 4728ba6a1819Smrg# enable support for GCJ libraries 4729ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 4730ba6a1819Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 4731ba6a1819Smrg])# AC_LIBTOOL_GCJ 4732ba6a1819Smrg 4733ba6a1819Smrg 4734ba6a1819Smrg# _LT_AC_LANG_GCJ 4735ba6a1819Smrg# --------------- 4736ba6a1819SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 4737ba6a1819Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 4738ba6a1819Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 4739ba6a1819Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 4740ba6a1819Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 4741ba6a1819Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 4742ba6a1819Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 4743ba6a1819Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 4744ba6a1819Smrg])# _LT_AC_LANG_GCJ 4745ba6a1819Smrg 4746ba6a1819Smrg 4747ba6a1819Smrg# AC_LIBTOOL_RC 4748ba6a1819Smrg# ------------- 4749ba6a1819Smrg# enable support for Windows resource files 4750ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_RC], 4751ba6a1819Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 4752ba6a1819Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 4753ba6a1819Smrg])# AC_LIBTOOL_RC 4754ba6a1819Smrg 4755ba6a1819Smrg 4756ba6a1819Smrg# AC_LIBTOOL_LANG_C_CONFIG 4757ba6a1819Smrg# ------------------------ 4758ba6a1819Smrg# Ensure that the configuration vars for the C compiler are 4759ba6a1819Smrg# suitably defined. Those variables are subsequently used by 4760ba6a1819Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4761ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 4762ba6a1819SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 4763ba6a1819Smrg[lt_save_CC="$CC" 4764ba6a1819SmrgAC_LANG_PUSH(C) 4765ba6a1819Smrg 4766ba6a1819Smrg# Source file extension for C test sources. 4767ba6a1819Smrgac_ext=c 4768ba6a1819Smrg 4769ba6a1819Smrg# Object file extension for compiled C test sources. 4770ba6a1819Smrgobjext=o 4771ba6a1819Smrg_LT_AC_TAGVAR(objext, $1)=$objext 4772ba6a1819Smrg 4773ba6a1819Smrg# Code to be used in simple compile tests 4774ba6a1819Smrglt_simple_compile_test_code="int some_variable = 0;\n" 4775ba6a1819Smrg 4776ba6a1819Smrg# Code to be used in simple link tests 4777ba6a1819Smrglt_simple_link_test_code='int main(){return(0);}\n' 4778ba6a1819Smrg 4779ba6a1819Smrg_LT_AC_SYS_COMPILER 4780ba6a1819Smrg 4781ba6a1819Smrg# save warnings/boilerplate of simple test code 4782ba6a1819Smrg_LT_COMPILER_BOILERPLATE 4783ba6a1819Smrg_LT_LINKER_BOILERPLATE 4784ba6a1819Smrg 4785ba6a1819SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4786ba6a1819SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4787ba6a1819SmrgAC_LIBTOOL_PROG_CC_C_O($1) 4788ba6a1819SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4789ba6a1819SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4790ba6a1819SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4791ba6a1819SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4792ba6a1819SmrgAC_LIBTOOL_SYS_LIB_STRIP 4793ba6a1819SmrgAC_LIBTOOL_DLOPEN_SELF 4794ba6a1819Smrg 4795ba6a1819Smrg# Report which library types will actually be built 4796ba6a1819SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 4797ba6a1819SmrgAC_MSG_RESULT([$can_build_shared]) 4798ba6a1819Smrg 4799ba6a1819SmrgAC_MSG_CHECKING([whether to build shared libraries]) 4800ba6a1819Smrgtest "$can_build_shared" = "no" && enable_shared=no 4801ba6a1819Smrg 4802ba6a1819Smrg# On AIX, shared libraries and static libraries use the same namespace, and 4803ba6a1819Smrg# are all built from PIC. 4804ba6a1819Smrgcase $host_os in 4805ba6a1819Smrgaix3*) 4806ba6a1819Smrg test "$enable_shared" = yes && enable_static=no 4807ba6a1819Smrg if test -n "$RANLIB"; then 4808ba6a1819Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 4809ba6a1819Smrg postinstall_cmds='$RANLIB $lib' 4810ba6a1819Smrg fi 4811ba6a1819Smrg ;; 4812ba6a1819Smrg 4813ba6a1819Smrgaix4* | aix5*) 4814ba6a1819Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4815ba6a1819Smrg test "$enable_shared" = yes && enable_static=no 4816ba6a1819Smrg fi 4817ba6a1819Smrg ;; 4818ba6a1819Smrgesac 4819ba6a1819SmrgAC_MSG_RESULT([$enable_shared]) 4820ba6a1819Smrg 4821ba6a1819SmrgAC_MSG_CHECKING([whether to build static libraries]) 4822ba6a1819Smrg# Make sure either enable_shared or enable_static is yes. 4823ba6a1819Smrgtest "$enable_shared" = yes || enable_static=yes 4824ba6a1819SmrgAC_MSG_RESULT([$enable_static]) 4825ba6a1819Smrg 4826ba6a1819SmrgAC_LIBTOOL_CONFIG($1) 4827ba6a1819Smrg 4828ba6a1819SmrgAC_LANG_POP 4829ba6a1819SmrgCC="$lt_save_CC" 4830ba6a1819Smrg])# AC_LIBTOOL_LANG_C_CONFIG 4831ba6a1819Smrg 4832ba6a1819Smrg 4833ba6a1819Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 4834ba6a1819Smrg# -------------------------- 4835ba6a1819Smrg# Ensure that the configuration vars for the C compiler are 4836ba6a1819Smrg# suitably defined. Those variables are subsequently used by 4837ba6a1819Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4838ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 4839ba6a1819SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 4840ba6a1819Smrg[AC_LANG_PUSH(C++) 4841ba6a1819SmrgAC_REQUIRE([AC_PROG_CXX]) 4842ba6a1819SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 4843ba6a1819Smrg 4844ba6a1819Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4845ba6a1819Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4846ba6a1819Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 4847ba6a1819Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4848ba6a1819Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4849ba6a1819Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 4850ba6a1819Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4851ba6a1819Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4852ba6a1819Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4853ba6a1819Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4854ba6a1819Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4855ba6a1819Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4856ba6a1819Smrg_LT_AC_TAGVAR(module_cmds, $1)= 4857ba6a1819Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4858ba6a1819Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4859ba6a1819Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4860ba6a1819Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 4861ba6a1819Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4862ba6a1819Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4863ba6a1819Smrg 4864ba6a1819Smrg# Dependencies to place before and after the object being linked: 4865ba6a1819Smrg_LT_AC_TAGVAR(predep_objects, $1)= 4866ba6a1819Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 4867ba6a1819Smrg_LT_AC_TAGVAR(predeps, $1)= 4868ba6a1819Smrg_LT_AC_TAGVAR(postdeps, $1)= 4869ba6a1819Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 4870ba6a1819Smrg 4871ba6a1819Smrg# Source file extension for C++ test sources. 4872ba6a1819Smrgac_ext=cpp 4873ba6a1819Smrg 4874ba6a1819Smrg# Object file extension for compiled C++ test sources. 4875ba6a1819Smrgobjext=o 4876ba6a1819Smrg_LT_AC_TAGVAR(objext, $1)=$objext 4877ba6a1819Smrg 4878ba6a1819Smrg# Code to be used in simple compile tests 4879ba6a1819Smrglt_simple_compile_test_code="int some_variable = 0;\n" 4880ba6a1819Smrg 4881ba6a1819Smrg# Code to be used in simple link tests 4882ba6a1819Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 4883ba6a1819Smrg 4884ba6a1819Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4885ba6a1819Smrg_LT_AC_SYS_COMPILER 4886ba6a1819Smrg 4887ba6a1819Smrg# save warnings/boilerplate of simple test code 4888ba6a1819Smrg_LT_COMPILER_BOILERPLATE 4889ba6a1819Smrg_LT_LINKER_BOILERPLATE 4890ba6a1819Smrg 4891ba6a1819Smrg# Allow CC to be a program name with arguments. 4892ba6a1819Smrglt_save_CC=$CC 4893ba6a1819Smrglt_save_LD=$LD 4894ba6a1819Smrglt_save_GCC=$GCC 4895ba6a1819SmrgGCC=$GXX 4896ba6a1819Smrglt_save_with_gnu_ld=$with_gnu_ld 4897ba6a1819Smrglt_save_path_LD=$lt_cv_path_LD 4898ba6a1819Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 4899ba6a1819Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 4900ba6a1819Smrgelse 4901ba6a1819Smrg $as_unset lt_cv_prog_gnu_ld 4902ba6a1819Smrgfi 4903ba6a1819Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 4904ba6a1819Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 4905ba6a1819Smrgelse 4906ba6a1819Smrg $as_unset lt_cv_path_LD 4907ba6a1819Smrgfi 4908ba6a1819Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 4909ba6a1819SmrgCC=${CXX-"c++"} 4910ba6a1819Smrgcompiler=$CC 4911ba6a1819Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 4912ba6a1819Smrg_LT_CC_BASENAME([$compiler]) 4913ba6a1819Smrg 4914ba6a1819Smrg# We don't want -fno-exception wen compiling C++ code, so set the 4915ba6a1819Smrg# no_builtin_flag separately 4916ba6a1819Smrgif test "$GXX" = yes; then 4917ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4918ba6a1819Smrgelse 4919ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4920ba6a1819Smrgfi 4921ba6a1819Smrg 4922ba6a1819Smrgif test "$GXX" = yes; then 4923ba6a1819Smrg # Set up default GNU C++ configuration 4924ba6a1819Smrg 4925ba6a1819Smrg AC_PROG_LD 4926ba6a1819Smrg 4927ba6a1819Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 4928ba6a1819Smrg # archiving commands below assume that GNU ld is being used. 4929ba6a1819Smrg if test "$with_gnu_ld" = yes; then 4930ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4931ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4932ba6a1819Smrg 4933ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 4934ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4935ba6a1819Smrg 4936ba6a1819Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4937ba6a1819Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 4938ba6a1819Smrg # investigate it a little bit more. (MM) 4939ba6a1819Smrg wlarc='${wl}' 4940ba6a1819Smrg 4941ba6a1819Smrg # ancient GNU ld didn't support --whole-archive et. al. 4942ba6a1819Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 4943ba6a1819Smrg grep 'no-whole-archive' > /dev/null; then 4944ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4945ba6a1819Smrg else 4946ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4947ba6a1819Smrg fi 4948ba6a1819Smrg else 4949ba6a1819Smrg with_gnu_ld=no 4950ba6a1819Smrg wlarc= 4951ba6a1819Smrg 4952ba6a1819Smrg # A generic and very simple default shared library creation 4953ba6a1819Smrg # command for GNU C++ for the case where it uses the native 4954ba6a1819Smrg # linker, instead of GNU ld. If possible, this setting should 4955ba6a1819Smrg # overridden to take advantage of the native linker features on 4956ba6a1819Smrg # the platform it is being used on. 4957ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 4958ba6a1819Smrg fi 4959ba6a1819Smrg 4960ba6a1819Smrg # Commands to make compiler produce verbose output that lists 4961ba6a1819Smrg # what "hidden" libraries, object files and flags are used when 4962ba6a1819Smrg # linking a shared library. 4963ba6a1819Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4964ba6a1819Smrg 4965ba6a1819Smrgelse 4966ba6a1819Smrg GXX=no 4967ba6a1819Smrg with_gnu_ld=no 4968ba6a1819Smrg wlarc= 4969ba6a1819Smrgfi 4970ba6a1819Smrg 4971ba6a1819Smrg# PORTME: fill in a description of your system's C++ link characteristics 4972ba6a1819SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4973ba6a1819Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 4974ba6a1819Smrgcase $host_os in 4975ba6a1819Smrg aix3*) 4976ba6a1819Smrg # FIXME: insert proper C++ library support 4977ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4978ba6a1819Smrg ;; 4979ba6a1819Smrg aix4* | aix5*) 4980ba6a1819Smrg if test "$host_cpu" = ia64; then 4981ba6a1819Smrg # On IA64, the linker does run time linking by default, so we don't 4982ba6a1819Smrg # have to do anything special. 4983ba6a1819Smrg aix_use_runtimelinking=no 4984ba6a1819Smrg exp_sym_flag='-Bexport' 4985ba6a1819Smrg no_entry_flag="" 4986ba6a1819Smrg else 4987ba6a1819Smrg aix_use_runtimelinking=no 4988ba6a1819Smrg 4989ba6a1819Smrg # Test if we are trying to use run time linking or normal 4990ba6a1819Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4991ba6a1819Smrg # need to do runtime linking. 4992ba6a1819Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 4993ba6a1819Smrg for ld_flag in $LDFLAGS; do 4994ba6a1819Smrg case $ld_flag in 4995ba6a1819Smrg *-brtl*) 4996ba6a1819Smrg aix_use_runtimelinking=yes 4997ba6a1819Smrg break 4998ba6a1819Smrg ;; 4999ba6a1819Smrg esac 5000ba6a1819Smrg done 5001ba6a1819Smrg ;; 5002ba6a1819Smrg esac 5003ba6a1819Smrg 5004ba6a1819Smrg exp_sym_flag='-bexport' 5005ba6a1819Smrg no_entry_flag='-bnoentry' 5006ba6a1819Smrg fi 5007ba6a1819Smrg 5008ba6a1819Smrg # When large executables or shared objects are built, AIX ld can 5009ba6a1819Smrg # have problems creating the table of contents. If linking a library 5010ba6a1819Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5011ba6a1819Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5012ba6a1819Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5013ba6a1819Smrg 5014ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 5015ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5016ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5017ba6a1819Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5018ba6a1819Smrg 5019ba6a1819Smrg if test "$GXX" = yes; then 5020ba6a1819Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5021ba6a1819Smrg # We only want to do this on AIX 4.2 and lower, the check 5022ba6a1819Smrg # below for broken collect2 doesn't work under 4.3+ 5023ba6a1819Smrg collect2name=`${CC} -print-prog-name=collect2` 5024ba6a1819Smrg if test -f "$collect2name" && \ 5025ba6a1819Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 5026ba6a1819Smrg then 5027ba6a1819Smrg # We have reworked collect2 5028ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5029ba6a1819Smrg else 5030ba6a1819Smrg # We have old collect2 5031ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5032ba6a1819Smrg # It fails to find uninstalled libraries when the uninstalled 5033ba6a1819Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5034ba6a1819Smrg # to unsupported forces relinking 5035ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5036ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5037ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5038ba6a1819Smrg fi 5039ba6a1819Smrg ;; 5040ba6a1819Smrg esac 5041ba6a1819Smrg shared_flag='-shared' 5042ba6a1819Smrg if test "$aix_use_runtimelinking" = yes; then 5043ba6a1819Smrg shared_flag="$shared_flag "'${wl}-G' 5044ba6a1819Smrg fi 5045ba6a1819Smrg else 5046ba6a1819Smrg # not using gcc 5047ba6a1819Smrg if test "$host_cpu" = ia64; then 5048ba6a1819Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5049ba6a1819Smrg # chokes on -Wl,-G. The following line is correct: 5050ba6a1819Smrg shared_flag='-G' 5051ba6a1819Smrg else 5052ba6a1819Smrg if test "$aix_use_runtimelinking" = yes; then 5053ba6a1819Smrg shared_flag='${wl}-G' 5054ba6a1819Smrg else 5055ba6a1819Smrg shared_flag='${wl}-bM:SRE' 5056ba6a1819Smrg fi 5057ba6a1819Smrg fi 5058ba6a1819Smrg fi 5059ba6a1819Smrg 5060ba6a1819Smrg # It seems that -bexpall does not export symbols beginning with 5061ba6a1819Smrg # underscore (_), so it is better to generate a list of symbols to export. 5062ba6a1819Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5063ba6a1819Smrg if test "$aix_use_runtimelinking" = yes; then 5064ba6a1819Smrg # Warning - without using the other runtime loading flags (-brtl), 5065ba6a1819Smrg # -berok will link without error, but may produce a broken library. 5066ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5067ba6a1819Smrg # Determine the default libpath from the value encoded in an empty executable. 5068ba6a1819Smrg _LT_AC_SYS_LIBPATH_AIX 5069ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5070ba6a1819Smrg 5071ba6a1819Smrg _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5072ba6a1819Smrg else 5073ba6a1819Smrg if test "$host_cpu" = ia64; then 5074ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5075ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5076ba6a1819Smrg _LT_AC_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" 5077ba6a1819Smrg else 5078ba6a1819Smrg # Determine the default libpath from the value encoded in an empty executable. 5079ba6a1819Smrg _LT_AC_SYS_LIBPATH_AIX 5080ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5081ba6a1819Smrg # Warning - without using the other run time loading flags, 5082ba6a1819Smrg # -berok will link without error, but may produce a broken library. 5083ba6a1819Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5084ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5085ba6a1819Smrg # Exported symbols can be pulled into shared objects from archives 5086ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5087ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 5088ba6a1819Smrg # This is similar to how AIX traditionally builds its shared libraries. 5089ba6a1819Smrg _LT_AC_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' 5090ba6a1819Smrg fi 5091ba6a1819Smrg fi 5092ba6a1819Smrg ;; 5093ba6a1819Smrg 5094ba6a1819Smrg beos*) 5095ba6a1819Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5096ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5097ba6a1819Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5098ba6a1819Smrg # support --undefined. This deserves some investigation. FIXME 5099ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5100ba6a1819Smrg else 5101ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5102ba6a1819Smrg fi 5103ba6a1819Smrg ;; 5104ba6a1819Smrg 5105ba6a1819Smrg chorus*) 5106ba6a1819Smrg case $cc_basename in 5107ba6a1819Smrg *) 5108ba6a1819Smrg # FIXME: insert proper C++ library support 5109ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5110ba6a1819Smrg ;; 5111ba6a1819Smrg esac 5112ba6a1819Smrg ;; 5113ba6a1819Smrg 5114ba6a1819Smrg cygwin* | mingw* | pw32*) 5115ba6a1819Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5116ba6a1819Smrg # as there is no search path for DLLs. 5117ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5118ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5119ba6a1819Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 5120ba6a1819Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5121ba6a1819Smrg 5122ba6a1819Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5123ba6a1819Smrg _LT_AC_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' 5124ba6a1819Smrg # If the export-symbols file already is a .def file (1st line 5125ba6a1819Smrg # is EXPORTS), use it as is; otherwise, prepend... 5126ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5127ba6a1819Smrg cp $export_symbols $output_objdir/$soname.def; 5128ba6a1819Smrg else 5129ba6a1819Smrg echo EXPORTS > $output_objdir/$soname.def; 5130ba6a1819Smrg cat $export_symbols >> $output_objdir/$soname.def; 5131ba6a1819Smrg fi~ 5132ba6a1819Smrg $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' 5133ba6a1819Smrg else 5134ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5135ba6a1819Smrg fi 5136ba6a1819Smrg ;; 5137ba6a1819Smrg darwin* | rhapsody*) 5138ba6a1819Smrg case $host_os in 5139ba6a1819Smrg rhapsody* | darwin1.[[012]]) 5140ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 5141ba6a1819Smrg ;; 5142ba6a1819Smrg *) # Darwin 1.3 on 5143ba6a1819Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 5144ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5145ba6a1819Smrg else 5146ba6a1819Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 5147ba6a1819Smrg 10.[[012]]) 5148ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5149ba6a1819Smrg ;; 5150ba6a1819Smrg 10.*) 5151ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 5152ba6a1819Smrg ;; 5153ba6a1819Smrg esac 5154ba6a1819Smrg fi 5155ba6a1819Smrg ;; 5156ba6a1819Smrg esac 5157ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5158ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5159ba6a1819Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 5160ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5161ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 5162ba6a1819Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5163ba6a1819Smrg 5164ba6a1819Smrg if test "$GXX" = yes ; then 5165ba6a1819Smrg lt_int_apple_cc_single_mod=no 5166ba6a1819Smrg output_verbose_link_cmd='echo' 5167ba6a1819Smrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 5168ba6a1819Smrg lt_int_apple_cc_single_mod=yes 5169ba6a1819Smrg fi 5170ba6a1819Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 5171ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 5172ba6a1819Smrg else 5173ba6a1819Smrg _LT_AC_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' 5174ba6a1819Smrg fi 5175ba6a1819Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5176ba6a1819Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5177ba6a1819Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 5178ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 5179ba6a1819Smrg else 5180ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 5181ba6a1819Smrg fi 5182ba6a1819Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 5183ba6a1819Smrg else 5184ba6a1819Smrg case $cc_basename in 5185ba6a1819Smrg xlc*) 5186ba6a1819Smrg output_verbose_link_cmd='echo' 5187ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 5188ba6a1819Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5189ba6a1819Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5190ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 5191ba6a1819Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 5192ba6a1819Smrg ;; 5193ba6a1819Smrg *) 5194ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5195ba6a1819Smrg ;; 5196ba6a1819Smrg esac 5197ba6a1819Smrg fi 5198ba6a1819Smrg ;; 5199ba6a1819Smrg 5200ba6a1819Smrg dgux*) 5201ba6a1819Smrg case $cc_basename in 5202ba6a1819Smrg ec++*) 5203ba6a1819Smrg # FIXME: insert proper C++ library support 5204ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5205ba6a1819Smrg ;; 5206ba6a1819Smrg ghcx*) 5207ba6a1819Smrg # Green Hills C++ Compiler 5208ba6a1819Smrg # FIXME: insert proper C++ library support 5209ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5210ba6a1819Smrg ;; 5211ba6a1819Smrg *) 5212ba6a1819Smrg # FIXME: insert proper C++ library support 5213ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5214ba6a1819Smrg ;; 5215ba6a1819Smrg esac 5216ba6a1819Smrg ;; 5217ba6a1819Smrg freebsd[[12]]*) 5218ba6a1819Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 5219ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5220ba6a1819Smrg ;; 5221ba6a1819Smrg freebsd-elf*) 5222ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5223ba6a1819Smrg ;; 5224ba6a1819Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 5225ba6a1819Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 5226ba6a1819Smrg # conventions 5227ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5228ba6a1819Smrg ;; 5229ba6a1819Smrg gnu*) 5230ba6a1819Smrg ;; 5231ba6a1819Smrg hpux9*) 5232ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5233ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5234ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5235ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5236ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5237ba6a1819Smrg # but as the default 5238ba6a1819Smrg # location of the library. 5239ba6a1819Smrg 5240ba6a1819Smrg case $cc_basename in 5241ba6a1819Smrg CC*) 5242ba6a1819Smrg # FIXME: insert proper C++ library support 5243ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5244ba6a1819Smrg ;; 5245ba6a1819Smrg aCC*) 5246ba6a1819Smrg _LT_AC_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' 5247ba6a1819Smrg # Commands to make compiler produce verbose output that lists 5248ba6a1819Smrg # what "hidden" libraries, object files and flags are used when 5249ba6a1819Smrg # linking a shared library. 5250ba6a1819Smrg # 5251ba6a1819Smrg # There doesn't appear to be a way to prevent this compiler from 5252ba6a1819Smrg # explicitly linking system object files so we need to strip them 5253ba6a1819Smrg # from the output so that they don't get included in the library 5254ba6a1819Smrg # dependencies. 5255ba6a1819Smrg 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; echo $list' 5256ba6a1819Smrg ;; 5257ba6a1819Smrg *) 5258ba6a1819Smrg if test "$GXX" = yes; then 5259ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' 5260ba6a1819Smrg else 5261ba6a1819Smrg # FIXME: insert proper C++ library support 5262ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5263ba6a1819Smrg fi 5264ba6a1819Smrg ;; 5265ba6a1819Smrg esac 5266ba6a1819Smrg ;; 5267ba6a1819Smrg hpux10*|hpux11*) 5268ba6a1819Smrg if test $with_gnu_ld = no; then 5269ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5270ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5271ba6a1819Smrg 5272ba6a1819Smrg case $host_cpu in 5273ba6a1819Smrg hppa*64*|ia64*) 5274ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5275ba6a1819Smrg ;; 5276ba6a1819Smrg *) 5277ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5278ba6a1819Smrg ;; 5279ba6a1819Smrg esac 5280ba6a1819Smrg fi 5281ba6a1819Smrg case $host_cpu in 5282ba6a1819Smrg hppa*64*|ia64*) 5283ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5284ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5285ba6a1819Smrg ;; 5286ba6a1819Smrg *) 5287ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5288ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5289ba6a1819Smrg # but as the default 5290ba6a1819Smrg # location of the library. 5291ba6a1819Smrg ;; 5292ba6a1819Smrg esac 5293ba6a1819Smrg 5294ba6a1819Smrg case $cc_basename in 5295ba6a1819Smrg CC*) 5296ba6a1819Smrg # FIXME: insert proper C++ library support 5297ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5298ba6a1819Smrg ;; 5299ba6a1819Smrg aCC*) 5300ba6a1819Smrg case $host_cpu in 5301ba6a1819Smrg hppa*64*) 5302ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5303ba6a1819Smrg ;; 5304ba6a1819Smrg ia64*) 5305ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5306ba6a1819Smrg ;; 5307ba6a1819Smrg *) 5308ba6a1819Smrg _LT_AC_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' 5309ba6a1819Smrg ;; 5310ba6a1819Smrg esac 5311ba6a1819Smrg # Commands to make compiler produce verbose output that lists 5312ba6a1819Smrg # what "hidden" libraries, object files and flags are used when 5313ba6a1819Smrg # linking a shared library. 5314ba6a1819Smrg # 5315ba6a1819Smrg # There doesn't appear to be a way to prevent this compiler from 5316ba6a1819Smrg # explicitly linking system object files so we need to strip them 5317ba6a1819Smrg # from the output so that they don't get included in the library 5318ba6a1819Smrg # dependencies. 5319ba6a1819Smrg 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; echo $list' 5320ba6a1819Smrg ;; 5321ba6a1819Smrg *) 5322ba6a1819Smrg if test "$GXX" = yes; then 5323ba6a1819Smrg if test $with_gnu_ld = no; then 5324ba6a1819Smrg case $host_cpu in 5325ba6a1819Smrg hppa*64*) 5326ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5327ba6a1819Smrg ;; 5328ba6a1819Smrg ia64*) 5329ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5330ba6a1819Smrg ;; 5331ba6a1819Smrg *) 5332ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5333ba6a1819Smrg ;; 5334ba6a1819Smrg esac 5335ba6a1819Smrg fi 5336ba6a1819Smrg else 5337ba6a1819Smrg # FIXME: insert proper C++ library support 5338ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5339ba6a1819Smrg fi 5340ba6a1819Smrg ;; 5341ba6a1819Smrg esac 5342ba6a1819Smrg ;; 5343ba6a1819Smrg interix3*) 5344ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 5345ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5346ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5347ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5348ba6a1819Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5349ba6a1819Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5350ba6a1819Smrg # default) and relocated if they conflict, which is a slow very memory 5351ba6a1819Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5352ba6a1819Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5353ba6a1819Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5354ba6a1819Smrg _LT_AC_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' 5355ba6a1819Smrg _LT_AC_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' 5356ba6a1819Smrg ;; 5357ba6a1819Smrg irix5* | irix6*) 5358ba6a1819Smrg case $cc_basename in 5359ba6a1819Smrg CC*) 5360ba6a1819Smrg # SGI C++ 5361ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 5362ba6a1819Smrg 5363ba6a1819Smrg # Archives containing C++ object files must be created using 5364ba6a1819Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 5365ba6a1819Smrg # necessary to make sure instantiated templates are included 5366ba6a1819Smrg # in the archive. 5367ba6a1819Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 5368ba6a1819Smrg ;; 5369ba6a1819Smrg *) 5370ba6a1819Smrg if test "$GXX" = yes; then 5371ba6a1819Smrg if test "$with_gnu_ld" = no; then 5372ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5373ba6a1819Smrg else 5374ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' 5375ba6a1819Smrg fi 5376ba6a1819Smrg fi 5377ba6a1819Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5378ba6a1819Smrg ;; 5379ba6a1819Smrg esac 5380ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5381ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5382ba6a1819Smrg ;; 5383ba6a1819Smrg linux*) 5384ba6a1819Smrg case $cc_basename in 5385ba6a1819Smrg KCC*) 5386ba6a1819Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5387ba6a1819Smrg 5388ba6a1819Smrg # KCC will only create a shared library if the output file 5389ba6a1819Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5390ba6a1819Smrg # to its proper name (with version) after linking. 5391ba6a1819Smrg _LT_AC_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' 5392ba6a1819Smrg _LT_AC_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' 5393ba6a1819Smrg # Commands to make compiler produce verbose output that lists 5394ba6a1819Smrg # what "hidden" libraries, object files and flags are used when 5395ba6a1819Smrg # linking a shared library. 5396ba6a1819Smrg # 5397ba6a1819Smrg # There doesn't appear to be a way to prevent this compiler from 5398ba6a1819Smrg # explicitly linking system object files so we need to strip them 5399ba6a1819Smrg # from the output so that they don't get included in the library 5400ba6a1819Smrg # dependencies. 5401ba6a1819Smrg 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; echo $list' 5402ba6a1819Smrg 5403ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 5404ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5405ba6a1819Smrg 5406ba6a1819Smrg # Archives containing C++ object files must be created using 5407ba6a1819Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5408ba6a1819Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5409ba6a1819Smrg ;; 5410ba6a1819Smrg icpc*) 5411ba6a1819Smrg # Intel C++ 5412ba6a1819Smrg with_gnu_ld=yes 5413ba6a1819Smrg # version 8.0 and above of icpc choke on multiply defined symbols 5414ba6a1819Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 5415ba6a1819Smrg # earlier do not add the objects themselves. 5416ba6a1819Smrg case `$CC -V 2>&1` in 5417ba6a1819Smrg *"Version 7."*) 5418ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5419ba6a1819Smrg _LT_AC_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' 5420ba6a1819Smrg ;; 5421ba6a1819Smrg *) # Version 8.0 or newer 5422ba6a1819Smrg tmp_idyn= 5423ba6a1819Smrg case $host_cpu in 5424ba6a1819Smrg ia64*) tmp_idyn=' -i_dynamic';; 5425ba6a1819Smrg esac 5426ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5427ba6a1819Smrg _LT_AC_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' 5428ba6a1819Smrg ;; 5429ba6a1819Smrg esac 5430ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5431ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5432ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5433ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5434ba6a1819Smrg ;; 5435ba6a1819Smrg pgCC*) 5436ba6a1819Smrg # Portland Group C++ compiler 5437ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5438ba6a1819Smrg _LT_AC_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' 5439ba6a1819Smrg 5440ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5441ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5442ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 5443ba6a1819Smrg ;; 5444ba6a1819Smrg cxx*) 5445ba6a1819Smrg # Compaq C++ 5446ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5447ba6a1819Smrg _LT_AC_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' 5448ba6a1819Smrg 5449ba6a1819Smrg runpath_var=LD_RUN_PATH 5450ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5451ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5452ba6a1819Smrg 5453ba6a1819Smrg # Commands to make compiler produce verbose output that lists 5454ba6a1819Smrg # what "hidden" libraries, object files and flags are used when 5455ba6a1819Smrg # linking a shared library. 5456ba6a1819Smrg # 5457ba6a1819Smrg # There doesn't appear to be a way to prevent this compiler from 5458ba6a1819Smrg # explicitly linking system object files so we need to strip them 5459ba6a1819Smrg # from the output so that they don't get included in the library 5460ba6a1819Smrg # dependencies. 5461ba6a1819Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' 5462ba6a1819Smrg ;; 5463ba6a1819Smrg esac 5464ba6a1819Smrg ;; 5465ba6a1819Smrg lynxos*) 5466ba6a1819Smrg # FIXME: insert proper C++ library support 5467ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5468ba6a1819Smrg ;; 5469ba6a1819Smrg m88k*) 5470ba6a1819Smrg # FIXME: insert proper C++ library support 5471ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5472ba6a1819Smrg ;; 5473ba6a1819Smrg mvs*) 5474ba6a1819Smrg case $cc_basename in 5475ba6a1819Smrg cxx*) 5476ba6a1819Smrg # FIXME: insert proper C++ library support 5477ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5478ba6a1819Smrg ;; 5479ba6a1819Smrg *) 5480ba6a1819Smrg # FIXME: insert proper C++ library support 5481ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5482ba6a1819Smrg ;; 5483ba6a1819Smrg esac 5484ba6a1819Smrg ;; 5485ba6a1819Smrg netbsd*) 5486ba6a1819Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5487ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 5488ba6a1819Smrg wlarc= 5489ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5490ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5491ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5492ba6a1819Smrg fi 5493ba6a1819Smrg # Workaround some broken pre-1.5 toolchains 5494ba6a1819Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 5495ba6a1819Smrg ;; 5496ba6a1819Smrg openbsd2*) 5497ba6a1819Smrg # C++ shared libraries are fairly broken 5498ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5499ba6a1819Smrg ;; 5500ba6a1819Smrg openbsd*) 5501ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5502ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5503ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5504ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5505ba6a1819Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5506ba6a1819Smrg _LT_AC_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' 5507ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5508ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5509ba6a1819Smrg fi 5510ba6a1819Smrg output_verbose_link_cmd='echo' 5511ba6a1819Smrg ;; 5512ba6a1819Smrg osf3*) 5513ba6a1819Smrg case $cc_basename in 5514ba6a1819Smrg KCC*) 5515ba6a1819Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5516ba6a1819Smrg 5517ba6a1819Smrg # KCC will only create a shared library if the output file 5518ba6a1819Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5519ba6a1819Smrg # to its proper name (with version) after linking. 5520ba6a1819Smrg _LT_AC_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' 5521ba6a1819Smrg 5522ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5523ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5524ba6a1819Smrg 5525ba6a1819Smrg # Archives containing C++ object files must be created using 5526ba6a1819Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5527ba6a1819Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5528ba6a1819Smrg 5529ba6a1819Smrg ;; 5530ba6a1819Smrg RCC*) 5531ba6a1819Smrg # Rational C++ 2.4.1 5532ba6a1819Smrg # FIXME: insert proper C++ library support 5533ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5534ba6a1819Smrg ;; 5535ba6a1819Smrg cxx*) 5536ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5537ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 5538ba6a1819Smrg 5539ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5540ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5541ba6a1819Smrg 5542ba6a1819Smrg # Commands to make compiler produce verbose output that lists 5543ba6a1819Smrg # what "hidden" libraries, object files and flags are used when 5544ba6a1819Smrg # linking a shared library. 5545ba6a1819Smrg # 5546ba6a1819Smrg # There doesn't appear to be a way to prevent this compiler from 5547ba6a1819Smrg # explicitly linking system object files so we need to strip them 5548ba6a1819Smrg # from the output so that they don't get included in the library 5549ba6a1819Smrg # dependencies. 5550ba6a1819Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' 5551ba6a1819Smrg ;; 5552ba6a1819Smrg *) 5553ba6a1819Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 5554ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5555ba6a1819Smrg _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5556ba6a1819Smrg 5557ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5558ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5559ba6a1819Smrg 5560ba6a1819Smrg # Commands to make compiler produce verbose output that lists 5561ba6a1819Smrg # what "hidden" libraries, object files and flags are used when 5562ba6a1819Smrg # linking a shared library. 5563ba6a1819Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 5564ba6a1819Smrg 5565ba6a1819Smrg else 5566ba6a1819Smrg # FIXME: insert proper C++ library support 5567ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5568ba6a1819Smrg fi 5569ba6a1819Smrg ;; 5570ba6a1819Smrg esac 5571ba6a1819Smrg ;; 5572ba6a1819Smrg osf4* | osf5*) 5573ba6a1819Smrg case $cc_basename in 5574ba6a1819Smrg KCC*) 5575ba6a1819Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5576ba6a1819Smrg 5577ba6a1819Smrg # KCC will only create a shared library if the output file 5578ba6a1819Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5579ba6a1819Smrg # to its proper name (with version) after linking. 5580ba6a1819Smrg _LT_AC_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' 5581ba6a1819Smrg 5582ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5583ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5584ba6a1819Smrg 5585ba6a1819Smrg # Archives containing C++ object files must be created using 5586ba6a1819Smrg # the KAI C++ compiler. 5587ba6a1819Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 5588ba6a1819Smrg ;; 5589ba6a1819Smrg RCC*) 5590ba6a1819Smrg # Rational C++ 2.4.1 5591ba6a1819Smrg # FIXME: insert proper C++ library support 5592ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5593ba6a1819Smrg ;; 5594ba6a1819Smrg cxx*) 5595ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5596ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 5597ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 5598ba6a1819Smrg echo "-hidden">> $lib.exp~ 5599ba6a1819Smrg $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~ 5600ba6a1819Smrg $rm $lib.exp' 5601ba6a1819Smrg 5602ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5603ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5604ba6a1819Smrg 5605ba6a1819Smrg # Commands to make compiler produce verbose output that lists 5606ba6a1819Smrg # what "hidden" libraries, object files and flags are used when 5607ba6a1819Smrg # linking a shared library. 5608ba6a1819Smrg # 5609ba6a1819Smrg # There doesn't appear to be a way to prevent this compiler from 5610ba6a1819Smrg # explicitly linking system object files so we need to strip them 5611ba6a1819Smrg # from the output so that they don't get included in the library 5612ba6a1819Smrg # dependencies. 5613ba6a1819Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' 5614ba6a1819Smrg ;; 5615ba6a1819Smrg *) 5616ba6a1819Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 5617ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5618ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5619ba6a1819Smrg 5620ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5621ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5622ba6a1819Smrg 5623ba6a1819Smrg # Commands to make compiler produce verbose output that lists 5624ba6a1819Smrg # what "hidden" libraries, object files and flags are used when 5625ba6a1819Smrg # linking a shared library. 5626ba6a1819Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 5627ba6a1819Smrg 5628ba6a1819Smrg else 5629ba6a1819Smrg # FIXME: insert proper C++ library support 5630ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5631ba6a1819Smrg fi 5632ba6a1819Smrg ;; 5633ba6a1819Smrg esac 5634ba6a1819Smrg ;; 5635ba6a1819Smrg psos*) 5636ba6a1819Smrg # FIXME: insert proper C++ library support 5637ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5638ba6a1819Smrg ;; 5639ba6a1819Smrg sunos4*) 5640ba6a1819Smrg case $cc_basename in 5641ba6a1819Smrg CC*) 5642ba6a1819Smrg # Sun C++ 4.x 5643ba6a1819Smrg # FIXME: insert proper C++ library support 5644ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5645ba6a1819Smrg ;; 5646ba6a1819Smrg lcc*) 5647ba6a1819Smrg # Lucid 5648ba6a1819Smrg # FIXME: insert proper C++ library support 5649ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5650ba6a1819Smrg ;; 5651ba6a1819Smrg *) 5652ba6a1819Smrg # FIXME: insert proper C++ library support 5653ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5654ba6a1819Smrg ;; 5655ba6a1819Smrg esac 5656ba6a1819Smrg ;; 5657ba6a1819Smrg solaris*) 5658ba6a1819Smrg case $cc_basename in 5659ba6a1819Smrg CC*) 5660ba6a1819Smrg # Sun C++ 4.2, 5.x and Centerline C++ 5661ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 5662ba6a1819Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 5663ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5664ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5665ba6a1819Smrg $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' 5666ba6a1819Smrg 5667ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5668ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5669ba6a1819Smrg case $host_os in 5670ba6a1819Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5671ba6a1819Smrg *) 5672ba6a1819Smrg # The C++ compiler is used as linker so we must use $wl 5673ba6a1819Smrg # flag to pass the commands to the underlying system 5674ba6a1819Smrg # linker. We must also pass each convience library through 5675ba6a1819Smrg # to the system linker between allextract/defaultextract. 5676ba6a1819Smrg # The C++ compiler will combine linker options so we 5677ba6a1819Smrg # cannot just pass the convience library names through 5678ba6a1819Smrg # without $wl. 5679ba6a1819Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5680ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' 5681ba6a1819Smrg ;; 5682ba6a1819Smrg esac 5683ba6a1819Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5684ba6a1819Smrg 5685ba6a1819Smrg output_verbose_link_cmd='echo' 5686ba6a1819Smrg 5687ba6a1819Smrg # Archives containing C++ object files must be created using 5688ba6a1819Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 5689ba6a1819Smrg # necessary to make sure instantiated templates are included 5690ba6a1819Smrg # in the archive. 5691ba6a1819Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 5692ba6a1819Smrg ;; 5693ba6a1819Smrg gcx*) 5694ba6a1819Smrg # Green Hills C++ Compiler 5695ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 5696ba6a1819Smrg 5697ba6a1819Smrg # The C++ compiler must be used to create the archive. 5698ba6a1819Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 5699ba6a1819Smrg ;; 5700ba6a1819Smrg *) 5701ba6a1819Smrg # GNU C++ compiler with Solaris linker 5702ba6a1819Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 5703ba6a1819Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 5704ba6a1819Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 5705ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 5706ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5707ba6a1819Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 5708ba6a1819Smrg 5709ba6a1819Smrg # Commands to make compiler produce verbose output that lists 5710ba6a1819Smrg # what "hidden" libraries, object files and flags are used when 5711ba6a1819Smrg # linking a shared library. 5712ba6a1819Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 5713ba6a1819Smrg else 5714ba6a1819Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 5715ba6a1819Smrg # platform. 5716ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 5717ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5718ba6a1819Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 5719ba6a1819Smrg 5720ba6a1819Smrg # Commands to make compiler produce verbose output that lists 5721ba6a1819Smrg # what "hidden" libraries, object files and flags are used when 5722ba6a1819Smrg # linking a shared library. 5723ba6a1819Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 5724ba6a1819Smrg fi 5725ba6a1819Smrg 5726ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 5727ba6a1819Smrg fi 5728ba6a1819Smrg ;; 5729ba6a1819Smrg esac 5730ba6a1819Smrg ;; 5731ba6a1819Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5732ba6a1819Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5733ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5734ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5735ba6a1819Smrg runpath_var='LD_RUN_PATH' 5736ba6a1819Smrg 5737ba6a1819Smrg case $cc_basename in 5738ba6a1819Smrg CC*) 5739ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5740ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5741ba6a1819Smrg ;; 5742ba6a1819Smrg *) 5743ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5744ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5745ba6a1819Smrg ;; 5746ba6a1819Smrg esac 5747ba6a1819Smrg ;; 5748ba6a1819Smrg sysv5* | sco3.2v5* | sco5v6*) 5749ba6a1819Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5750ba6a1819Smrg # link with -lc, and that would cause any symbols used from libc to 5751ba6a1819Smrg # always be unresolved, which means just about no library would 5752ba6a1819Smrg # ever link correctly. If we're not using GNU ld we use -z text 5753ba6a1819Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5754ba6a1819Smrg # as -z defs. 5755ba6a1819Smrg # For security reasons, it is highly recommended that you always 5756ba6a1819Smrg # use absolute paths for naming shared libraries, and exclude the 5757ba6a1819Smrg # DT_RUNPATH tag from executables and libraries. But doing so 5758ba6a1819Smrg # requires that you compile everything twice, which is a pain. 5759ba6a1819Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 5760ba6a1819Smrg # non-empty value in the environment. Most likely only useful for 5761ba6a1819Smrg # creating official distributions of packages. 5762ba6a1819Smrg # This is a hack until libtool officially supports absolute path 5763ba6a1819Smrg # names for shared libraries. 5764ba6a1819Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5765ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5766ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5767ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5768ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 5769ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5770ba6a1819Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5771ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5772ba6a1819Smrg runpath_var='LD_RUN_PATH' 5773ba6a1819Smrg 5774ba6a1819Smrg case $cc_basename in 5775ba6a1819Smrg CC*) 5776ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5777ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5778ba6a1819Smrg ;; 5779ba6a1819Smrg *) 5780ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5781ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5782ba6a1819Smrg ;; 5783ba6a1819Smrg esac 5784ba6a1819Smrg ;; 5785ba6a1819Smrg tandem*) 5786ba6a1819Smrg case $cc_basename in 5787ba6a1819Smrg NCC*) 5788ba6a1819Smrg # NonStop-UX NCC 3.20 5789ba6a1819Smrg # FIXME: insert proper C++ library support 5790ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5791ba6a1819Smrg ;; 5792ba6a1819Smrg *) 5793ba6a1819Smrg # FIXME: insert proper C++ library support 5794ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5795ba6a1819Smrg ;; 5796ba6a1819Smrg esac 5797ba6a1819Smrg ;; 5798ba6a1819Smrg vxworks*) 5799ba6a1819Smrg # FIXME: insert proper C++ library support 5800ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5801ba6a1819Smrg ;; 5802ba6a1819Smrg *) 5803ba6a1819Smrg # FIXME: insert proper C++ library support 5804ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5805ba6a1819Smrg ;; 5806ba6a1819Smrgesac 5807ba6a1819SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 5808ba6a1819Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5809ba6a1819Smrg 5810ba6a1819Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 5811ba6a1819Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 5812ba6a1819Smrg 5813ba6a1819SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 5814ba6a1819SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 5815ba6a1819SmrgAC_LIBTOOL_PROG_CC_C_O($1) 5816ba6a1819SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 5817ba6a1819SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 5818ba6a1819SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 5819ba6a1819SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5820ba6a1819Smrg 5821ba6a1819SmrgAC_LIBTOOL_CONFIG($1) 5822ba6a1819Smrg 5823ba6a1819SmrgAC_LANG_POP 5824ba6a1819SmrgCC=$lt_save_CC 5825ba6a1819SmrgLDCXX=$LD 5826ba6a1819SmrgLD=$lt_save_LD 5827ba6a1819SmrgGCC=$lt_save_GCC 5828ba6a1819Smrgwith_gnu_ldcxx=$with_gnu_ld 5829ba6a1819Smrgwith_gnu_ld=$lt_save_with_gnu_ld 5830ba6a1819Smrglt_cv_path_LDCXX=$lt_cv_path_LD 5831ba6a1819Smrglt_cv_path_LD=$lt_save_path_LD 5832ba6a1819Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 5833ba6a1819Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 5834ba6a1819Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 5835ba6a1819Smrg 5836ba6a1819Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 5837ba6a1819Smrg# ------------------------------------ 5838ba6a1819Smrg# Figure out "hidden" library dependencies from verbose 5839ba6a1819Smrg# compiler output when linking a shared library. 5840ba6a1819Smrg# Parse the compiler output and extract the necessary 5841ba6a1819Smrg# objects, libraries and library flags. 5842ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 5843ba6a1819Smrgdnl we can't use the lt_simple_compile_test_code here, 5844ba6a1819Smrgdnl because it contains code intended for an executable, 5845ba6a1819Smrgdnl not a library. It's possible we should let each 5846ba6a1819Smrgdnl tag define a new lt_????_link_test_code variable, 5847ba6a1819Smrgdnl but it's only used here... 5848ba6a1819Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 5849ba6a1819Smrgint a; 5850ba6a1819Smrgvoid foo (void) { a = 0; } 5851ba6a1819SmrgEOF 5852ba6a1819Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 5853ba6a1819Smrgclass Foo 5854ba6a1819Smrg{ 5855ba6a1819Smrgpublic: 5856ba6a1819Smrg Foo (void) { a = 0; } 5857ba6a1819Smrgprivate: 5858ba6a1819Smrg int a; 5859ba6a1819Smrg}; 5860ba6a1819SmrgEOF 5861ba6a1819Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 5862ba6a1819Smrg subroutine foo 5863ba6a1819Smrg implicit none 5864ba6a1819Smrg integer*4 a 5865ba6a1819Smrg a=0 5866ba6a1819Smrg return 5867ba6a1819Smrg end 5868ba6a1819SmrgEOF 5869ba6a1819Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 5870ba6a1819Smrgpublic class foo { 5871ba6a1819Smrg private int a; 5872ba6a1819Smrg public void bar (void) { 5873ba6a1819Smrg a = 0; 5874ba6a1819Smrg } 5875ba6a1819Smrg}; 5876ba6a1819SmrgEOF 5877ba6a1819Smrg]) 5878ba6a1819Smrgdnl Parse the compiler output and extract the necessary 5879ba6a1819Smrgdnl objects, libraries and library flags. 5880ba6a1819Smrgif AC_TRY_EVAL(ac_compile); then 5881ba6a1819Smrg # Parse the compiler output and extract the necessary 5882ba6a1819Smrg # objects, libraries and library flags. 5883ba6a1819Smrg 5884ba6a1819Smrg # Sentinel used to keep track of whether or not we are before 5885ba6a1819Smrg # the conftest object file. 5886ba6a1819Smrg pre_test_object_deps_done=no 5887ba6a1819Smrg 5888ba6a1819Smrg # The `*' in the case matches for architectures that use `case' in 5889ba6a1819Smrg # $output_verbose_cmd can trigger glob expansion during the loop 5890ba6a1819Smrg # eval without this substitution. 5891ba6a1819Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 5892ba6a1819Smrg 5893ba6a1819Smrg for p in `eval $output_verbose_link_cmd`; do 5894ba6a1819Smrg case $p in 5895ba6a1819Smrg 5896ba6a1819Smrg -L* | -R* | -l*) 5897ba6a1819Smrg # Some compilers place space between "-{L,R}" and the path. 5898ba6a1819Smrg # Remove the space. 5899ba6a1819Smrg if test $p = "-L" \ 5900ba6a1819Smrg || test $p = "-R"; then 5901ba6a1819Smrg prev=$p 5902ba6a1819Smrg continue 5903ba6a1819Smrg else 5904ba6a1819Smrg prev= 5905ba6a1819Smrg fi 5906ba6a1819Smrg 5907ba6a1819Smrg if test "$pre_test_object_deps_done" = no; then 5908ba6a1819Smrg case $p in 5909ba6a1819Smrg -L* | -R*) 5910ba6a1819Smrg # Internal compiler library paths should come after those 5911ba6a1819Smrg # provided the user. The postdeps already come after the 5912ba6a1819Smrg # user supplied libs so there is no need to process them. 5913ba6a1819Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 5914ba6a1819Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 5915ba6a1819Smrg else 5916ba6a1819Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 5917ba6a1819Smrg fi 5918ba6a1819Smrg ;; 5919ba6a1819Smrg # The "-l" case would never come before the object being 5920ba6a1819Smrg # linked, so don't bother handling this case. 5921ba6a1819Smrg esac 5922ba6a1819Smrg else 5923ba6a1819Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 5924ba6a1819Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 5925ba6a1819Smrg else 5926ba6a1819Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 5927ba6a1819Smrg fi 5928ba6a1819Smrg fi 5929ba6a1819Smrg ;; 5930ba6a1819Smrg 5931ba6a1819Smrg *.$objext) 5932ba6a1819Smrg # This assumes that the test object file only shows up 5933ba6a1819Smrg # once in the compiler output. 5934ba6a1819Smrg if test "$p" = "conftest.$objext"; then 5935ba6a1819Smrg pre_test_object_deps_done=yes 5936ba6a1819Smrg continue 5937ba6a1819Smrg fi 5938ba6a1819Smrg 5939ba6a1819Smrg if test "$pre_test_object_deps_done" = no; then 5940ba6a1819Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 5941ba6a1819Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 5942ba6a1819Smrg else 5943ba6a1819Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 5944ba6a1819Smrg fi 5945ba6a1819Smrg else 5946ba6a1819Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 5947ba6a1819Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 5948ba6a1819Smrg else 5949ba6a1819Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 5950ba6a1819Smrg fi 5951ba6a1819Smrg fi 5952ba6a1819Smrg ;; 5953ba6a1819Smrg 5954ba6a1819Smrg *) ;; # Ignore the rest. 5955ba6a1819Smrg 5956ba6a1819Smrg esac 5957ba6a1819Smrg done 5958ba6a1819Smrg 5959ba6a1819Smrg # Clean up. 5960ba6a1819Smrg rm -f a.out a.exe 5961ba6a1819Smrgelse 5962ba6a1819Smrg echo "libtool.m4: error: problem compiling $1 test program" 5963ba6a1819Smrgfi 5964ba6a1819Smrg 5965ba6a1819Smrg$rm -f confest.$objext 5966ba6a1819Smrg 5967ba6a1819Smrg# PORTME: override above test on systems where it is broken 5968ba6a1819Smrgifelse([$1],[CXX], 5969ba6a1819Smrg[case $host_os in 5970ba6a1819Smrginterix3*) 5971ba6a1819Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 5972ba6a1819Smrg # hack all around it, let's just trust "g++" to DTRT. 5973ba6a1819Smrg _LT_AC_TAGVAR(predep_objects,$1)= 5974ba6a1819Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 5975ba6a1819Smrg _LT_AC_TAGVAR(postdeps,$1)= 5976ba6a1819Smrg ;; 5977ba6a1819Smrg 5978ba6a1819Smrgsolaris*) 5979ba6a1819Smrg case $cc_basename in 5980ba6a1819Smrg CC*) 5981ba6a1819Smrg # Adding this requires a known-good setup of shared libraries for 5982ba6a1819Smrg # Sun compiler versions before 5.6, else PIC objects from an old 5983ba6a1819Smrg # archive will be linked into the output, leading to subtle bugs. 5984ba6a1819Smrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 5985ba6a1819Smrg ;; 5986ba6a1819Smrg esac 5987ba6a1819Smrg ;; 5988ba6a1819Smrgesac 5989ba6a1819Smrg]) 5990ba6a1819Smrg 5991ba6a1819Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 5992ba6a1819Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 5993ba6a1819Smrgesac 5994ba6a1819Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 5995ba6a1819Smrg 5996ba6a1819Smrg# AC_LIBTOOL_LANG_F77_CONFIG 5997ba6a1819Smrg# -------------------------- 5998ba6a1819Smrg# Ensure that the configuration vars for the C compiler are 5999ba6a1819Smrg# suitably defined. Those variables are subsequently used by 6000ba6a1819Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 6001ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 6002ba6a1819SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 6003ba6a1819Smrg[AC_REQUIRE([AC_PROG_F77]) 6004ba6a1819SmrgAC_LANG_PUSH(Fortran 77) 6005ba6a1819Smrg 6006ba6a1819Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6007ba6a1819Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 6008ba6a1819Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 6009ba6a1819Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 6010ba6a1819Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 6011ba6a1819Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 6012ba6a1819Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 6013ba6a1819Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6014ba6a1819Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 6015ba6a1819Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 6016ba6a1819Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 6017ba6a1819Smrg_LT_AC_TAGVAR(module_cmds, $1)= 6018ba6a1819Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 6019ba6a1819Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 6020ba6a1819Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6021ba6a1819Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 6022ba6a1819Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6023ba6a1819Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6024ba6a1819Smrg 6025ba6a1819Smrg# Source file extension for f77 test sources. 6026ba6a1819Smrgac_ext=f 6027ba6a1819Smrg 6028ba6a1819Smrg# Object file extension for compiled f77 test sources. 6029ba6a1819Smrgobjext=o 6030ba6a1819Smrg_LT_AC_TAGVAR(objext, $1)=$objext 6031ba6a1819Smrg 6032ba6a1819Smrg# Code to be used in simple compile tests 6033ba6a1819Smrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 6034ba6a1819Smrg 6035ba6a1819Smrg# Code to be used in simple link tests 6036ba6a1819Smrglt_simple_link_test_code=" program t\n end\n" 6037ba6a1819Smrg 6038ba6a1819Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6039ba6a1819Smrg_LT_AC_SYS_COMPILER 6040ba6a1819Smrg 6041ba6a1819Smrg# save warnings/boilerplate of simple test code 6042ba6a1819Smrg_LT_COMPILER_BOILERPLATE 6043ba6a1819Smrg_LT_LINKER_BOILERPLATE 6044ba6a1819Smrg 6045ba6a1819Smrg# Allow CC to be a program name with arguments. 6046ba6a1819Smrglt_save_CC="$CC" 6047ba6a1819SmrgCC=${F77-"f77"} 6048ba6a1819Smrgcompiler=$CC 6049ba6a1819Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 6050ba6a1819Smrg_LT_CC_BASENAME([$compiler]) 6051ba6a1819Smrg 6052ba6a1819SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 6053ba6a1819SmrgAC_MSG_RESULT([$can_build_shared]) 6054ba6a1819Smrg 6055ba6a1819SmrgAC_MSG_CHECKING([whether to build shared libraries]) 6056ba6a1819Smrgtest "$can_build_shared" = "no" && enable_shared=no 6057ba6a1819Smrg 6058ba6a1819Smrg# On AIX, shared libraries and static libraries use the same namespace, and 6059ba6a1819Smrg# are all built from PIC. 6060ba6a1819Smrgcase $host_os in 6061ba6a1819Smrgaix3*) 6062ba6a1819Smrg test "$enable_shared" = yes && enable_static=no 6063ba6a1819Smrg if test -n "$RANLIB"; then 6064ba6a1819Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6065ba6a1819Smrg postinstall_cmds='$RANLIB $lib' 6066ba6a1819Smrg fi 6067ba6a1819Smrg ;; 6068ba6a1819Smrgaix4* | aix5*) 6069ba6a1819Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6070ba6a1819Smrg test "$enable_shared" = yes && enable_static=no 6071ba6a1819Smrg fi 6072ba6a1819Smrg ;; 6073ba6a1819Smrgesac 6074ba6a1819SmrgAC_MSG_RESULT([$enable_shared]) 6075ba6a1819Smrg 6076ba6a1819SmrgAC_MSG_CHECKING([whether to build static libraries]) 6077ba6a1819Smrg# Make sure either enable_shared or enable_static is yes. 6078ba6a1819Smrgtest "$enable_shared" = yes || enable_static=yes 6079ba6a1819SmrgAC_MSG_RESULT([$enable_static]) 6080ba6a1819Smrg 6081ba6a1819Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 6082ba6a1819Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 6083ba6a1819Smrg 6084ba6a1819SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 6085ba6a1819SmrgAC_LIBTOOL_PROG_CC_C_O($1) 6086ba6a1819SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 6087ba6a1819SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 6088ba6a1819SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 6089ba6a1819SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 6090ba6a1819Smrg 6091ba6a1819SmrgAC_LIBTOOL_CONFIG($1) 6092ba6a1819Smrg 6093ba6a1819SmrgAC_LANG_POP 6094ba6a1819SmrgCC="$lt_save_CC" 6095ba6a1819Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 6096ba6a1819Smrg 6097ba6a1819Smrg 6098ba6a1819Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 6099ba6a1819Smrg# -------------------------- 6100ba6a1819Smrg# Ensure that the configuration vars for the C compiler are 6101ba6a1819Smrg# suitably defined. Those variables are subsequently used by 6102ba6a1819Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 6103ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 6104ba6a1819SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 6105ba6a1819Smrg[AC_LANG_SAVE 6106ba6a1819Smrg 6107ba6a1819Smrg# Source file extension for Java test sources. 6108ba6a1819Smrgac_ext=java 6109ba6a1819Smrg 6110ba6a1819Smrg# Object file extension for compiled Java test sources. 6111ba6a1819Smrgobjext=o 6112ba6a1819Smrg_LT_AC_TAGVAR(objext, $1)=$objext 6113ba6a1819Smrg 6114ba6a1819Smrg# Code to be used in simple compile tests 6115ba6a1819Smrglt_simple_compile_test_code="class foo {}\n" 6116ba6a1819Smrg 6117ba6a1819Smrg# Code to be used in simple link tests 6118ba6a1819Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 6119ba6a1819Smrg 6120ba6a1819Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6121ba6a1819Smrg_LT_AC_SYS_COMPILER 6122ba6a1819Smrg 6123ba6a1819Smrg# save warnings/boilerplate of simple test code 6124ba6a1819Smrg_LT_COMPILER_BOILERPLATE 6125ba6a1819Smrg_LT_LINKER_BOILERPLATE 6126ba6a1819Smrg 6127ba6a1819Smrg# Allow CC to be a program name with arguments. 6128ba6a1819Smrglt_save_CC="$CC" 6129ba6a1819SmrgCC=${GCJ-"gcj"} 6130ba6a1819Smrgcompiler=$CC 6131ba6a1819Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 6132ba6a1819Smrg_LT_CC_BASENAME([$compiler]) 6133ba6a1819Smrg 6134ba6a1819Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 6135ba6a1819Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6136ba6a1819Smrg 6137ba6a1819Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6138ba6a1819Smrg 6139ba6a1819SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 6140ba6a1819SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 6141ba6a1819SmrgAC_LIBTOOL_PROG_CC_C_O($1) 6142ba6a1819SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 6143ba6a1819SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 6144ba6a1819SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 6145ba6a1819SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 6146ba6a1819Smrg 6147ba6a1819SmrgAC_LIBTOOL_CONFIG($1) 6148ba6a1819Smrg 6149ba6a1819SmrgAC_LANG_RESTORE 6150ba6a1819SmrgCC="$lt_save_CC" 6151ba6a1819Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 6152ba6a1819Smrg 6153ba6a1819Smrg 6154ba6a1819Smrg# AC_LIBTOOL_LANG_RC_CONFIG 6155ba6a1819Smrg# ------------------------- 6156ba6a1819Smrg# Ensure that the configuration vars for the Windows resource compiler are 6157ba6a1819Smrg# suitably defined. Those variables are subsequently used by 6158ba6a1819Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 6159ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 6160ba6a1819SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 6161ba6a1819Smrg[AC_LANG_SAVE 6162ba6a1819Smrg 6163ba6a1819Smrg# Source file extension for RC test sources. 6164ba6a1819Smrgac_ext=rc 6165ba6a1819Smrg 6166ba6a1819Smrg# Object file extension for compiled RC test sources. 6167ba6a1819Smrgobjext=o 6168ba6a1819Smrg_LT_AC_TAGVAR(objext, $1)=$objext 6169ba6a1819Smrg 6170ba6a1819Smrg# Code to be used in simple compile tests 6171ba6a1819Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 6172ba6a1819Smrg 6173ba6a1819Smrg# Code to be used in simple link tests 6174ba6a1819Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 6175ba6a1819Smrg 6176ba6a1819Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6177ba6a1819Smrg_LT_AC_SYS_COMPILER 6178ba6a1819Smrg 6179ba6a1819Smrg# save warnings/boilerplate of simple test code 6180ba6a1819Smrg_LT_COMPILER_BOILERPLATE 6181ba6a1819Smrg_LT_LINKER_BOILERPLATE 6182ba6a1819Smrg 6183ba6a1819Smrg# Allow CC to be a program name with arguments. 6184ba6a1819Smrglt_save_CC="$CC" 6185ba6a1819SmrgCC=${RC-"windres"} 6186ba6a1819Smrgcompiler=$CC 6187ba6a1819Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 6188ba6a1819Smrg_LT_CC_BASENAME([$compiler]) 6189ba6a1819Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6190ba6a1819Smrg 6191ba6a1819SmrgAC_LIBTOOL_CONFIG($1) 6192ba6a1819Smrg 6193ba6a1819SmrgAC_LANG_RESTORE 6194ba6a1819SmrgCC="$lt_save_CC" 6195ba6a1819Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 6196ba6a1819Smrg 6197ba6a1819Smrg 6198ba6a1819Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 6199ba6a1819Smrg# ---------------------------- 6200ba6a1819Smrg# If TAGNAME is not passed, then create an initial libtool script 6201ba6a1819Smrg# with a default configuration from the untagged config vars. Otherwise 6202ba6a1819Smrg# add code to config.status for appending the configuration named by 6203ba6a1819Smrg# TAGNAME from the matching tagged config vars. 6204ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 6205ba6a1819Smrg[# The else clause should only fire when bootstrapping the 6206ba6a1819Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 6207ba6a1819Smrg# with your package, and you will get complaints that there are 6208ba6a1819Smrg# no rules to generate ltmain.sh. 6209ba6a1819Smrgif test -f "$ltmain"; then 6210ba6a1819Smrg # See if we are running on zsh, and set the options which allow our commands through 6211ba6a1819Smrg # without removal of \ escapes. 6212ba6a1819Smrg if test -n "${ZSH_VERSION+set}" ; then 6213ba6a1819Smrg setopt NO_GLOB_SUBST 6214ba6a1819Smrg fi 6215ba6a1819Smrg # Now quote all the things that may contain metacharacters while being 6216ba6a1819Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 6217ba6a1819Smrg # variables and quote the copies for generation of the libtool script. 6218ba6a1819Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 6219ba6a1819Smrg SED SHELL STRIP \ 6220ba6a1819Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 6221ba6a1819Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 6222ba6a1819Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 6223ba6a1819Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 6224ba6a1819Smrg lt_cv_sys_global_symbol_to_c_name_address \ 6225ba6a1819Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 6226ba6a1819Smrg old_postinstall_cmds old_postuninstall_cmds \ 6227ba6a1819Smrg _LT_AC_TAGVAR(compiler, $1) \ 6228ba6a1819Smrg _LT_AC_TAGVAR(CC, $1) \ 6229ba6a1819Smrg _LT_AC_TAGVAR(LD, $1) \ 6230ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 6231ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 6232ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 6233ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 6234ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 6235ba6a1819Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 6236ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 6237ba6a1819Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 6238ba6a1819Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 6239ba6a1819Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 6240ba6a1819Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 6241ba6a1819Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 6242ba6a1819Smrg _LT_AC_TAGVAR(predeps, $1) \ 6243ba6a1819Smrg _LT_AC_TAGVAR(postdeps, $1) \ 6244ba6a1819Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 6245ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 6246ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 6247ba6a1819Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 6248ba6a1819Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 6249ba6a1819Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 6250ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 6251ba6a1819Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 6252ba6a1819Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 6253ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 6254ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 6255ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 6256ba6a1819Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 6257ba6a1819Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 6258ba6a1819Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 6259ba6a1819Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 6260ba6a1819Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 6261ba6a1819Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 6262ba6a1819Smrg 6263ba6a1819Smrg case $var in 6264ba6a1819Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 6265ba6a1819Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 6266ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 6267ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 6268ba6a1819Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 6269ba6a1819Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 6270ba6a1819Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 6271ba6a1819Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 6272ba6a1819Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 6273ba6a1819Smrg postinstall_cmds | postuninstall_cmds | \ 6274ba6a1819Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 6275ba6a1819Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 6276ba6a1819Smrg # Double-quote double-evaled strings. 6277ba6a1819Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 6278ba6a1819Smrg ;; 6279ba6a1819Smrg *) 6280ba6a1819Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 6281ba6a1819Smrg ;; 6282ba6a1819Smrg esac 6283ba6a1819Smrg done 6284ba6a1819Smrg 6285ba6a1819Smrg case $lt_echo in 6286ba6a1819Smrg *'\[$]0 --fallback-echo"') 6287ba6a1819Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 6288ba6a1819Smrg ;; 6289ba6a1819Smrg esac 6290ba6a1819Smrg 6291ba6a1819Smrgifelse([$1], [], 6292ba6a1819Smrg [cfgfile="${ofile}T" 6293ba6a1819Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 6294ba6a1819Smrg $rm -f "$cfgfile" 6295ba6a1819Smrg AC_MSG_NOTICE([creating $ofile])], 6296ba6a1819Smrg [cfgfile="$ofile"]) 6297ba6a1819Smrg 6298ba6a1819Smrg cat <<__EOF__ >> "$cfgfile" 6299ba6a1819Smrgifelse([$1], [], 6300ba6a1819Smrg[#! $SHELL 6301ba6a1819Smrg 6302ba6a1819Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 6303ba6a1819Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 6304ba6a1819Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 6305ba6a1819Smrg# 6306ba6a1819Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 6307ba6a1819Smrg# Free Software Foundation, Inc. 6308ba6a1819Smrg# 6309ba6a1819Smrg# This file is part of GNU Libtool: 6310ba6a1819Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 6311ba6a1819Smrg# 6312ba6a1819Smrg# This program is free software; you can redistribute it and/or modify 6313ba6a1819Smrg# it under the terms of the GNU General Public License as published by 6314ba6a1819Smrg# the Free Software Foundation; either version 2 of the License, or 6315ba6a1819Smrg# (at your option) any later version. 6316ba6a1819Smrg# 6317ba6a1819Smrg# This program is distributed in the hope that it will be useful, but 6318ba6a1819Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 6319ba6a1819Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6320ba6a1819Smrg# General Public License for more details. 6321ba6a1819Smrg# 6322ba6a1819Smrg# You should have received a copy of the GNU General Public License 6323ba6a1819Smrg# along with this program; if not, write to the Free Software 6324ba6a1819Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 6325ba6a1819Smrg# 6326ba6a1819Smrg# As a special exception to the GNU General Public License, if you 6327ba6a1819Smrg# distribute this file as part of a program that contains a 6328ba6a1819Smrg# configuration script generated by Autoconf, you may include it under 6329ba6a1819Smrg# the same distribution terms that you use for the rest of that program. 6330ba6a1819Smrg 6331ba6a1819Smrg# A sed program that does not truncate output. 6332ba6a1819SmrgSED=$lt_SED 6333ba6a1819Smrg 6334ba6a1819Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 6335ba6a1819SmrgXsed="$SED -e 1s/^X//" 6336ba6a1819Smrg 6337ba6a1819Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 6338ba6a1819Smrg# if CDPATH is set. 6339ba6a1819Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 6340ba6a1819Smrg 6341ba6a1819Smrg# The names of the tagged configurations supported by this script. 6342ba6a1819Smrgavailable_tags= 6343ba6a1819Smrg 6344ba6a1819Smrg# ### BEGIN LIBTOOL CONFIG], 6345ba6a1819Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 6346ba6a1819Smrg 6347ba6a1819Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 6348ba6a1819Smrg 6349ba6a1819Smrg# Shell to use when invoking shell scripts. 6350ba6a1819SmrgSHELL=$lt_SHELL 6351ba6a1819Smrg 6352ba6a1819Smrg# Whether or not to build shared libraries. 6353ba6a1819Smrgbuild_libtool_libs=$enable_shared 6354ba6a1819Smrg 6355ba6a1819Smrg# Whether or not to build static libraries. 6356ba6a1819Smrgbuild_old_libs=$enable_static 6357ba6a1819Smrg 6358ba6a1819Smrg# Whether or not to add -lc for building shared libraries. 6359ba6a1819Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 6360ba6a1819Smrg 6361ba6a1819Smrg# Whether or not to disallow shared libs when runtime libs are static 6362ba6a1819Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 6363ba6a1819Smrg 6364ba6a1819Smrg# Whether or not to optimize for fast installation. 6365ba6a1819Smrgfast_install=$enable_fast_install 6366ba6a1819Smrg 6367ba6a1819Smrg# The host system. 6368ba6a1819Smrghost_alias=$host_alias 6369ba6a1819Smrghost=$host 6370ba6a1819Smrghost_os=$host_os 6371ba6a1819Smrg 6372ba6a1819Smrg# The build system. 6373ba6a1819Smrgbuild_alias=$build_alias 6374ba6a1819Smrgbuild=$build 6375ba6a1819Smrgbuild_os=$build_os 6376ba6a1819Smrg 6377ba6a1819Smrg# An echo program that does not interpret backslashes. 6378ba6a1819Smrgecho=$lt_echo 6379ba6a1819Smrg 6380ba6a1819Smrg# The archiver. 6381ba6a1819SmrgAR=$lt_AR 6382ba6a1819SmrgAR_FLAGS=$lt_AR_FLAGS 6383ba6a1819Smrg 6384ba6a1819Smrg# A C compiler. 6385ba6a1819SmrgLTCC=$lt_LTCC 6386ba6a1819Smrg 6387ba6a1819Smrg# LTCC compiler flags. 6388ba6a1819SmrgLTCFLAGS=$lt_LTCFLAGS 6389ba6a1819Smrg 6390ba6a1819Smrg# A language-specific compiler. 6391ba6a1819SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 6392ba6a1819Smrg 6393ba6a1819Smrg# Is the compiler the GNU C compiler? 6394ba6a1819Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 6395ba6a1819Smrg 6396ba6a1819Smrg# An ERE matcher. 6397ba6a1819SmrgEGREP=$lt_EGREP 6398ba6a1819Smrg 6399ba6a1819Smrg# The linker used to build libraries. 6400ba6a1819SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 6401ba6a1819Smrg 6402ba6a1819Smrg# Whether we need hard or soft links. 6403ba6a1819SmrgLN_S=$lt_LN_S 6404ba6a1819Smrg 6405ba6a1819Smrg# A BSD-compatible nm program. 6406ba6a1819SmrgNM=$lt_NM 6407ba6a1819Smrg 6408ba6a1819Smrg# A symbol stripping program 6409ba6a1819SmrgSTRIP=$lt_STRIP 6410ba6a1819Smrg 6411ba6a1819Smrg# Used to examine libraries when file_magic_cmd begins "file" 6412ba6a1819SmrgMAGIC_CMD=$MAGIC_CMD 6413ba6a1819Smrg 6414ba6a1819Smrg# Used on cygwin: DLL creation program. 6415ba6a1819SmrgDLLTOOL="$DLLTOOL" 6416ba6a1819Smrg 6417ba6a1819Smrg# Used on cygwin: object dumper. 6418ba6a1819SmrgOBJDUMP="$OBJDUMP" 6419ba6a1819Smrg 6420ba6a1819Smrg# Used on cygwin: assembler. 6421ba6a1819SmrgAS="$AS" 6422ba6a1819Smrg 6423ba6a1819Smrg# The name of the directory that contains temporary libtool files. 6424ba6a1819Smrgobjdir=$objdir 6425ba6a1819Smrg 6426ba6a1819Smrg# How to create reloadable object files. 6427ba6a1819Smrgreload_flag=$lt_reload_flag 6428ba6a1819Smrgreload_cmds=$lt_reload_cmds 6429ba6a1819Smrg 6430ba6a1819Smrg# How to pass a linker flag through the compiler. 6431ba6a1819Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6432ba6a1819Smrg 6433ba6a1819Smrg# Object file suffix (normally "o"). 6434ba6a1819Smrgobjext="$ac_objext" 6435ba6a1819Smrg 6436ba6a1819Smrg# Old archive suffix (normally "a"). 6437ba6a1819Smrglibext="$libext" 6438ba6a1819Smrg 6439ba6a1819Smrg# Shared library suffix (normally ".so"). 6440ba6a1819Smrgshrext_cmds='$shrext_cmds' 6441ba6a1819Smrg 6442ba6a1819Smrg# Executable file suffix (normally ""). 6443ba6a1819Smrgexeext="$exeext" 6444ba6a1819Smrg 6445ba6a1819Smrg# Additional compiler flags for building library objects. 6446ba6a1819Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6447ba6a1819Smrgpic_mode=$pic_mode 6448ba6a1819Smrg 6449ba6a1819Smrg# What is the maximum length of a command? 6450ba6a1819Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 6451ba6a1819Smrg 6452ba6a1819Smrg# Does compiler simultaneously support -c and -o options? 6453ba6a1819Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 6454ba6a1819Smrg 6455ba6a1819Smrg# Must we lock files when doing compilation? 6456ba6a1819Smrgneed_locks=$lt_need_locks 6457ba6a1819Smrg 6458ba6a1819Smrg# Do we need the lib prefix for modules? 6459ba6a1819Smrgneed_lib_prefix=$need_lib_prefix 6460ba6a1819Smrg 6461ba6a1819Smrg# Do we need a version for libraries? 6462ba6a1819Smrgneed_version=$need_version 6463ba6a1819Smrg 6464ba6a1819Smrg# Whether dlopen is supported. 6465ba6a1819Smrgdlopen_support=$enable_dlopen 6466ba6a1819Smrg 6467ba6a1819Smrg# Whether dlopen of programs is supported. 6468ba6a1819Smrgdlopen_self=$enable_dlopen_self 6469ba6a1819Smrg 6470ba6a1819Smrg# Whether dlopen of statically linked programs is supported. 6471ba6a1819Smrgdlopen_self_static=$enable_dlopen_self_static 6472ba6a1819Smrg 6473ba6a1819Smrg# Compiler flag to prevent dynamic linking. 6474ba6a1819Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 6475ba6a1819Smrg 6476ba6a1819Smrg# Compiler flag to turn off builtin functions. 6477ba6a1819Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 6478ba6a1819Smrg 6479ba6a1819Smrg# Compiler flag to allow reflexive dlopens. 6480ba6a1819Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 6481ba6a1819Smrg 6482ba6a1819Smrg# Compiler flag to generate shared objects directly from archives. 6483ba6a1819Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 6484ba6a1819Smrg 6485ba6a1819Smrg# Compiler flag to generate thread-safe objects. 6486ba6a1819Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 6487ba6a1819Smrg 6488ba6a1819Smrg# Library versioning type. 6489ba6a1819Smrgversion_type=$version_type 6490ba6a1819Smrg 6491ba6a1819Smrg# Format of library name prefix. 6492ba6a1819Smrglibname_spec=$lt_libname_spec 6493ba6a1819Smrg 6494ba6a1819Smrg# List of archive names. First name is the real one, the rest are links. 6495ba6a1819Smrg# The last name is the one that the linker finds with -lNAME. 6496ba6a1819Smrglibrary_names_spec=$lt_library_names_spec 6497ba6a1819Smrg 6498ba6a1819Smrg# The coded name of the library, if different from the real name. 6499ba6a1819Smrgsoname_spec=$lt_soname_spec 6500ba6a1819Smrg 6501ba6a1819Smrg# Commands used to build and install an old-style archive. 6502ba6a1819SmrgRANLIB=$lt_RANLIB 6503ba6a1819Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 6504ba6a1819Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 6505ba6a1819Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 6506ba6a1819Smrg 6507ba6a1819Smrg# Create an old-style archive from a shared archive. 6508ba6a1819Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 6509ba6a1819Smrg 6510ba6a1819Smrg# Create a temporary old-style archive to link instead of a shared archive. 6511ba6a1819Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 6512ba6a1819Smrg 6513ba6a1819Smrg# Commands used to build and install a shared archive. 6514ba6a1819Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 6515ba6a1819Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 6516ba6a1819Smrgpostinstall_cmds=$lt_postinstall_cmds 6517ba6a1819Smrgpostuninstall_cmds=$lt_postuninstall_cmds 6518ba6a1819Smrg 6519ba6a1819Smrg# Commands used to build a loadable module (assumed same as above if empty) 6520ba6a1819Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 6521ba6a1819Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 6522ba6a1819Smrg 6523ba6a1819Smrg# Commands to strip libraries. 6524ba6a1819Smrgold_striplib=$lt_old_striplib 6525ba6a1819Smrgstriplib=$lt_striplib 6526ba6a1819Smrg 6527ba6a1819Smrg# Dependencies to place before the objects being linked to create a 6528ba6a1819Smrg# shared library. 6529ba6a1819Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 6530ba6a1819Smrg 6531ba6a1819Smrg# Dependencies to place after the objects being linked to create a 6532ba6a1819Smrg# shared library. 6533ba6a1819Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 6534ba6a1819Smrg 6535ba6a1819Smrg# Dependencies to place before the objects being linked to create a 6536ba6a1819Smrg# shared library. 6537ba6a1819Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 6538ba6a1819Smrg 6539ba6a1819Smrg# Dependencies to place after the objects being linked to create a 6540ba6a1819Smrg# shared library. 6541ba6a1819Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 6542ba6a1819Smrg 6543ba6a1819Smrg# The library search path used internally by the compiler when linking 6544ba6a1819Smrg# a shared library. 6545ba6a1819Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 6546ba6a1819Smrg 6547ba6a1819Smrg# Method to check whether dependent libraries are shared objects. 6548ba6a1819Smrgdeplibs_check_method=$lt_deplibs_check_method 6549ba6a1819Smrg 6550ba6a1819Smrg# Command to use when deplibs_check_method == file_magic. 6551ba6a1819Smrgfile_magic_cmd=$lt_file_magic_cmd 6552ba6a1819Smrg 6553ba6a1819Smrg# Flag that allows shared libraries with undefined symbols to be built. 6554ba6a1819Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 6555ba6a1819Smrg 6556ba6a1819Smrg# Flag that forces no undefined symbols. 6557ba6a1819Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 6558ba6a1819Smrg 6559ba6a1819Smrg# Commands used to finish a libtool library installation in a directory. 6560ba6a1819Smrgfinish_cmds=$lt_finish_cmds 6561ba6a1819Smrg 6562ba6a1819Smrg# Same as above, but a single script fragment to be evaled but not shown. 6563ba6a1819Smrgfinish_eval=$lt_finish_eval 6564ba6a1819Smrg 6565ba6a1819Smrg# Take the output of nm and produce a listing of raw symbols and C names. 6566ba6a1819Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 6567ba6a1819Smrg 6568ba6a1819Smrg# Transform the output of nm in a proper C declaration 6569ba6a1819Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 6570ba6a1819Smrg 6571ba6a1819Smrg# Transform the output of nm in a C name address pair 6572ba6a1819Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 6573ba6a1819Smrg 6574ba6a1819Smrg# This is the shared library runtime path variable. 6575ba6a1819Smrgrunpath_var=$runpath_var 6576ba6a1819Smrg 6577ba6a1819Smrg# This is the shared library path variable. 6578ba6a1819Smrgshlibpath_var=$shlibpath_var 6579ba6a1819Smrg 6580ba6a1819Smrg# Is shlibpath searched before the hard-coded library search path? 6581ba6a1819Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 6582ba6a1819Smrg 6583ba6a1819Smrg# How to hardcode a shared library path into an executable. 6584ba6a1819Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 6585ba6a1819Smrg 6586ba6a1819Smrg# Whether we should hardcode library paths into libraries. 6587ba6a1819Smrghardcode_into_libs=$hardcode_into_libs 6588ba6a1819Smrg 6589ba6a1819Smrg# Flag to hardcode \$libdir into a binary during linking. 6590ba6a1819Smrg# This must work even if \$libdir does not exist. 6591ba6a1819Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 6592ba6a1819Smrg 6593ba6a1819Smrg# If ld is used when linking, flag to hardcode \$libdir into 6594ba6a1819Smrg# a binary during linking. This must work even if \$libdir does 6595ba6a1819Smrg# not exist. 6596ba6a1819Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 6597ba6a1819Smrg 6598ba6a1819Smrg# Whether we need a single -rpath flag with a separated argument. 6599ba6a1819Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 6600ba6a1819Smrg 6601ba6a1819Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 6602ba6a1819Smrg# resulting binary. 6603ba6a1819Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 6604ba6a1819Smrg 6605ba6a1819Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 6606ba6a1819Smrg# resulting binary. 6607ba6a1819Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 6608ba6a1819Smrg 6609ba6a1819Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 6610ba6a1819Smrg# the resulting binary. 6611ba6a1819Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 6612ba6a1819Smrg 6613ba6a1819Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 6614ba6a1819Smrg# and all subsequent libraries and executables linked against it. 6615ba6a1819Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 6616ba6a1819Smrg 6617ba6a1819Smrg# Variables whose values should be saved in libtool wrapper scripts and 6618ba6a1819Smrg# restored at relink time. 6619ba6a1819Smrgvariables_saved_for_relink="$variables_saved_for_relink" 6620ba6a1819Smrg 6621ba6a1819Smrg# Whether libtool must link a program against all its dependency libraries. 6622ba6a1819Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 6623ba6a1819Smrg 6624ba6a1819Smrg# Compile-time system search path for libraries 6625ba6a1819Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 6626ba6a1819Smrg 6627ba6a1819Smrg# Run-time system search path for libraries 6628ba6a1819Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 6629ba6a1819Smrg 6630ba6a1819Smrg# Fix the shell variable \$srcfile for the compiler. 6631ba6a1819Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 6632ba6a1819Smrg 6633ba6a1819Smrg# Set to yes if exported symbols are required. 6634ba6a1819Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 6635ba6a1819Smrg 6636ba6a1819Smrg# The commands to list exported symbols. 6637ba6a1819Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 6638ba6a1819Smrg 6639ba6a1819Smrg# The commands to extract the exported symbol list from a shared archive. 6640ba6a1819Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 6641ba6a1819Smrg 6642ba6a1819Smrg# Symbols that should not be listed in the preloaded symbols. 6643ba6a1819Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 6644ba6a1819Smrg 6645ba6a1819Smrg# Symbols that must always be exported. 6646ba6a1819Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 6647ba6a1819Smrg 6648ba6a1819Smrgifelse([$1],[], 6649ba6a1819Smrg[# ### END LIBTOOL CONFIG], 6650ba6a1819Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 6651ba6a1819Smrg 6652ba6a1819Smrg__EOF__ 6653ba6a1819Smrg 6654ba6a1819Smrgifelse([$1],[], [ 6655ba6a1819Smrg case $host_os in 6656ba6a1819Smrg aix3*) 6657ba6a1819Smrg cat <<\EOF >> "$cfgfile" 6658ba6a1819Smrg 6659ba6a1819Smrg# AIX sometimes has problems with the GCC collect2 program. For some 6660ba6a1819Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 6661ba6a1819Smrg# vanish in a puff of smoke. 6662ba6a1819Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 6663ba6a1819Smrg COLLECT_NAMES= 6664ba6a1819Smrg export COLLECT_NAMES 6665ba6a1819Smrgfi 6666ba6a1819SmrgEOF 6667ba6a1819Smrg ;; 6668ba6a1819Smrg esac 6669ba6a1819Smrg 6670ba6a1819Smrg # We use sed instead of cat because bash on DJGPP gets confused if 6671ba6a1819Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 6672ba6a1819Smrg # text mode, it properly converts lines to CR/LF. This bash problem 6673ba6a1819Smrg # is reportedly fixed, but why not run on old versions too? 6674ba6a1819Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 6675ba6a1819Smrg 6676ba6a1819Smrg mv -f "$cfgfile" "$ofile" || \ 6677ba6a1819Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 6678ba6a1819Smrg chmod +x "$ofile" 6679ba6a1819Smrg]) 6680ba6a1819Smrgelse 6681ba6a1819Smrg # If there is no Makefile yet, we rely on a make rule to execute 6682ba6a1819Smrg # `config.status --recheck' to rerun these tests and create the 6683ba6a1819Smrg # libtool script then. 6684ba6a1819Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 6685ba6a1819Smrg if test -f "$ltmain_in"; then 6686ba6a1819Smrg test -f Makefile && make "$ltmain" 6687ba6a1819Smrg fi 6688ba6a1819Smrgfi 6689ba6a1819Smrg])# AC_LIBTOOL_CONFIG 6690ba6a1819Smrg 6691ba6a1819Smrg 6692ba6a1819Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 6693ba6a1819Smrg# ------------------------------------------- 6694ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 6695ba6a1819Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 6696ba6a1819Smrg 6697ba6a1819Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6698ba6a1819Smrg 6699ba6a1819Smrgif test "$GCC" = yes; then 6700ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6701ba6a1819Smrg 6702ba6a1819Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 6703ba6a1819Smrg lt_cv_prog_compiler_rtti_exceptions, 6704ba6a1819Smrg [-fno-rtti -fno-exceptions], [], 6705ba6a1819Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 6706ba6a1819Smrgfi 6707ba6a1819Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 6708ba6a1819Smrg 6709ba6a1819Smrg 6710ba6a1819Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 6711ba6a1819Smrg# --------------------------------- 6712ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 6713ba6a1819Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 6714ba6a1819SmrgAC_REQUIRE([AC_PROG_NM]) 6715ba6a1819SmrgAC_REQUIRE([AC_OBJEXT]) 6716ba6a1819Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 6717ba6a1819SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 6718ba6a1819SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 6719ba6a1819Smrg[ 6720ba6a1819Smrg# These are sane defaults that work on at least a few old systems. 6721ba6a1819Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 6722ba6a1819Smrg 6723ba6a1819Smrg# Character class describing NM global symbol codes. 6724ba6a1819Smrgsymcode='[[BCDEGRST]]' 6725ba6a1819Smrg 6726ba6a1819Smrg# Regexp to match symbols that can be accessed directly from C. 6727ba6a1819Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 6728ba6a1819Smrg 6729ba6a1819Smrg# Transform an extracted symbol line into a proper C declaration 6730ba6a1819Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 6731ba6a1819Smrg 6732ba6a1819Smrg# Transform an extracted symbol line into symbol name and symbol address 6733ba6a1819Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 6734ba6a1819Smrg 6735ba6a1819Smrg# Define system-specific variables. 6736ba6a1819Smrgcase $host_os in 6737ba6a1819Smrgaix*) 6738ba6a1819Smrg symcode='[[BCDT]]' 6739ba6a1819Smrg ;; 6740ba6a1819Smrgcygwin* | mingw* | pw32*) 6741ba6a1819Smrg symcode='[[ABCDGISTW]]' 6742ba6a1819Smrg ;; 6743ba6a1819Smrghpux*) # Its linker distinguishes data from code symbols 6744ba6a1819Smrg if test "$host_cpu" = ia64; then 6745ba6a1819Smrg symcode='[[ABCDEGRST]]' 6746ba6a1819Smrg fi 6747ba6a1819Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 6748ba6a1819Smrg lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 6749ba6a1819Smrg ;; 6750ba6a1819Smrglinux*) 6751ba6a1819Smrg if test "$host_cpu" = ia64; then 6752ba6a1819Smrg symcode='[[ABCDGIRSTW]]' 6753ba6a1819Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 6754ba6a1819Smrg lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 6755ba6a1819Smrg fi 6756ba6a1819Smrg ;; 6757ba6a1819Smrgirix* | nonstopux*) 6758ba6a1819Smrg symcode='[[BCDEGRST]]' 6759ba6a1819Smrg ;; 6760ba6a1819Smrgosf*) 6761ba6a1819Smrg symcode='[[BCDEGQRST]]' 6762ba6a1819Smrg ;; 6763ba6a1819Smrgsolaris*) 6764ba6a1819Smrg symcode='[[BDRT]]' 6765ba6a1819Smrg ;; 6766ba6a1819Smrgsco3.2v5*) 6767ba6a1819Smrg symcode='[[DT]]' 6768ba6a1819Smrg ;; 6769ba6a1819Smrgsysv4.2uw2*) 6770ba6a1819Smrg symcode='[[DT]]' 6771ba6a1819Smrg ;; 6772ba6a1819Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 6773ba6a1819Smrg symcode='[[ABDT]]' 6774ba6a1819Smrg ;; 6775ba6a1819Smrgsysv4) 6776ba6a1819Smrg symcode='[[DFNSTU]]' 6777ba6a1819Smrg ;; 6778ba6a1819Smrgesac 6779ba6a1819Smrg 6780ba6a1819Smrg# Handle CRLF in mingw tool chain 6781ba6a1819Smrgopt_cr= 6782ba6a1819Smrgcase $build_os in 6783ba6a1819Smrgmingw*) 6784ba6a1819Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 6785ba6a1819Smrg ;; 6786ba6a1819Smrgesac 6787ba6a1819Smrg 6788ba6a1819Smrg# If we're using GNU nm, then use its standard symbol codes. 6789ba6a1819Smrgcase `$NM -V 2>&1` in 6790ba6a1819Smrg*GNU* | *'with BFD'*) 6791ba6a1819Smrg symcode='[[ABCDGIRSTW]]' ;; 6792ba6a1819Smrgesac 6793ba6a1819Smrg 6794ba6a1819Smrg# Try without a prefix undercore, then with it. 6795ba6a1819Smrgfor ac_symprfx in "" "_"; do 6796ba6a1819Smrg 6797ba6a1819Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 6798ba6a1819Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 6799ba6a1819Smrg 6800ba6a1819Smrg # Write the raw and C identifiers. 6801ba6a1819Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 6802ba6a1819Smrg 6803ba6a1819Smrg # Check to see that the pipe works correctly. 6804ba6a1819Smrg pipe_works=no 6805ba6a1819Smrg 6806ba6a1819Smrg rm -f conftest* 6807ba6a1819Smrg cat > conftest.$ac_ext <<EOF 6808ba6a1819Smrg#ifdef __cplusplus 6809ba6a1819Smrgextern "C" { 6810ba6a1819Smrg#endif 6811ba6a1819Smrgchar nm_test_var; 6812ba6a1819Smrgvoid nm_test_func(){} 6813ba6a1819Smrg#ifdef __cplusplus 6814ba6a1819Smrg} 6815ba6a1819Smrg#endif 6816ba6a1819Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 6817ba6a1819SmrgEOF 6818ba6a1819Smrg 6819ba6a1819Smrg if AC_TRY_EVAL(ac_compile); then 6820ba6a1819Smrg # Now try to grab the symbols. 6821ba6a1819Smrg nlist=conftest.nm 6822ba6a1819Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 6823ba6a1819Smrg # Try sorting and uniquifying the output. 6824ba6a1819Smrg if sort "$nlist" | uniq > "$nlist"T; then 6825ba6a1819Smrg mv -f "$nlist"T "$nlist" 6826ba6a1819Smrg else 6827ba6a1819Smrg rm -f "$nlist"T 6828ba6a1819Smrg fi 6829ba6a1819Smrg 6830ba6a1819Smrg # Make sure that we snagged all the symbols we need. 6831ba6a1819Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 6832ba6a1819Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 6833ba6a1819Smrg cat <<EOF > conftest.$ac_ext 6834ba6a1819Smrg#ifdef __cplusplus 6835ba6a1819Smrgextern "C" { 6836ba6a1819Smrg#endif 6837ba6a1819Smrg 6838ba6a1819SmrgEOF 6839ba6a1819Smrg # Now generate the symbol file. 6840ba6a1819Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 6841ba6a1819Smrg 6842ba6a1819Smrg cat <<EOF >> conftest.$ac_ext 6843ba6a1819Smrg#if defined (__STDC__) && __STDC__ 6844ba6a1819Smrg# define lt_ptr_t void * 6845ba6a1819Smrg#else 6846ba6a1819Smrg# define lt_ptr_t char * 6847ba6a1819Smrg# define const 6848ba6a1819Smrg#endif 6849ba6a1819Smrg 6850ba6a1819Smrg/* The mapping between symbol names and symbols. */ 6851ba6a1819Smrgconst struct { 6852ba6a1819Smrg const char *name; 6853ba6a1819Smrg lt_ptr_t address; 6854ba6a1819Smrg} 6855ba6a1819Smrglt_preloaded_symbols[[]] = 6856ba6a1819Smrg{ 6857ba6a1819SmrgEOF 6858ba6a1819Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 6859ba6a1819Smrg cat <<\EOF >> conftest.$ac_ext 6860ba6a1819Smrg {0, (lt_ptr_t) 0} 6861ba6a1819Smrg}; 6862ba6a1819Smrg 6863ba6a1819Smrg#ifdef __cplusplus 6864ba6a1819Smrg} 6865ba6a1819Smrg#endif 6866ba6a1819SmrgEOF 6867ba6a1819Smrg # Now try linking the two files. 6868ba6a1819Smrg mv conftest.$ac_objext conftstm.$ac_objext 6869ba6a1819Smrg lt_save_LIBS="$LIBS" 6870ba6a1819Smrg lt_save_CFLAGS="$CFLAGS" 6871ba6a1819Smrg LIBS="conftstm.$ac_objext" 6872ba6a1819Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 6873ba6a1819Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 6874ba6a1819Smrg pipe_works=yes 6875ba6a1819Smrg fi 6876ba6a1819Smrg LIBS="$lt_save_LIBS" 6877ba6a1819Smrg CFLAGS="$lt_save_CFLAGS" 6878ba6a1819Smrg else 6879ba6a1819Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 6880ba6a1819Smrg fi 6881ba6a1819Smrg else 6882ba6a1819Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 6883ba6a1819Smrg fi 6884ba6a1819Smrg else 6885ba6a1819Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 6886ba6a1819Smrg fi 6887ba6a1819Smrg else 6888ba6a1819Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 6889ba6a1819Smrg cat conftest.$ac_ext >&5 6890ba6a1819Smrg fi 6891ba6a1819Smrg rm -f conftest* conftst* 6892ba6a1819Smrg 6893ba6a1819Smrg # Do not use the global_symbol_pipe unless it works. 6894ba6a1819Smrg if test "$pipe_works" = yes; then 6895ba6a1819Smrg break 6896ba6a1819Smrg else 6897ba6a1819Smrg lt_cv_sys_global_symbol_pipe= 6898ba6a1819Smrg fi 6899ba6a1819Smrgdone 6900ba6a1819Smrg]) 6901ba6a1819Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 6902ba6a1819Smrg lt_cv_sys_global_symbol_to_cdecl= 6903ba6a1819Smrgfi 6904ba6a1819Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 6905ba6a1819Smrg AC_MSG_RESULT(failed) 6906ba6a1819Smrgelse 6907ba6a1819Smrg AC_MSG_RESULT(ok) 6908ba6a1819Smrgfi 6909ba6a1819Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 6910ba6a1819Smrg 6911ba6a1819Smrg 6912ba6a1819Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 6913ba6a1819Smrg# --------------------------------------- 6914ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 6915ba6a1819Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 6916ba6a1819Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6917ba6a1819Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 6918ba6a1819Smrg 6919ba6a1819SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 6920ba6a1819Smrg ifelse([$1],[CXX],[ 6921ba6a1819Smrg # C++ specific cases for pic, static, wl, etc. 6922ba6a1819Smrg if test "$GXX" = yes; then 6923ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6924ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6925ba6a1819Smrg 6926ba6a1819Smrg case $host_os in 6927ba6a1819Smrg aix*) 6928ba6a1819Smrg # All AIX code is PIC. 6929ba6a1819Smrg if test "$host_cpu" = ia64; then 6930ba6a1819Smrg # AIX 5 now supports IA64 processor 6931ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6932ba6a1819Smrg fi 6933ba6a1819Smrg ;; 6934ba6a1819Smrg amigaos*) 6935ba6a1819Smrg # FIXME: we need at least 68020 code to build shared libraries, but 6936ba6a1819Smrg # adding the `-m68020' flag to GCC prevents building anything better, 6937ba6a1819Smrg # like `-m68040'. 6938ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6939ba6a1819Smrg ;; 6940ba6a1819Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6941ba6a1819Smrg # PIC is the default for these OSes. 6942ba6a1819Smrg ;; 6943ba6a1819Smrg mingw* | os2* | pw32*) 6944ba6a1819Smrg # This hack is so that the source file can tell whether it is being 6945ba6a1819Smrg # built for inclusion in a dll (and should export symbols for example). 6946ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6947ba6a1819Smrg ;; 6948ba6a1819Smrg darwin* | rhapsody*) 6949ba6a1819Smrg # PIC is the default on this platform 6950ba6a1819Smrg # Common symbols not allowed in MH_DYLIB files 6951ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6952ba6a1819Smrg ;; 6953ba6a1819Smrg *djgpp*) 6954ba6a1819Smrg # DJGPP does not support shared libraries at all 6955ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6956ba6a1819Smrg ;; 6957ba6a1819Smrg interix3*) 6958ba6a1819Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6959ba6a1819Smrg # Instead, we relocate shared libraries at runtime. 6960ba6a1819Smrg ;; 6961ba6a1819Smrg sysv4*MP*) 6962ba6a1819Smrg if test -d /usr/nec; then 6963ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6964ba6a1819Smrg fi 6965ba6a1819Smrg ;; 6966ba6a1819Smrg hpux*) 6967ba6a1819Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6968ba6a1819Smrg # not for PA HP-UX. 6969ba6a1819Smrg case $host_cpu in 6970ba6a1819Smrg hppa*64*|ia64*) 6971ba6a1819Smrg ;; 6972ba6a1819Smrg *) 6973ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6974ba6a1819Smrg ;; 6975ba6a1819Smrg esac 6976ba6a1819Smrg ;; 6977ba6a1819Smrg *) 6978ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6979ba6a1819Smrg ;; 6980ba6a1819Smrg esac 6981ba6a1819Smrg else 6982ba6a1819Smrg case $host_os in 6983ba6a1819Smrg aix4* | aix5*) 6984ba6a1819Smrg # All AIX code is PIC. 6985ba6a1819Smrg if test "$host_cpu" = ia64; then 6986ba6a1819Smrg # AIX 5 now supports IA64 processor 6987ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6988ba6a1819Smrg else 6989ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6990ba6a1819Smrg fi 6991ba6a1819Smrg ;; 6992ba6a1819Smrg chorus*) 6993ba6a1819Smrg case $cc_basename in 6994ba6a1819Smrg cxch68*) 6995ba6a1819Smrg # Green Hills C++ Compiler 6996ba6a1819Smrg # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" 6997ba6a1819Smrg ;; 6998ba6a1819Smrg esac 6999ba6a1819Smrg ;; 7000ba6a1819Smrg darwin*) 7001ba6a1819Smrg # PIC is the default on this platform 7002ba6a1819Smrg # Common symbols not allowed in MH_DYLIB files 7003ba6a1819Smrg case $cc_basename in 7004ba6a1819Smrg xlc*) 7005ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 7006ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7007ba6a1819Smrg ;; 7008ba6a1819Smrg esac 7009ba6a1819Smrg ;; 7010ba6a1819Smrg dgux*) 7011ba6a1819Smrg case $cc_basename in 7012ba6a1819Smrg ec++*) 7013ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7014ba6a1819Smrg ;; 7015ba6a1819Smrg ghcx*) 7016ba6a1819Smrg # Green Hills C++ Compiler 7017ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7018ba6a1819Smrg ;; 7019ba6a1819Smrg *) 7020ba6a1819Smrg ;; 7021ba6a1819Smrg esac 7022ba6a1819Smrg ;; 7023ba6a1819Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 7024ba6a1819Smrg # FreeBSD uses GNU C++ 7025ba6a1819Smrg ;; 7026ba6a1819Smrg hpux9* | hpux10* | hpux11*) 7027ba6a1819Smrg case $cc_basename in 7028ba6a1819Smrg CC*) 7029ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7030ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 7031ba6a1819Smrg if test "$host_cpu" != ia64; then 7032ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7033ba6a1819Smrg fi 7034ba6a1819Smrg ;; 7035ba6a1819Smrg aCC*) 7036ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7037ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 7038ba6a1819Smrg case $host_cpu in 7039ba6a1819Smrg hppa*64*|ia64*) 7040ba6a1819Smrg # +Z the default 7041ba6a1819Smrg ;; 7042ba6a1819Smrg *) 7043ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7044ba6a1819Smrg ;; 7045ba6a1819Smrg esac 7046ba6a1819Smrg ;; 7047ba6a1819Smrg *) 7048ba6a1819Smrg ;; 7049ba6a1819Smrg esac 7050ba6a1819Smrg ;; 7051ba6a1819Smrg interix*) 7052ba6a1819Smrg # This is c89, which is MS Visual C++ (no shared libs) 7053ba6a1819Smrg # Anyone wants to do a port? 7054ba6a1819Smrg ;; 7055ba6a1819Smrg irix5* | irix6* | nonstopux*) 7056ba6a1819Smrg case $cc_basename in 7057ba6a1819Smrg CC*) 7058ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7059ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7060ba6a1819Smrg # CC pic flag -KPIC is the default. 7061ba6a1819Smrg ;; 7062ba6a1819Smrg *) 7063ba6a1819Smrg ;; 7064ba6a1819Smrg esac 7065ba6a1819Smrg ;; 7066ba6a1819Smrg linux*) 7067ba6a1819Smrg case $cc_basename in 7068ba6a1819Smrg KCC*) 7069ba6a1819Smrg # KAI C++ Compiler 7070ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7071ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7072ba6a1819Smrg ;; 7073ba6a1819Smrg icpc* | ecpc*) 7074ba6a1819Smrg # Intel C++ 7075ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7076ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7077ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 7078ba6a1819Smrg ;; 7079ba6a1819Smrg pgCC*) 7080ba6a1819Smrg # Portland Group C++ compiler. 7081ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7082ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7083ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7084ba6a1819Smrg ;; 7085ba6a1819Smrg cxx*) 7086ba6a1819Smrg # Compaq C++ 7087ba6a1819Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7088ba6a1819Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7089ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 7090ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7091ba6a1819Smrg ;; 7092ba6a1819Smrg *) 7093ba6a1819Smrg ;; 7094ba6a1819Smrg esac 7095ba6a1819Smrg ;; 7096ba6a1819Smrg lynxos*) 7097ba6a1819Smrg ;; 7098ba6a1819Smrg m88k*) 7099ba6a1819Smrg ;; 7100ba6a1819Smrg mvs*) 7101ba6a1819Smrg case $cc_basename in 7102ba6a1819Smrg cxx*) 7103ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7104ba6a1819Smrg ;; 7105ba6a1819Smrg *) 7106ba6a1819Smrg ;; 7107ba6a1819Smrg esac 7108ba6a1819Smrg ;; 7109ba6a1819Smrg netbsd*) 7110ba6a1819Smrg ;; 7111ba6a1819Smrg osf3* | osf4* | osf5*) 7112ba6a1819Smrg case $cc_basename in 7113ba6a1819Smrg KCC*) 7114ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7115ba6a1819Smrg ;; 7116ba6a1819Smrg RCC*) 7117ba6a1819Smrg # Rational C++ 2.4.1 7118ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7119ba6a1819Smrg ;; 7120ba6a1819Smrg cxx*) 7121ba6a1819Smrg # Digital/Compaq C++ 7122ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7123ba6a1819Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7124ba6a1819Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7125ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 7126ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7127ba6a1819Smrg ;; 7128ba6a1819Smrg *) 7129ba6a1819Smrg ;; 7130ba6a1819Smrg esac 7131ba6a1819Smrg ;; 7132ba6a1819Smrg psos*) 7133ba6a1819Smrg ;; 7134ba6a1819Smrg solaris*) 7135ba6a1819Smrg case $cc_basename in 7136ba6a1819Smrg CC*) 7137ba6a1819Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7138ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7139ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7140ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7141ba6a1819Smrg ;; 7142ba6a1819Smrg gcx*) 7143ba6a1819Smrg # Green Hills C++ Compiler 7144ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7145ba6a1819Smrg ;; 7146ba6a1819Smrg *) 7147ba6a1819Smrg ;; 7148ba6a1819Smrg esac 7149ba6a1819Smrg ;; 7150ba6a1819Smrg sunos4*) 7151ba6a1819Smrg case $cc_basename in 7152ba6a1819Smrg CC*) 7153ba6a1819Smrg # Sun C++ 4.x 7154ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7155ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7156ba6a1819Smrg ;; 7157ba6a1819Smrg lcc*) 7158ba6a1819Smrg # Lucid 7159ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7160ba6a1819Smrg ;; 7161ba6a1819Smrg *) 7162ba6a1819Smrg ;; 7163ba6a1819Smrg esac 7164ba6a1819Smrg ;; 7165ba6a1819Smrg tandem*) 7166ba6a1819Smrg case $cc_basename in 7167ba6a1819Smrg NCC*) 7168ba6a1819Smrg # NonStop-UX NCC 3.20 7169ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7170ba6a1819Smrg ;; 7171ba6a1819Smrg *) 7172ba6a1819Smrg ;; 7173ba6a1819Smrg esac 7174ba6a1819Smrg ;; 7175ba6a1819Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7176ba6a1819Smrg case $cc_basename in 7177ba6a1819Smrg CC*) 7178ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7179ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7180ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7181ba6a1819Smrg ;; 7182ba6a1819Smrg esac 7183ba6a1819Smrg ;; 7184ba6a1819Smrg vxworks*) 7185ba6a1819Smrg ;; 7186ba6a1819Smrg *) 7187ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7188ba6a1819Smrg ;; 7189ba6a1819Smrg esac 7190ba6a1819Smrg fi 7191ba6a1819Smrg], 7192ba6a1819Smrg[ 7193ba6a1819Smrg if test "$GCC" = yes; then 7194ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7195ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 7196ba6a1819Smrg 7197ba6a1819Smrg case $host_os in 7198ba6a1819Smrg aix*) 7199ba6a1819Smrg # All AIX code is PIC. 7200ba6a1819Smrg if test "$host_cpu" = ia64; then 7201ba6a1819Smrg # AIX 5 now supports IA64 processor 7202ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7203ba6a1819Smrg fi 7204ba6a1819Smrg ;; 7205ba6a1819Smrg 7206ba6a1819Smrg amigaos*) 7207ba6a1819Smrg # FIXME: we need at least 68020 code to build shared libraries, but 7208ba6a1819Smrg # adding the `-m68020' flag to GCC prevents building anything better, 7209ba6a1819Smrg # like `-m68040'. 7210ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7211ba6a1819Smrg ;; 7212ba6a1819Smrg 7213ba6a1819Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7214ba6a1819Smrg # PIC is the default for these OSes. 7215ba6a1819Smrg ;; 7216ba6a1819Smrg 7217ba6a1819Smrg mingw* | pw32* | os2*) 7218ba6a1819Smrg # This hack is so that the source file can tell whether it is being 7219ba6a1819Smrg # built for inclusion in a dll (and should export symbols for example). 7220ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 7221ba6a1819Smrg ;; 7222ba6a1819Smrg 7223ba6a1819Smrg darwin* | rhapsody*) 7224ba6a1819Smrg # PIC is the default on this platform 7225ba6a1819Smrg # Common symbols not allowed in MH_DYLIB files 7226ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7227ba6a1819Smrg ;; 7228ba6a1819Smrg 7229ba6a1819Smrg interix3*) 7230ba6a1819Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7231ba6a1819Smrg # Instead, we relocate shared libraries at runtime. 7232ba6a1819Smrg ;; 7233ba6a1819Smrg 7234ba6a1819Smrg msdosdjgpp*) 7235ba6a1819Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 7236ba6a1819Smrg # on systems that don't support them. 7237ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7238ba6a1819Smrg enable_shared=no 7239ba6a1819Smrg ;; 7240ba6a1819Smrg 7241ba6a1819Smrg sysv4*MP*) 7242ba6a1819Smrg if test -d /usr/nec; then 7243ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7244ba6a1819Smrg fi 7245ba6a1819Smrg ;; 7246ba6a1819Smrg 7247ba6a1819Smrg hpux*) 7248ba6a1819Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 7249ba6a1819Smrg # not for PA HP-UX. 7250ba6a1819Smrg case $host_cpu in 7251ba6a1819Smrg hppa*64*|ia64*) 7252ba6a1819Smrg # +Z the default 7253ba6a1819Smrg ;; 7254ba6a1819Smrg *) 7255ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7256ba6a1819Smrg ;; 7257ba6a1819Smrg esac 7258ba6a1819Smrg ;; 7259ba6a1819Smrg 7260ba6a1819Smrg *) 7261ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7262ba6a1819Smrg ;; 7263ba6a1819Smrg esac 7264ba6a1819Smrg else 7265ba6a1819Smrg # PORTME Check for flag to pass linker flags through the system compiler. 7266ba6a1819Smrg case $host_os in 7267ba6a1819Smrg aix*) 7268ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7269ba6a1819Smrg if test "$host_cpu" = ia64; then 7270ba6a1819Smrg # AIX 5 now supports IA64 processor 7271ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7272ba6a1819Smrg else 7273ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7274ba6a1819Smrg fi 7275ba6a1819Smrg ;; 7276ba6a1819Smrg darwin*) 7277ba6a1819Smrg # PIC is the default on this platform 7278ba6a1819Smrg # Common symbols not allowed in MH_DYLIB files 7279ba6a1819Smrg case $cc_basename in 7280ba6a1819Smrg xlc*) 7281ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 7282ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7283ba6a1819Smrg ;; 7284ba6a1819Smrg esac 7285ba6a1819Smrg ;; 7286ba6a1819Smrg 7287ba6a1819Smrg mingw* | pw32* | os2*) 7288ba6a1819Smrg # This hack is so that the source file can tell whether it is being 7289ba6a1819Smrg # built for inclusion in a dll (and should export symbols for example). 7290ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 7291ba6a1819Smrg ;; 7292ba6a1819Smrg 7293ba6a1819Smrg hpux9* | hpux10* | hpux11*) 7294ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7295ba6a1819Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 7296ba6a1819Smrg # not for PA HP-UX. 7297ba6a1819Smrg case $host_cpu in 7298ba6a1819Smrg hppa*64*|ia64*) 7299ba6a1819Smrg # +Z the default 7300ba6a1819Smrg ;; 7301ba6a1819Smrg *) 7302ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7303ba6a1819Smrg ;; 7304ba6a1819Smrg esac 7305ba6a1819Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 7306ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 7307ba6a1819Smrg ;; 7308ba6a1819Smrg 7309ba6a1819Smrg irix5* | irix6* | nonstopux*) 7310ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7311ba6a1819Smrg # PIC (with -KPIC) is the default. 7312ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7313ba6a1819Smrg ;; 7314ba6a1819Smrg 7315ba6a1819Smrg newsos6) 7316ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7317ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7318ba6a1819Smrg ;; 7319ba6a1819Smrg 7320ba6a1819Smrg linux*) 7321ba6a1819Smrg case $cc_basename in 7322ba6a1819Smrg icc* | ecc*) 7323ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7324ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7325ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 7326ba6a1819Smrg ;; 7327ba6a1819Smrg pgcc* | pgf77* | pgf90* | pgf95*) 7328ba6a1819Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 7329ba6a1819Smrg # which looks to be a dead project) 7330ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7331ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7332ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7333ba6a1819Smrg ;; 7334ba6a1819Smrg ccc*) 7335ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7336ba6a1819Smrg # All Alpha code is PIC. 7337ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7338ba6a1819Smrg ;; 7339ba6a1819Smrg esac 7340ba6a1819Smrg ;; 7341ba6a1819Smrg 7342ba6a1819Smrg osf3* | osf4* | osf5*) 7343ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7344ba6a1819Smrg # All OSF/1 code is PIC. 7345ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7346ba6a1819Smrg ;; 7347ba6a1819Smrg 7348ba6a1819Smrg solaris*) 7349ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7350ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7351ba6a1819Smrg case $cc_basename in 7352ba6a1819Smrg f77* | f90* | f95*) 7353ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 7354ba6a1819Smrg *) 7355ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 7356ba6a1819Smrg esac 7357ba6a1819Smrg ;; 7358ba6a1819Smrg 7359ba6a1819Smrg sunos4*) 7360ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7361ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7362ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7363ba6a1819Smrg ;; 7364ba6a1819Smrg 7365ba6a1819Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 7366ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7367ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7368ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7369ba6a1819Smrg ;; 7370ba6a1819Smrg 7371ba6a1819Smrg sysv4*MP*) 7372ba6a1819Smrg if test -d /usr/nec ;then 7373ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 7374ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7375ba6a1819Smrg fi 7376ba6a1819Smrg ;; 7377ba6a1819Smrg 7378ba6a1819Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7379ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7380ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7381ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7382ba6a1819Smrg ;; 7383ba6a1819Smrg 7384ba6a1819Smrg unicos*) 7385ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7386ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7387ba6a1819Smrg ;; 7388ba6a1819Smrg 7389ba6a1819Smrg uts4*) 7390ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7391ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7392ba6a1819Smrg ;; 7393ba6a1819Smrg 7394ba6a1819Smrg *) 7395ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7396ba6a1819Smrg ;; 7397ba6a1819Smrg esac 7398ba6a1819Smrg fi 7399ba6a1819Smrg]) 7400ba6a1819SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 7401ba6a1819Smrg 7402ba6a1819Smrg# 7403ba6a1819Smrg# Check to make sure the PIC flag actually works. 7404ba6a1819Smrg# 7405ba6a1819Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 7406ba6a1819Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 7407ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 7408ba6a1819Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 7409ba6a1819Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 7410ba6a1819Smrg "" | " "*) ;; 7411ba6a1819Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 7412ba6a1819Smrg esac], 7413ba6a1819Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 7414ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 7415ba6a1819Smrgfi 7416ba6a1819Smrgcase $host_os in 7417ba6a1819Smrg # For platforms which do not support PIC, -DPIC is meaningless: 7418ba6a1819Smrg *djgpp*) 7419ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 7420ba6a1819Smrg ;; 7421ba6a1819Smrg *) 7422ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 7423ba6a1819Smrg ;; 7424ba6a1819Smrgesac 7425ba6a1819Smrg 7426ba6a1819Smrg# 7427ba6a1819Smrg# Check to make sure the static flag actually works. 7428ba6a1819Smrg# 7429ba6a1819Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 7430ba6a1819SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 7431ba6a1819Smrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 7432ba6a1819Smrg $lt_tmp_static_flag, 7433ba6a1819Smrg [], 7434ba6a1819Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 7435ba6a1819Smrg]) 7436ba6a1819Smrg 7437ba6a1819Smrg 7438ba6a1819Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 7439ba6a1819Smrg# ------------------------------------ 7440ba6a1819Smrg# See if the linker supports building shared libraries. 7441ba6a1819SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 7442ba6a1819Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7443ba6a1819Smrgifelse([$1],[CXX],[ 7444ba6a1819Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7445ba6a1819Smrg case $host_os in 7446ba6a1819Smrg aix4* | aix5*) 7447ba6a1819Smrg # If we're using GNU nm, then we don't want the "-C" option. 7448ba6a1819Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 7449ba6a1819Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 7450ba6a1819Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 7451ba6a1819Smrg else 7452ba6a1819Smrg _LT_AC_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' 7453ba6a1819Smrg fi 7454ba6a1819Smrg ;; 7455ba6a1819Smrg pw32*) 7456ba6a1819Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 7457ba6a1819Smrg ;; 7458ba6a1819Smrg cygwin* | mingw*) 7459ba6a1819Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' 7460ba6a1819Smrg ;; 7461ba6a1819Smrg *) 7462ba6a1819Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7463ba6a1819Smrg ;; 7464ba6a1819Smrg esac 7465ba6a1819Smrg],[ 7466ba6a1819Smrg runpath_var= 7467ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 7468ba6a1819Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7469ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 7470ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 7471ba6a1819Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 7472ba6a1819Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 7473ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 7474ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 7475ba6a1819Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 7476ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 7477ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7478ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 7479ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 7480ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 7481ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7482ba6a1819Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 7483ba6a1819Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 7484ba6a1819Smrg _LT_AC_TAGVAR(module_cmds, $1)= 7485ba6a1819Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 7486ba6a1819Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 7487ba6a1819Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7488ba6a1819Smrg # include_expsyms should be a list of space-separated symbols to be *always* 7489ba6a1819Smrg # included in the symbol list 7490ba6a1819Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 7491ba6a1819Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 7492ba6a1819Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 7493ba6a1819Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 7494ba6a1819Smrg # as well as any symbol that contains `d'. 7495ba6a1819Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 7496ba6a1819Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 7497ba6a1819Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 7498ba6a1819Smrg # the symbol is explicitly referenced. Since portable code cannot 7499ba6a1819Smrg # rely on this symbol name, it's probably fine to never include it in 7500ba6a1819Smrg # preloaded symbol tables. 7501ba6a1819Smrg extract_expsyms_cmds= 7502ba6a1819Smrg # Just being paranoid about ensuring that cc_basename is set. 7503ba6a1819Smrg _LT_CC_BASENAME([$compiler]) 7504ba6a1819Smrg case $host_os in 7505ba6a1819Smrg cygwin* | mingw* | pw32*) 7506ba6a1819Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 7507ba6a1819Smrg # When not using gcc, we currently assume that we are using 7508ba6a1819Smrg # Microsoft Visual C++. 7509ba6a1819Smrg if test "$GCC" != yes; then 7510ba6a1819Smrg with_gnu_ld=no 7511ba6a1819Smrg fi 7512ba6a1819Smrg ;; 7513ba6a1819Smrg interix*) 7514ba6a1819Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 7515ba6a1819Smrg with_gnu_ld=yes 7516ba6a1819Smrg ;; 7517ba6a1819Smrg openbsd*) 7518ba6a1819Smrg with_gnu_ld=no 7519ba6a1819Smrg ;; 7520ba6a1819Smrg esac 7521ba6a1819Smrg 7522ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 7523ba6a1819Smrg if test "$with_gnu_ld" = yes; then 7524ba6a1819Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 7525ba6a1819Smrg wlarc='${wl}' 7526ba6a1819Smrg 7527ba6a1819Smrg # Set some defaults for GNU ld with shared library support. These 7528ba6a1819Smrg # are reset later if shared libraries are not supported. Putting them 7529ba6a1819Smrg # here allows them to be overridden if necessary. 7530ba6a1819Smrg runpath_var=LD_RUN_PATH 7531ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7532ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7533ba6a1819Smrg # ancient GNU ld didn't support --whole-archive et. al. 7534ba6a1819Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 7535ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7536ba6a1819Smrg else 7537ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 7538ba6a1819Smrg fi 7539ba6a1819Smrg supports_anon_versioning=no 7540ba6a1819Smrg case `$LD -v 2>/dev/null` in 7541ba6a1819Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 7542ba6a1819Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 7543ba6a1819Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 7544ba6a1819Smrg *\ 2.11.*) ;; # other 2.11 versions 7545ba6a1819Smrg *) supports_anon_versioning=yes ;; 7546ba6a1819Smrg esac 7547ba6a1819Smrg 7548ba6a1819Smrg # See if GNU ld supports shared libraries. 7549ba6a1819Smrg case $host_os in 7550ba6a1819Smrg aix3* | aix4* | aix5*) 7551ba6a1819Smrg # On AIX/PPC, the GNU linker is very broken 7552ba6a1819Smrg if test "$host_cpu" != ia64; then 7553ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7554ba6a1819Smrg cat <<EOF 1>&2 7555ba6a1819Smrg 7556ba6a1819Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 7557ba6a1819Smrg*** to be unable to reliably create shared libraries on AIX. 7558ba6a1819Smrg*** Therefore, libtool is disabling shared libraries support. If you 7559ba6a1819Smrg*** really care for shared libraries, you may want to modify your PATH 7560ba6a1819Smrg*** so that a non-GNU linker is found, and then restart. 7561ba6a1819Smrg 7562ba6a1819SmrgEOF 7563ba6a1819Smrg fi 7564ba6a1819Smrg ;; 7565ba6a1819Smrg 7566ba6a1819Smrg amigaos*) 7567ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 7568ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7569ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7570ba6a1819Smrg 7571ba6a1819Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 7572ba6a1819Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 7573ba6a1819Smrg # to version 4, is to share data among multiple programs linked 7574ba6a1819Smrg # with the same dynamic library. Since this doesn't match the 7575ba6a1819Smrg # behavior of shared libraries on other platforms, we can't use 7576ba6a1819Smrg # them. 7577ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7578ba6a1819Smrg ;; 7579ba6a1819Smrg 7580ba6a1819Smrg beos*) 7581ba6a1819Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7582ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7583ba6a1819Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7584ba6a1819Smrg # support --undefined. This deserves some investigation. FIXME 7585ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7586ba6a1819Smrg else 7587ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7588ba6a1819Smrg fi 7589ba6a1819Smrg ;; 7590ba6a1819Smrg 7591ba6a1819Smrg cygwin* | mingw* | pw32*) 7592ba6a1819Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7593ba6a1819Smrg # as there is no search path for DLLs. 7594ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7595ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7596ba6a1819Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 7597ba6a1819Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7598ba6a1819Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' 7599ba6a1819Smrg 7600ba6a1819Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 7601ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 7602ba6a1819Smrg # If the export-symbols file already is a .def file (1st line 7603ba6a1819Smrg # is EXPORTS), use it as is; otherwise, prepend... 7604ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7605ba6a1819Smrg cp $export_symbols $output_objdir/$soname.def; 7606ba6a1819Smrg else 7607ba6a1819Smrg echo EXPORTS > $output_objdir/$soname.def; 7608ba6a1819Smrg cat $export_symbols >> $output_objdir/$soname.def; 7609ba6a1819Smrg fi~ 7610ba6a1819Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 7611ba6a1819Smrg else 7612ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7613ba6a1819Smrg fi 7614ba6a1819Smrg ;; 7615ba6a1819Smrg 7616ba6a1819Smrg interix3*) 7617ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 7618ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7619ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7620ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7621ba6a1819Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7622ba6a1819Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 7623ba6a1819Smrg # default) and relocated if they conflict, which is a slow very memory 7624ba6a1819Smrg # consuming and fragmenting process. To avoid this, we pick a random, 7625ba6a1819Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7626ba6a1819Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7627ba6a1819Smrg _LT_AC_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' 7628ba6a1819Smrg _LT_AC_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' 7629ba6a1819Smrg ;; 7630ba6a1819Smrg 7631ba6a1819Smrg linux*) 7632ba6a1819Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7633ba6a1819Smrg tmp_addflag= 7634ba6a1819Smrg case $cc_basename,$host_cpu in 7635ba6a1819Smrg pgcc*) # Portland Group C compiler 7636ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 7637ba6a1819Smrg tmp_addflag=' $pic_flag' 7638ba6a1819Smrg ;; 7639ba6a1819Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 7640ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 7641ba6a1819Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 7642ba6a1819Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 7643ba6a1819Smrg tmp_addflag=' -i_dynamic' ;; 7644ba6a1819Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 7645ba6a1819Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 7646ba6a1819Smrg ifc* | ifort*) # Intel Fortran compiler 7647ba6a1819Smrg tmp_addflag=' -nofor_main' ;; 7648ba6a1819Smrg esac 7649ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7650ba6a1819Smrg 7651ba6a1819Smrg if test $supports_anon_versioning = yes; then 7652ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 7653ba6a1819Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7654ba6a1819Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 7655ba6a1819Smrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7656ba6a1819Smrg fi 7657ba6a1819Smrg else 7658ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7659ba6a1819Smrg fi 7660ba6a1819Smrg ;; 7661ba6a1819Smrg 7662ba6a1819Smrg netbsd*) 7663ba6a1819Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 7664ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 7665ba6a1819Smrg wlarc= 7666ba6a1819Smrg else 7667ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7668ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7669ba6a1819Smrg fi 7670ba6a1819Smrg ;; 7671ba6a1819Smrg 7672ba6a1819Smrg solaris*) 7673ba6a1819Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 7674ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7675ba6a1819Smrg cat <<EOF 1>&2 7676ba6a1819Smrg 7677ba6a1819Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 7678ba6a1819Smrg*** create shared libraries on Solaris systems. Therefore, libtool 7679ba6a1819Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 7680ba6a1819Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 7681ba6a1819Smrg*** your PATH or compiler configuration so that the native linker is 7682ba6a1819Smrg*** used, and then restart. 7683ba6a1819Smrg 7684ba6a1819SmrgEOF 7685ba6a1819Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7686ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7687ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7688ba6a1819Smrg else 7689ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7690ba6a1819Smrg fi 7691ba6a1819Smrg ;; 7692ba6a1819Smrg 7693ba6a1819Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 7694ba6a1819Smrg case `$LD -v 2>&1` in 7695ba6a1819Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 7696ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7697ba6a1819Smrg cat <<_LT_EOF 1>&2 7698ba6a1819Smrg 7699ba6a1819Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 7700ba6a1819Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 7701ba6a1819Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 7702ba6a1819Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 7703ba6a1819Smrg*** your PATH or compiler configuration so that the native linker is 7704ba6a1819Smrg*** used, and then restart. 7705ba6a1819Smrg 7706ba6a1819Smrg_LT_EOF 7707ba6a1819Smrg ;; 7708ba6a1819Smrg *) 7709ba6a1819Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7710ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 7711ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 7712ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' 7713ba6a1819Smrg else 7714ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7715ba6a1819Smrg fi 7716ba6a1819Smrg ;; 7717ba6a1819Smrg esac 7718ba6a1819Smrg ;; 7719ba6a1819Smrg 7720ba6a1819Smrg sunos4*) 7721ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7722ba6a1819Smrg wlarc= 7723ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7724ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7725ba6a1819Smrg ;; 7726ba6a1819Smrg 7727ba6a1819Smrg *) 7728ba6a1819Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7729ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7730ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7731ba6a1819Smrg else 7732ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7733ba6a1819Smrg fi 7734ba6a1819Smrg ;; 7735ba6a1819Smrg esac 7736ba6a1819Smrg 7737ba6a1819Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 7738ba6a1819Smrg runpath_var= 7739ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 7740ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 7741ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 7742ba6a1819Smrg fi 7743ba6a1819Smrg else 7744ba6a1819Smrg # PORTME fill in a description of your system's linker (not GNU ld) 7745ba6a1819Smrg case $host_os in 7746ba6a1819Smrg aix3*) 7747ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7748ba6a1819Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 7749ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' 7750ba6a1819Smrg # Note: this linker hardcodes the directories in LIBPATH if there 7751ba6a1819Smrg # are no directories specified by -L. 7752ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7753ba6a1819Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 7754ba6a1819Smrg # Neither direct hardcoding nor static linking is supported with a 7755ba6a1819Smrg # broken collect2. 7756ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 7757ba6a1819Smrg fi 7758ba6a1819Smrg ;; 7759ba6a1819Smrg 7760ba6a1819Smrg aix4* | aix5*) 7761ba6a1819Smrg if test "$host_cpu" = ia64; then 7762ba6a1819Smrg # On IA64, the linker does run time linking by default, so we don't 7763ba6a1819Smrg # have to do anything special. 7764ba6a1819Smrg aix_use_runtimelinking=no 7765ba6a1819Smrg exp_sym_flag='-Bexport' 7766ba6a1819Smrg no_entry_flag="" 7767ba6a1819Smrg else 7768ba6a1819Smrg # If we're using GNU nm, then we don't want the "-C" option. 7769ba6a1819Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 7770ba6a1819Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 7771ba6a1819Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 7772ba6a1819Smrg else 7773ba6a1819Smrg _LT_AC_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' 7774ba6a1819Smrg fi 7775ba6a1819Smrg aix_use_runtimelinking=no 7776ba6a1819Smrg 7777ba6a1819Smrg # Test if we are trying to use run time linking or normal 7778ba6a1819Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7779ba6a1819Smrg # need to do runtime linking. 7780ba6a1819Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 7781ba6a1819Smrg for ld_flag in $LDFLAGS; do 7782ba6a1819Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 7783ba6a1819Smrg aix_use_runtimelinking=yes 7784ba6a1819Smrg break 7785ba6a1819Smrg fi 7786ba6a1819Smrg done 7787ba6a1819Smrg ;; 7788ba6a1819Smrg esac 7789ba6a1819Smrg 7790ba6a1819Smrg exp_sym_flag='-bexport' 7791ba6a1819Smrg no_entry_flag='-bnoentry' 7792ba6a1819Smrg fi 7793ba6a1819Smrg 7794ba6a1819Smrg # When large executables or shared objects are built, AIX ld can 7795ba6a1819Smrg # have problems creating the table of contents. If linking a library 7796ba6a1819Smrg # or program results in "error TOC overflow" add -mminimal-toc to 7797ba6a1819Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7798ba6a1819Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7799ba6a1819Smrg 7800ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 7801ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7802ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 7803ba6a1819Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7804ba6a1819Smrg 7805ba6a1819Smrg if test "$GCC" = yes; then 7806ba6a1819Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7807ba6a1819Smrg # We only want to do this on AIX 4.2 and lower, the check 7808ba6a1819Smrg # below for broken collect2 doesn't work under 4.3+ 7809ba6a1819Smrg collect2name=`${CC} -print-prog-name=collect2` 7810ba6a1819Smrg if test -f "$collect2name" && \ 7811ba6a1819Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 7812ba6a1819Smrg then 7813ba6a1819Smrg # We have reworked collect2 7814ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7815ba6a1819Smrg else 7816ba6a1819Smrg # We have old collect2 7817ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 7818ba6a1819Smrg # It fails to find uninstalled libraries when the uninstalled 7819ba6a1819Smrg # path is not listed in the libpath. Setting hardcode_minus_L 7820ba6a1819Smrg # to unsupported forces relinking 7821ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7822ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7823ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 7824ba6a1819Smrg fi 7825ba6a1819Smrg ;; 7826ba6a1819Smrg esac 7827ba6a1819Smrg shared_flag='-shared' 7828ba6a1819Smrg if test "$aix_use_runtimelinking" = yes; then 7829ba6a1819Smrg shared_flag="$shared_flag "'${wl}-G' 7830ba6a1819Smrg fi 7831ba6a1819Smrg else 7832ba6a1819Smrg # not using gcc 7833ba6a1819Smrg if test "$host_cpu" = ia64; then 7834ba6a1819Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7835ba6a1819Smrg # chokes on -Wl,-G. The following line is correct: 7836ba6a1819Smrg shared_flag='-G' 7837ba6a1819Smrg else 7838ba6a1819Smrg if test "$aix_use_runtimelinking" = yes; then 7839ba6a1819Smrg shared_flag='${wl}-G' 7840ba6a1819Smrg else 7841ba6a1819Smrg shared_flag='${wl}-bM:SRE' 7842ba6a1819Smrg fi 7843ba6a1819Smrg fi 7844ba6a1819Smrg fi 7845ba6a1819Smrg 7846ba6a1819Smrg # It seems that -bexpall does not export symbols beginning with 7847ba6a1819Smrg # underscore (_), so it is better to generate a list of symbols to export. 7848ba6a1819Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 7849ba6a1819Smrg if test "$aix_use_runtimelinking" = yes; then 7850ba6a1819Smrg # Warning - without using the other runtime loading flags (-brtl), 7851ba6a1819Smrg # -berok will link without error, but may produce a broken library. 7852ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 7853ba6a1819Smrg # Determine the default libpath from the value encoded in an empty executable. 7854ba6a1819Smrg _LT_AC_SYS_LIBPATH_AIX 7855ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7856ba6a1819Smrg _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 7857ba6a1819Smrg else 7858ba6a1819Smrg if test "$host_cpu" = ia64; then 7859ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7860ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7861ba6a1819Smrg _LT_AC_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" 7862ba6a1819Smrg else 7863ba6a1819Smrg # Determine the default libpath from the value encoded in an empty executable. 7864ba6a1819Smrg _LT_AC_SYS_LIBPATH_AIX 7865ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7866ba6a1819Smrg # Warning - without using the other run time loading flags, 7867ba6a1819Smrg # -berok will link without error, but may produce a broken library. 7868ba6a1819Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7869ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7870ba6a1819Smrg # Exported symbols can be pulled into shared objects from archives 7871ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7872ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7873ba6a1819Smrg # This is similar to how AIX traditionally builds its shared libraries. 7874ba6a1819Smrg _LT_AC_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' 7875ba6a1819Smrg fi 7876ba6a1819Smrg fi 7877ba6a1819Smrg ;; 7878ba6a1819Smrg 7879ba6a1819Smrg amigaos*) 7880ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 7881ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7882ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7883ba6a1819Smrg # see comment about different semantics on the GNU ld section 7884ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7885ba6a1819Smrg ;; 7886ba6a1819Smrg 7887ba6a1819Smrg bsdi[[45]]*) 7888ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 7889ba6a1819Smrg ;; 7890ba6a1819Smrg 7891ba6a1819Smrg cygwin* | mingw* | pw32*) 7892ba6a1819Smrg # When not using gcc, we currently assume that we are using 7893ba6a1819Smrg # Microsoft Visual C++. 7894ba6a1819Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 7895ba6a1819Smrg # no search path for DLLs. 7896ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7897ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7898ba6a1819Smrg # Tell ltmain to make .lib files, not .a files. 7899ba6a1819Smrg libext=lib 7900ba6a1819Smrg # Tell ltmain to make .dll files, not .so files. 7901ba6a1819Smrg shrext_cmds=".dll" 7902ba6a1819Smrg # FIXME: Setting linknames here is a bad hack. 7903ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 7904ba6a1819Smrg # The linker will automatically build a .lib file if we build a DLL. 7905ba6a1819Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 7906ba6a1819Smrg # FIXME: Should let the user specify the lib program. 7907ba6a1819Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 7908ba6a1819Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 7909ba6a1819Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7910ba6a1819Smrg ;; 7911ba6a1819Smrg 7912ba6a1819Smrg darwin* | rhapsody*) 7913ba6a1819Smrg case $host_os in 7914ba6a1819Smrg rhapsody* | darwin1.[[012]]) 7915ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 7916ba6a1819Smrg ;; 7917ba6a1819Smrg *) # Darwin 1.3 on 7918ba6a1819Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 7919ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 7920ba6a1819Smrg else 7921ba6a1819Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 7922ba6a1819Smrg 10.[[012]]) 7923ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 7924ba6a1819Smrg ;; 7925ba6a1819Smrg 10.*) 7926ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 7927ba6a1819Smrg ;; 7928ba6a1819Smrg esac 7929ba6a1819Smrg fi 7930ba6a1819Smrg ;; 7931ba6a1819Smrg esac 7932ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7933ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 7934ba6a1819Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 7935ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7936ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 7937ba6a1819Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7938ba6a1819Smrg if test "$GCC" = yes ; then 7939ba6a1819Smrg output_verbose_link_cmd='echo' 7940ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 7941ba6a1819Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 7942ba6a1819Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 7943ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 7944ba6a1819Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 7945ba6a1819Smrg else 7946ba6a1819Smrg case $cc_basename in 7947ba6a1819Smrg xlc*) 7948ba6a1819Smrg output_verbose_link_cmd='echo' 7949ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 7950ba6a1819Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 7951ba6a1819Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 7952ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 7953ba6a1819Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 7954ba6a1819Smrg ;; 7955ba6a1819Smrg *) 7956ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7957ba6a1819Smrg ;; 7958ba6a1819Smrg esac 7959ba6a1819Smrg fi 7960ba6a1819Smrg ;; 7961ba6a1819Smrg 7962ba6a1819Smrg dgux*) 7963ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7964ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7965ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7966ba6a1819Smrg ;; 7967ba6a1819Smrg 7968ba6a1819Smrg freebsd1*) 7969ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7970ba6a1819Smrg ;; 7971ba6a1819Smrg 7972ba6a1819Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7973ba6a1819Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 7974ba6a1819Smrg # does not break anything, and helps significantly (at the cost of a little 7975ba6a1819Smrg # extra space). 7976ba6a1819Smrg freebsd2.2*) 7977ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7978ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7979ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7980ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7981ba6a1819Smrg ;; 7982ba6a1819Smrg 7983ba6a1819Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7984ba6a1819Smrg freebsd2*) 7985ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7986ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7987ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7988ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7989ba6a1819Smrg ;; 7990ba6a1819Smrg 7991ba6a1819Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7992ba6a1819Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 7993ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7994ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7995ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7996ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7997ba6a1819Smrg ;; 7998ba6a1819Smrg 7999ba6a1819Smrg hpux9*) 8000ba6a1819Smrg if test "$GCC" = yes; then 8001ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 8002ba6a1819Smrg else 8003ba6a1819Smrg _LT_AC_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' 8004ba6a1819Smrg fi 8005ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8006ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8007ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8008ba6a1819Smrg 8009ba6a1819Smrg # hardcode_minus_L: Not really in the search PATH, 8010ba6a1819Smrg # but as the default location of the library. 8011ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 8012ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8013ba6a1819Smrg ;; 8014ba6a1819Smrg 8015ba6a1819Smrg hpux10*) 8016ba6a1819Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 8017ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 8018ba6a1819Smrg else 8019ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 8020ba6a1819Smrg fi 8021ba6a1819Smrg if test "$with_gnu_ld" = no; then 8022ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8023ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8024ba6a1819Smrg 8025ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8026ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8027ba6a1819Smrg 8028ba6a1819Smrg # hardcode_minus_L: Not really in the search PATH, 8029ba6a1819Smrg # but as the default location of the library. 8030ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 8031ba6a1819Smrg fi 8032ba6a1819Smrg ;; 8033ba6a1819Smrg 8034ba6a1819Smrg hpux11*) 8035ba6a1819Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 8036ba6a1819Smrg case $host_cpu in 8037ba6a1819Smrg hppa*64*) 8038ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 8039ba6a1819Smrg ;; 8040ba6a1819Smrg ia64*) 8041ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 8042ba6a1819Smrg ;; 8043ba6a1819Smrg *) 8044ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 8045ba6a1819Smrg ;; 8046ba6a1819Smrg esac 8047ba6a1819Smrg else 8048ba6a1819Smrg case $host_cpu in 8049ba6a1819Smrg hppa*64*) 8050ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 8051ba6a1819Smrg ;; 8052ba6a1819Smrg ia64*) 8053ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 8054ba6a1819Smrg ;; 8055ba6a1819Smrg *) 8056ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 8057ba6a1819Smrg ;; 8058ba6a1819Smrg esac 8059ba6a1819Smrg fi 8060ba6a1819Smrg if test "$with_gnu_ld" = no; then 8061ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8062ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8063ba6a1819Smrg 8064ba6a1819Smrg case $host_cpu in 8065ba6a1819Smrg hppa*64*|ia64*) 8066ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 8067ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 8068ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8069ba6a1819Smrg ;; 8070ba6a1819Smrg *) 8071ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8072ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8073ba6a1819Smrg 8074ba6a1819Smrg # hardcode_minus_L: Not really in the search PATH, 8075ba6a1819Smrg # but as the default location of the library. 8076ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 8077ba6a1819Smrg ;; 8078ba6a1819Smrg esac 8079ba6a1819Smrg fi 8080ba6a1819Smrg ;; 8081ba6a1819Smrg 8082ba6a1819Smrg irix5* | irix6* | nonstopux*) 8083ba6a1819Smrg if test "$GCC" = yes; then 8084ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8085ba6a1819Smrg else 8086ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 8087ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 8088ba6a1819Smrg fi 8089ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8090ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8091ba6a1819Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 8092ba6a1819Smrg ;; 8093ba6a1819Smrg 8094ba6a1819Smrg netbsd*) 8095ba6a1819Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 8096ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 8097ba6a1819Smrg else 8098ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 8099ba6a1819Smrg fi 8100ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8101ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8102ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8103ba6a1819Smrg ;; 8104ba6a1819Smrg 8105ba6a1819Smrg newsos6) 8106ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8107ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8108ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8109ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8110ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8111ba6a1819Smrg ;; 8112ba6a1819Smrg 8113ba6a1819Smrg openbsd*) 8114ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8115ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8116ba6a1819Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 8117ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 8118ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 8119ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8120ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8121ba6a1819Smrg else 8122ba6a1819Smrg case $host_os in 8123ba6a1819Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 8124ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8125ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8126ba6a1819Smrg ;; 8127ba6a1819Smrg *) 8128ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 8129ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8130ba6a1819Smrg ;; 8131ba6a1819Smrg esac 8132ba6a1819Smrg fi 8133ba6a1819Smrg ;; 8134ba6a1819Smrg 8135ba6a1819Smrg os2*) 8136ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8137ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 8138ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 8139ba6a1819Smrg _LT_AC_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' 8140ba6a1819Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 8141ba6a1819Smrg ;; 8142ba6a1819Smrg 8143ba6a1819Smrg osf3*) 8144ba6a1819Smrg if test "$GCC" = yes; then 8145ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8146ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8147ba6a1819Smrg else 8148ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8149ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 8150ba6a1819Smrg fi 8151ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8152ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8153ba6a1819Smrg ;; 8154ba6a1819Smrg 8155ba6a1819Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 8156ba6a1819Smrg if test "$GCC" = yes; then 8157ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8158ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8159ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8160ba6a1819Smrg else 8161ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8162ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 8163ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ 8164ba6a1819Smrg $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' 8165ba6a1819Smrg 8166ba6a1819Smrg # Both c and cxx compiler support -rpath directly 8167ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8168ba6a1819Smrg fi 8169ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8170ba6a1819Smrg ;; 8171ba6a1819Smrg 8172ba6a1819Smrg solaris*) 8173ba6a1819Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 8174ba6a1819Smrg if test "$GCC" = yes; then 8175ba6a1819Smrg wlarc='${wl}' 8176ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 8177ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 8178ba6a1819Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 8179ba6a1819Smrg else 8180ba6a1819Smrg wlarc='' 8181ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 8182ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 8183ba6a1819Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 8184ba6a1819Smrg fi 8185ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8186ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8187ba6a1819Smrg case $host_os in 8188ba6a1819Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8189ba6a1819Smrg *) 8190ba6a1819Smrg # The compiler driver will combine linker options so we 8191ba6a1819Smrg # cannot just pass the convience library names through 8192ba6a1819Smrg # without $wl, iff we do not link with $LD. 8193ba6a1819Smrg # Luckily, gcc supports the same syntax we need for Sun Studio. 8194ba6a1819Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 8195ba6a1819Smrg case $wlarc in 8196ba6a1819Smrg '') 8197ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 8198ba6a1819Smrg *) 8199ba6a1819Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; 8200ba6a1819Smrg esac ;; 8201ba6a1819Smrg esac 8202ba6a1819Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 8203ba6a1819Smrg ;; 8204ba6a1819Smrg 8205ba6a1819Smrg sunos4*) 8206ba6a1819Smrg if test "x$host_vendor" = xsequent; then 8207ba6a1819Smrg # Use $CC to link under sequent, because it throws in some extra .o 8208ba6a1819Smrg # files that make .init and .fini sections work. 8209ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 8210ba6a1819Smrg else 8211ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 8212ba6a1819Smrg fi 8213ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8214ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8215ba6a1819Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 8216ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8217ba6a1819Smrg ;; 8218ba6a1819Smrg 8219ba6a1819Smrg sysv4) 8220ba6a1819Smrg case $host_vendor in 8221ba6a1819Smrg sni) 8222ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8223ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 8224ba6a1819Smrg ;; 8225ba6a1819Smrg siemens) 8226ba6a1819Smrg ## LD is ld it makes a PLAMLIB 8227ba6a1819Smrg ## CC just makes a GrossModule. 8228ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 8229ba6a1819Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 8230ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 8231ba6a1819Smrg ;; 8232ba6a1819Smrg motorola) 8233ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8234ba6a1819Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 8235ba6a1819Smrg ;; 8236ba6a1819Smrg esac 8237ba6a1819Smrg runpath_var='LD_RUN_PATH' 8238ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8239ba6a1819Smrg ;; 8240ba6a1819Smrg 8241ba6a1819Smrg sysv4.3*) 8242ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8243ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8244ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 8245ba6a1819Smrg ;; 8246ba6a1819Smrg 8247ba6a1819Smrg sysv4*MP*) 8248ba6a1819Smrg if test -d /usr/nec; then 8249ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8250ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8251ba6a1819Smrg runpath_var=LD_RUN_PATH 8252ba6a1819Smrg hardcode_runpath_var=yes 8253ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 8254ba6a1819Smrg fi 8255ba6a1819Smrg ;; 8256ba6a1819Smrg 8257ba6a1819Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 8258ba6a1819Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8259ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 8260ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8261ba6a1819Smrg runpath_var='LD_RUN_PATH' 8262ba6a1819Smrg 8263ba6a1819Smrg if test "$GCC" = yes; then 8264ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8265ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8266ba6a1819Smrg else 8267ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8268ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8269ba6a1819Smrg fi 8270ba6a1819Smrg ;; 8271ba6a1819Smrg 8272ba6a1819Smrg sysv5* | sco3.2v5* | sco5v6*) 8273ba6a1819Smrg # Note: We can NOT use -z defs as we might desire, because we do not 8274ba6a1819Smrg # link with -lc, and that would cause any symbols used from libc to 8275ba6a1819Smrg # always be unresolved, which means just about no library would 8276ba6a1819Smrg # ever link correctly. If we're not using GNU ld we use -z text 8277ba6a1819Smrg # though, which does catch some bad symbols but isn't as heavy-handed 8278ba6a1819Smrg # as -z defs. 8279ba6a1819Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8280ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 8281ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 8282ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8283ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 8284ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 8285ba6a1819Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 8286ba6a1819Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8287ba6a1819Smrg runpath_var='LD_RUN_PATH' 8288ba6a1819Smrg 8289ba6a1819Smrg if test "$GCC" = yes; then 8290ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 8291ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 8292ba6a1819Smrg else 8293ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 8294ba6a1819Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 8295ba6a1819Smrg fi 8296ba6a1819Smrg ;; 8297ba6a1819Smrg 8298ba6a1819Smrg uts4*) 8299ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8300ba6a1819Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8301ba6a1819Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8302ba6a1819Smrg ;; 8303ba6a1819Smrg 8304ba6a1819Smrg *) 8305ba6a1819Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 8306ba6a1819Smrg ;; 8307ba6a1819Smrg esac 8308ba6a1819Smrg fi 8309ba6a1819Smrg]) 8310ba6a1819SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 8311ba6a1819Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8312ba6a1819Smrg 8313ba6a1819Smrg# 8314ba6a1819Smrg# Do we need to explicitly link libc? 8315ba6a1819Smrg# 8316ba6a1819Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 8317ba6a1819Smrgx|xyes) 8318ba6a1819Smrg # Assume -lc should be added 8319ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 8320ba6a1819Smrg 8321ba6a1819Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 8322ba6a1819Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 8323ba6a1819Smrg *'~'*) 8324ba6a1819Smrg # FIXME: we may have to deal with multi-command sequences. 8325ba6a1819Smrg ;; 8326ba6a1819Smrg '$CC '*) 8327ba6a1819Smrg # Test whether the compiler implicitly links with -lc since on some 8328ba6a1819Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 8329ba6a1819Smrg # to ld, don't add -lc before -lgcc. 8330ba6a1819Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 8331ba6a1819Smrg $rm conftest* 8332ba6a1819Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 8333ba6a1819Smrg 8334ba6a1819Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 8335ba6a1819Smrg soname=conftest 8336ba6a1819Smrg lib=conftest 8337ba6a1819Smrg libobjs=conftest.$ac_objext 8338ba6a1819Smrg deplibs= 8339ba6a1819Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 8340ba6a1819Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 8341ba6a1819Smrg compiler_flags=-v 8342ba6a1819Smrg linker_flags=-v 8343ba6a1819Smrg verstring= 8344ba6a1819Smrg output_objdir=. 8345ba6a1819Smrg libname=conftest 8346ba6a1819Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 8347ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 8348ba6a1819Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 8349ba6a1819Smrg then 8350ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 8351ba6a1819Smrg else 8352ba6a1819Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 8353ba6a1819Smrg fi 8354ba6a1819Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 8355ba6a1819Smrg else 8356ba6a1819Smrg cat conftest.err 1>&5 8357ba6a1819Smrg fi 8358ba6a1819Smrg $rm conftest* 8359ba6a1819Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 8360ba6a1819Smrg ;; 8361ba6a1819Smrg esac 8362ba6a1819Smrg fi 8363ba6a1819Smrg ;; 8364ba6a1819Smrgesac 8365ba6a1819Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 8366ba6a1819Smrg 8367ba6a1819Smrg 8368ba6a1819Smrg# _LT_AC_FILE_LTDLL_C 8369ba6a1819Smrg# ------------------- 8370ba6a1819Smrg# Be careful that the start marker always follows a newline. 8371ba6a1819SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 8372ba6a1819Smrg# /* ltdll.c starts here */ 8373ba6a1819Smrg# #define WIN32_LEAN_AND_MEAN 8374ba6a1819Smrg# #include <windows.h> 8375ba6a1819Smrg# #undef WIN32_LEAN_AND_MEAN 8376ba6a1819Smrg# #include <stdio.h> 8377ba6a1819Smrg# 8378ba6a1819Smrg# #ifndef __CYGWIN__ 8379ba6a1819Smrg# # ifdef __CYGWIN32__ 8380ba6a1819Smrg# # define __CYGWIN__ __CYGWIN32__ 8381ba6a1819Smrg# # endif 8382ba6a1819Smrg# #endif 8383ba6a1819Smrg# 8384ba6a1819Smrg# #ifdef __cplusplus 8385ba6a1819Smrg# extern "C" { 8386ba6a1819Smrg# #endif 8387ba6a1819Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 8388ba6a1819Smrg# #ifdef __cplusplus 8389ba6a1819Smrg# } 8390ba6a1819Smrg# #endif 8391ba6a1819Smrg# 8392ba6a1819Smrg# #ifdef __CYGWIN__ 8393ba6a1819Smrg# #include <cygwin/cygwin_dll.h> 8394ba6a1819Smrg# DECLARE_CYGWIN_DLL( DllMain ); 8395ba6a1819Smrg# #endif 8396ba6a1819Smrg# HINSTANCE __hDllInstance_base; 8397ba6a1819Smrg# 8398ba6a1819Smrg# BOOL APIENTRY 8399ba6a1819Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 8400ba6a1819Smrg# { 8401ba6a1819Smrg# __hDllInstance_base = hInst; 8402ba6a1819Smrg# return TRUE; 8403ba6a1819Smrg# } 8404ba6a1819Smrg# /* ltdll.c ends here */ 8405ba6a1819Smrg])# _LT_AC_FILE_LTDLL_C 8406ba6a1819Smrg 8407ba6a1819Smrg 8408ba6a1819Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 8409ba6a1819Smrg# --------------------------------- 8410ba6a1819SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 8411ba6a1819Smrg 8412ba6a1819Smrg 8413ba6a1819Smrg# old names 8414ba6a1819SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 8415ba6a1819SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8416ba6a1819SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8417ba6a1819SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8418ba6a1819SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8419ba6a1819SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 8420ba6a1819SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 8421ba6a1819Smrg 8422ba6a1819Smrg# This is just to silence aclocal about the macro not being used 8423ba6a1819Smrgifelse([AC_DISABLE_FAST_INSTALL]) 8424ba6a1819Smrg 8425ba6a1819SmrgAC_DEFUN([LT_AC_PROG_GCJ], 8426ba6a1819Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 8427ba6a1819Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8428ba6a1819Smrg AC_SUBST(GCJFLAGS) 8429ba6a1819Smrg]) 8430ba6a1819Smrg 8431ba6a1819SmrgAC_DEFUN([LT_AC_PROG_RC], 8432ba6a1819Smrg[AC_CHECK_TOOL(RC, windres, no) 8433ba6a1819Smrg]) 8434ba6a1819Smrg 8435ba6a1819Smrg# NOTE: This macro has been submitted for inclusion into # 8436ba6a1819Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8437ba6a1819Smrg# a released version of Autoconf we should remove this # 8438ba6a1819Smrg# macro and use it instead. # 8439ba6a1819Smrg# LT_AC_PROG_SED 8440ba6a1819Smrg# -------------- 8441ba6a1819Smrg# Check for a fully-functional sed program, that truncates 8442ba6a1819Smrg# as few characters as possible. Prefer GNU sed if found. 8443ba6a1819SmrgAC_DEFUN([LT_AC_PROG_SED], 8444ba6a1819Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8445ba6a1819SmrgAC_CACHE_VAL(lt_cv_path_SED, 8446ba6a1819Smrg[# Loop through the user's path and test for sed and gsed. 8447ba6a1819Smrg# Then use that list of sed's as ones to test for truncation. 8448ba6a1819Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8449ba6a1819Smrgfor as_dir in $PATH 8450ba6a1819Smrgdo 8451ba6a1819Smrg IFS=$as_save_IFS 8452ba6a1819Smrg test -z "$as_dir" && as_dir=. 8453ba6a1819Smrg for lt_ac_prog in sed gsed; do 8454ba6a1819Smrg for ac_exec_ext in '' $ac_executable_extensions; do 8455ba6a1819Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8456ba6a1819Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8457ba6a1819Smrg fi 8458ba6a1819Smrg done 8459ba6a1819Smrg done 8460ba6a1819Smrgdone 8461ba6a1819Smrglt_ac_max=0 8462ba6a1819Smrglt_ac_count=0 8463ba6a1819Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8464ba6a1819Smrg# along with /bin/sed that truncates output. 8465ba6a1819Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8466ba6a1819Smrg test ! -f $lt_ac_sed && continue 8467ba6a1819Smrg cat /dev/null > conftest.in 8468ba6a1819Smrg lt_ac_count=0 8469ba6a1819Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8470ba6a1819Smrg # Check for GNU sed and select it if it is found. 8471ba6a1819Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8472ba6a1819Smrg lt_cv_path_SED=$lt_ac_sed 8473ba6a1819Smrg break 8474ba6a1819Smrg fi 8475ba6a1819Smrg while true; do 8476ba6a1819Smrg cat conftest.in conftest.in >conftest.tmp 8477ba6a1819Smrg mv conftest.tmp conftest.in 8478ba6a1819Smrg cp conftest.in conftest.nl 8479ba6a1819Smrg echo >>conftest.nl 8480ba6a1819Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8481ba6a1819Smrg cmp -s conftest.out conftest.nl || break 8482ba6a1819Smrg # 10000 chars as input seems more than enough 8483ba6a1819Smrg test $lt_ac_count -gt 10 && break 8484ba6a1819Smrg lt_ac_count=`expr $lt_ac_count + 1` 8485ba6a1819Smrg if test $lt_ac_count -gt $lt_ac_max; then 8486ba6a1819Smrg lt_ac_max=$lt_ac_count 8487ba6a1819Smrg lt_cv_path_SED=$lt_ac_sed 8488ba6a1819Smrg fi 8489ba6a1819Smrg done 8490ba6a1819Smrgdone 8491ba6a1819Smrg]) 8492ba6a1819SmrgSED=$lt_cv_path_SED 8493ba6a1819SmrgAC_MSG_RESULT([$SED]) 8494ba6a1819Smrg]) 8495ba6a1819Smrg 8496ba6a1819Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8497ba6a1819Smrg# 8498ba6a1819Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8499ba6a1819Smrg# 8500ba6a1819Smrg# This program is free software; you can redistribute it and/or modify 8501ba6a1819Smrg# it under the terms of the GNU General Public License as published by 8502ba6a1819Smrg# the Free Software Foundation; either version 2 of the License, or 8503ba6a1819Smrg# (at your option) any later version. 8504ba6a1819Smrg# 8505ba6a1819Smrg# This program is distributed in the hope that it will be useful, but 8506ba6a1819Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 8507ba6a1819Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8508ba6a1819Smrg# General Public License for more details. 8509ba6a1819Smrg# 8510ba6a1819Smrg# You should have received a copy of the GNU General Public License 8511ba6a1819Smrg# along with this program; if not, write to the Free Software 8512ba6a1819Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8513ba6a1819Smrg# 8514ba6a1819Smrg# As a special exception to the GNU General Public License, if you 8515ba6a1819Smrg# distribute this file as part of a program that contains a 8516ba6a1819Smrg# configuration script generated by Autoconf, you may include it under 8517ba6a1819Smrg# the same distribution terms that you use for the rest of that program. 8518ba6a1819Smrg 8519ba6a1819Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8520ba6a1819Smrg# ---------------------------------- 8521ba6a1819SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 8522ba6a1819Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8523ba6a1819Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 8524ba6a1819SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 8525ba6a1819Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8526ba6a1819Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8527ba6a1819Smrgfi 8528ba6a1819Smrgif test -n "$PKG_CONFIG"; then 8529ba6a1819Smrg _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) 8530ba6a1819Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8531ba6a1819Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8532ba6a1819Smrg AC_MSG_RESULT([yes]) 8533ba6a1819Smrg else 8534ba6a1819Smrg AC_MSG_RESULT([no]) 8535ba6a1819Smrg PKG_CONFIG="" 8536ba6a1819Smrg fi 8537ba6a1819Smrg 8538ba6a1819Smrgfi[]dnl 8539ba6a1819Smrg])# PKG_PROG_PKG_CONFIG 8540ba6a1819Smrg 8541ba6a1819Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8542ba6a1819Smrg# 8543ba6a1819Smrg# Check to see whether a particular set of modules exists. Similar 8544ba6a1819Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8545ba6a1819Smrg# 8546ba6a1819Smrg# 8547ba6a1819Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 8548ba6a1819Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 8549ba6a1819Smrg# PKG_CHECK_EXISTS manually 8550ba6a1819Smrg# -------------------------------------------------------------- 8551ba6a1819SmrgAC_DEFUN([PKG_CHECK_EXISTS], 8552ba6a1819Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8553ba6a1819Smrgif test -n "$PKG_CONFIG" && \ 8554ba6a1819Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8555ba6a1819Smrg m4_ifval([$2], [$2], [:]) 8556ba6a1819Smrgm4_ifvaln([$3], [else 8557ba6a1819Smrg $3])dnl 8558ba6a1819Smrgfi]) 8559ba6a1819Smrg 8560ba6a1819Smrg 8561ba6a1819Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8562ba6a1819Smrg# --------------------------------------------- 8563ba6a1819Smrgm4_define([_PKG_CONFIG], 8564ba6a1819Smrg[if test -n "$PKG_CONFIG"; then 8565ba6a1819Smrg PKG_CHECK_EXISTS([$3], 8566ba6a1819Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8567ba6a1819Smrg [pkg_failed=yes]) 8568ba6a1819Smrgelse 8569ba6a1819Smrg pkg_failed=untried 8570ba6a1819Smrgfi[]dnl 8571ba6a1819Smrg])# _PKG_CONFIG 8572ba6a1819Smrg 8573ba6a1819Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8574ba6a1819Smrg# [ACTION-IF-NOT-FOUND]) 8575ba6a1819Smrg# 8576ba6a1819Smrg# 8577ba6a1819Smrg# Note that if there is a possibility the first call to 8578ba6a1819Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8579ba6a1819Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8580ba6a1819Smrg# 8581ba6a1819Smrg# 8582ba6a1819Smrg# -------------------------------------------------------------- 8583ba6a1819SmrgAC_DEFUN([PKG_CHECK_MODULES], 8584ba6a1819Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8585ba6a1819SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8586ba6a1819SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8587ba6a1819Smrg 8588ba6a1819Smrgpkg_failed=no 8589ba6a1819SmrgAC_MSG_CHECKING([for $1]) 8590ba6a1819Smrg 8591ba6a1819Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8592ba6a1819Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8593ba6a1819Smrg 8594ba6a1819Smrgif test $pkg_failed = yes; then 8595ba6a1819Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 8596ba6a1819Smrg # Put the nasty error message in config.log where it belongs 8597ba6a1819Smrg echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD 8598ba6a1819Smrg 8599ba6a1819Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 8600ba6a1819Smrg[Package requirements ($2) were not met. 8601ba6a1819SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8602ba6a1819Smrginstalled software in a non-standard prefix. 8603ba6a1819Smrg 8604ba6a1819SmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables 8605ba6a1819Smrgto avoid the need to call pkg-config. See the pkg-config man page for 8606ba6a1819Smrgmore details.])], 8607ba6a1819Smrg [$4]) 8608ba6a1819Smrgelif test $pkg_failed = untried; then 8609ba6a1819Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 8610ba6a1819Smrg[The pkg-config script could not be found or is too old. Make sure it 8611ba6a1819Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 8612ba6a1819Smrgpath to pkg-config. 8613ba6a1819Smrg 8614ba6a1819SmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables 8615ba6a1819Smrgto avoid the need to call pkg-config. See the pkg-config man page for 8616ba6a1819Smrgmore details. 8617ba6a1819Smrg 8618ba6a1819SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 8619ba6a1819Smrg [$4]) 8620ba6a1819Smrgelse 8621ba6a1819Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8622ba6a1819Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8623ba6a1819Smrg AC_MSG_RESULT([yes]) 8624ba6a1819Smrg ifelse([$3], , :, [$3]) 8625ba6a1819Smrgfi[]dnl 8626ba6a1819Smrg])# PKG_CHECK_MODULES 8627ba6a1819Smrg 8628