aclocal.m4 revision 1ae1b5e8
11ae1b5e8Smrg# generated automatically by aclocal 1.10 -*- Autoconf -*- 276888252Smrg 376888252Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 41ae1b5e8Smrg# 2005, 2006 Free Software Foundation, Inc. 576888252Smrg# This file is free software; the Free Software Foundation 676888252Smrg# gives unlimited permission to copy and/or distribute it, 776888252Smrg# with or without modifications, as long as this notice is preserved. 876888252Smrg 976888252Smrg# This program is distributed in the hope that it will be useful, 1076888252Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1176888252Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1276888252Smrg# PARTICULAR PURPOSE. 1376888252Smrg 141ae1b5e8Smrgm4_if(m4_PACKAGE_VERSION, [2.61],, 151ae1b5e8Smrg[m4_fatal([this file was generated for autoconf 2.61. 161ae1b5e8SmrgYou have another version of autoconf. If you want to use that, 171ae1b5e8Smrgyou should regenerate the build system entirely.], [63])]) 1876888252Smrg 191ae1b5e8Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 201ae1b5e8Smrgdnl 211ae1b5e8Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 221ae1b5e8Smrgdnl 231ae1b5e8Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 241ae1b5e8Smrgdnl copy of this software and associated documentation files (the 251ae1b5e8Smrgdnl "Software"), to deal in the Software without restriction, including 261ae1b5e8Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 271ae1b5e8Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 281ae1b5e8Smrgdnl to whom the Software is furnished to do so, provided that the above 291ae1b5e8Smrgdnl copyright notice(s) and this permission notice appear in all copies of 301ae1b5e8Smrgdnl the Software and that both the above copyright notice(s) and this 311ae1b5e8Smrgdnl permission notice appear in supporting documentation. 321ae1b5e8Smrgdnl 331ae1b5e8Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 341ae1b5e8Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 351ae1b5e8Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 361ae1b5e8Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 371ae1b5e8Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 381ae1b5e8Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 391ae1b5e8Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 401ae1b5e8Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 411ae1b5e8Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 421ae1b5e8Smrgdnl 431ae1b5e8Smrgdnl Except as contained in this notice, the name of a copyright holder 441ae1b5e8Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 451ae1b5e8Smrgdnl or other dealings in this Software without prior written authorization 461ae1b5e8Smrgdnl of the copyright holder. 4776888252Smrg 481ae1b5e8Smrg# XORG_MACROS_VERSION(required-version) 491ae1b5e8Smrg# ------------------------------------- 501ae1b5e8Smrg# Minimum version: 1.1.0 511ae1b5e8Smrg# 521ae1b5e8Smrg# If you're using a macro added in Version 1.1 or newer, include this in 531ae1b5e8Smrg# your configure.ac with the minimum required version, such as: 541ae1b5e8Smrg# XORG_MACROS_VERSION(1.1) 551ae1b5e8Smrg# 561ae1b5e8Smrg# To force at least a version with this macro defined, also add: 571ae1b5e8Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 581ae1b5e8Smrg# 591ae1b5e8Smrg# 601ae1b5e8Smrg# See the "minimum version" comment for each macro you use to see what 611ae1b5e8Smrg# version you require. 621ae1b5e8SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 631ae1b5e8Smrg [XORG_MACROS_needed_version=$1 641ae1b5e8Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 651ae1b5e8Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 661ae1b5e8Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 671ae1b5e8Smrg [XORG_MACROS_version=1.2.1 681ae1b5e8Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 691ae1b5e8Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 701ae1b5e8Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 711ae1b5e8Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 721ae1b5e8Smrg fi 731ae1b5e8Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 741ae1b5e8Smrg 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]) 751ae1b5e8Smrg fi 761ae1b5e8Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 771ae1b5e8Smrg]) # XORG_MACROS_VERSION 7876888252Smrg 791ae1b5e8Smrg# XORG_PROG_RAWCPP() 801ae1b5e8Smrg# ------------------ 811ae1b5e8Smrg# Minimum version: 1.0.0 821ae1b5e8Smrg# 831ae1b5e8Smrg# Find cpp program and necessary flags for use in pre-processing text files 841ae1b5e8Smrg# such as man pages and config files 851ae1b5e8SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 861ae1b5e8SmrgAC_REQUIRE([AC_PROG_CPP]) 871ae1b5e8SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 881ae1b5e8Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8976888252Smrg 901ae1b5e8Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 911ae1b5e8Smrg# which is not the best choice for supporting other OS'es, but covers most 921ae1b5e8Smrg# of the ones we need for now. 931ae1b5e8SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 941ae1b5e8SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 951ae1b5e8Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 961ae1b5e8Smrg AC_MSG_RESULT([no]) 971ae1b5e8Smrgelse 981ae1b5e8Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 991ae1b5e8Smrg RAWCPPFLAGS=-undef 1001ae1b5e8Smrg AC_MSG_RESULT([yes]) 1011ae1b5e8Smrg # under Cygwin unix is still defined even with -undef 1021ae1b5e8Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1031ae1b5e8Smrg RAWCPPFLAGS="-undef -ansi" 1041ae1b5e8Smrg AC_MSG_RESULT([yes, with -ansi]) 1051ae1b5e8Smrg else 1061ae1b5e8Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1071ae1b5e8Smrg fi 1081ae1b5e8Smrgfi 1091ae1b5e8Smrgrm -f conftest.$ac_ext 11076888252Smrg 1111ae1b5e8SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1121ae1b5e8SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1131ae1b5e8Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1141ae1b5e8Smrg AC_MSG_RESULT([no]) 1151ae1b5e8Smrgelse 1161ae1b5e8Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1171ae1b5e8Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1181ae1b5e8Smrg AC_MSG_RESULT([yes]) 1191ae1b5e8Smrg else 1201ae1b5e8Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1211ae1b5e8Smrg fi 1221ae1b5e8Smrgfi 1231ae1b5e8Smrgrm -f conftest.$ac_ext 1241ae1b5e8SmrgAC_SUBST(RAWCPPFLAGS) 1251ae1b5e8Smrg]) # XORG_PROG_RAWCPP 12676888252Smrg 1271ae1b5e8Smrg# XORG_MANPAGE_SECTIONS() 1281ae1b5e8Smrg# ----------------------- 1291ae1b5e8Smrg# Minimum version: 1.0.0 1301ae1b5e8Smrg# 1311ae1b5e8Smrg# Determine which sections man pages go in for the different man page types 1321ae1b5e8Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1331ae1b5e8Smrg# Not sure if there's any better way than just hardcoding by OS name. 1341ae1b5e8Smrg# Override default settings by setting environment variables 13576888252Smrg 1361ae1b5e8SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1371ae1b5e8SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 13876888252Smrg 1391ae1b5e8Smrgif test x$APP_MAN_SUFFIX = x ; then 1401ae1b5e8Smrg APP_MAN_SUFFIX=1 1411ae1b5e8Smrgfi 1421ae1b5e8Smrgif test x$APP_MAN_DIR = x ; then 1431ae1b5e8Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1441ae1b5e8Smrgfi 14576888252Smrg 1461ae1b5e8Smrgif test x$LIB_MAN_SUFFIX = x ; then 1471ae1b5e8Smrg LIB_MAN_SUFFIX=3 1481ae1b5e8Smrgfi 1491ae1b5e8Smrgif test x$LIB_MAN_DIR = x ; then 1501ae1b5e8Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1511ae1b5e8Smrgfi 15276888252Smrg 1531ae1b5e8Smrgif test x$FILE_MAN_SUFFIX = x ; then 1541ae1b5e8Smrg case $host_os in 1551ae1b5e8Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 1561ae1b5e8Smrg *) FILE_MAN_SUFFIX=5 ;; 1571ae1b5e8Smrg esac 1581ae1b5e8Smrgfi 1591ae1b5e8Smrgif test x$FILE_MAN_DIR = x ; then 1601ae1b5e8Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1611ae1b5e8Smrgfi 16276888252Smrg 1631ae1b5e8Smrgif test x$MISC_MAN_SUFFIX = x ; then 1641ae1b5e8Smrg case $host_os in 1651ae1b5e8Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 1661ae1b5e8Smrg *) MISC_MAN_SUFFIX=7 ;; 1671ae1b5e8Smrg esac 1681ae1b5e8Smrgfi 1691ae1b5e8Smrgif test x$MISC_MAN_DIR = x ; then 1701ae1b5e8Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1711ae1b5e8Smrgfi 17276888252Smrg 1731ae1b5e8Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1741ae1b5e8Smrg case $host_os in 1751ae1b5e8Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1761ae1b5e8Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1771ae1b5e8Smrg esac 1781ae1b5e8Smrgfi 1791ae1b5e8Smrgif test x$DRIVER_MAN_DIR = x ; then 1801ae1b5e8Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1811ae1b5e8Smrgfi 18276888252Smrg 1831ae1b5e8Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1841ae1b5e8Smrg case $host_os in 1851ae1b5e8Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1861ae1b5e8Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1871ae1b5e8Smrg esac 1881ae1b5e8Smrgfi 1891ae1b5e8Smrgif test x$ADMIN_MAN_DIR = x ; then 1901ae1b5e8Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1911ae1b5e8Smrgfi 19276888252Smrg 19376888252Smrg 1941ae1b5e8SmrgAC_SUBST([APP_MAN_SUFFIX]) 1951ae1b5e8SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1961ae1b5e8SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1971ae1b5e8SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1981ae1b5e8SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1991ae1b5e8SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 2001ae1b5e8SmrgAC_SUBST([APP_MAN_DIR]) 2011ae1b5e8SmrgAC_SUBST([LIB_MAN_DIR]) 2021ae1b5e8SmrgAC_SUBST([FILE_MAN_DIR]) 2031ae1b5e8SmrgAC_SUBST([MISC_MAN_DIR]) 2041ae1b5e8SmrgAC_SUBST([DRIVER_MAN_DIR]) 2051ae1b5e8SmrgAC_SUBST([ADMIN_MAN_DIR]) 2061ae1b5e8Smrg]) # XORG_MANPAGE_SECTIONS 20776888252Smrg 2081ae1b5e8Smrg# XORG_CHECK_LINUXDOC 2091ae1b5e8Smrg# ------------------- 2101ae1b5e8Smrg# Minimum version: 1.0.0 2111ae1b5e8Smrg# 2121ae1b5e8Smrg# Defines the variable MAKE_TEXT if the necessary tools and 2131ae1b5e8Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 2141ae1b5e8Smrg# Whether or not the necessary tools and files are found can be checked 2151ae1b5e8Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 2161ae1b5e8SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 2171ae1b5e8Smrgif test x$XORG_SGML_PATH = x ; then 2181ae1b5e8Smrg XORG_SGML_PATH=$prefix/share/sgml 2191ae1b5e8Smrgfi 2201ae1b5e8SmrgHAVE_DEFS_ENT= 22176888252Smrg 2221ae1b5e8Smrgif test x"$cross_compiling" = x"yes" ; then 2231ae1b5e8Smrg HAVE_DEFS_ENT=no 2241ae1b5e8Smrgelse 2251ae1b5e8Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 2261ae1b5e8Smrgfi 22776888252Smrg 2281ae1b5e8SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 2291ae1b5e8SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 23076888252Smrg 2311ae1b5e8SmrgAC_MSG_CHECKING([Whether to build documentation]) 23276888252Smrg 2331ae1b5e8Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 2341ae1b5e8Smrg BUILDDOC=yes 2351ae1b5e8Smrgelse 2361ae1b5e8Smrg BUILDDOC=no 2371ae1b5e8Smrgfi 23876888252Smrg 2391ae1b5e8SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 24076888252Smrg 2411ae1b5e8SmrgAC_MSG_RESULT([$BUILDDOC]) 24276888252Smrg 2431ae1b5e8SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 24476888252Smrg 2451ae1b5e8Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 2461ae1b5e8Smrg BUILDPDFDOC=yes 2471ae1b5e8Smrgelse 2481ae1b5e8Smrg BUILDPDFDOC=no 2491ae1b5e8Smrgfi 25076888252Smrg 2511ae1b5e8SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 25276888252Smrg 2531ae1b5e8SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 25476888252Smrg 2551ae1b5e8SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 2561ae1b5e8SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 2571ae1b5e8SmrgMAKE_PDF="$PS2PDF" 2581ae1b5e8SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 25976888252Smrg 2601ae1b5e8SmrgAC_SUBST(MAKE_TEXT) 2611ae1b5e8SmrgAC_SUBST(MAKE_PS) 2621ae1b5e8SmrgAC_SUBST(MAKE_PDF) 2631ae1b5e8SmrgAC_SUBST(MAKE_HTML) 2641ae1b5e8Smrg]) # XORG_CHECK_LINUXDOC 26576888252Smrg 2661ae1b5e8Smrg# XORG_CHECK_DOCBOOK 2671ae1b5e8Smrg# ------------------- 2681ae1b5e8Smrg# Minimum version: 1.0.0 2691ae1b5e8Smrg# 2701ae1b5e8Smrg# Checks for the ability to build output formats from SGML DocBook source. 2711ae1b5e8Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 2721ae1b5e8Smrg# indicates whether the necessary tools and files are found and, if set, 2731ae1b5e8Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 2741ae1b5e8SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 2751ae1b5e8Smrgif test x$XORG_SGML_PATH = x ; then 2761ae1b5e8Smrg XORG_SGML_PATH=$prefix/share/sgml 2771ae1b5e8Smrgfi 2781ae1b5e8SmrgHAVE_DEFS_ENT= 2791ae1b5e8SmrgBUILDTXTDOC=no 2801ae1b5e8SmrgBUILDPDFDOC=no 2811ae1b5e8SmrgBUILDPSDOC=no 2821ae1b5e8SmrgBUILDHTMLDOC=no 2831ae1b5e8Smrg 2841ae1b5e8SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 2851ae1b5e8Smrg 2861ae1b5e8SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 2871ae1b5e8SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 2881ae1b5e8SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 2891ae1b5e8SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 2901ae1b5e8Smrg 2911ae1b5e8SmrgAC_MSG_CHECKING([Whether to build text documentation]) 2921ae1b5e8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 2931ae1b5e8Smrg test x$BUILD_TXTDOC != xno; then 2941ae1b5e8Smrg BUILDTXTDOC=yes 29576888252Smrgfi 2961ae1b5e8SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 2971ae1b5e8SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 29876888252Smrg 2991ae1b5e8SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 3001ae1b5e8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 3011ae1b5e8Smrg test x$BUILD_PDFDOC != xno; then 3021ae1b5e8Smrg BUILDPDFDOC=yes 3031ae1b5e8Smrgfi 3041ae1b5e8SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 3051ae1b5e8SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 30676888252Smrg 3071ae1b5e8SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 3081ae1b5e8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 3091ae1b5e8Smrg test x$BUILD_PSDOC != xno; then 3101ae1b5e8Smrg BUILDPSDOC=yes 3111ae1b5e8Smrgfi 3121ae1b5e8SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 3131ae1b5e8SmrgAC_MSG_RESULT([$BUILDPSDOC]) 31476888252Smrg 3151ae1b5e8SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 3161ae1b5e8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 3171ae1b5e8Smrg test x$BUILD_HTMLDOC != xno; then 3181ae1b5e8Smrg BUILDHTMLDOC=yes 3191ae1b5e8Smrgfi 3201ae1b5e8SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 3211ae1b5e8SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 32276888252Smrg 3231ae1b5e8SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 3241ae1b5e8SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 3251ae1b5e8SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 3261ae1b5e8SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 32776888252Smrg 3281ae1b5e8SmrgAC_SUBST(MAKE_TEXT) 3291ae1b5e8SmrgAC_SUBST(MAKE_PS) 3301ae1b5e8SmrgAC_SUBST(MAKE_PDF) 3311ae1b5e8SmrgAC_SUBST(MAKE_HTML) 3321ae1b5e8Smrg]) # XORG_CHECK_DOCBOOK 33376888252Smrg 3341ae1b5e8Smrg# XORG_CHECK_MALLOC_ZERO 3351ae1b5e8Smrg# ---------------------- 3361ae1b5e8Smrg# Minimum version: 1.0.0 3371ae1b5e8Smrg# 3381ae1b5e8Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 3391ae1b5e8Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 3401ae1b5e8Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 3411ae1b5e8SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 3421ae1b5e8SmrgAC_ARG_ENABLE(malloc0returnsnull, 3431ae1b5e8Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 3441ae1b5e8Smrg [malloc(0) returns NULL (default: auto)]), 3451ae1b5e8Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 3461ae1b5e8Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 34776888252Smrg 3481ae1b5e8SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 3491ae1b5e8Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 3501ae1b5e8Smrg AC_RUN_IFELSE([ 3511ae1b5e8Smrgchar *malloc(); 3521ae1b5e8Smrgchar *realloc(); 3531ae1b5e8Smrgchar *calloc(); 3541ae1b5e8Smrgmain() { 3551ae1b5e8Smrg char *m0, *r0, *c0, *p; 3561ae1b5e8Smrg m0 = malloc(0); 3571ae1b5e8Smrg p = malloc(10); 3581ae1b5e8Smrg r0 = realloc(p,0); 3591ae1b5e8Smrg c0 = calloc(0); 3601ae1b5e8Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 3611ae1b5e8Smrg}], 3621ae1b5e8Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 3631ae1b5e8Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 3641ae1b5e8Smrgfi 3651ae1b5e8SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 36676888252Smrg 3671ae1b5e8Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 3681ae1b5e8Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 3691ae1b5e8Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 3701ae1b5e8Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 3711ae1b5e8Smrgelse 3721ae1b5e8Smrg MALLOC_ZERO_CFLAGS="" 3731ae1b5e8Smrg XMALLOC_ZERO_CFLAGS="" 3741ae1b5e8Smrg XTMALLOC_ZERO_CFLAGS="" 3751ae1b5e8Smrgfi 37676888252Smrg 3771ae1b5e8SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 3781ae1b5e8SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 3791ae1b5e8SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 3801ae1b5e8Smrg]) # XORG_CHECK_MALLOC_ZERO 38176888252Smrg 3821ae1b5e8Smrg# XORG_WITH_LINT() 3831ae1b5e8Smrg# ---------------- 3841ae1b5e8Smrg# Minimum version: 1.1.0 3851ae1b5e8Smrg# 3861ae1b5e8Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 3871ae1b5e8Smrg# is specified. (Use --with-lint=sparse for sparse.) 3881ae1b5e8Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 3891ae1b5e8Smrg# Sets $LINT_FLAGS to flags to pass to source checker 3901ae1b5e8Smrg# Sets LINT automake conditional if enabled (default: disabled) 3911ae1b5e8Smrg# 3921ae1b5e8SmrgAC_DEFUN([XORG_WITH_LINT],[ 3931ae1b5e8Smrg 3941ae1b5e8Smrg# Allow checking code with lint, sparse, etc. 3951ae1b5e8SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 3961ae1b5e8Smrg [Use a lint-style source code checker (default: disabled)])], 3971ae1b5e8Smrg [use_lint=$withval], [use_lint=no]) 3981ae1b5e8Smrgif test "x$use_lint" = "xyes" ; then 3991ae1b5e8Smrg LINT="lint" 4001ae1b5e8Smrgelse 4011ae1b5e8Smrg LINT="$use_lint" 4021ae1b5e8Smrgfi 4031ae1b5e8Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 4041ae1b5e8Smrg case $LINT in 4051ae1b5e8Smrg lint|*/lint) 4061ae1b5e8Smrg case $host_os in 4071ae1b5e8Smrg solaris*) 4081ae1b5e8Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 4091ae1b5e8Smrg ;; 4101ae1b5e8Smrg esac 4111ae1b5e8Smrg ;; 4121ae1b5e8Smrg esac 4131ae1b5e8Smrgfi 41476888252Smrg 4151ae1b5e8SmrgAC_SUBST(LINT) 4161ae1b5e8SmrgAC_SUBST(LINT_FLAGS) 4171ae1b5e8SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 41876888252Smrg 4191ae1b5e8Smrg]) # XORG_WITH_LINT 42076888252Smrg 4211ae1b5e8Smrg# XORG_LINT_LIBRARY(LIBNAME) 4221ae1b5e8Smrg# -------------------------- 4231ae1b5e8Smrg# Minimum version: 1.1.0 4241ae1b5e8Smrg# 4251ae1b5e8Smrg# Sets up flags for building lint libraries for checking programs that call 4261ae1b5e8Smrg# functions in the library. 4271ae1b5e8Smrg# Disabled by default, enable with --enable-lint-library 4281ae1b5e8Smrg# Sets: 4291ae1b5e8Smrg# @LINTLIB@ - name of lint library file to make 4301ae1b5e8Smrg# MAKE_LINT_LIB - automake conditional 4311ae1b5e8Smrg# 43276888252Smrg 4331ae1b5e8SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 4341ae1b5e8SmrgAC_REQUIRE([XORG_WITH_LINT]) 4351ae1b5e8Smrg# Build lint "library" for more indepth checks of programs calling this library 4361ae1b5e8SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 4371ae1b5e8Smrg [Create lint library (default: disabled)])], 4381ae1b5e8Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 4391ae1b5e8Smrgif test "x$make_lint_lib" != "xno" ; then 4401ae1b5e8Smrg if test "x$LINT" = "xno" ; then 4411ae1b5e8Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 4421ae1b5e8Smrg fi 4431ae1b5e8Smrg if test "x$make_lint_lib" = "xyes" ; then 4441ae1b5e8Smrg LINTLIB=llib-l$1.ln 4451ae1b5e8Smrg else 4461ae1b5e8Smrg LINTLIB=$make_lint_lib 4471ae1b5e8Smrg fi 4481ae1b5e8Smrgfi 4491ae1b5e8SmrgAC_SUBST(LINTLIB) 4501ae1b5e8SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 45176888252Smrg 4521ae1b5e8Smrg]) # XORG_LINT_LIBRARY 45376888252Smrg 4541ae1b5e8Smrg# XORG_CWARNFLAGS 4551ae1b5e8Smrg# --------------- 4561ae1b5e8Smrg# Minimum version: 1.2.0 4571ae1b5e8Smrg# 4581ae1b5e8Smrg# Defines CWARNFLAGS to enable C compiler warnings. 4591ae1b5e8Smrg# 4601ae1b5e8SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 4611ae1b5e8SmrgAC_REQUIRE([AC_PROG_CC]) 4621ae1b5e8Smrgif test "x$GCC" = xyes ; then 4631ae1b5e8Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 4641ae1b5e8Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 4651ae1b5e8Smrg-Wbad-function-cast" 4661ae1b5e8Smrg case `gcc -dumpversion` in 4671ae1b5e8Smrg 3.4.* | 4.*) 4681ae1b5e8Smrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 4691ae1b5e8Smrg ;; 4701ae1b5e8Smrg esac 4711ae1b5e8Smrgelse 4721ae1b5e8Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 4731ae1b5e8Smrg if test "x$SUNCC" = "xyes"; then 4741ae1b5e8Smrg CWARNFLAGS="-v" 4751ae1b5e8Smrg fi 4761ae1b5e8Smrgfi 4771ae1b5e8SmrgAC_SUBST(CWARNFLAGS) 4781ae1b5e8Smrg]) # XORG_CWARNFLAGS 4791ae1b5e8Smrgdnl Copyright 2005 Red Hat, Inc 4801ae1b5e8Smrgdnl 4811ae1b5e8Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 4821ae1b5e8Smrgdnl documentation for any purpose is hereby granted without fee, provided that 4831ae1b5e8Smrgdnl the above copyright notice appear in all copies and that both that 4841ae1b5e8Smrgdnl copyright notice and this permission notice appear in supporting 4851ae1b5e8Smrgdnl documentation. 4861ae1b5e8Smrgdnl 4871ae1b5e8Smrgdnl The above copyright notice and this permission notice shall be included 4881ae1b5e8Smrgdnl in all copies or substantial portions of the Software. 4891ae1b5e8Smrgdnl 4901ae1b5e8Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 4911ae1b5e8Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 4921ae1b5e8Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 4931ae1b5e8Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 4941ae1b5e8Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 4951ae1b5e8Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 4961ae1b5e8Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 4971ae1b5e8Smrgdnl 4981ae1b5e8Smrgdnl Except as contained in this notice, the name of the copyright holders shall 4991ae1b5e8Smrgdnl not be used in advertising or otherwise to promote the sale, use or 5001ae1b5e8Smrgdnl other dealings in this Software without prior written authorization 5011ae1b5e8Smrgdnl from the copyright holders. 5021ae1b5e8Smrgdnl 50376888252Smrg 5041ae1b5e8Smrg# XORG_RELEASE_VERSION 5051ae1b5e8Smrg# -------------------- 5061ae1b5e8Smrg# Adds --with/without-release-string and changes the PACKAGE and 5071ae1b5e8Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 5081ae1b5e8Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 5091ae1b5e8Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 5101ae1b5e8Smrg 5111ae1b5e8SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 5121ae1b5e8Smrg AC_ARG_WITH(release-version, 5131ae1b5e8Smrg AC_HELP_STRING([--with-release-version=STRING], 5141ae1b5e8Smrg [Use release version string in package name]), 5151ae1b5e8Smrg [RELEASE_VERSION="$withval"], 5161ae1b5e8Smrg [RELEASE_VERSION=""]) 5171ae1b5e8Smrg if test "x$RELEASE_VERSION" != "x"; then 5181ae1b5e8Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 5191ae1b5e8Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 5201ae1b5e8Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 5211ae1b5e8Smrg fi 5221ae1b5e8Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 5231ae1b5e8Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 5241ae1b5e8Smrg [Major version of this package]) 5251ae1b5e8Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 5261ae1b5e8Smrg if test "x$PVM" = "x"; then 5271ae1b5e8Smrg PVM="0" 5281ae1b5e8Smrg fi 5291ae1b5e8Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 5301ae1b5e8Smrg [$PVM], 5311ae1b5e8Smrg [Minor version of this package]) 5321ae1b5e8Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 5331ae1b5e8Smrg if test "x$PVP" = "x"; then 5341ae1b5e8Smrg PVP="0" 5351ae1b5e8Smrg fi 5361ae1b5e8Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 5371ae1b5e8Smrg [$PVP], 5381ae1b5e8Smrg [Patch version of this package]) 5391ae1b5e8Smrg]) 54076888252Smrg 5411ae1b5e8Smrg# XORG_CHANGELOG() 5421ae1b5e8Smrg# ---------------- 5431ae1b5e8Smrg# Minimum version: 1.2.0 5441ae1b5e8Smrg# 5451ae1b5e8Smrg# Defines the variable CHANGELOG_CMD as the command to generate 5461ae1b5e8Smrg# ChangeLog from git. 5471ae1b5e8Smrg# 5481ae1b5e8Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 5491ae1b5e8Smrg# 5501ae1b5e8SmrgAC_DEFUN([XORG_CHANGELOG], [ 5511ae1b5e8SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 5521ae1b5e8Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 5531ae1b5e8Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 5541ae1b5e8SmrgAC_SUBST([CHANGELOG_CMD]) 5551ae1b5e8SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 5561ae1b5e8Smrg]) # XORG_CHANGELOG 5571ae1b5e8Smrg 5581ae1b5e8Smrg# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. 5591ae1b5e8Smrg# 5601ae1b5e8Smrg# This file is free software; the Free Software Foundation 5611ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 5621ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 56376888252Smrg 5641ae1b5e8Smrg# AM_AUTOMAKE_VERSION(VERSION) 5651ae1b5e8Smrg# ---------------------------- 5661ae1b5e8Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 5671ae1b5e8Smrg# generated from the m4 files accompanying Automake X.Y. 5681ae1b5e8Smrg# (This private macro should not be called outside this file.) 5691ae1b5e8SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 5701ae1b5e8Smrg[am__api_version='1.10' 5711ae1b5e8Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 5721ae1b5e8Smrgdnl require some minimum version. Point them to the right macro. 5731ae1b5e8Smrgm4_if([$1], [1.10], [], 5741ae1b5e8Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 5751ae1b5e8Smrg]) 57676888252Smrg 5771ae1b5e8Smrg# _AM_AUTOCONF_VERSION(VERSION) 5781ae1b5e8Smrg# ----------------------------- 5791ae1b5e8Smrg# aclocal traces this macro to find the Autoconf version. 5801ae1b5e8Smrg# This is a private macro too. Using m4_define simplifies 5811ae1b5e8Smrg# the logic in aclocal, which can simply ignore this definition. 5821ae1b5e8Smrgm4_define([_AM_AUTOCONF_VERSION], []) 58376888252Smrg 5841ae1b5e8Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 5851ae1b5e8Smrg# ------------------------------- 5861ae1b5e8Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5871ae1b5e8Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 5881ae1b5e8SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5891ae1b5e8Smrg[AM_AUTOMAKE_VERSION([1.10])dnl 5901ae1b5e8Smrg_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) 59176888252Smrg 5921ae1b5e8Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59376888252Smrg 5941ae1b5e8Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 5951ae1b5e8Smrg# 5961ae1b5e8Smrg# This file is free software; the Free Software Foundation 5971ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 5981ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 59976888252Smrg 6001ae1b5e8Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6011ae1b5e8Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6021ae1b5e8Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6031ae1b5e8Smrg# 6041ae1b5e8Smrg# Of course, Automake must honor this variable whenever it calls a 6051ae1b5e8Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 6061ae1b5e8Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 6071ae1b5e8Smrg# depending on how configure is run. This is pretty annoying, since 6081ae1b5e8Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 6091ae1b5e8Smrg# source directory, any form will work fine, but in subdirectories a 6101ae1b5e8Smrg# relative path needs to be adjusted first. 6111ae1b5e8Smrg# 6121ae1b5e8Smrg# $ac_aux_dir/missing 6131ae1b5e8Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 6141ae1b5e8Smrg# $top_srcdir/$ac_aux_dir/missing 6151ae1b5e8Smrg# fails if $ac_aux_dir is absolute, 6161ae1b5e8Smrg# fails when called from a subdirectory in a VPATH build with 6171ae1b5e8Smrg# a relative $ac_aux_dir 6181ae1b5e8Smrg# 6191ae1b5e8Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 6201ae1b5e8Smrg# are both prefixed by $srcdir. In an in-source build this is usually 6211ae1b5e8Smrg# harmless because $srcdir is `.', but things will broke when you 6221ae1b5e8Smrg# start a VPATH build or use an absolute $srcdir. 6231ae1b5e8Smrg# 6241ae1b5e8Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 6251ae1b5e8Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 6261ae1b5e8Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 6271ae1b5e8Smrg# and then we would define $MISSING as 6281ae1b5e8Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 6291ae1b5e8Smrg# This will work as long as MISSING is not called from configure, because 6301ae1b5e8Smrg# unfortunately $(top_srcdir) has no meaning in configure. 6311ae1b5e8Smrg# However there are other variables, like CC, which are often used in 6321ae1b5e8Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 6331ae1b5e8Smrg# 6341ae1b5e8Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 6351ae1b5e8Smrg# absolute PATH. The drawback is that using absolute paths prevent a 6361ae1b5e8Smrg# configured tree to be moved without reconfiguration. 63776888252Smrg 6381ae1b5e8SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 6391ae1b5e8Smrg[dnl Rely on autoconf to set up CDPATH properly. 6401ae1b5e8SmrgAC_PREREQ([2.50])dnl 6411ae1b5e8Smrg# expand $ac_aux_dir to an absolute path 6421ae1b5e8Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 6431ae1b5e8Smrg]) 64476888252Smrg 6451ae1b5e8Smrg# AM_CONDITIONAL -*- Autoconf -*- 64676888252Smrg 6471ae1b5e8Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 6481ae1b5e8Smrg# Free Software Foundation, Inc. 6491ae1b5e8Smrg# 6501ae1b5e8Smrg# This file is free software; the Free Software Foundation 6511ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 6521ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 65376888252Smrg 6541ae1b5e8Smrg# serial 8 65576888252Smrg 6561ae1b5e8Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 6571ae1b5e8Smrg# ------------------------------------- 6581ae1b5e8Smrg# Define a conditional. 6591ae1b5e8SmrgAC_DEFUN([AM_CONDITIONAL], 6601ae1b5e8Smrg[AC_PREREQ(2.52)dnl 6611ae1b5e8Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 6621ae1b5e8Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 6631ae1b5e8SmrgAC_SUBST([$1_TRUE])dnl 6641ae1b5e8SmrgAC_SUBST([$1_FALSE])dnl 6651ae1b5e8Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 6661ae1b5e8Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 6671ae1b5e8Smrgif $2; then 6681ae1b5e8Smrg $1_TRUE= 6691ae1b5e8Smrg $1_FALSE='#' 67076888252Smrgelse 6711ae1b5e8Smrg $1_TRUE='#' 6721ae1b5e8Smrg $1_FALSE= 67376888252Smrgfi 6741ae1b5e8SmrgAC_CONFIG_COMMANDS_PRE( 6751ae1b5e8Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 6761ae1b5e8Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 6771ae1b5e8SmrgUsually this means the macro was only invoked conditionally.]]) 6781ae1b5e8Smrgfi])]) 67976888252Smrg 6801ae1b5e8Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6811ae1b5e8Smrg# Free Software Foundation, Inc. 6821ae1b5e8Smrg# 6831ae1b5e8Smrg# This file is free software; the Free Software Foundation 6841ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 6851ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 68676888252Smrg 6871ae1b5e8Smrg# serial 9 68876888252Smrg 6891ae1b5e8Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 6901ae1b5e8Smrg# written in clear, in which case automake, when reading aclocal.m4, 6911ae1b5e8Smrg# will think it sees a *use*, and therefore will trigger all it's 6921ae1b5e8Smrg# C support machinery. Also note that it means that autoscan, seeing 6931ae1b5e8Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 69476888252Smrg 69576888252Smrg 6961ae1b5e8Smrg# _AM_DEPENDENCIES(NAME) 6971ae1b5e8Smrg# ---------------------- 6981ae1b5e8Smrg# See how the compiler implements dependency checking. 6991ae1b5e8Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 7001ae1b5e8Smrg# We try a few techniques and use that to set a single cache variable. 7011ae1b5e8Smrg# 7021ae1b5e8Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 7031ae1b5e8Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 7041ae1b5e8Smrg# dependency, and given that the user is not expected to run this macro, 7051ae1b5e8Smrg# just rely on AC_PROG_CC. 7061ae1b5e8SmrgAC_DEFUN([_AM_DEPENDENCIES], 7071ae1b5e8Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 7081ae1b5e8SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 7091ae1b5e8SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 7101ae1b5e8SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 71176888252Smrg 7121ae1b5e8Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 7131ae1b5e8Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 7141ae1b5e8Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 7151ae1b5e8Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 7161ae1b5e8Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 7171ae1b5e8Smrg [depcc="$$1" am_compiler_list=]) 71876888252Smrg 7191ae1b5e8SmrgAC_CACHE_CHECK([dependency style of $depcc], 7201ae1b5e8Smrg [am_cv_$1_dependencies_compiler_type], 7211ae1b5e8Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 7221ae1b5e8Smrg # We make a subdir and do the tests there. Otherwise we can end up 7231ae1b5e8Smrg # making bogus files that we don't know about and never remove. For 7241ae1b5e8Smrg # instance it was reported that on HP-UX the gcc test will end up 7251ae1b5e8Smrg # making a dummy file named `D' -- because `-MD' means `put the output 7261ae1b5e8Smrg # in D'. 7271ae1b5e8Smrg mkdir conftest.dir 7281ae1b5e8Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 7291ae1b5e8Smrg # using a relative directory. 7301ae1b5e8Smrg cp "$am_depcomp" conftest.dir 7311ae1b5e8Smrg cd conftest.dir 7321ae1b5e8Smrg # We will build objects and dependencies in a subdirectory because 7331ae1b5e8Smrg # it helps to detect inapplicable dependency modes. For instance 7341ae1b5e8Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 7351ae1b5e8Smrg # side effect of compilation, but ICC will put the dependencies in 7361ae1b5e8Smrg # the current directory while Tru64 will put them in the object 7371ae1b5e8Smrg # directory. 7381ae1b5e8Smrg mkdir sub 7391ae1b5e8Smrg 7401ae1b5e8Smrg am_cv_$1_dependencies_compiler_type=none 7411ae1b5e8Smrg if test "$am_compiler_list" = ""; then 7421ae1b5e8Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 74376888252Smrg fi 7441ae1b5e8Smrg for depmode in $am_compiler_list; do 7451ae1b5e8Smrg # Setup a source with many dependencies, because some compilers 7461ae1b5e8Smrg # like to wrap large dependency lists on column 80 (with \), and 7471ae1b5e8Smrg # we should not choose a depcomp mode which is confused by this. 7481ae1b5e8Smrg # 7491ae1b5e8Smrg # We need to recreate these files for each test, as the compiler may 7501ae1b5e8Smrg # overwrite some of them when testing with obscure command lines. 7511ae1b5e8Smrg # This happens at least with the AIX C compiler. 7521ae1b5e8Smrg : > sub/conftest.c 7531ae1b5e8Smrg for i in 1 2 3 4 5 6; do 7541ae1b5e8Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 7551ae1b5e8Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 7561ae1b5e8Smrg # Solaris 8's {/usr,}/bin/sh. 7571ae1b5e8Smrg touch sub/conftst$i.h 7581ae1b5e8Smrg done 7591ae1b5e8Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 7601ae1b5e8Smrg 7611ae1b5e8Smrg case $depmode in 7621ae1b5e8Smrg nosideeffect) 7631ae1b5e8Smrg # after this tag, mechanisms are not by side-effect, so they'll 7641ae1b5e8Smrg # only be used when explicitly requested 7651ae1b5e8Smrg if test "x$enable_dependency_tracking" = xyes; then 7661ae1b5e8Smrg continue 7671ae1b5e8Smrg else 7681ae1b5e8Smrg break 7691ae1b5e8Smrg fi 77076888252Smrg ;; 7711ae1b5e8Smrg none) break ;; 77276888252Smrg esac 7731ae1b5e8Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 7741ae1b5e8Smrg # mode. It turns out that the SunPro C++ compiler does not properly 7751ae1b5e8Smrg # handle `-M -o', and we need to detect this. 7761ae1b5e8Smrg if depmode=$depmode \ 7771ae1b5e8Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 7781ae1b5e8Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 7791ae1b5e8Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 7801ae1b5e8Smrg >/dev/null 2>conftest.err && 7811ae1b5e8Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 7821ae1b5e8Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 7831ae1b5e8Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 7841ae1b5e8Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 7851ae1b5e8Smrg # icc doesn't choke on unknown options, it will just issue warnings 7861ae1b5e8Smrg # or remarks (even with -Werror). So we grep stderr for any message 7871ae1b5e8Smrg # that says an option was ignored or not supported. 7881ae1b5e8Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 7891ae1b5e8Smrg # icc: Command line warning: ignoring option '-M'; no argument required 7901ae1b5e8Smrg # The diagnosis changed in icc 8.0: 7911ae1b5e8Smrg # icc: Command line remark: option '-MP' not supported 7921ae1b5e8Smrg if (grep 'ignoring option' conftest.err || 7931ae1b5e8Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 7941ae1b5e8Smrg am_cv_$1_dependencies_compiler_type=$depmode 7951ae1b5e8Smrg break 7961ae1b5e8Smrg fi 7971ae1b5e8Smrg fi 7981ae1b5e8Smrg done 79976888252Smrg 8001ae1b5e8Smrg cd .. 8011ae1b5e8Smrg rm -rf conftest.dir 8021ae1b5e8Smrgelse 8031ae1b5e8Smrg am_cv_$1_dependencies_compiler_type=none 8041ae1b5e8Smrgfi 8051ae1b5e8Smrg]) 8061ae1b5e8SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 8071ae1b5e8SmrgAM_CONDITIONAL([am__fastdep$1], [ 8081ae1b5e8Smrg test "x$enable_dependency_tracking" != xno \ 8091ae1b5e8Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 8101ae1b5e8Smrg]) 81176888252Smrg 81276888252Smrg 8131ae1b5e8Smrg# AM_SET_DEPDIR 8141ae1b5e8Smrg# ------------- 8151ae1b5e8Smrg# Choose a directory name for dependency files. 8161ae1b5e8Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 8171ae1b5e8SmrgAC_DEFUN([AM_SET_DEPDIR], 8181ae1b5e8Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 8191ae1b5e8SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 8201ae1b5e8Smrg]) 82176888252Smrg 82276888252Smrg 8231ae1b5e8Smrg# AM_DEP_TRACK 8241ae1b5e8Smrg# ------------ 8251ae1b5e8SmrgAC_DEFUN([AM_DEP_TRACK], 8261ae1b5e8Smrg[AC_ARG_ENABLE(dependency-tracking, 8271ae1b5e8Smrg[ --disable-dependency-tracking speeds up one-time build 8281ae1b5e8Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 8291ae1b5e8Smrgif test "x$enable_dependency_tracking" != xno; then 8301ae1b5e8Smrg am_depcomp="$ac_aux_dir/depcomp" 8311ae1b5e8Smrg AMDEPBACKSLASH='\' 8321ae1b5e8Smrgfi 8331ae1b5e8SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 8341ae1b5e8SmrgAC_SUBST([AMDEPBACKSLASH])dnl 8351ae1b5e8Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 83676888252Smrg]) 83776888252Smrg 8381ae1b5e8Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 83976888252Smrg 8401ae1b5e8Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 8411ae1b5e8Smrg# Free Software Foundation, Inc. 8421ae1b5e8Smrg# 8431ae1b5e8Smrg# This file is free software; the Free Software Foundation 8441ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 8451ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 84676888252Smrg 8471ae1b5e8Smrg#serial 3 8481ae1b5e8Smrg 8491ae1b5e8Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 8501ae1b5e8Smrg# ------------------------------ 8511ae1b5e8SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 8521ae1b5e8Smrg[for mf in $CONFIG_FILES; do 8531ae1b5e8Smrg # Strip MF so we end up with the name of the file. 8541ae1b5e8Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 8551ae1b5e8Smrg # Check whether this is an Automake generated Makefile or not. 8561ae1b5e8Smrg # We used to match only the files named `Makefile.in', but 8571ae1b5e8Smrg # some people rename them; so instead we look at the file content. 8581ae1b5e8Smrg # Grep'ing the first line is not enough: some people post-process 8591ae1b5e8Smrg # each Makefile.in and add a new line on top of each file to say so. 8601ae1b5e8Smrg # Grep'ing the whole file is not good either: AIX grep has a line 8611ae1b5e8Smrg # limit of 2048, but all sed's we know have understand at least 4000. 8621ae1b5e8Smrg if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then 8631ae1b5e8Smrg dirpart=`AS_DIRNAME("$mf")` 8641ae1b5e8Smrg else 8651ae1b5e8Smrg continue 8661ae1b5e8Smrg fi 8671ae1b5e8Smrg # Extract the definition of DEPDIR, am__include, and am__quote 8681ae1b5e8Smrg # from the Makefile without running `make'. 8691ae1b5e8Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 8701ae1b5e8Smrg test -z "$DEPDIR" && continue 8711ae1b5e8Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 8721ae1b5e8Smrg test -z "am__include" && continue 8731ae1b5e8Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 8741ae1b5e8Smrg # When using ansi2knr, U may be empty or an underscore; expand it 8751ae1b5e8Smrg U=`sed -n 's/^U = //p' < "$mf"` 8761ae1b5e8Smrg # Find all dependency output files, they are included files with 8771ae1b5e8Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 8781ae1b5e8Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 8791ae1b5e8Smrg # expansion. 8801ae1b5e8Smrg for file in `sed -n " 8811ae1b5e8Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 8821ae1b5e8Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 8831ae1b5e8Smrg # Make sure the directory exists. 8841ae1b5e8Smrg test -f "$dirpart/$file" && continue 8851ae1b5e8Smrg fdir=`AS_DIRNAME(["$file"])` 8861ae1b5e8Smrg AS_MKDIR_P([$dirpart/$fdir]) 8871ae1b5e8Smrg # echo "creating $dirpart/$file" 8881ae1b5e8Smrg echo '# dummy' > "$dirpart/$file" 8891ae1b5e8Smrg done 8901ae1b5e8Smrgdone 8911ae1b5e8Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 8921ae1b5e8Smrg 8931ae1b5e8Smrg 8941ae1b5e8Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 8951ae1b5e8Smrg# ----------------------------- 8961ae1b5e8Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 8971ae1b5e8Smrg# 8981ae1b5e8Smrg# This code is only required when automatic dependency tracking 8991ae1b5e8Smrg# is enabled. FIXME. This creates each `.P' file that we will 9001ae1b5e8Smrg# need in order to bootstrap the dependency handling code. 9011ae1b5e8SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 9021ae1b5e8Smrg[AC_CONFIG_COMMANDS([depfiles], 9031ae1b5e8Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 9041ae1b5e8Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 90576888252Smrg]) 90676888252Smrg 9071ae1b5e8Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 9081ae1b5e8Smrg# Free Software Foundation, Inc. 9091ae1b5e8Smrg# 9101ae1b5e8Smrg# This file is free software; the Free Software Foundation 9111ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 9121ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 91376888252Smrg 9141ae1b5e8Smrg# serial 8 91576888252Smrg 9161ae1b5e8Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 9171ae1b5e8SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 91876888252Smrg 9191ae1b5e8Smrg# Do all the work for Automake. -*- Autoconf -*- 92076888252Smrg 9211ae1b5e8Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 9221ae1b5e8Smrg# 2005, 2006 Free Software Foundation, Inc. 9231ae1b5e8Smrg# 9241ae1b5e8Smrg# This file is free software; the Free Software Foundation 9251ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 9261ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 92776888252Smrg 9281ae1b5e8Smrg# serial 12 92976888252Smrg 9301ae1b5e8Smrg# This macro actually does too much. Some checks are only needed if 9311ae1b5e8Smrg# your package does certain things. But this isn't really a big deal. 93276888252Smrg 9331ae1b5e8Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 9341ae1b5e8Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 9351ae1b5e8Smrg# ----------------------------------------------- 9361ae1b5e8Smrg# The call with PACKAGE and VERSION arguments is the old style 9371ae1b5e8Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 9381ae1b5e8Smrg# and VERSION should now be passed to AC_INIT and removed from 9391ae1b5e8Smrg# the call to AM_INIT_AUTOMAKE. 9401ae1b5e8Smrg# We support both call styles for the transition. After 9411ae1b5e8Smrg# the next Automake release, Autoconf can make the AC_INIT 9421ae1b5e8Smrg# arguments mandatory, and then we can depend on a new Autoconf 9431ae1b5e8Smrg# release and drop the old call support. 9441ae1b5e8SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 9451ae1b5e8Smrg[AC_PREREQ([2.60])dnl 9461ae1b5e8Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 9471ae1b5e8Smrgdnl the ones we care about. 9481ae1b5e8Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 9491ae1b5e8SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 9501ae1b5e8SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 9511ae1b5e8Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 9521ae1b5e8Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 9531ae1b5e8Smrg # is not polluted with repeated "-I." 9541ae1b5e8Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 9551ae1b5e8Smrg # test to see if srcdir already configured 9561ae1b5e8Smrg if test -f $srcdir/config.status; then 9571ae1b5e8Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 9581ae1b5e8Smrg fi 9591ae1b5e8Smrgfi 96076888252Smrg 9611ae1b5e8Smrg# test whether we have cygpath 9621ae1b5e8Smrgif test -z "$CYGPATH_W"; then 9631ae1b5e8Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 9641ae1b5e8Smrg CYGPATH_W='cygpath -w' 9651ae1b5e8Smrg else 9661ae1b5e8Smrg CYGPATH_W=echo 9671ae1b5e8Smrg fi 9681ae1b5e8Smrgfi 9691ae1b5e8SmrgAC_SUBST([CYGPATH_W]) 97076888252Smrg 9711ae1b5e8Smrg# Define the identity of the package. 9721ae1b5e8Smrgdnl Distinguish between old-style and new-style calls. 9731ae1b5e8Smrgm4_ifval([$2], 9741ae1b5e8Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 9751ae1b5e8Smrg AC_SUBST([PACKAGE], [$1])dnl 9761ae1b5e8Smrg AC_SUBST([VERSION], [$2])], 9771ae1b5e8Smrg[_AM_SET_OPTIONS([$1])dnl 9781ae1b5e8Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 9791ae1b5e8Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 9801ae1b5e8Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 9811ae1b5e8Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 9821ae1b5e8Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 98376888252Smrg 9841ae1b5e8Smrg_AM_IF_OPTION([no-define],, 9851ae1b5e8Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 9861ae1b5e8Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 98776888252Smrg 9881ae1b5e8Smrg# Some tools Automake needs. 9891ae1b5e8SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 9901ae1b5e8SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 9911ae1b5e8SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 9921ae1b5e8SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 9931ae1b5e8SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 9941ae1b5e8SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 9951ae1b5e8SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 9961ae1b5e8SmrgAM_PROG_INSTALL_SH 9971ae1b5e8SmrgAM_PROG_INSTALL_STRIP 9981ae1b5e8SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 9991ae1b5e8Smrg# We need awk for the "check" target. The system "awk" is bad on 10001ae1b5e8Smrg# some platforms. 10011ae1b5e8SmrgAC_REQUIRE([AC_PROG_AWK])dnl 10021ae1b5e8SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 10031ae1b5e8SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 10041ae1b5e8Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 10051ae1b5e8Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 10061ae1b5e8Smrg [_AM_PROG_TAR([v7])])]) 10071ae1b5e8Smrg_AM_IF_OPTION([no-dependencies],, 10081ae1b5e8Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 10091ae1b5e8Smrg [_AM_DEPENDENCIES(CC)], 10101ae1b5e8Smrg [define([AC_PROG_CC], 10111ae1b5e8Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 10121ae1b5e8SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 10131ae1b5e8Smrg [_AM_DEPENDENCIES(CXX)], 10141ae1b5e8Smrg [define([AC_PROG_CXX], 10151ae1b5e8Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 10161ae1b5e8SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 10171ae1b5e8Smrg [_AM_DEPENDENCIES(OBJC)], 10181ae1b5e8Smrg [define([AC_PROG_OBJC], 10191ae1b5e8Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 10201ae1b5e8Smrg]) 10211ae1b5e8Smrg]) 102276888252Smrg 102376888252Smrg 10241ae1b5e8Smrg# When config.status generates a header, we must update the stamp-h file. 10251ae1b5e8Smrg# This file resides in the same directory as the config header 10261ae1b5e8Smrg# that is generated. The stamp files are numbered to have different names. 102776888252Smrg 10281ae1b5e8Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 10291ae1b5e8Smrg# loop where config.status creates the headers, so we can generate 10301ae1b5e8Smrg# our stamp files there. 10311ae1b5e8SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 10321ae1b5e8Smrg[# Compute $1's index in $config_headers. 10331ae1b5e8Smrg_am_stamp_count=1 10341ae1b5e8Smrgfor _am_header in $config_headers :; do 10351ae1b5e8Smrg case $_am_header in 10361ae1b5e8Smrg $1 | $1:* ) 10371ae1b5e8Smrg break ;; 10381ae1b5e8Smrg * ) 10391ae1b5e8Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 10401ae1b5e8Smrg esac 10411ae1b5e8Smrgdone 10421ae1b5e8Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 104376888252Smrg 10441ae1b5e8Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 10451ae1b5e8Smrg# 10461ae1b5e8Smrg# This file is free software; the Free Software Foundation 10471ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 10481ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 104976888252Smrg 10501ae1b5e8Smrg# AM_PROG_INSTALL_SH 10511ae1b5e8Smrg# ------------------ 10521ae1b5e8Smrg# Define $install_sh. 10531ae1b5e8SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 10541ae1b5e8Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 10551ae1b5e8Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 10561ae1b5e8SmrgAC_SUBST(install_sh)]) 105776888252Smrg 10581ae1b5e8Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 10591ae1b5e8Smrg# 10601ae1b5e8Smrg# This file is free software; the Free Software Foundation 10611ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 10621ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 106376888252Smrg 10641ae1b5e8Smrg# serial 2 106576888252Smrg 10661ae1b5e8Smrg# Check whether the underlying file-system supports filenames 10671ae1b5e8Smrg# with a leading dot. For instance MS-DOS doesn't. 10681ae1b5e8SmrgAC_DEFUN([AM_SET_LEADING_DOT], 10691ae1b5e8Smrg[rm -rf .tst 2>/dev/null 10701ae1b5e8Smrgmkdir .tst 2>/dev/null 10711ae1b5e8Smrgif test -d .tst; then 10721ae1b5e8Smrg am__leading_dot=. 10731ae1b5e8Smrgelse 10741ae1b5e8Smrg am__leading_dot=_ 10751ae1b5e8Smrgfi 10761ae1b5e8Smrgrmdir .tst 2>/dev/null 10771ae1b5e8SmrgAC_SUBST([am__leading_dot])]) 107876888252Smrg 10791ae1b5e8Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 10801ae1b5e8Smrg# From Jim Meyering 108176888252Smrg 10821ae1b5e8Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 10831ae1b5e8Smrg# Free Software Foundation, Inc. 10841ae1b5e8Smrg# 10851ae1b5e8Smrg# This file is free software; the Free Software Foundation 10861ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 10871ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 108876888252Smrg 10891ae1b5e8Smrg# serial 4 109076888252Smrg 10911ae1b5e8SmrgAC_DEFUN([AM_MAINTAINER_MODE], 10921ae1b5e8Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 10931ae1b5e8Smrg dnl maintainer-mode is disabled by default 10941ae1b5e8Smrg AC_ARG_ENABLE(maintainer-mode, 10951ae1b5e8Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 10961ae1b5e8Smrg (and sometimes confusing) to the casual installer], 10971ae1b5e8Smrg USE_MAINTAINER_MODE=$enableval, 10981ae1b5e8Smrg USE_MAINTAINER_MODE=no) 10991ae1b5e8Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11001ae1b5e8Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 11011ae1b5e8Smrg MAINT=$MAINTAINER_MODE_TRUE 11021ae1b5e8Smrg AC_SUBST(MAINT)dnl 11031ae1b5e8Smrg] 11041ae1b5e8Smrg) 110576888252Smrg 11061ae1b5e8SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 110776888252Smrg 11081ae1b5e8Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 110976888252Smrg 11101ae1b5e8Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 11111ae1b5e8Smrg# 11121ae1b5e8Smrg# This file is free software; the Free Software Foundation 11131ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 11141ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 111576888252Smrg 11161ae1b5e8Smrg# serial 3 111776888252Smrg 11181ae1b5e8Smrg# AM_MAKE_INCLUDE() 11191ae1b5e8Smrg# ----------------- 11201ae1b5e8Smrg# Check to see how make treats includes. 11211ae1b5e8SmrgAC_DEFUN([AM_MAKE_INCLUDE], 11221ae1b5e8Smrg[am_make=${MAKE-make} 11231ae1b5e8Smrgcat > confinc << 'END' 11241ae1b5e8Smrgam__doit: 11251ae1b5e8Smrg @echo done 11261ae1b5e8Smrg.PHONY: am__doit 11271ae1b5e8SmrgEND 11281ae1b5e8Smrg# If we don't find an include directive, just comment out the code. 11291ae1b5e8SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11301ae1b5e8Smrgam__include="#" 11311ae1b5e8Smrgam__quote= 11321ae1b5e8Smrg_am_result=none 11331ae1b5e8Smrg# First try GNU make style include. 11341ae1b5e8Smrgecho "include confinc" > confmf 11351ae1b5e8Smrg# We grep out `Entering directory' and `Leaving directory' 11361ae1b5e8Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 11371ae1b5e8Smrg# In particular we don't look at `^make:' because GNU make might 11381ae1b5e8Smrg# be invoked under some other name (usually "gmake"), in which 11391ae1b5e8Smrg# case it prints its new name instead of `make'. 11401ae1b5e8Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 11411ae1b5e8Smrg am__include=include 11421ae1b5e8Smrg am__quote= 11431ae1b5e8Smrg _am_result=GNU 11441ae1b5e8Smrgfi 11451ae1b5e8Smrg# Now try BSD make style include. 11461ae1b5e8Smrgif test "$am__include" = "#"; then 11471ae1b5e8Smrg echo '.include "confinc"' > confmf 11481ae1b5e8Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 11491ae1b5e8Smrg am__include=.include 11501ae1b5e8Smrg am__quote="\"" 11511ae1b5e8Smrg _am_result=BSD 11521ae1b5e8Smrg fi 11531ae1b5e8Smrgfi 11541ae1b5e8SmrgAC_SUBST([am__include]) 11551ae1b5e8SmrgAC_SUBST([am__quote]) 11561ae1b5e8SmrgAC_MSG_RESULT([$_am_result]) 11571ae1b5e8Smrgrm -f confinc confmf 11581ae1b5e8Smrg]) 115976888252Smrg 11601ae1b5e8Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 116176888252Smrg 11621ae1b5e8Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 11631ae1b5e8Smrg# Free Software Foundation, Inc. 11641ae1b5e8Smrg# 11651ae1b5e8Smrg# This file is free software; the Free Software Foundation 11661ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 11671ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 116876888252Smrg 11691ae1b5e8Smrg# serial 5 117076888252Smrg 11711ae1b5e8Smrg# AM_MISSING_PROG(NAME, PROGRAM) 11721ae1b5e8Smrg# ------------------------------ 11731ae1b5e8SmrgAC_DEFUN([AM_MISSING_PROG], 11741ae1b5e8Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11751ae1b5e8Smrg$1=${$1-"${am_missing_run}$2"} 11761ae1b5e8SmrgAC_SUBST($1)]) 117776888252Smrg 117876888252Smrg 11791ae1b5e8Smrg# AM_MISSING_HAS_RUN 11801ae1b5e8Smrg# ------------------ 11811ae1b5e8Smrg# Define MISSING if not defined so far and test if it supports --run. 11821ae1b5e8Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 11831ae1b5e8SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 11841ae1b5e8Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11851ae1b5e8SmrgAC_REQUIRE_AUX_FILE([missing])dnl 11861ae1b5e8Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 11871ae1b5e8Smrg# Use eval to expand $SHELL 11881ae1b5e8Smrgif eval "$MISSING --run true"; then 11891ae1b5e8Smrg am_missing_run="$MISSING --run " 11901ae1b5e8Smrgelse 11911ae1b5e8Smrg am_missing_run= 11921ae1b5e8Smrg AC_MSG_WARN([`missing' script is too old or missing]) 11931ae1b5e8Smrgfi 11941ae1b5e8Smrg]) 119576888252Smrg 11961ae1b5e8Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 11971ae1b5e8Smrg# 11981ae1b5e8Smrg# This file is free software; the Free Software Foundation 11991ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 12001ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 120176888252Smrg 12021ae1b5e8Smrg# AM_PROG_MKDIR_P 12031ae1b5e8Smrg# --------------- 12041ae1b5e8Smrg# Check for `mkdir -p'. 12051ae1b5e8SmrgAC_DEFUN([AM_PROG_MKDIR_P], 12061ae1b5e8Smrg[AC_PREREQ([2.60])dnl 12071ae1b5e8SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 12081ae1b5e8Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 12091ae1b5e8Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 12101ae1b5e8Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 12111ae1b5e8Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 12121ae1b5e8Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 12131ae1b5e8Smrgdnl adjustment using top_builddir (which is defined more often than 12141ae1b5e8Smrgdnl MKDIR_P). 12151ae1b5e8SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 12161ae1b5e8Smrgcase $mkdir_p in 12171ae1b5e8Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 12181ae1b5e8Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 12191ae1b5e8Smrgesac 12201ae1b5e8Smrg]) 122176888252Smrg 12221ae1b5e8Smrg# Helper functions for option handling. -*- Autoconf -*- 122376888252Smrg 12241ae1b5e8Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 12251ae1b5e8Smrg# 12261ae1b5e8Smrg# This file is free software; the Free Software Foundation 12271ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 12281ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 122976888252Smrg 12301ae1b5e8Smrg# serial 3 123176888252Smrg 12321ae1b5e8Smrg# _AM_MANGLE_OPTION(NAME) 12331ae1b5e8Smrg# ----------------------- 12341ae1b5e8SmrgAC_DEFUN([_AM_MANGLE_OPTION], 12351ae1b5e8Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 123676888252Smrg 12371ae1b5e8Smrg# _AM_SET_OPTION(NAME) 12381ae1b5e8Smrg# ------------------------------ 12391ae1b5e8Smrg# Set option NAME. Presently that only means defining a flag for this option. 12401ae1b5e8SmrgAC_DEFUN([_AM_SET_OPTION], 12411ae1b5e8Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 124276888252Smrg 12431ae1b5e8Smrg# _AM_SET_OPTIONS(OPTIONS) 12441ae1b5e8Smrg# ---------------------------------- 12451ae1b5e8Smrg# OPTIONS is a space-separated list of Automake options. 12461ae1b5e8SmrgAC_DEFUN([_AM_SET_OPTIONS], 12471ae1b5e8Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 124876888252Smrg 12491ae1b5e8Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 12501ae1b5e8Smrg# ------------------------------------------- 12511ae1b5e8Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12521ae1b5e8SmrgAC_DEFUN([_AM_IF_OPTION], 12531ae1b5e8Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 125476888252Smrg 12551ae1b5e8Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 125676888252Smrg 12571ae1b5e8Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 12581ae1b5e8Smrg# Free Software Foundation, Inc. 12591ae1b5e8Smrg# 12601ae1b5e8Smrg# This file is free software; the Free Software Foundation 12611ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 12621ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 126376888252Smrg 12641ae1b5e8Smrg# serial 4 126576888252Smrg 12661ae1b5e8Smrg# AM_SANITY_CHECK 12671ae1b5e8Smrg# --------------- 12681ae1b5e8SmrgAC_DEFUN([AM_SANITY_CHECK], 12691ae1b5e8Smrg[AC_MSG_CHECKING([whether build environment is sane]) 12701ae1b5e8Smrg# Just in case 12711ae1b5e8Smrgsleep 1 12721ae1b5e8Smrgecho timestamp > conftest.file 12731ae1b5e8Smrg# Do `set' in a subshell so we don't clobber the current shell's 12741ae1b5e8Smrg# arguments. Must try -L first in case configure is actually a 12751ae1b5e8Smrg# symlink; some systems play weird games with the mod time of symlinks 12761ae1b5e8Smrg# (eg FreeBSD returns the mod time of the symlink's containing 12771ae1b5e8Smrg# directory). 12781ae1b5e8Smrgif ( 12791ae1b5e8Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 12801ae1b5e8Smrg if test "$[*]" = "X"; then 12811ae1b5e8Smrg # -L didn't work. 12821ae1b5e8Smrg set X `ls -t $srcdir/configure conftest.file` 12831ae1b5e8Smrg fi 12841ae1b5e8Smrg rm -f conftest.file 12851ae1b5e8Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 12861ae1b5e8Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 128776888252Smrg 12881ae1b5e8Smrg # If neither matched, then we have a broken ls. This can happen 12891ae1b5e8Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 12901ae1b5e8Smrg # broken ls alias from the environment. This has actually 12911ae1b5e8Smrg # happened. Such a system could not be considered "sane". 12921ae1b5e8Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12931ae1b5e8Smrgalias in your environment]) 12941ae1b5e8Smrg fi 129576888252Smrg 12961ae1b5e8Smrg test "$[2]" = conftest.file 12971ae1b5e8Smrg ) 12981ae1b5e8Smrgthen 12991ae1b5e8Smrg # Ok. 13001ae1b5e8Smrg : 130176888252Smrgelse 13021ae1b5e8Smrg AC_MSG_ERROR([newly created file is older than distributed files! 13031ae1b5e8SmrgCheck your system clock]) 130476888252Smrgfi 13051ae1b5e8SmrgAC_MSG_RESULT(yes)]) 130676888252Smrg 13071ae1b5e8Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 13081ae1b5e8Smrg# 13091ae1b5e8Smrg# This file is free software; the Free Software Foundation 13101ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 13111ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 131276888252Smrg 13131ae1b5e8Smrg# AM_PROG_INSTALL_STRIP 13141ae1b5e8Smrg# --------------------- 13151ae1b5e8Smrg# One issue with vendor `install' (even GNU) is that you can't 13161ae1b5e8Smrg# specify the program used to strip binaries. This is especially 13171ae1b5e8Smrg# annoying in cross-compiling environments, where the build's strip 13181ae1b5e8Smrg# is unlikely to handle the host's binaries. 13191ae1b5e8Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 13201ae1b5e8Smrg# always use install-sh in `make install-strip', and initialize 13211ae1b5e8Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 13221ae1b5e8SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 13231ae1b5e8Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 13241ae1b5e8Smrg# Installed binaries are usually stripped using `strip' when the user 13251ae1b5e8Smrg# run `make install-strip'. However `strip' might not be the right 13261ae1b5e8Smrg# tool to use in cross-compilation environments, therefore Automake 13271ae1b5e8Smrg# will honor the `STRIP' environment variable to overrule this program. 13281ae1b5e8Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 13291ae1b5e8Smrgif test "$cross_compiling" != no; then 13301ae1b5e8Smrg AC_CHECK_TOOL([STRIP], [strip], :) 133176888252Smrgfi 13321ae1b5e8SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 13331ae1b5e8SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 133476888252Smrg 13351ae1b5e8Smrg# Copyright (C) 2006 Free Software Foundation, Inc. 13361ae1b5e8Smrg# 13371ae1b5e8Smrg# This file is free software; the Free Software Foundation 13381ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 13391ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 134076888252Smrg 13411ae1b5e8Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 13421ae1b5e8Smrg# --------------------------- 13431ae1b5e8Smrg# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. 13441ae1b5e8Smrg# This macro is traced by Automake. 13451ae1b5e8SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 134676888252Smrg 13471ae1b5e8Smrg# Check how to create a tarball. -*- Autoconf -*- 134876888252Smrg 13491ae1b5e8Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 13501ae1b5e8Smrg# 13511ae1b5e8Smrg# This file is free software; the Free Software Foundation 13521ae1b5e8Smrg# gives unlimited permission to copy and/or distribute it, 13531ae1b5e8Smrg# with or without modifications, as long as this notice is preserved. 135476888252Smrg 13551ae1b5e8Smrg# serial 2 135676888252Smrg 13571ae1b5e8Smrg# _AM_PROG_TAR(FORMAT) 13581ae1b5e8Smrg# -------------------- 13591ae1b5e8Smrg# Check how to create a tarball in format FORMAT. 13601ae1b5e8Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 13611ae1b5e8Smrg# 13621ae1b5e8Smrg# Substitute a variable $(am__tar) that is a command 13631ae1b5e8Smrg# writing to stdout a FORMAT-tarball containing the directory 13641ae1b5e8Smrg# $tardir. 13651ae1b5e8Smrg# tardir=directory && $(am__tar) > result.tar 13661ae1b5e8Smrg# 13671ae1b5e8Smrg# Substitute a variable $(am__untar) that extract such 13681ae1b5e8Smrg# a tarball read from stdin. 13691ae1b5e8Smrg# $(am__untar) < result.tar 13701ae1b5e8SmrgAC_DEFUN([_AM_PROG_TAR], 13711ae1b5e8Smrg[# Always define AMTAR for backward compatibility. 13721ae1b5e8SmrgAM_MISSING_PROG([AMTAR], [tar]) 13731ae1b5e8Smrgm4_if([$1], [v7], 13741ae1b5e8Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 13751ae1b5e8Smrg [m4_case([$1], [ustar],, [pax],, 13761ae1b5e8Smrg [m4_fatal([Unknown tar format])]) 13771ae1b5e8SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 13781ae1b5e8Smrg# Loop over all known methods to create a tar archive until one works. 13791ae1b5e8Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 13801ae1b5e8Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 13811ae1b5e8Smrg# Do not fold the above two line into one, because Tru64 sh and 13821ae1b5e8Smrg# Solaris sh will not grok spaces in the rhs of `-'. 13831ae1b5e8Smrgfor _am_tool in $_am_tools 13841ae1b5e8Smrgdo 13851ae1b5e8Smrg case $_am_tool in 13861ae1b5e8Smrg gnutar) 13871ae1b5e8Smrg for _am_tar in tar gnutar gtar; 13881ae1b5e8Smrg do 13891ae1b5e8Smrg AM_RUN_LOG([$_am_tar --version]) && break 13901ae1b5e8Smrg done 13911ae1b5e8Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 13921ae1b5e8Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 13931ae1b5e8Smrg am__untar="$_am_tar -xf -" 139476888252Smrg ;; 13951ae1b5e8Smrg plaintar) 13961ae1b5e8Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 13971ae1b5e8Smrg # ustar tarball either. 13981ae1b5e8Smrg (tar --version) >/dev/null 2>&1 && continue 13991ae1b5e8Smrg am__tar='tar chf - "$$tardir"' 14001ae1b5e8Smrg am__tar_='tar chf - "$tardir"' 14011ae1b5e8Smrg am__untar='tar xf -' 14021ae1b5e8Smrg ;; 14031ae1b5e8Smrg pax) 14041ae1b5e8Smrg am__tar='pax -L -x $1 -w "$$tardir"' 14051ae1b5e8Smrg am__tar_='pax -L -x $1 -w "$tardir"' 14061ae1b5e8Smrg am__untar='pax -r' 14071ae1b5e8Smrg ;; 14081ae1b5e8Smrg cpio) 14091ae1b5e8Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 14101ae1b5e8Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 14111ae1b5e8Smrg am__untar='cpio -i -H $1 -d' 14121ae1b5e8Smrg ;; 14131ae1b5e8Smrg none) 14141ae1b5e8Smrg am__tar=false 14151ae1b5e8Smrg am__tar_=false 14161ae1b5e8Smrg am__untar=false 141776888252Smrg ;; 141876888252Smrg esac 141976888252Smrg 14201ae1b5e8Smrg # If the value was cached, stop now. We just wanted to have am__tar 14211ae1b5e8Smrg # and am__untar set. 14221ae1b5e8Smrg test -n "${am_cv_prog_tar_$1}" && break 14231ae1b5e8Smrg 14241ae1b5e8Smrg # tar/untar a dummy directory, and stop if the command works 14251ae1b5e8Smrg rm -rf conftest.dir 14261ae1b5e8Smrg mkdir conftest.dir 14271ae1b5e8Smrg echo GrepMe > conftest.dir/file 14281ae1b5e8Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 14291ae1b5e8Smrg rm -rf conftest.dir 14301ae1b5e8Smrg if test -s conftest.tar; then 14311ae1b5e8Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 14321ae1b5e8Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 143376888252Smrg fi 14341ae1b5e8Smrgdone 14351ae1b5e8Smrgrm -rf conftest.dir 143676888252Smrg 14371ae1b5e8SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 14381ae1b5e8SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 14391ae1b5e8SmrgAC_SUBST([am__tar]) 14401ae1b5e8SmrgAC_SUBST([am__untar]) 14411ae1b5e8Smrg]) # _AM_PROG_TAR 144276888252Smrg 14431ae1b5e8Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 14441ae1b5e8Smrgdnl 14451ae1b5e8Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 14461ae1b5e8Smrgdnl 14471ae1b5e8Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 14481ae1b5e8Smrgdnl copy of this software and associated documentation files (the 14491ae1b5e8Smrgdnl "Software"), to deal in the Software without restriction, including 14501ae1b5e8Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 14511ae1b5e8Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 14521ae1b5e8Smrgdnl to whom the Software is furnished to do so, provided that the above 14531ae1b5e8Smrgdnl copyright notice(s) and this permission notice appear in all copies of 14541ae1b5e8Smrgdnl the Software and that both the above copyright notice(s) and this 14551ae1b5e8Smrgdnl permission notice appear in supporting documentation. 14561ae1b5e8Smrgdnl 14571ae1b5e8Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 14581ae1b5e8Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14591ae1b5e8Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 14601ae1b5e8Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 14611ae1b5e8Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 14621ae1b5e8Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 14631ae1b5e8Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 14641ae1b5e8Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 14651ae1b5e8Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14661ae1b5e8Smrgdnl 14671ae1b5e8Smrgdnl Except as contained in this notice, the name of a copyright holder 14681ae1b5e8Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 14691ae1b5e8Smrgdnl or other dealings in this Software without prior written authorization 14701ae1b5e8Smrgdnl of the copyright holder. 147176888252Smrg 14721ae1b5e8Smrg# XORG_MACROS_VERSION(required-version) 14731ae1b5e8Smrg# ------------------------------------- 14741ae1b5e8Smrg# Minimum version: 1.1.0 14751ae1b5e8Smrg# 14761ae1b5e8Smrg# If you're using a macro added in Version 1.1 or newer, include this in 14771ae1b5e8Smrg# your configure.ac with the minimum required version, such as: 14781ae1b5e8Smrg# XORG_MACROS_VERSION(1.1) 14791ae1b5e8Smrg# 14801ae1b5e8Smrg# To ensure that this macro is defined, also add: 14811ae1b5e8Smrg# m4_ifndef([XORG_MACROS_VERSION], 14821ae1b5e8Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 14831ae1b5e8Smrg# 14841ae1b5e8Smrg# 14851ae1b5e8Smrg# See the "minimum version" comment for each macro you use to see what 14861ae1b5e8Smrg# version you require. 14871ae1b5e8Smrgm4_defun([XORG_MACROS_VERSION],[ 14881ae1b5e8Smrgm4_define([vers_have], [1.2.1]) 14891ae1b5e8Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 14901ae1b5e8Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 14911ae1b5e8Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 14921ae1b5e8Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 14931ae1b5e8Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 14941ae1b5e8Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 14951ae1b5e8Smrgm4_undefine([vers_have]) 14961ae1b5e8Smrgm4_undefine([maj_have]) 14971ae1b5e8Smrgm4_undefine([maj_needed]) 14981ae1b5e8Smrg]) # XORG_MACROS_VERSION 149976888252Smrg 15001ae1b5e8Smrg# XORG_PROG_RAWCPP() 15011ae1b5e8Smrg# ------------------ 15021ae1b5e8Smrg# Minimum version: 1.0.0 15031ae1b5e8Smrg# 15041ae1b5e8Smrg# Find cpp program and necessary flags for use in pre-processing text files 15051ae1b5e8Smrg# such as man pages and config files 15061ae1b5e8SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 15071ae1b5e8SmrgAC_REQUIRE([AC_PROG_CPP]) 15081ae1b5e8SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 15091ae1b5e8Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 151076888252Smrg 15111ae1b5e8Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 15121ae1b5e8Smrg# which is not the best choice for supporting other OS'es, but covers most 15131ae1b5e8Smrg# of the ones we need for now. 15141ae1b5e8SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 15151ae1b5e8SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 15161ae1b5e8Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 15171ae1b5e8Smrg AC_MSG_RESULT([no]) 15181ae1b5e8Smrgelse 15191ae1b5e8Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 15201ae1b5e8Smrg RAWCPPFLAGS=-undef 15211ae1b5e8Smrg AC_MSG_RESULT([yes]) 15221ae1b5e8Smrg # under Cygwin unix is still defined even with -undef 15231ae1b5e8Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 15241ae1b5e8Smrg RAWCPPFLAGS="-undef -ansi" 15251ae1b5e8Smrg AC_MSG_RESULT([yes, with -ansi]) 15261ae1b5e8Smrg else 15271ae1b5e8Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 15281ae1b5e8Smrg fi 15291ae1b5e8Smrgfi 15301ae1b5e8Smrgrm -f conftest.$ac_ext 153176888252Smrg 15321ae1b5e8SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 15331ae1b5e8SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 15341ae1b5e8Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 15351ae1b5e8Smrg AC_MSG_RESULT([no]) 15361ae1b5e8Smrgelse 15371ae1b5e8Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 15381ae1b5e8Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 15391ae1b5e8Smrg AC_MSG_RESULT([yes]) 154076888252Smrg else 15411ae1b5e8Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 15421ae1b5e8Smrg fi 15431ae1b5e8Smrgfi 15441ae1b5e8Smrgrm -f conftest.$ac_ext 15451ae1b5e8SmrgAC_SUBST(RAWCPPFLAGS) 15461ae1b5e8Smrg]) # XORG_PROG_RAWCPP 154776888252Smrg 15481ae1b5e8Smrg# XORG_MANPAGE_SECTIONS() 15491ae1b5e8Smrg# ----------------------- 15501ae1b5e8Smrg# Minimum version: 1.0.0 15511ae1b5e8Smrg# 15521ae1b5e8Smrg# Determine which sections man pages go in for the different man page types 15531ae1b5e8Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 15541ae1b5e8Smrg# Not sure if there's any better way than just hardcoding by OS name. 15551ae1b5e8Smrg# Override default settings by setting environment variables 155676888252Smrg 15571ae1b5e8SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 15581ae1b5e8SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 155976888252Smrg 15601ae1b5e8Smrgif test x$APP_MAN_SUFFIX = x ; then 15611ae1b5e8Smrg APP_MAN_SUFFIX=1 15621ae1b5e8Smrgfi 15631ae1b5e8Smrgif test x$APP_MAN_DIR = x ; then 15641ae1b5e8Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 15651ae1b5e8Smrgfi 156676888252Smrg 15671ae1b5e8Smrgif test x$LIB_MAN_SUFFIX = x ; then 15681ae1b5e8Smrg LIB_MAN_SUFFIX=3 15691ae1b5e8Smrgfi 15701ae1b5e8Smrgif test x$LIB_MAN_DIR = x ; then 15711ae1b5e8Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 15721ae1b5e8Smrgfi 157376888252Smrg 15741ae1b5e8Smrgif test x$FILE_MAN_SUFFIX = x ; then 15751ae1b5e8Smrg case $host_os in 15761ae1b5e8Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 15771ae1b5e8Smrg *) FILE_MAN_SUFFIX=5 ;; 15781ae1b5e8Smrg esac 15791ae1b5e8Smrgfi 15801ae1b5e8Smrgif test x$FILE_MAN_DIR = x ; then 15811ae1b5e8Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 15821ae1b5e8Smrgfi 158376888252Smrg 15841ae1b5e8Smrgif test x$MISC_MAN_SUFFIX = x ; then 15851ae1b5e8Smrg case $host_os in 15861ae1b5e8Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 15871ae1b5e8Smrg *) MISC_MAN_SUFFIX=7 ;; 15881ae1b5e8Smrg esac 15891ae1b5e8Smrgfi 15901ae1b5e8Smrgif test x$MISC_MAN_DIR = x ; then 15911ae1b5e8Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 15921ae1b5e8Smrgfi 159376888252Smrg 15941ae1b5e8Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 15951ae1b5e8Smrg case $host_os in 15961ae1b5e8Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 15971ae1b5e8Smrg *) DRIVER_MAN_SUFFIX=4 ;; 15981ae1b5e8Smrg esac 15991ae1b5e8Smrgfi 16001ae1b5e8Smrgif test x$DRIVER_MAN_DIR = x ; then 16011ae1b5e8Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 16021ae1b5e8Smrgfi 160376888252Smrg 16041ae1b5e8Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 16051ae1b5e8Smrg case $host_os in 16061ae1b5e8Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 16071ae1b5e8Smrg *) ADMIN_MAN_SUFFIX=8 ;; 16081ae1b5e8Smrg esac 16091ae1b5e8Smrgfi 16101ae1b5e8Smrgif test x$ADMIN_MAN_DIR = x ; then 16111ae1b5e8Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 16121ae1b5e8Smrgfi 161376888252Smrg 161476888252Smrg 16151ae1b5e8SmrgAC_SUBST([APP_MAN_SUFFIX]) 16161ae1b5e8SmrgAC_SUBST([LIB_MAN_SUFFIX]) 16171ae1b5e8SmrgAC_SUBST([FILE_MAN_SUFFIX]) 16181ae1b5e8SmrgAC_SUBST([MISC_MAN_SUFFIX]) 16191ae1b5e8SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 16201ae1b5e8SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 16211ae1b5e8SmrgAC_SUBST([APP_MAN_DIR]) 16221ae1b5e8SmrgAC_SUBST([LIB_MAN_DIR]) 16231ae1b5e8SmrgAC_SUBST([FILE_MAN_DIR]) 16241ae1b5e8SmrgAC_SUBST([MISC_MAN_DIR]) 16251ae1b5e8SmrgAC_SUBST([DRIVER_MAN_DIR]) 16261ae1b5e8SmrgAC_SUBST([ADMIN_MAN_DIR]) 16271ae1b5e8Smrg]) # XORG_MANPAGE_SECTIONS 162876888252Smrg 16291ae1b5e8Smrg# XORG_CHECK_LINUXDOC 16301ae1b5e8Smrg# ------------------- 16311ae1b5e8Smrg# Minimum version: 1.0.0 16321ae1b5e8Smrg# 16331ae1b5e8Smrg# Defines the variable MAKE_TEXT if the necessary tools and 16341ae1b5e8Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 16351ae1b5e8Smrg# Whether or not the necessary tools and files are found can be checked 16361ae1b5e8Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 16371ae1b5e8SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 16381ae1b5e8Smrgif test x$XORG_SGML_PATH = x ; then 16391ae1b5e8Smrg XORG_SGML_PATH=$prefix/share/sgml 16401ae1b5e8Smrgfi 16411ae1b5e8SmrgHAVE_DEFS_ENT= 164276888252Smrg 16431ae1b5e8Smrgif test x"$cross_compiling" = x"yes" ; then 16441ae1b5e8Smrg HAVE_DEFS_ENT=no 16451ae1b5e8Smrgelse 16461ae1b5e8Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 16471ae1b5e8Smrgfi 164876888252Smrg 16491ae1b5e8SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 16501ae1b5e8SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 165176888252Smrg 16521ae1b5e8SmrgAC_MSG_CHECKING([Whether to build documentation]) 165376888252Smrg 16541ae1b5e8Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 16551ae1b5e8Smrg BUILDDOC=yes 16561ae1b5e8Smrgelse 16571ae1b5e8Smrg BUILDDOC=no 16581ae1b5e8Smrgfi 165976888252Smrg 16601ae1b5e8SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 166176888252Smrg 16621ae1b5e8SmrgAC_MSG_RESULT([$BUILDDOC]) 166376888252Smrg 16641ae1b5e8SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 166576888252Smrg 16661ae1b5e8Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 16671ae1b5e8Smrg BUILDPDFDOC=yes 16681ae1b5e8Smrgelse 16691ae1b5e8Smrg BUILDPDFDOC=no 167076888252Smrgfi 167176888252Smrg 16721ae1b5e8SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 167376888252Smrg 16741ae1b5e8SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 167576888252Smrg 16761ae1b5e8SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 16771ae1b5e8SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 16781ae1b5e8SmrgMAKE_PDF="$PS2PDF" 16791ae1b5e8SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 168076888252Smrg 16811ae1b5e8SmrgAC_SUBST(MAKE_TEXT) 16821ae1b5e8SmrgAC_SUBST(MAKE_PS) 16831ae1b5e8SmrgAC_SUBST(MAKE_PDF) 16841ae1b5e8SmrgAC_SUBST(MAKE_HTML) 16851ae1b5e8Smrg]) # XORG_CHECK_LINUXDOC 168676888252Smrg 16871ae1b5e8Smrg# XORG_CHECK_DOCBOOK 16881ae1b5e8Smrg# ------------------- 16891ae1b5e8Smrg# Minimum version: 1.0.0 16901ae1b5e8Smrg# 16911ae1b5e8Smrg# Checks for the ability to build output formats from SGML DocBook source. 16921ae1b5e8Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 16931ae1b5e8Smrg# indicates whether the necessary tools and files are found and, if set, 16941ae1b5e8Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 16951ae1b5e8SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 16961ae1b5e8Smrgif test x$XORG_SGML_PATH = x ; then 16971ae1b5e8Smrg XORG_SGML_PATH=$prefix/share/sgml 16981ae1b5e8Smrgfi 16991ae1b5e8SmrgHAVE_DEFS_ENT= 17001ae1b5e8SmrgBUILDTXTDOC=no 17011ae1b5e8SmrgBUILDPDFDOC=no 17021ae1b5e8SmrgBUILDPSDOC=no 17031ae1b5e8SmrgBUILDHTMLDOC=no 17041ae1b5e8Smrg 17051ae1b5e8SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 17061ae1b5e8Smrg 17071ae1b5e8SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 17081ae1b5e8SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 17091ae1b5e8SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 17101ae1b5e8SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 17111ae1b5e8Smrg 17121ae1b5e8SmrgAC_MSG_CHECKING([Whether to build text documentation]) 17131ae1b5e8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 17141ae1b5e8Smrg test x$BUILD_TXTDOC != xno; then 17151ae1b5e8Smrg BUILDTXTDOC=yes 17161ae1b5e8Smrgfi 17171ae1b5e8SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 17181ae1b5e8SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 171976888252Smrg 17201ae1b5e8SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 17211ae1b5e8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 17221ae1b5e8Smrg test x$BUILD_PDFDOC != xno; then 17231ae1b5e8Smrg BUILDPDFDOC=yes 17241ae1b5e8Smrgfi 17251ae1b5e8SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 17261ae1b5e8SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 172776888252Smrg 17281ae1b5e8SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 17291ae1b5e8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 17301ae1b5e8Smrg test x$BUILD_PSDOC != xno; then 17311ae1b5e8Smrg BUILDPSDOC=yes 17321ae1b5e8Smrgfi 17331ae1b5e8SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 17341ae1b5e8SmrgAC_MSG_RESULT([$BUILDPSDOC]) 173576888252Smrg 17361ae1b5e8SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 17371ae1b5e8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 17381ae1b5e8Smrg test x$BUILD_HTMLDOC != xno; then 17391ae1b5e8Smrg BUILDHTMLDOC=yes 17401ae1b5e8Smrgfi 17411ae1b5e8SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 17421ae1b5e8SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 174376888252Smrg 17441ae1b5e8SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 17451ae1b5e8SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 17461ae1b5e8SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 17471ae1b5e8SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 174876888252Smrg 17491ae1b5e8SmrgAC_SUBST(MAKE_TEXT) 17501ae1b5e8SmrgAC_SUBST(MAKE_PS) 17511ae1b5e8SmrgAC_SUBST(MAKE_PDF) 17521ae1b5e8SmrgAC_SUBST(MAKE_HTML) 17531ae1b5e8Smrg]) # XORG_CHECK_DOCBOOK 175476888252Smrg 17551ae1b5e8Smrg# XORG_CHECK_MALLOC_ZERO 17561ae1b5e8Smrg# ---------------------- 17571ae1b5e8Smrg# Minimum version: 1.0.0 17581ae1b5e8Smrg# 17591ae1b5e8Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 17601ae1b5e8Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 17611ae1b5e8Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 17621ae1b5e8SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 17631ae1b5e8SmrgAC_ARG_ENABLE(malloc0returnsnull, 17641ae1b5e8Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 17651ae1b5e8Smrg [malloc(0) returns NULL (default: auto)]), 17661ae1b5e8Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 17671ae1b5e8Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 176876888252Smrg 17691ae1b5e8SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 17701ae1b5e8Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 17711ae1b5e8Smrg AC_RUN_IFELSE([ 17721ae1b5e8Smrgchar *malloc(); 17731ae1b5e8Smrgchar *realloc(); 17741ae1b5e8Smrgchar *calloc(); 17751ae1b5e8Smrgmain() { 17761ae1b5e8Smrg char *m0, *r0, *c0, *p; 17771ae1b5e8Smrg m0 = malloc(0); 17781ae1b5e8Smrg p = malloc(10); 17791ae1b5e8Smrg r0 = realloc(p,0); 17801ae1b5e8Smrg c0 = calloc(0); 17811ae1b5e8Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 17821ae1b5e8Smrg}], 17831ae1b5e8Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 17841ae1b5e8Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 17851ae1b5e8Smrgfi 17861ae1b5e8SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 178776888252Smrg 17881ae1b5e8Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 17891ae1b5e8Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 17901ae1b5e8Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 17911ae1b5e8Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 17921ae1b5e8Smrgelse 17931ae1b5e8Smrg MALLOC_ZERO_CFLAGS="" 17941ae1b5e8Smrg XMALLOC_ZERO_CFLAGS="" 17951ae1b5e8Smrg XTMALLOC_ZERO_CFLAGS="" 17961ae1b5e8Smrgfi 179776888252Smrg 17981ae1b5e8SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 17991ae1b5e8SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 18001ae1b5e8SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 18011ae1b5e8Smrg]) # XORG_CHECK_MALLOC_ZERO 180276888252Smrg 18031ae1b5e8Smrg# XORG_WITH_LINT() 18041ae1b5e8Smrg# ---------------- 18051ae1b5e8Smrg# Minimum version: 1.1.0 18061ae1b5e8Smrg# 18071ae1b5e8Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 18081ae1b5e8Smrg# is specified. (Use --with-lint=sparse for sparse.) 18091ae1b5e8Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 18101ae1b5e8Smrg# Sets $LINT_FLAGS to flags to pass to source checker 18111ae1b5e8Smrg# Sets LINT automake conditional if enabled (default: disabled) 18121ae1b5e8Smrg# 18131ae1b5e8SmrgAC_DEFUN([XORG_WITH_LINT],[ 18141ae1b5e8Smrg 18151ae1b5e8Smrg# Allow checking code with lint, sparse, etc. 18161ae1b5e8SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 18171ae1b5e8Smrg [Use a lint-style source code checker (default: disabled)])], 18181ae1b5e8Smrg [use_lint=$withval], [use_lint=no]) 18191ae1b5e8Smrgif test "x$use_lint" = "xyes" ; then 18201ae1b5e8Smrg LINT="lint" 18211ae1b5e8Smrgelse 18221ae1b5e8Smrg LINT="$use_lint" 18231ae1b5e8Smrgfi 18241ae1b5e8Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 18251ae1b5e8Smrg case $LINT in 18261ae1b5e8Smrg lint|*/lint) 18271ae1b5e8Smrg case $host_os in 18281ae1b5e8Smrg solaris*) 18291ae1b5e8Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 18301ae1b5e8Smrg ;; 18311ae1b5e8Smrg esac 18321ae1b5e8Smrg ;; 18331ae1b5e8Smrg esac 183476888252Smrgfi 183576888252Smrg 18361ae1b5e8SmrgAC_SUBST(LINT) 18371ae1b5e8SmrgAC_SUBST(LINT_FLAGS) 18381ae1b5e8SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 183976888252Smrg 18401ae1b5e8Smrg]) # XORG_WITH_LINT 184176888252Smrg 18421ae1b5e8Smrg# XORG_LINT_LIBRARY(LIBNAME) 18431ae1b5e8Smrg# -------------------------- 18441ae1b5e8Smrg# Minimum version: 1.1.0 18451ae1b5e8Smrg# 18461ae1b5e8Smrg# Sets up flags for building lint libraries for checking programs that call 18471ae1b5e8Smrg# functions in the library. 18481ae1b5e8Smrg# Disabled by default, enable with --enable-lint-library 18491ae1b5e8Smrg# Sets: 18501ae1b5e8Smrg# @LINTLIB@ - name of lint library file to make 18511ae1b5e8Smrg# MAKE_LINT_LIB - automake conditional 18521ae1b5e8Smrg# 185376888252Smrg 18541ae1b5e8SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 18551ae1b5e8SmrgAC_REQUIRE([XORG_WITH_LINT]) 18561ae1b5e8Smrg# Build lint "library" for more indepth checks of programs calling this library 18571ae1b5e8SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 18581ae1b5e8Smrg [Create lint library (default: disabled)])], 18591ae1b5e8Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 18601ae1b5e8Smrgif test "x$make_lint_lib" != "xno" ; then 18611ae1b5e8Smrg if test "x$LINT" = "xno" ; then 18621ae1b5e8Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 18631ae1b5e8Smrg fi 18641ae1b5e8Smrg if test "x$make_lint_lib" = "xyes" ; then 18651ae1b5e8Smrg LINTLIB=llib-l$1.ln 18661ae1b5e8Smrg else 18671ae1b5e8Smrg LINTLIB=$make_lint_lib 18681ae1b5e8Smrg fi 18691ae1b5e8Smrgfi 18701ae1b5e8SmrgAC_SUBST(LINTLIB) 18711ae1b5e8SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 187276888252Smrg 18731ae1b5e8Smrg]) # XORG_LINT_LIBRARY 187476888252Smrg 18751ae1b5e8Smrg# XORG_CWARNFLAGS 18761ae1b5e8Smrg# --------------- 18771ae1b5e8Smrg# Minimum version: 1.2.0 18781ae1b5e8Smrg# 18791ae1b5e8Smrg# Defines CWARNFLAGS to enable C compiler warnings. 18801ae1b5e8Smrg# 18811ae1b5e8SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 18821ae1b5e8SmrgAC_REQUIRE([AC_PROG_CC]) 18831ae1b5e8Smrgif test "x$GCC" = xyes ; then 18841ae1b5e8Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 18851ae1b5e8Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 18861ae1b5e8Smrg-Wbad-function-cast" 18871ae1b5e8Smrg case `gcc -dumpversion` in 18881ae1b5e8Smrg 3.4.* | 4.*) 18891ae1b5e8Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 18901ae1b5e8Smrg ;; 18911ae1b5e8Smrg esac 18921ae1b5e8Smrgelse 18931ae1b5e8Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 18941ae1b5e8Smrg if test "x$SUNCC" = "xyes"; then 18951ae1b5e8Smrg CWARNFLAGS="-v" 18961ae1b5e8Smrg fi 18971ae1b5e8Smrgfi 18981ae1b5e8SmrgAC_SUBST(CWARNFLAGS) 18991ae1b5e8Smrg]) # XORG_CWARNFLAGS 19001ae1b5e8Smrgdnl Copyright 2005 Red Hat, Inc 19011ae1b5e8Smrgdnl 19021ae1b5e8Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 19031ae1b5e8Smrgdnl documentation for any purpose is hereby granted without fee, provided that 19041ae1b5e8Smrgdnl the above copyright notice appear in all copies and that both that 19051ae1b5e8Smrgdnl copyright notice and this permission notice appear in supporting 19061ae1b5e8Smrgdnl documentation. 19071ae1b5e8Smrgdnl 19081ae1b5e8Smrgdnl The above copyright notice and this permission notice shall be included 19091ae1b5e8Smrgdnl in all copies or substantial portions of the Software. 19101ae1b5e8Smrgdnl 19111ae1b5e8Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19121ae1b5e8Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19131ae1b5e8Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19141ae1b5e8Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 19151ae1b5e8Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19161ae1b5e8Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 19171ae1b5e8Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 19181ae1b5e8Smrgdnl 19191ae1b5e8Smrgdnl Except as contained in this notice, the name of the copyright holders shall 19201ae1b5e8Smrgdnl not be used in advertising or otherwise to promote the sale, use or 19211ae1b5e8Smrgdnl other dealings in this Software without prior written authorization 19221ae1b5e8Smrgdnl from the copyright holders. 19231ae1b5e8Smrgdnl 19241ae1b5e8Smrg 19251ae1b5e8Smrg# XORG_RELEASE_VERSION 19261ae1b5e8Smrg# -------------------- 19271ae1b5e8Smrg# Adds --with/without-release-string and changes the PACKAGE and 19281ae1b5e8Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 19291ae1b5e8Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 19301ae1b5e8Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 19311ae1b5e8Smrg 19321ae1b5e8SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 19331ae1b5e8Smrg AC_ARG_WITH(release-version, 19341ae1b5e8Smrg AC_HELP_STRING([--with-release-version=STRING], 19351ae1b5e8Smrg [Use release version string in package name]), 19361ae1b5e8Smrg [RELEASE_VERSION="$withval"], 19371ae1b5e8Smrg [RELEASE_VERSION=""]) 19381ae1b5e8Smrg if test "x$RELEASE_VERSION" != "x"; then 19391ae1b5e8Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 19401ae1b5e8Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 19411ae1b5e8Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 194276888252Smrg fi 19431ae1b5e8Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 19441ae1b5e8Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 19451ae1b5e8Smrg [Major version of this package]) 19461ae1b5e8Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 19471ae1b5e8Smrg if test "x$PVM" = "x"; then 19481ae1b5e8Smrg PVM="0" 19491ae1b5e8Smrg fi 19501ae1b5e8Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 19511ae1b5e8Smrg [$PVM], 19521ae1b5e8Smrg [Minor version of this package]) 19531ae1b5e8Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 19541ae1b5e8Smrg if test "x$PVP" = "x"; then 19551ae1b5e8Smrg PVP="0" 19561ae1b5e8Smrg fi 19571ae1b5e8Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 19581ae1b5e8Smrg [$PVP], 19591ae1b5e8Smrg [Patch version of this package]) 19601ae1b5e8Smrg]) 196176888252Smrg 19621ae1b5e8Smrg# XORG_CHANGELOG() 19631ae1b5e8Smrg# ---------------- 19641ae1b5e8Smrg# Minimum version: 1.2.0 19651ae1b5e8Smrg# 19661ae1b5e8Smrg# Defines the variable CHANGELOG_CMD as the command to generate 19671ae1b5e8Smrg# ChangeLog from git. 19681ae1b5e8Smrg# 19691ae1b5e8Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 19701ae1b5e8Smrg# 19711ae1b5e8SmrgAC_DEFUN([XORG_CHANGELOG], [ 19721ae1b5e8SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 19731ae1b5e8Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 19741ae1b5e8Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 19751ae1b5e8SmrgAC_SUBST([CHANGELOG_CMD]) 19761ae1b5e8SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 19771ae1b5e8Smrg]) # XORG_CHANGELOG 197876888252Smrg 19791ae1b5e8Smrgdnl Copyright 2005 Red Hat, Inc 19801ae1b5e8Smrgdnl 19811ae1b5e8Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 19821ae1b5e8Smrgdnl documentation for any purpose is hereby granted without fee, provided that 19831ae1b5e8Smrgdnl the above copyright notice appear in all copies and that both that 19841ae1b5e8Smrgdnl copyright notice and this permission notice appear in supporting 19851ae1b5e8Smrgdnl documentation. 19861ae1b5e8Smrgdnl 19871ae1b5e8Smrgdnl The above copyright notice and this permission notice shall be included 19881ae1b5e8Smrgdnl in all copies or substantial portions of the Software. 19891ae1b5e8Smrgdnl 19901ae1b5e8Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19911ae1b5e8Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19921ae1b5e8Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19931ae1b5e8Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 19941ae1b5e8Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19951ae1b5e8Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 19961ae1b5e8Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 19971ae1b5e8Smrgdnl 19981ae1b5e8Smrgdnl Except as contained in this notice, the name of the copyright holders shall 19991ae1b5e8Smrgdnl not be used in advertising or otherwise to promote the sale, use or 20001ae1b5e8Smrgdnl other dealings in this Software without prior written authorization 20011ae1b5e8Smrgdnl from the copyright holders. 20021ae1b5e8Smrgdnl 200376888252Smrg 20041ae1b5e8Smrg# XORG_DRIVER_CHECK_EXT() 20051ae1b5e8Smrg# -------------------------- 20061ae1b5e8Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 20071ae1b5e8Smrg# is defined, then add $1 to $REQUIRED_MODULES. 200876888252Smrg 20091ae1b5e8SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 20101ae1b5e8Smrg SAVE_CFLAGS="$CFLAGS" 20111ae1b5e8Smrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 20121ae1b5e8Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 20131ae1b5e8Smrg#include "xorg-server.h" 20141ae1b5e8Smrg#if !defined $1 20151ae1b5e8Smrg#error $1 not defined 20161ae1b5e8Smrg#endif 20171ae1b5e8Smrg ]])], 20181ae1b5e8Smrg [_EXT_CHECK=yes], 20191ae1b5e8Smrg [_EXT_CHECK=no]) 20201ae1b5e8Smrg CFLAGS="$SAVE_CFLAGS" 20211ae1b5e8Smrg AC_MSG_CHECKING([if $1 is defined]) 20221ae1b5e8Smrg AC_MSG_RESULT([$_EXT_CHECK]) 20231ae1b5e8Smrg if test "$_EXT_CHECK" != no; then 20241ae1b5e8Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 202576888252Smrg fi 20261ae1b5e8Smrg]) 202776888252Smrg 20281ae1b5e8Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 202976888252Smrg 20301ae1b5e8Smrg# serial 48 AC_PROG_LIBTOOL 203176888252Smrg 203276888252Smrg 20331ae1b5e8Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 20341ae1b5e8Smrg# ----------------------------------------------------------- 20351ae1b5e8Smrg# If this macro is not defined by Autoconf, define it here. 20361ae1b5e8Smrgm4_ifdef([AC_PROVIDE_IFELSE], 20371ae1b5e8Smrg [], 20381ae1b5e8Smrg [m4_define([AC_PROVIDE_IFELSE], 20391ae1b5e8Smrg [m4_ifdef([AC_PROVIDE_$1], 20401ae1b5e8Smrg [$2], [$3])])]) 204176888252Smrg 204276888252Smrg 20431ae1b5e8Smrg# AC_PROG_LIBTOOL 20441ae1b5e8Smrg# --------------- 20451ae1b5e8SmrgAC_DEFUN([AC_PROG_LIBTOOL], 20461ae1b5e8Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 20471ae1b5e8Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 20481ae1b5e8Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 20491ae1b5e8Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 20501ae1b5e8Smrg [AC_LIBTOOL_CXX], 20511ae1b5e8Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 20521ae1b5e8Smrg ])]) 20531ae1b5e8Smrgdnl And a similar setup for Fortran 77 support 20541ae1b5e8Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 20551ae1b5e8Smrg [AC_LIBTOOL_F77], 20561ae1b5e8Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 20571ae1b5e8Smrg])]) 205876888252Smrg 20591ae1b5e8Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 20601ae1b5e8Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 20611ae1b5e8Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 20621ae1b5e8Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 20631ae1b5e8Smrg [AC_LIBTOOL_GCJ], 20641ae1b5e8Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 20651ae1b5e8Smrg [AC_LIBTOOL_GCJ], 20661ae1b5e8Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 20671ae1b5e8Smrg [AC_LIBTOOL_GCJ], 20681ae1b5e8Smrg [ifdef([AC_PROG_GCJ], 20691ae1b5e8Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 20701ae1b5e8Smrg ifdef([A][M_PROG_GCJ], 20711ae1b5e8Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 20721ae1b5e8Smrg ifdef([LT_AC_PROG_GCJ], 20731ae1b5e8Smrg [define([LT_AC_PROG_GCJ], 20741ae1b5e8Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 20751ae1b5e8Smrg])])# AC_PROG_LIBTOOL 207676888252Smrg 207776888252Smrg 20781ae1b5e8Smrg# _AC_PROG_LIBTOOL 20791ae1b5e8Smrg# ---------------- 20801ae1b5e8SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 20811ae1b5e8Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 20821ae1b5e8SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 20831ae1b5e8SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 20841ae1b5e8SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 208576888252Smrg 20861ae1b5e8Smrg# This can be used to rebuild libtool when needed 20871ae1b5e8SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 208876888252Smrg 20891ae1b5e8Smrg# Always use our own libtool. 20901ae1b5e8SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 20911ae1b5e8SmrgAC_SUBST(LIBTOOL)dnl 209276888252Smrg 20931ae1b5e8Smrg# Prevent multiple expansion 20941ae1b5e8Smrgdefine([AC_PROG_LIBTOOL], []) 20951ae1b5e8Smrg])# _AC_PROG_LIBTOOL 209676888252Smrg 209776888252Smrg 20981ae1b5e8Smrg# AC_LIBTOOL_SETUP 20991ae1b5e8Smrg# ---------------- 21001ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 21011ae1b5e8Smrg[AC_PREREQ(2.50)dnl 21021ae1b5e8SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 21031ae1b5e8SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 21041ae1b5e8SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 21051ae1b5e8SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 21061ae1b5e8SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 21071ae1b5e8SmrgAC_REQUIRE([AC_PROG_CC])dnl 21081ae1b5e8SmrgAC_REQUIRE([AC_PROG_LD])dnl 21091ae1b5e8SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 21101ae1b5e8SmrgAC_REQUIRE([AC_PROG_NM])dnl 21111ae1b5e8Smrg 21121ae1b5e8SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 21131ae1b5e8SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 21141ae1b5e8Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 21151ae1b5e8SmrgAC_REQUIRE([AC_OBJEXT])dnl 21161ae1b5e8SmrgAC_REQUIRE([AC_EXEEXT])dnl 21171ae1b5e8Smrgdnl 211876888252Smrg 21191ae1b5e8SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 21201ae1b5e8SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 21211ae1b5e8SmrgAC_LIBTOOL_OBJDIR 212276888252Smrg 21231ae1b5e8SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 21241ae1b5e8Smrg_LT_AC_PROG_ECHO_BACKSLASH 21251ae1b5e8Smrg 21261ae1b5e8Smrgcase $host_os in 21271ae1b5e8Smrgaix3*) 21281ae1b5e8Smrg # AIX sometimes has problems with the GCC collect2 program. For some 21291ae1b5e8Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 21301ae1b5e8Smrg # vanish in a puff of smoke. 21311ae1b5e8Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 21321ae1b5e8Smrg COLLECT_NAMES= 21331ae1b5e8Smrg export COLLECT_NAMES 213476888252Smrg fi 21351ae1b5e8Smrg ;; 21361ae1b5e8Smrgesac 213776888252Smrg 21381ae1b5e8Smrg# Sed substitution that helps us do robust quoting. It backslashifies 21391ae1b5e8Smrg# metacharacters that are still active within double-quoted strings. 21401ae1b5e8SmrgXsed='sed -e 1s/^X//' 21411ae1b5e8Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 214276888252Smrg 21431ae1b5e8Smrg# Same as above, but do not quote variable references. 21441ae1b5e8Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 21451ae1b5e8Smrg 21461ae1b5e8Smrg# Sed substitution to delay expansion of an escaped shell variable in a 21471ae1b5e8Smrg# double_quote_subst'ed string. 21481ae1b5e8Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 21491ae1b5e8Smrg 21501ae1b5e8Smrg# Sed substitution to avoid accidental globbing in evaled expressions 21511ae1b5e8Smrgno_glob_subst='s/\*/\\\*/g' 21521ae1b5e8Smrg 21531ae1b5e8Smrg# Constants: 21541ae1b5e8Smrgrm="rm -f" 21551ae1b5e8Smrg 21561ae1b5e8Smrg# Global variables: 21571ae1b5e8Smrgdefault_ofile=libtool 21581ae1b5e8Smrgcan_build_shared=yes 21591ae1b5e8Smrg 21601ae1b5e8Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 21611ae1b5e8Smrg# which needs '.lib'). 21621ae1b5e8Smrglibext=a 21631ae1b5e8Smrgltmain="$ac_aux_dir/ltmain.sh" 21641ae1b5e8Smrgofile="$default_ofile" 21651ae1b5e8Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 21661ae1b5e8Smrg 21671ae1b5e8SmrgAC_CHECK_TOOL(AR, ar, false) 21681ae1b5e8SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 21691ae1b5e8SmrgAC_CHECK_TOOL(STRIP, strip, :) 21701ae1b5e8Smrg 21711ae1b5e8Smrgold_CC="$CC" 21721ae1b5e8Smrgold_CFLAGS="$CFLAGS" 21731ae1b5e8Smrg 21741ae1b5e8Smrg# Set sane defaults for various variables 21751ae1b5e8Smrgtest -z "$AR" && AR=ar 21761ae1b5e8Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 21771ae1b5e8Smrgtest -z "$AS" && AS=as 21781ae1b5e8Smrgtest -z "$CC" && CC=cc 21791ae1b5e8Smrgtest -z "$LTCC" && LTCC=$CC 21801ae1b5e8Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 21811ae1b5e8Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 21821ae1b5e8Smrgtest -z "$LD" && LD=ld 21831ae1b5e8Smrgtest -z "$LN_S" && LN_S="ln -s" 21841ae1b5e8Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 21851ae1b5e8Smrgtest -z "$NM" && NM=nm 21861ae1b5e8Smrgtest -z "$SED" && SED=sed 21871ae1b5e8Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 21881ae1b5e8Smrgtest -z "$RANLIB" && RANLIB=: 21891ae1b5e8Smrgtest -z "$STRIP" && STRIP=: 21901ae1b5e8Smrgtest -z "$ac_objext" && ac_objext=o 21911ae1b5e8Smrg 21921ae1b5e8Smrg# Determine commands to create old-style static archives. 21931ae1b5e8Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 21941ae1b5e8Smrgold_postinstall_cmds='chmod 644 $oldlib' 21951ae1b5e8Smrgold_postuninstall_cmds= 21961ae1b5e8Smrg 21971ae1b5e8Smrgif test -n "$RANLIB"; then 21981ae1b5e8Smrg case $host_os in 21991ae1b5e8Smrg openbsd*) 22001ae1b5e8Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 220176888252Smrg ;; 220276888252Smrg *) 22031ae1b5e8Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 220476888252Smrg ;; 220576888252Smrg esac 22061ae1b5e8Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 220776888252Smrgfi 220876888252Smrg 22091ae1b5e8Smrg_LT_CC_BASENAME([$compiler]) 221076888252Smrg 22111ae1b5e8Smrg# Only perform the check for file, if the check method requires it 22121ae1b5e8Smrgcase $deplibs_check_method in 22131ae1b5e8Smrgfile_magic*) 22141ae1b5e8Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 22151ae1b5e8Smrg AC_PATH_MAGIC 22161ae1b5e8Smrg fi 221776888252Smrg ;; 221876888252Smrgesac 221976888252Smrg 22201ae1b5e8SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 22211ae1b5e8SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 22221ae1b5e8Smrgenable_win32_dll=yes, enable_win32_dll=no) 222376888252Smrg 22241ae1b5e8SmrgAC_ARG_ENABLE([libtool-lock], 22251ae1b5e8Smrg [AC_HELP_STRING([--disable-libtool-lock], 22261ae1b5e8Smrg [avoid locking (might break parallel builds)])]) 22271ae1b5e8Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 222876888252Smrg 22291ae1b5e8SmrgAC_ARG_WITH([pic], 22301ae1b5e8Smrg [AC_HELP_STRING([--with-pic], 22311ae1b5e8Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 22321ae1b5e8Smrg [pic_mode="$withval"], 22331ae1b5e8Smrg [pic_mode=default]) 22341ae1b5e8Smrgtest -z "$pic_mode" && pic_mode=default 223576888252Smrg 22361ae1b5e8Smrg# Use C for the default configuration in the libtool script 22371ae1b5e8Smrgtagname= 22381ae1b5e8SmrgAC_LIBTOOL_LANG_C_CONFIG 22391ae1b5e8Smrg_LT_AC_TAGCONFIG 22401ae1b5e8Smrg])# AC_LIBTOOL_SETUP 224176888252Smrg 224276888252Smrg 22431ae1b5e8Smrg# _LT_AC_SYS_COMPILER 22441ae1b5e8Smrg# ------------------- 22451ae1b5e8SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 22461ae1b5e8Smrg[AC_REQUIRE([AC_PROG_CC])dnl 224776888252Smrg 22481ae1b5e8Smrg# If no C compiler was specified, use CC. 22491ae1b5e8SmrgLTCC=${LTCC-"$CC"} 225076888252Smrg 22511ae1b5e8Smrg# If no C compiler flags were specified, use CFLAGS. 22521ae1b5e8SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 225376888252Smrg 22541ae1b5e8Smrg# Allow CC to be a program name with arguments. 22551ae1b5e8Smrgcompiler=$CC 22561ae1b5e8Smrg])# _LT_AC_SYS_COMPILER 225776888252Smrg 225876888252Smrg 22591ae1b5e8Smrg# _LT_CC_BASENAME(CC) 22601ae1b5e8Smrg# ------------------- 22611ae1b5e8Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 22621ae1b5e8SmrgAC_DEFUN([_LT_CC_BASENAME], 22631ae1b5e8Smrg[for cc_temp in $1""; do 22641ae1b5e8Smrg case $cc_temp in 22651ae1b5e8Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 22661ae1b5e8Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 22671ae1b5e8Smrg \-*) ;; 22681ae1b5e8Smrg *) break;; 226976888252Smrg esac 22701ae1b5e8Smrgdone 22711ae1b5e8Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 22721ae1b5e8Smrg]) 227376888252Smrg 227476888252Smrg 22751ae1b5e8Smrg# _LT_COMPILER_BOILERPLATE 22761ae1b5e8Smrg# ------------------------ 22771ae1b5e8Smrg# Check for compiler boilerplate output or warnings with 22781ae1b5e8Smrg# the simple compiler test code. 22791ae1b5e8SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 22801ae1b5e8Smrg[ac_outfile=conftest.$ac_objext 22811ae1b5e8Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 22821ae1b5e8Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 22831ae1b5e8Smrg_lt_compiler_boilerplate=`cat conftest.err` 22841ae1b5e8Smrg$rm conftest* 22851ae1b5e8Smrg])# _LT_COMPILER_BOILERPLATE 228676888252Smrg 228776888252Smrg 22881ae1b5e8Smrg# _LT_LINKER_BOILERPLATE 22891ae1b5e8Smrg# ---------------------- 22901ae1b5e8Smrg# Check for linker boilerplate output or warnings with 22911ae1b5e8Smrg# the simple link test code. 22921ae1b5e8SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 22931ae1b5e8Smrg[ac_outfile=conftest.$ac_objext 22941ae1b5e8Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 22951ae1b5e8Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 22961ae1b5e8Smrg_lt_linker_boilerplate=`cat conftest.err` 22971ae1b5e8Smrg$rm conftest* 22981ae1b5e8Smrg])# _LT_LINKER_BOILERPLATE 229976888252Smrg 230076888252Smrg 23011ae1b5e8Smrg# _LT_AC_SYS_LIBPATH_AIX 23021ae1b5e8Smrg# ---------------------- 23031ae1b5e8Smrg# Links a minimal program and checks the executable 23041ae1b5e8Smrg# for the system default hardcoded library path. In most cases, 23051ae1b5e8Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 23061ae1b5e8Smrg# the location of the communication and MPI libs are included too. 23071ae1b5e8Smrg# If we don't find anything, use the default library path according 23081ae1b5e8Smrg# to the aix ld manual. 23091ae1b5e8SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 23101ae1b5e8Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 23111ae1b5e8Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 23121ae1b5e8Smrg}'` 23131ae1b5e8Smrg# Check for a 64-bit object if we didn't find anything. 23141ae1b5e8Smrgif 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; } 23151ae1b5e8Smrg}'`; fi],[]) 23161ae1b5e8Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 23171ae1b5e8Smrg])# _LT_AC_SYS_LIBPATH_AIX 231876888252Smrg 231976888252Smrg 23201ae1b5e8Smrg# _LT_AC_SHELL_INIT(ARG) 23211ae1b5e8Smrg# ---------------------- 23221ae1b5e8SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 23231ae1b5e8Smrg[ifdef([AC_DIVERSION_NOTICE], 23241ae1b5e8Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 23251ae1b5e8Smrg [AC_DIVERT_PUSH(NOTICE)]) 23261ae1b5e8Smrg$1 23271ae1b5e8SmrgAC_DIVERT_POP 23281ae1b5e8Smrg])# _LT_AC_SHELL_INIT 232976888252Smrg 233076888252Smrg 23311ae1b5e8Smrg# _LT_AC_PROG_ECHO_BACKSLASH 23321ae1b5e8Smrg# -------------------------- 23331ae1b5e8Smrg# Add some code to the start of the generated configure script which 23341ae1b5e8Smrg# will find an echo command which doesn't interpret backslashes. 23351ae1b5e8SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 23361ae1b5e8Smrg[_LT_AC_SHELL_INIT([ 23371ae1b5e8Smrg# Check that we are running under the correct shell. 23381ae1b5e8SmrgSHELL=${CONFIG_SHELL-/bin/sh} 233976888252Smrg 23401ae1b5e8Smrgcase X$ECHO in 23411ae1b5e8SmrgX*--fallback-echo) 23421ae1b5e8Smrg # Remove one level of quotation (which was required for Make). 23431ae1b5e8Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 234476888252Smrg ;; 234576888252Smrgesac 234676888252Smrg 23471ae1b5e8Smrgecho=${ECHO-echo} 23481ae1b5e8Smrgif test "X[$]1" = X--no-reexec; then 23491ae1b5e8Smrg # Discard the --no-reexec flag, and continue. 23501ae1b5e8Smrg shift 23511ae1b5e8Smrgelif test "X[$]1" = X--fallback-echo; then 23521ae1b5e8Smrg # Avoid inline document here, it may be left over 23531ae1b5e8Smrg : 23541ae1b5e8Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 23551ae1b5e8Smrg # Yippee, $echo works! 23561ae1b5e8Smrg : 235776888252Smrgelse 23581ae1b5e8Smrg # Restart under the correct shell. 23591ae1b5e8Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 23601ae1b5e8Smrgfi 236176888252Smrg 23621ae1b5e8Smrgif test "X[$]1" = X--fallback-echo; then 23631ae1b5e8Smrg # used as fallback echo 23641ae1b5e8Smrg shift 23651ae1b5e8Smrg cat <<EOF 23661ae1b5e8Smrg[$]* 23671ae1b5e8SmrgEOF 23681ae1b5e8Smrg exit 0 23691ae1b5e8Smrgfi 237076888252Smrg 23711ae1b5e8Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 23721ae1b5e8Smrg# if CDPATH is set. 23731ae1b5e8Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 237476888252Smrg 23751ae1b5e8Smrgif test -z "$ECHO"; then 23761ae1b5e8Smrgif test "X${echo_test_string+set}" != Xset; then 23771ae1b5e8Smrg# find a string as large as possible, as long as the shell can cope with it 23781ae1b5e8Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 23791ae1b5e8Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 23801ae1b5e8Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 23811ae1b5e8Smrg echo_test_string=`eval $cmd` && 23821ae1b5e8Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 23831ae1b5e8Smrg then 23841ae1b5e8Smrg break 23851ae1b5e8Smrg fi 23861ae1b5e8Smrg done 23871ae1b5e8Smrgfi 238876888252Smrg 23891ae1b5e8Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 23901ae1b5e8Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 23911ae1b5e8Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 23921ae1b5e8Smrg : 23931ae1b5e8Smrgelse 23941ae1b5e8Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 23951ae1b5e8Smrg # backslashes. This makes it impossible to quote backslashes using 23961ae1b5e8Smrg # echo "$something" | sed 's/\\/\\\\/g' 23971ae1b5e8Smrg # 23981ae1b5e8Smrg # So, first we look for a working echo in the user's PATH. 239976888252Smrg 24001ae1b5e8Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 24011ae1b5e8Smrg for dir in $PATH /usr/ucb; do 24021ae1b5e8Smrg IFS="$lt_save_ifs" 24031ae1b5e8Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 24041ae1b5e8Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 24051ae1b5e8Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 24061ae1b5e8Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 24071ae1b5e8Smrg echo="$dir/echo" 24081ae1b5e8Smrg break 24091ae1b5e8Smrg fi 24101ae1b5e8Smrg done 24111ae1b5e8Smrg IFS="$lt_save_ifs" 241276888252Smrg 24131ae1b5e8Smrg if test "X$echo" = Xecho; then 24141ae1b5e8Smrg # We didn't find a better echo, so look for alternatives. 24151ae1b5e8Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 24161ae1b5e8Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 24171ae1b5e8Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 24181ae1b5e8Smrg # This shell has a builtin print -r that does the trick. 24191ae1b5e8Smrg echo='print -r' 24201ae1b5e8Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 24211ae1b5e8Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 24221ae1b5e8Smrg # If we have ksh, try running configure again with it. 24231ae1b5e8Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 24241ae1b5e8Smrg export ORIGINAL_CONFIG_SHELL 24251ae1b5e8Smrg CONFIG_SHELL=/bin/ksh 24261ae1b5e8Smrg export CONFIG_SHELL 24271ae1b5e8Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 24281ae1b5e8Smrg else 24291ae1b5e8Smrg # Try using printf. 24301ae1b5e8Smrg echo='printf %s\n' 24311ae1b5e8Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 24321ae1b5e8Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 24331ae1b5e8Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 24341ae1b5e8Smrg # Cool, printf works 24351ae1b5e8Smrg : 24361ae1b5e8Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 24371ae1b5e8Smrg test "X$echo_testing_string" = 'X\t' && 24381ae1b5e8Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 24391ae1b5e8Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 24401ae1b5e8Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 24411ae1b5e8Smrg export CONFIG_SHELL 24421ae1b5e8Smrg SHELL="$CONFIG_SHELL" 24431ae1b5e8Smrg export SHELL 24441ae1b5e8Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 24451ae1b5e8Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 24461ae1b5e8Smrg test "X$echo_testing_string" = 'X\t' && 24471ae1b5e8Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 24481ae1b5e8Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 24491ae1b5e8Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 24501ae1b5e8Smrg else 24511ae1b5e8Smrg # maybe with a smaller string... 24521ae1b5e8Smrg prev=: 245376888252Smrg 24541ae1b5e8Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 24551ae1b5e8Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 24561ae1b5e8Smrg then 24571ae1b5e8Smrg break 24581ae1b5e8Smrg fi 24591ae1b5e8Smrg prev="$cmd" 24601ae1b5e8Smrg done 246176888252Smrg 24621ae1b5e8Smrg if test "$prev" != 'sed 50q "[$]0"'; then 24631ae1b5e8Smrg echo_test_string=`eval $prev` 24641ae1b5e8Smrg export echo_test_string 24651ae1b5e8Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 24661ae1b5e8Smrg else 24671ae1b5e8Smrg # Oops. We lost completely, so just stick with echo. 24681ae1b5e8Smrg echo=echo 24691ae1b5e8Smrg fi 24701ae1b5e8Smrg fi 24711ae1b5e8Smrg fi 24721ae1b5e8Smrg fi 24731ae1b5e8Smrgfi 24741ae1b5e8Smrgfi 247576888252Smrg 24761ae1b5e8Smrg# Copy echo and quote the copy suitably for passing to libtool from 24771ae1b5e8Smrg# the Makefile, instead of quoting the original, which is used later. 24781ae1b5e8SmrgECHO=$echo 24791ae1b5e8Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 24801ae1b5e8Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 248176888252Smrgfi 248276888252Smrg 24831ae1b5e8SmrgAC_SUBST(ECHO) 24841ae1b5e8Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 248576888252Smrg 248676888252Smrg 24871ae1b5e8Smrg# _LT_AC_LOCK 24881ae1b5e8Smrg# ----------- 24891ae1b5e8SmrgAC_DEFUN([_LT_AC_LOCK], 24901ae1b5e8Smrg[AC_ARG_ENABLE([libtool-lock], 24911ae1b5e8Smrg [AC_HELP_STRING([--disable-libtool-lock], 24921ae1b5e8Smrg [avoid locking (might break parallel builds)])]) 24931ae1b5e8Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 249476888252Smrg 24951ae1b5e8Smrg# Some flags need to be propagated to the compiler or linker for good 24961ae1b5e8Smrg# libtool support. 24971ae1b5e8Smrgcase $host in 24981ae1b5e8Smrgia64-*-hpux*) 24991ae1b5e8Smrg # Find out which ABI we are using. 25001ae1b5e8Smrg echo 'int i;' > conftest.$ac_ext 25011ae1b5e8Smrg if AC_TRY_EVAL(ac_compile); then 25021ae1b5e8Smrg case `/usr/bin/file conftest.$ac_objext` in 25031ae1b5e8Smrg *ELF-32*) 25041ae1b5e8Smrg HPUX_IA64_MODE="32" 25051ae1b5e8Smrg ;; 25061ae1b5e8Smrg *ELF-64*) 25071ae1b5e8Smrg HPUX_IA64_MODE="64" 25081ae1b5e8Smrg ;; 25091ae1b5e8Smrg esac 25101ae1b5e8Smrg fi 25111ae1b5e8Smrg rm -rf conftest* 25121ae1b5e8Smrg ;; 25131ae1b5e8Smrg*-*-irix6*) 25141ae1b5e8Smrg # Find out which ABI we are using. 25151ae1b5e8Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 25161ae1b5e8Smrg if AC_TRY_EVAL(ac_compile); then 25171ae1b5e8Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 25181ae1b5e8Smrg case `/usr/bin/file conftest.$ac_objext` in 25191ae1b5e8Smrg *32-bit*) 25201ae1b5e8Smrg LD="${LD-ld} -melf32bsmip" 25211ae1b5e8Smrg ;; 25221ae1b5e8Smrg *N32*) 25231ae1b5e8Smrg LD="${LD-ld} -melf32bmipn32" 25241ae1b5e8Smrg ;; 25251ae1b5e8Smrg *64-bit*) 25261ae1b5e8Smrg LD="${LD-ld} -melf64bmip" 25271ae1b5e8Smrg ;; 25281ae1b5e8Smrg esac 25291ae1b5e8Smrg else 25301ae1b5e8Smrg case `/usr/bin/file conftest.$ac_objext` in 25311ae1b5e8Smrg *32-bit*) 25321ae1b5e8Smrg LD="${LD-ld} -32" 25331ae1b5e8Smrg ;; 25341ae1b5e8Smrg *N32*) 25351ae1b5e8Smrg LD="${LD-ld} -n32" 25361ae1b5e8Smrg ;; 25371ae1b5e8Smrg *64-bit*) 25381ae1b5e8Smrg LD="${LD-ld} -64" 25391ae1b5e8Smrg ;; 25401ae1b5e8Smrg esac 25411ae1b5e8Smrg fi 25421ae1b5e8Smrg fi 25431ae1b5e8Smrg rm -rf conftest* 25441ae1b5e8Smrg ;; 254576888252Smrg 25461ae1b5e8Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 25471ae1b5e8Smrg # Find out which ABI we are using. 25481ae1b5e8Smrg echo 'int i;' > conftest.$ac_ext 25491ae1b5e8Smrg if AC_TRY_EVAL(ac_compile); then 25501ae1b5e8Smrg case `/usr/bin/file conftest.o` in 25511ae1b5e8Smrg *32-bit*) 25521ae1b5e8Smrg case $host in 25531ae1b5e8Smrg x86_64-*linux*) 25541ae1b5e8Smrg LD="${LD-ld} -m elf_i386" 25551ae1b5e8Smrg ;; 25561ae1b5e8Smrg ppc64-*linux*|powerpc64-*linux*) 25571ae1b5e8Smrg LD="${LD-ld} -m elf32ppclinux" 25581ae1b5e8Smrg ;; 25591ae1b5e8Smrg s390x-*linux*) 25601ae1b5e8Smrg LD="${LD-ld} -m elf_s390" 25611ae1b5e8Smrg ;; 25621ae1b5e8Smrg sparc64-*linux*) 25631ae1b5e8Smrg LD="${LD-ld} -m elf32_sparc" 25641ae1b5e8Smrg ;; 25651ae1b5e8Smrg esac 25661ae1b5e8Smrg ;; 25671ae1b5e8Smrg *64-bit*) 25681ae1b5e8Smrg case $host in 25691ae1b5e8Smrg x86_64-*linux*) 25701ae1b5e8Smrg LD="${LD-ld} -m elf_x86_64" 25711ae1b5e8Smrg ;; 25721ae1b5e8Smrg ppc*-*linux*|powerpc*-*linux*) 25731ae1b5e8Smrg LD="${LD-ld} -m elf64ppc" 25741ae1b5e8Smrg ;; 25751ae1b5e8Smrg s390*-*linux*) 25761ae1b5e8Smrg LD="${LD-ld} -m elf64_s390" 25771ae1b5e8Smrg ;; 25781ae1b5e8Smrg sparc*-*linux*) 25791ae1b5e8Smrg LD="${LD-ld} -m elf64_sparc" 25801ae1b5e8Smrg ;; 25811ae1b5e8Smrg esac 25821ae1b5e8Smrg ;; 25831ae1b5e8Smrg esac 25841ae1b5e8Smrg fi 25851ae1b5e8Smrg rm -rf conftest* 25861ae1b5e8Smrg ;; 258776888252Smrg 25881ae1b5e8Smrg*-*-sco3.2v5*) 25891ae1b5e8Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 25901ae1b5e8Smrg SAVE_CFLAGS="$CFLAGS" 25911ae1b5e8Smrg CFLAGS="$CFLAGS -belf" 25921ae1b5e8Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 25931ae1b5e8Smrg [AC_LANG_PUSH(C) 25941ae1b5e8Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 25951ae1b5e8Smrg AC_LANG_POP]) 25961ae1b5e8Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 25971ae1b5e8Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 25981ae1b5e8Smrg CFLAGS="$SAVE_CFLAGS" 25991ae1b5e8Smrg fi 26001ae1b5e8Smrg ;; 26011ae1b5e8Smrgsparc*-*solaris*) 26021ae1b5e8Smrg # Find out which ABI we are using. 26031ae1b5e8Smrg echo 'int i;' > conftest.$ac_ext 26041ae1b5e8Smrg if AC_TRY_EVAL(ac_compile); then 26051ae1b5e8Smrg case `/usr/bin/file conftest.o` in 26061ae1b5e8Smrg *64-bit*) 26071ae1b5e8Smrg case $lt_cv_prog_gnu_ld in 26081ae1b5e8Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 26091ae1b5e8Smrg *) LD="${LD-ld} -64" ;; 26101ae1b5e8Smrg esac 26111ae1b5e8Smrg ;; 26121ae1b5e8Smrg esac 26131ae1b5e8Smrg fi 26141ae1b5e8Smrg rm -rf conftest* 26151ae1b5e8Smrg ;; 261676888252Smrg 26171ae1b5e8SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 26181ae1b5e8Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 26191ae1b5e8Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 26201ae1b5e8Smrg AC_CHECK_TOOL(AS, as, false) 26211ae1b5e8Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 26221ae1b5e8Smrg ;; 26231ae1b5e8Smrg ]) 26241ae1b5e8Smrgesac 262576888252Smrg 26261ae1b5e8Smrgneed_locks="$enable_libtool_lock" 262776888252Smrg 26281ae1b5e8Smrg])# _LT_AC_LOCK 262976888252Smrg 263076888252Smrg 26311ae1b5e8Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26321ae1b5e8Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 26331ae1b5e8Smrg# ---------------------------------------------------------------- 26341ae1b5e8Smrg# Check whether the given compiler option works 26351ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 26361ae1b5e8Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 26371ae1b5e8SmrgAC_CACHE_CHECK([$1], [$2], 26381ae1b5e8Smrg [$2=no 26391ae1b5e8Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 26401ae1b5e8Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 26411ae1b5e8Smrg lt_compiler_flag="$3" 26421ae1b5e8Smrg # Insert the option either (1) after the last *FLAGS variable, or 26431ae1b5e8Smrg # (2) before a word containing "conftest.", or (3) at the end. 26441ae1b5e8Smrg # Note that $ac_compile itself does not contain backslashes and begins 26451ae1b5e8Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 26461ae1b5e8Smrg # The option is referenced via a variable to avoid confusing sed. 26471ae1b5e8Smrg lt_compile=`echo "$ac_compile" | $SED \ 26481ae1b5e8Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 26491ae1b5e8Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 26501ae1b5e8Smrg -e 's:$: $lt_compiler_flag:'` 26511ae1b5e8Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 26521ae1b5e8Smrg (eval "$lt_compile" 2>conftest.err) 26531ae1b5e8Smrg ac_status=$? 26541ae1b5e8Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 26551ae1b5e8Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 26561ae1b5e8Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 26571ae1b5e8Smrg # The compiler can only warn and ignore the option if not recognized 26581ae1b5e8Smrg # So say no if there are warnings other than the usual output. 26591ae1b5e8Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 26601ae1b5e8Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 26611ae1b5e8Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 26621ae1b5e8Smrg $2=yes 26631ae1b5e8Smrg fi 26641ae1b5e8Smrg fi 26651ae1b5e8Smrg $rm conftest* 26661ae1b5e8Smrg]) 266776888252Smrg 26681ae1b5e8Smrgif test x"[$]$2" = xyes; then 26691ae1b5e8Smrg ifelse([$5], , :, [$5]) 26701ae1b5e8Smrgelse 26711ae1b5e8Smrg ifelse([$6], , :, [$6]) 26721ae1b5e8Smrgfi 26731ae1b5e8Smrg])# AC_LIBTOOL_COMPILER_OPTION 267476888252Smrg 267576888252Smrg 26761ae1b5e8Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26771ae1b5e8Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 26781ae1b5e8Smrg# ------------------------------------------------------------ 26791ae1b5e8Smrg# Check whether the given compiler option works 26801ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 26811ae1b5e8Smrg[AC_CACHE_CHECK([$1], [$2], 26821ae1b5e8Smrg [$2=no 26831ae1b5e8Smrg save_LDFLAGS="$LDFLAGS" 26841ae1b5e8Smrg LDFLAGS="$LDFLAGS $3" 26851ae1b5e8Smrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 26861ae1b5e8Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 26871ae1b5e8Smrg # The linker can only warn and ignore the option if not recognized 26881ae1b5e8Smrg # So say no if there are warnings 26891ae1b5e8Smrg if test -s conftest.err; then 26901ae1b5e8Smrg # Append any errors to the config.log. 26911ae1b5e8Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 26921ae1b5e8Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 26931ae1b5e8Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 26941ae1b5e8Smrg if diff conftest.exp conftest.er2 >/dev/null; then 26951ae1b5e8Smrg $2=yes 26961ae1b5e8Smrg fi 26971ae1b5e8Smrg else 26981ae1b5e8Smrg $2=yes 26991ae1b5e8Smrg fi 27001ae1b5e8Smrg fi 27011ae1b5e8Smrg $rm conftest* 27021ae1b5e8Smrg LDFLAGS="$save_LDFLAGS" 27031ae1b5e8Smrg]) 270476888252Smrg 27051ae1b5e8Smrgif test x"[$]$2" = xyes; then 27061ae1b5e8Smrg ifelse([$4], , :, [$4]) 27071ae1b5e8Smrgelse 27081ae1b5e8Smrg ifelse([$5], , :, [$5]) 27091ae1b5e8Smrgfi 27101ae1b5e8Smrg])# AC_LIBTOOL_LINKER_OPTION 271176888252Smrg 271276888252Smrg 27131ae1b5e8Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 27141ae1b5e8Smrg# -------------------------- 27151ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 27161ae1b5e8Smrg[# find the maximum length of command line arguments 27171ae1b5e8SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 27181ae1b5e8SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 27191ae1b5e8Smrg i=0 27201ae1b5e8Smrg teststring="ABCD" 272176888252Smrg 27221ae1b5e8Smrg case $build_os in 27231ae1b5e8Smrg msdosdjgpp*) 27241ae1b5e8Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 27251ae1b5e8Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 27261ae1b5e8Smrg # during glob expansion). Even if it were fixed, the result of this 27271ae1b5e8Smrg # check would be larger than it should be. 27281ae1b5e8Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 27291ae1b5e8Smrg ;; 273076888252Smrg 27311ae1b5e8Smrg gnu*) 27321ae1b5e8Smrg # Under GNU Hurd, this test is not required because there is 27331ae1b5e8Smrg # no limit to the length of command line arguments. 27341ae1b5e8Smrg # Libtool will interpret -1 as no limit whatsoever 27351ae1b5e8Smrg lt_cv_sys_max_cmd_len=-1; 273676888252Smrg ;; 273776888252Smrg 27381ae1b5e8Smrg cygwin* | mingw*) 27391ae1b5e8Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 27401ae1b5e8Smrg # about 5 minutes as the teststring grows exponentially. 27411ae1b5e8Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 27421ae1b5e8Smrg # you end up with a "frozen" computer, even though with patience 27431ae1b5e8Smrg # the test eventually succeeds (with a max line length of 256k). 27441ae1b5e8Smrg # Instead, let's just punt: use the minimum linelength reported by 27451ae1b5e8Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 27461ae1b5e8Smrg lt_cv_sys_max_cmd_len=8192; 27471ae1b5e8Smrg ;; 274876888252Smrg 27491ae1b5e8Smrg amigaos*) 27501ae1b5e8Smrg # On AmigaOS with pdksh, this test takes hours, literally. 27511ae1b5e8Smrg # So we just punt and use a minimum line length of 8192. 27521ae1b5e8Smrg lt_cv_sys_max_cmd_len=8192; 27531ae1b5e8Smrg ;; 275476888252Smrg 27551ae1b5e8Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 27561ae1b5e8Smrg # This has been around since 386BSD, at least. Likely further. 27571ae1b5e8Smrg if test -x /sbin/sysctl; then 27581ae1b5e8Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 27591ae1b5e8Smrg elif test -x /usr/sbin/sysctl; then 27601ae1b5e8Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 27611ae1b5e8Smrg else 27621ae1b5e8Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 27631ae1b5e8Smrg fi 27641ae1b5e8Smrg # And add a safety zone 27651ae1b5e8Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27661ae1b5e8Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 27671ae1b5e8Smrg ;; 276876888252Smrg 27691ae1b5e8Smrg interix*) 27701ae1b5e8Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 27711ae1b5e8Smrg lt_cv_sys_max_cmd_len=196608 27721ae1b5e8Smrg ;; 277376888252Smrg 27741ae1b5e8Smrg osf*) 27751ae1b5e8Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 27761ae1b5e8Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 27771ae1b5e8Smrg # nice to cause kernel panics so lets avoid the loop below. 27781ae1b5e8Smrg # First set a reasonable default. 27791ae1b5e8Smrg lt_cv_sys_max_cmd_len=16384 27801ae1b5e8Smrg # 27811ae1b5e8Smrg if test -x /sbin/sysconfig; then 27821ae1b5e8Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 27831ae1b5e8Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 27841ae1b5e8Smrg esac 27851ae1b5e8Smrg fi 27861ae1b5e8Smrg ;; 27871ae1b5e8Smrg sco3.2v5*) 27881ae1b5e8Smrg lt_cv_sys_max_cmd_len=102400 27891ae1b5e8Smrg ;; 27901ae1b5e8Smrg sysv5* | sco5v6* | sysv4.2uw2*) 27911ae1b5e8Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 27921ae1b5e8Smrg if test -n "$kargmax"; then 27931ae1b5e8Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 27941ae1b5e8Smrg else 27951ae1b5e8Smrg lt_cv_sys_max_cmd_len=32768 27961ae1b5e8Smrg fi 27971ae1b5e8Smrg ;; 27981ae1b5e8Smrg *) 27991ae1b5e8Smrg # If test is not a shell built-in, we'll probably end up computing a 28001ae1b5e8Smrg # maximum length that is only half of the actual maximum length, but 28011ae1b5e8Smrg # we can't tell. 28021ae1b5e8Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 28031ae1b5e8Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 28041ae1b5e8Smrg = "XX$teststring") >/dev/null 2>&1 && 28051ae1b5e8Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 28061ae1b5e8Smrg lt_cv_sys_max_cmd_len=$new_result && 28071ae1b5e8Smrg test $i != 17 # 1/2 MB should be enough 28081ae1b5e8Smrg do 28091ae1b5e8Smrg i=`expr $i + 1` 28101ae1b5e8Smrg teststring=$teststring$teststring 28111ae1b5e8Smrg done 28121ae1b5e8Smrg teststring= 28131ae1b5e8Smrg # Add a significant safety factor because C++ compilers can tack on massive 28141ae1b5e8Smrg # amounts of additional arguments before passing them to the linker. 28151ae1b5e8Smrg # It appears as though 1/2 is a usable value. 28161ae1b5e8Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 28171ae1b5e8Smrg ;; 28181ae1b5e8Smrg esac 28191ae1b5e8Smrg]) 28201ae1b5e8Smrgif test -n $lt_cv_sys_max_cmd_len ; then 28211ae1b5e8Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 28221ae1b5e8Smrgelse 28231ae1b5e8Smrg AC_MSG_RESULT(none) 28241ae1b5e8Smrgfi 28251ae1b5e8Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 282676888252Smrg 282776888252Smrg 28281ae1b5e8Smrg# _LT_AC_CHECK_DLFCN 28291ae1b5e8Smrg# ------------------ 28301ae1b5e8SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 28311ae1b5e8Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 28321ae1b5e8Smrg])# _LT_AC_CHECK_DLFCN 283376888252Smrg 283476888252Smrg 28351ae1b5e8Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 28361ae1b5e8Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 28371ae1b5e8Smrg# --------------------------------------------------------------------- 28381ae1b5e8SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 28391ae1b5e8Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 28401ae1b5e8Smrgif test "$cross_compiling" = yes; then : 28411ae1b5e8Smrg [$4] 284276888252Smrgelse 28431ae1b5e8Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 28441ae1b5e8Smrg lt_status=$lt_dlunknown 28451ae1b5e8Smrg cat > conftest.$ac_ext <<EOF 28461ae1b5e8Smrg[#line __oline__ "configure" 28471ae1b5e8Smrg#include "confdefs.h" 284876888252Smrg 28491ae1b5e8Smrg#if HAVE_DLFCN_H 28501ae1b5e8Smrg#include <dlfcn.h> 28511ae1b5e8Smrg#endif 285276888252Smrg 28531ae1b5e8Smrg#include <stdio.h> 285476888252Smrg 28551ae1b5e8Smrg#ifdef RTLD_GLOBAL 28561ae1b5e8Smrg# define LT_DLGLOBAL RTLD_GLOBAL 28571ae1b5e8Smrg#else 28581ae1b5e8Smrg# ifdef DL_GLOBAL 28591ae1b5e8Smrg# define LT_DLGLOBAL DL_GLOBAL 28601ae1b5e8Smrg# else 28611ae1b5e8Smrg# define LT_DLGLOBAL 0 28621ae1b5e8Smrg# endif 28631ae1b5e8Smrg#endif 286476888252Smrg 28651ae1b5e8Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 28661ae1b5e8Smrg find out it does not work in some platform. */ 28671ae1b5e8Smrg#ifndef LT_DLLAZY_OR_NOW 28681ae1b5e8Smrg# ifdef RTLD_LAZY 28691ae1b5e8Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 28701ae1b5e8Smrg# else 28711ae1b5e8Smrg# ifdef DL_LAZY 28721ae1b5e8Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 28731ae1b5e8Smrg# else 28741ae1b5e8Smrg# ifdef RTLD_NOW 28751ae1b5e8Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 28761ae1b5e8Smrg# else 28771ae1b5e8Smrg# ifdef DL_NOW 28781ae1b5e8Smrg# define LT_DLLAZY_OR_NOW DL_NOW 28791ae1b5e8Smrg# else 28801ae1b5e8Smrg# define LT_DLLAZY_OR_NOW 0 28811ae1b5e8Smrg# endif 28821ae1b5e8Smrg# endif 28831ae1b5e8Smrg# endif 28841ae1b5e8Smrg# endif 28851ae1b5e8Smrg#endif 288676888252Smrg 28871ae1b5e8Smrg#ifdef __cplusplus 28881ae1b5e8Smrgextern "C" void exit (int); 28891ae1b5e8Smrg#endif 289076888252Smrg 28911ae1b5e8Smrgvoid fnord() { int i=42;} 28921ae1b5e8Smrgint main () 28931ae1b5e8Smrg{ 28941ae1b5e8Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 28951ae1b5e8Smrg int status = $lt_dlunknown; 289676888252Smrg 28971ae1b5e8Smrg if (self) 28981ae1b5e8Smrg { 28991ae1b5e8Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 29001ae1b5e8Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 29011ae1b5e8Smrg /* dlclose (self); */ 29021ae1b5e8Smrg } 290376888252Smrg else 29041ae1b5e8Smrg puts (dlerror ()); 290576888252Smrg 29061ae1b5e8Smrg exit (status); 29071ae1b5e8Smrg}] 29081ae1b5e8SmrgEOF 29091ae1b5e8Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 29101ae1b5e8Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 29111ae1b5e8Smrg lt_status=$? 29121ae1b5e8Smrg case x$lt_status in 29131ae1b5e8Smrg x$lt_dlno_uscore) $1 ;; 29141ae1b5e8Smrg x$lt_dlneed_uscore) $2 ;; 29151ae1b5e8Smrg x$lt_dlunknown|x*) $3 ;; 29161ae1b5e8Smrg esac 29171ae1b5e8Smrg else : 29181ae1b5e8Smrg # compilation failed 29191ae1b5e8Smrg $3 292076888252Smrg fi 29211ae1b5e8Smrgfi 29221ae1b5e8Smrgrm -fr conftest* 29231ae1b5e8Smrg])# _LT_AC_TRY_DLOPEN_SELF 292476888252Smrg 292576888252Smrg 29261ae1b5e8Smrg# AC_LIBTOOL_DLOPEN_SELF 29271ae1b5e8Smrg# ---------------------- 29281ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 29291ae1b5e8Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 29301ae1b5e8Smrgif test "x$enable_dlopen" != xyes; then 29311ae1b5e8Smrg enable_dlopen=unknown 29321ae1b5e8Smrg enable_dlopen_self=unknown 29331ae1b5e8Smrg enable_dlopen_self_static=unknown 293476888252Smrgelse 29351ae1b5e8Smrg lt_cv_dlopen=no 29361ae1b5e8Smrg lt_cv_dlopen_libs= 293776888252Smrg 29381ae1b5e8Smrg case $host_os in 29391ae1b5e8Smrg beos*) 29401ae1b5e8Smrg lt_cv_dlopen="load_add_on" 29411ae1b5e8Smrg lt_cv_dlopen_libs= 29421ae1b5e8Smrg lt_cv_dlopen_self=yes 294376888252Smrg ;; 294476888252Smrg 29451ae1b5e8Smrg mingw* | pw32*) 29461ae1b5e8Smrg lt_cv_dlopen="LoadLibrary" 29471ae1b5e8Smrg lt_cv_dlopen_libs= 29481ae1b5e8Smrg ;; 294976888252Smrg 29501ae1b5e8Smrg cygwin*) 29511ae1b5e8Smrg lt_cv_dlopen="dlopen" 29521ae1b5e8Smrg lt_cv_dlopen_libs= 29531ae1b5e8Smrg ;; 295476888252Smrg 29551ae1b5e8Smrg darwin*) 29561ae1b5e8Smrg # if libdl is installed we need to link against it 29571ae1b5e8Smrg AC_CHECK_LIB([dl], [dlopen], 29581ae1b5e8Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 29591ae1b5e8Smrg lt_cv_dlopen="dyld" 29601ae1b5e8Smrg lt_cv_dlopen_libs= 29611ae1b5e8Smrg lt_cv_dlopen_self=yes 29621ae1b5e8Smrg ]) 29631ae1b5e8Smrg ;; 296476888252Smrg 29651ae1b5e8Smrg *) 29661ae1b5e8Smrg AC_CHECK_FUNC([shl_load], 29671ae1b5e8Smrg [lt_cv_dlopen="shl_load"], 29681ae1b5e8Smrg [AC_CHECK_LIB([dld], [shl_load], 29691ae1b5e8Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 29701ae1b5e8Smrg [AC_CHECK_FUNC([dlopen], 29711ae1b5e8Smrg [lt_cv_dlopen="dlopen"], 29721ae1b5e8Smrg [AC_CHECK_LIB([dl], [dlopen], 29731ae1b5e8Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 29741ae1b5e8Smrg [AC_CHECK_LIB([svld], [dlopen], 29751ae1b5e8Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 29761ae1b5e8Smrg [AC_CHECK_LIB([dld], [dld_link], 29771ae1b5e8Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 29781ae1b5e8Smrg ]) 29791ae1b5e8Smrg ]) 29801ae1b5e8Smrg ]) 29811ae1b5e8Smrg ]) 29821ae1b5e8Smrg ]) 29831ae1b5e8Smrg ;; 29841ae1b5e8Smrg esac 298576888252Smrg 29861ae1b5e8Smrg if test "x$lt_cv_dlopen" != xno; then 29871ae1b5e8Smrg enable_dlopen=yes 29881ae1b5e8Smrg else 29891ae1b5e8Smrg enable_dlopen=no 29901ae1b5e8Smrg fi 299176888252Smrg 29921ae1b5e8Smrg case $lt_cv_dlopen in 29931ae1b5e8Smrg dlopen) 29941ae1b5e8Smrg save_CPPFLAGS="$CPPFLAGS" 29951ae1b5e8Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 299676888252Smrg 29971ae1b5e8Smrg save_LDFLAGS="$LDFLAGS" 29981ae1b5e8Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 299976888252Smrg 30001ae1b5e8Smrg save_LIBS="$LIBS" 30011ae1b5e8Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 30021ae1b5e8Smrg 30031ae1b5e8Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 30041ae1b5e8Smrg lt_cv_dlopen_self, [dnl 30051ae1b5e8Smrg _LT_AC_TRY_DLOPEN_SELF( 30061ae1b5e8Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 30071ae1b5e8Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 30081ae1b5e8Smrg ]) 30091ae1b5e8Smrg 30101ae1b5e8Smrg if test "x$lt_cv_dlopen_self" = xyes; then 30111ae1b5e8Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 30121ae1b5e8Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 30131ae1b5e8Smrg lt_cv_dlopen_self_static, [dnl 30141ae1b5e8Smrg _LT_AC_TRY_DLOPEN_SELF( 30151ae1b5e8Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 30161ae1b5e8Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 30171ae1b5e8Smrg ]) 301876888252Smrg fi 301976888252Smrg 30201ae1b5e8Smrg CPPFLAGS="$save_CPPFLAGS" 30211ae1b5e8Smrg LDFLAGS="$save_LDFLAGS" 30221ae1b5e8Smrg LIBS="$save_LIBS" 302376888252Smrg ;; 30241ae1b5e8Smrg esac 302576888252Smrg 30261ae1b5e8Smrg case $lt_cv_dlopen_self in 30271ae1b5e8Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 30281ae1b5e8Smrg *) enable_dlopen_self=unknown ;; 30291ae1b5e8Smrg esac 303076888252Smrg 30311ae1b5e8Smrg case $lt_cv_dlopen_self_static in 30321ae1b5e8Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 30331ae1b5e8Smrg *) enable_dlopen_self_static=unknown ;; 30341ae1b5e8Smrg esac 30351ae1b5e8Smrgfi 30361ae1b5e8Smrg])# AC_LIBTOOL_DLOPEN_SELF 303776888252Smrg 303876888252Smrg 30391ae1b5e8Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 30401ae1b5e8Smrg# --------------------------------- 30411ae1b5e8Smrg# Check to see if options -c and -o are simultaneously supported by compiler 30421ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 30431ae1b5e8Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 30441ae1b5e8SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 30451ae1b5e8Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 30461ae1b5e8Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 30471ae1b5e8Smrg $rm -r conftest 2>/dev/null 30481ae1b5e8Smrg mkdir conftest 30491ae1b5e8Smrg cd conftest 30501ae1b5e8Smrg mkdir out 30511ae1b5e8Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 305276888252Smrg 30531ae1b5e8Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 30541ae1b5e8Smrg # Insert the option either (1) after the last *FLAGS variable, or 30551ae1b5e8Smrg # (2) before a word containing "conftest.", or (3) at the end. 30561ae1b5e8Smrg # Note that $ac_compile itself does not contain backslashes and begins 30571ae1b5e8Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 30581ae1b5e8Smrg lt_compile=`echo "$ac_compile" | $SED \ 30591ae1b5e8Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 30601ae1b5e8Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 30611ae1b5e8Smrg -e 's:$: $lt_compiler_flag:'` 30621ae1b5e8Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 30631ae1b5e8Smrg (eval "$lt_compile" 2>out/conftest.err) 30641ae1b5e8Smrg ac_status=$? 30651ae1b5e8Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 30661ae1b5e8Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 30671ae1b5e8Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 30681ae1b5e8Smrg then 30691ae1b5e8Smrg # The compiler can only warn and ignore the option if not recognized 30701ae1b5e8Smrg # So say no if there are warnings 30711ae1b5e8Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 30721ae1b5e8Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 30731ae1b5e8Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 30741ae1b5e8Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 30751ae1b5e8Smrg fi 30761ae1b5e8Smrg fi 30771ae1b5e8Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 30781ae1b5e8Smrg $rm conftest* 30791ae1b5e8Smrg # SGI C++ compiler will create directory out/ii_files/ for 30801ae1b5e8Smrg # template instantiation 30811ae1b5e8Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 30821ae1b5e8Smrg $rm out/* && rmdir out 30831ae1b5e8Smrg cd .. 30841ae1b5e8Smrg rmdir conftest 30851ae1b5e8Smrg $rm conftest* 30861ae1b5e8Smrg]) 30871ae1b5e8Smrg])# AC_LIBTOOL_PROG_CC_C_O 308876888252Smrg 308976888252Smrg 30901ae1b5e8Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 30911ae1b5e8Smrg# ----------------------------------------- 30921ae1b5e8Smrg# Check to see if we can do hard links to lock some files if needed 30931ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 30941ae1b5e8Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 309576888252Smrg 30961ae1b5e8Smrghard_links="nottested" 30971ae1b5e8Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 30981ae1b5e8Smrg # do not overwrite the value of need_locks provided by the user 30991ae1b5e8Smrg AC_MSG_CHECKING([if we can lock with hard links]) 31001ae1b5e8Smrg hard_links=yes 31011ae1b5e8Smrg $rm conftest* 31021ae1b5e8Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31031ae1b5e8Smrg touch conftest.a 31041ae1b5e8Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 31051ae1b5e8Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31061ae1b5e8Smrg AC_MSG_RESULT([$hard_links]) 31071ae1b5e8Smrg if test "$hard_links" = no; then 31081ae1b5e8Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 31091ae1b5e8Smrg need_locks=warn 31101ae1b5e8Smrg fi 31111ae1b5e8Smrgelse 31121ae1b5e8Smrg need_locks=no 31131ae1b5e8Smrgfi 31141ae1b5e8Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 311576888252Smrg 311676888252Smrg 31171ae1b5e8Smrg# AC_LIBTOOL_OBJDIR 31181ae1b5e8Smrg# ----------------- 31191ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 31201ae1b5e8Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 31211ae1b5e8Smrg[rm -f .libs 2>/dev/null 31221ae1b5e8Smrgmkdir .libs 2>/dev/null 31231ae1b5e8Smrgif test -d .libs; then 31241ae1b5e8Smrg lt_cv_objdir=.libs 31251ae1b5e8Smrgelse 31261ae1b5e8Smrg # MS-DOS does not allow filenames that begin with a dot. 31271ae1b5e8Smrg lt_cv_objdir=_libs 31281ae1b5e8Smrgfi 31291ae1b5e8Smrgrmdir .libs 2>/dev/null]) 31301ae1b5e8Smrgobjdir=$lt_cv_objdir 31311ae1b5e8Smrg])# AC_LIBTOOL_OBJDIR 313276888252Smrg 313376888252Smrg 31341ae1b5e8Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 31351ae1b5e8Smrg# ---------------------------------------------- 31361ae1b5e8Smrg# Check hardcoding attributes. 31371ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 31381ae1b5e8Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 31391ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 31401ae1b5e8Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 31411ae1b5e8Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 31421ae1b5e8Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 314376888252Smrg 31441ae1b5e8Smrg # We can hardcode non-existant directories. 31451ae1b5e8Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 31461ae1b5e8Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 31471ae1b5e8Smrg # have to relink, otherwise we might link with an installed library 31481ae1b5e8Smrg # when we should be linking with a yet-to-be-installed one 31491ae1b5e8Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 31501ae1b5e8Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 31511ae1b5e8Smrg # Linking always hardcodes the temporary library directory. 31521ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 31531ae1b5e8Smrg else 31541ae1b5e8Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 31551ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 31561ae1b5e8Smrg fi 31571ae1b5e8Smrgelse 31581ae1b5e8Smrg # We cannot hardcode anything, or else we can only hardcode existing 31591ae1b5e8Smrg # directories. 31601ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 31611ae1b5e8Smrgfi 31621ae1b5e8SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 316376888252Smrg 31641ae1b5e8Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 31651ae1b5e8Smrg # Fast installation is not supported 31661ae1b5e8Smrg enable_fast_install=no 31671ae1b5e8Smrgelif test "$shlibpath_overrides_runpath" = yes || 31681ae1b5e8Smrg test "$enable_shared" = no; then 31691ae1b5e8Smrg # Fast installation is not necessary 31701ae1b5e8Smrg enable_fast_install=needless 31711ae1b5e8Smrgfi 31721ae1b5e8Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 31731ae1b5e8Smrg 31741ae1b5e8Smrg 31751ae1b5e8Smrg# AC_LIBTOOL_SYS_LIB_STRIP 31761ae1b5e8Smrg# ------------------------ 31771ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 31781ae1b5e8Smrg[striplib= 31791ae1b5e8Smrgold_striplib= 31801ae1b5e8SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 31811ae1b5e8Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 31821ae1b5e8Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 31831ae1b5e8Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 31841ae1b5e8Smrg AC_MSG_RESULT([yes]) 31851ae1b5e8Smrgelse 31861ae1b5e8Smrg# FIXME - insert some real tests, host_os isn't really good enough 31871ae1b5e8Smrg case $host_os in 31881ae1b5e8Smrg darwin*) 31891ae1b5e8Smrg if test -n "$STRIP" ; then 31901ae1b5e8Smrg striplib="$STRIP -x" 31911ae1b5e8Smrg AC_MSG_RESULT([yes]) 31921ae1b5e8Smrg else 31931ae1b5e8Smrg AC_MSG_RESULT([no]) 31941ae1b5e8Smrgfi 31951ae1b5e8Smrg ;; 31961ae1b5e8Smrg *) 31971ae1b5e8Smrg AC_MSG_RESULT([no]) 319876888252Smrg ;; 31991ae1b5e8Smrg esac 32001ae1b5e8Smrgfi 32011ae1b5e8Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 320276888252Smrg 320376888252Smrg 32041ae1b5e8Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 32051ae1b5e8Smrg# ----------------------------- 32061ae1b5e8Smrg# PORTME Fill in your ld.so characteristics 32071ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 32081ae1b5e8Smrg[AC_MSG_CHECKING([dynamic linker characteristics]) 32091ae1b5e8Smrglibrary_names_spec= 32101ae1b5e8Smrglibname_spec='lib$name' 32111ae1b5e8Smrgsoname_spec= 32121ae1b5e8Smrgshrext_cmds=".so" 32131ae1b5e8Smrgpostinstall_cmds= 32141ae1b5e8Smrgpostuninstall_cmds= 32151ae1b5e8Smrgfinish_cmds= 32161ae1b5e8Smrgfinish_eval= 32171ae1b5e8Smrgshlibpath_var= 32181ae1b5e8Smrgshlibpath_overrides_runpath=unknown 32191ae1b5e8Smrgversion_type=none 32201ae1b5e8Smrgdynamic_linker="$host_os ld.so" 32211ae1b5e8Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 32221ae1b5e8Smrgif test "$GCC" = yes; then 32231ae1b5e8Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 32241ae1b5e8Smrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 32251ae1b5e8Smrg # if the path contains ";" then we assume it to be the separator 32261ae1b5e8Smrg # otherwise default to the standard path separator (i.e. ":") - it is 32271ae1b5e8Smrg # assumed that no part of a normal pathname contains ";" but that should 32281ae1b5e8Smrg # okay in the real world where ";" in dirpaths is itself problematic. 32291ae1b5e8Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 32301ae1b5e8Smrg else 32311ae1b5e8Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 32321ae1b5e8Smrg fi 32331ae1b5e8Smrgelse 32341ae1b5e8Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 32351ae1b5e8Smrgfi 32361ae1b5e8Smrgneed_lib_prefix=unknown 32371ae1b5e8Smrghardcode_into_libs=no 323876888252Smrg 32391ae1b5e8Smrg# when you set need_version to no, make sure it does not cause -set_version 32401ae1b5e8Smrg# flags to be left without arguments 32411ae1b5e8Smrgneed_version=unknown 324276888252Smrg 32431ae1b5e8Smrgcase $host_os in 32441ae1b5e8Smrgaix3*) 32451ae1b5e8Smrg version_type=linux 32461ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 32471ae1b5e8Smrg shlibpath_var=LIBPATH 324876888252Smrg 32491ae1b5e8Smrg # AIX 3 has no versioning support, so we append a major version to the name. 32501ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 32511ae1b5e8Smrg ;; 325276888252Smrg 32531ae1b5e8Smrgaix4* | aix5*) 32541ae1b5e8Smrg version_type=linux 32551ae1b5e8Smrg need_lib_prefix=no 32561ae1b5e8Smrg need_version=no 32571ae1b5e8Smrg hardcode_into_libs=yes 32581ae1b5e8Smrg if test "$host_cpu" = ia64; then 32591ae1b5e8Smrg # AIX 5 supports IA64 32601ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 32611ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 32621ae1b5e8Smrg else 32631ae1b5e8Smrg # With GCC up to 2.95.x, collect2 would create an import file 32641ae1b5e8Smrg # for dependence libraries. The import file would start with 32651ae1b5e8Smrg # the line `#! .'. This would cause the generated library to 32661ae1b5e8Smrg # depend on `.', always an invalid library. This was fixed in 32671ae1b5e8Smrg # development snapshots of GCC prior to 3.0. 32681ae1b5e8Smrg case $host_os in 32691ae1b5e8Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 32701ae1b5e8Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 32711ae1b5e8Smrg echo ' yes ' 32721ae1b5e8Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 32731ae1b5e8Smrg : 32741ae1b5e8Smrg else 32751ae1b5e8Smrg can_build_shared=no 32761ae1b5e8Smrg fi 32771ae1b5e8Smrg ;; 327876888252Smrg esac 32791ae1b5e8Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 32801ae1b5e8Smrg # soname into executable. Probably we can add versioning support to 32811ae1b5e8Smrg # collect2, so additional links can be useful in future. 32821ae1b5e8Smrg if test "$aix_use_runtimelinking" = yes; then 32831ae1b5e8Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 32841ae1b5e8Smrg # instead of lib<name>.a to let people know that these are not 32851ae1b5e8Smrg # typical AIX shared libraries. 32861ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 32871ae1b5e8Smrg else 32881ae1b5e8Smrg # We preserve .a as extension for shared libraries through AIX4.2 32891ae1b5e8Smrg # and later when we are not doing run time linking. 32901ae1b5e8Smrg library_names_spec='${libname}${release}.a $libname.a' 32911ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 32921ae1b5e8Smrg fi 32931ae1b5e8Smrg shlibpath_var=LIBPATH 32941ae1b5e8Smrg fi 32951ae1b5e8Smrg ;; 329676888252Smrg 32971ae1b5e8Smrgamigaos*) 32981ae1b5e8Smrg library_names_spec='$libname.ixlibrary $libname.a' 32991ae1b5e8Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 33001ae1b5e8Smrg 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' 33011ae1b5e8Smrg ;; 330276888252Smrg 33031ae1b5e8Smrgbeos*) 33041ae1b5e8Smrg library_names_spec='${libname}${shared_ext}' 33051ae1b5e8Smrg dynamic_linker="$host_os ld.so" 33061ae1b5e8Smrg shlibpath_var=LIBRARY_PATH 33071ae1b5e8Smrg ;; 330876888252Smrg 33091ae1b5e8Smrgbsdi[[45]]*) 33101ae1b5e8Smrg version_type=linux 33111ae1b5e8Smrg need_version=no 33121ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33131ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 33141ae1b5e8Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 33151ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 33161ae1b5e8Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 33171ae1b5e8Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 33181ae1b5e8Smrg # the default ld.so.conf also contains /usr/contrib/lib and 33191ae1b5e8Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 33201ae1b5e8Smrg # libtool to hard-code these into programs 33211ae1b5e8Smrg ;; 332276888252Smrg 33231ae1b5e8Smrgcygwin* | mingw* | pw32*) 33241ae1b5e8Smrg version_type=windows 33251ae1b5e8Smrg shrext_cmds=".dll" 33261ae1b5e8Smrg need_version=no 33271ae1b5e8Smrg need_lib_prefix=no 332876888252Smrg 33291ae1b5e8Smrg case $GCC,$host_os in 33301ae1b5e8Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 33311ae1b5e8Smrg library_names_spec='$libname.dll.a' 33321ae1b5e8Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 33331ae1b5e8Smrg postinstall_cmds='base_file=`basename \${file}`~ 33341ae1b5e8Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 33351ae1b5e8Smrg dldir=$destdir/`dirname \$dlpath`~ 33361ae1b5e8Smrg test -d \$dldir || mkdir -p \$dldir~ 33371ae1b5e8Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 33381ae1b5e8Smrg chmod a+x \$dldir/$dlname' 33391ae1b5e8Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 33401ae1b5e8Smrg dlpath=$dir/\$dldll~ 33411ae1b5e8Smrg $rm \$dlpath' 33421ae1b5e8Smrg shlibpath_overrides_runpath=yes 334376888252Smrg 33441ae1b5e8Smrg case $host_os in 33451ae1b5e8Smrg cygwin*) 33461ae1b5e8Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 33471ae1b5e8Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 33481ae1b5e8Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 33491ae1b5e8Smrg ;; 33501ae1b5e8Smrg mingw*) 33511ae1b5e8Smrg # MinGW DLLs use traditional 'lib' prefix 33521ae1b5e8Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 33531ae1b5e8Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 33541ae1b5e8Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 33551ae1b5e8Smrg # It is most probably a Windows format PATH printed by 33561ae1b5e8Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 33571ae1b5e8Smrg # path with ; separators, and with drive letters. We can handle the 33581ae1b5e8Smrg # drive letters (cygwin fileutils understands them), so leave them, 33591ae1b5e8Smrg # especially as we might pass files found there to a mingw objdump, 33601ae1b5e8Smrg # which wouldn't understand a cygwinified path. Ahh. 33611ae1b5e8Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 33621ae1b5e8Smrg else 33631ae1b5e8Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 33641ae1b5e8Smrg fi 33651ae1b5e8Smrg ;; 33661ae1b5e8Smrg pw32*) 33671ae1b5e8Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 33681ae1b5e8Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 33691ae1b5e8Smrg ;; 337076888252Smrg esac 337176888252Smrg ;; 337276888252Smrg 33731ae1b5e8Smrg *) 33741ae1b5e8Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 33751ae1b5e8Smrg ;; 33761ae1b5e8Smrg esac 33771ae1b5e8Smrg dynamic_linker='Win32 ld.exe' 33781ae1b5e8Smrg # FIXME: first we should search . and the directory the executable is in 33791ae1b5e8Smrg shlibpath_var=PATH 33801ae1b5e8Smrg ;; 338176888252Smrg 33821ae1b5e8Smrgdarwin* | rhapsody*) 33831ae1b5e8Smrg dynamic_linker="$host_os dyld" 33841ae1b5e8Smrg version_type=darwin 33851ae1b5e8Smrg need_lib_prefix=no 33861ae1b5e8Smrg need_version=no 33871ae1b5e8Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 33881ae1b5e8Smrg soname_spec='${libname}${release}${major}$shared_ext' 33891ae1b5e8Smrg shlibpath_overrides_runpath=yes 33901ae1b5e8Smrg shlibpath_var=DYLD_LIBRARY_PATH 33911ae1b5e8Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 33921ae1b5e8Smrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 33931ae1b5e8Smrg if test "$GCC" = yes; then 33941ae1b5e8Smrg 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"` 33951ae1b5e8Smrg else 33961ae1b5e8Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 33971ae1b5e8Smrg fi 33981ae1b5e8Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 33991ae1b5e8Smrg ;; 340076888252Smrg 34011ae1b5e8Smrgdgux*) 34021ae1b5e8Smrg version_type=linux 34031ae1b5e8Smrg need_lib_prefix=no 34041ae1b5e8Smrg need_version=no 34051ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 34061ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 34071ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 34081ae1b5e8Smrg ;; 340976888252Smrg 34101ae1b5e8Smrgfreebsd1*) 34111ae1b5e8Smrg dynamic_linker=no 34121ae1b5e8Smrg ;; 341376888252Smrg 34141ae1b5e8Smrgkfreebsd*-gnu) 34151ae1b5e8Smrg version_type=linux 34161ae1b5e8Smrg need_lib_prefix=no 34171ae1b5e8Smrg need_version=no 34181ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 34191ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 34201ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 34211ae1b5e8Smrg shlibpath_overrides_runpath=no 34221ae1b5e8Smrg hardcode_into_libs=yes 34231ae1b5e8Smrg dynamic_linker='GNU ld.so' 34241ae1b5e8Smrg ;; 342576888252Smrg 34261ae1b5e8Smrgfreebsd* | dragonfly*) 34271ae1b5e8Smrg # DragonFly does not have aout. When/if they implement a new 34281ae1b5e8Smrg # versioning mechanism, adjust this. 34291ae1b5e8Smrg if test -x /usr/bin/objformat; then 34301ae1b5e8Smrg objformat=`/usr/bin/objformat` 34311ae1b5e8Smrg else 34321ae1b5e8Smrg case $host_os in 34331ae1b5e8Smrg freebsd[[123]]*) objformat=aout ;; 34341ae1b5e8Smrg *) objformat=elf ;; 343576888252Smrg esac 34361ae1b5e8Smrg fi 34371ae1b5e8Smrg version_type=freebsd-$objformat 34381ae1b5e8Smrg case $version_type in 34391ae1b5e8Smrg freebsd-elf*) 34401ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 34411ae1b5e8Smrg need_version=no 34421ae1b5e8Smrg need_lib_prefix=no 34431ae1b5e8Smrg ;; 34441ae1b5e8Smrg freebsd-*) 34451ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 34461ae1b5e8Smrg need_version=yes 34471ae1b5e8Smrg ;; 34481ae1b5e8Smrg esac 34491ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 34501ae1b5e8Smrg case $host_os in 34511ae1b5e8Smrg freebsd2*) 34521ae1b5e8Smrg shlibpath_overrides_runpath=yes 345376888252Smrg ;; 34541ae1b5e8Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 34551ae1b5e8Smrg shlibpath_overrides_runpath=yes 34561ae1b5e8Smrg hardcode_into_libs=yes 345776888252Smrg ;; 34581ae1b5e8Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 34591ae1b5e8Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 34601ae1b5e8Smrg shlibpath_overrides_runpath=no 34611ae1b5e8Smrg hardcode_into_libs=yes 346276888252Smrg ;; 34631ae1b5e8Smrg freebsd*) # from 4.6 on 34641ae1b5e8Smrg shlibpath_overrides_runpath=yes 34651ae1b5e8Smrg hardcode_into_libs=yes 346676888252Smrg ;; 34671ae1b5e8Smrg esac 34681ae1b5e8Smrg ;; 34691ae1b5e8Smrg 34701ae1b5e8Smrggnu*) 34711ae1b5e8Smrg version_type=linux 34721ae1b5e8Smrg need_lib_prefix=no 34731ae1b5e8Smrg need_version=no 34741ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 34751ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 34761ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 34771ae1b5e8Smrg hardcode_into_libs=yes 34781ae1b5e8Smrg ;; 34791ae1b5e8Smrg 34801ae1b5e8Smrghpux9* | hpux10* | hpux11*) 34811ae1b5e8Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 34821ae1b5e8Smrg # link against other versions. 34831ae1b5e8Smrg version_type=sunos 34841ae1b5e8Smrg need_lib_prefix=no 34851ae1b5e8Smrg need_version=no 34861ae1b5e8Smrg case $host_cpu in 34871ae1b5e8Smrg ia64*) 34881ae1b5e8Smrg shrext_cmds='.so' 34891ae1b5e8Smrg hardcode_into_libs=yes 34901ae1b5e8Smrg dynamic_linker="$host_os dld.so" 34911ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 34921ae1b5e8Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 34931ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34941ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 34951ae1b5e8Smrg if test "X$HPUX_IA64_MODE" = X32; then 34961ae1b5e8Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 34971ae1b5e8Smrg else 34981ae1b5e8Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 34991ae1b5e8Smrg fi 35001ae1b5e8Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 350176888252Smrg ;; 35021ae1b5e8Smrg hppa*64*) 35031ae1b5e8Smrg shrext_cmds='.sl' 35041ae1b5e8Smrg hardcode_into_libs=yes 35051ae1b5e8Smrg dynamic_linker="$host_os dld.sl" 35061ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 35071ae1b5e8Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 35081ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35091ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 35101ae1b5e8Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 35111ae1b5e8Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 35121ae1b5e8Smrg ;; 35131ae1b5e8Smrg *) 35141ae1b5e8Smrg shrext_cmds='.sl' 35151ae1b5e8Smrg dynamic_linker="$host_os dld.sl" 35161ae1b5e8Smrg shlibpath_var=SHLIB_PATH 35171ae1b5e8Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 35181ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35191ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 352076888252Smrg ;; 35211ae1b5e8Smrg esac 35221ae1b5e8Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 35231ae1b5e8Smrg postinstall_cmds='chmod 555 $lib' 35241ae1b5e8Smrg ;; 352576888252Smrg 35261ae1b5e8Smrginterix3*) 35271ae1b5e8Smrg version_type=linux 35281ae1b5e8Smrg need_lib_prefix=no 35291ae1b5e8Smrg need_version=no 35301ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 35311ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 35321ae1b5e8Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 35331ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 35341ae1b5e8Smrg shlibpath_overrides_runpath=no 35351ae1b5e8Smrg hardcode_into_libs=yes 35361ae1b5e8Smrg ;; 353776888252Smrg 35381ae1b5e8Smrgirix5* | irix6* | nonstopux*) 35391ae1b5e8Smrg case $host_os in 35401ae1b5e8Smrg nonstopux*) version_type=nonstopux ;; 35411ae1b5e8Smrg *) 35421ae1b5e8Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 35431ae1b5e8Smrg version_type=linux 35441ae1b5e8Smrg else 35451ae1b5e8Smrg version_type=irix 35461ae1b5e8Smrg fi ;; 35471ae1b5e8Smrg esac 35481ae1b5e8Smrg need_lib_prefix=no 35491ae1b5e8Smrg need_version=no 35501ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 35511ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 35521ae1b5e8Smrg case $host_os in 35531ae1b5e8Smrg irix5* | nonstopux*) 35541ae1b5e8Smrg libsuff= shlibsuff= 35551ae1b5e8Smrg ;; 35561ae1b5e8Smrg *) 35571ae1b5e8Smrg case $LD in # libtool.m4 will add one of these switches to LD 35581ae1b5e8Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 35591ae1b5e8Smrg libsuff= shlibsuff= libmagic=32-bit;; 35601ae1b5e8Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 35611ae1b5e8Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 35621ae1b5e8Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 35631ae1b5e8Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 35641ae1b5e8Smrg *) libsuff= shlibsuff= libmagic=never-match;; 35651ae1b5e8Smrg esac 35661ae1b5e8Smrg ;; 35671ae1b5e8Smrg esac 35681ae1b5e8Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 35691ae1b5e8Smrg shlibpath_overrides_runpath=no 35701ae1b5e8Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 35711ae1b5e8Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 35721ae1b5e8Smrg hardcode_into_libs=yes 35731ae1b5e8Smrg ;; 357476888252Smrg 35751ae1b5e8Smrg# No shared lib support for Linux oldld, aout, or coff. 35761ae1b5e8Smrglinux*oldld* | linux*aout* | linux*coff*) 35771ae1b5e8Smrg dynamic_linker=no 35781ae1b5e8Smrg ;; 357976888252Smrg 35801ae1b5e8Smrg# This must be Linux ELF. 35811ae1b5e8Smrglinux*) 35821ae1b5e8Smrg version_type=linux 35831ae1b5e8Smrg need_lib_prefix=no 35841ae1b5e8Smrg need_version=no 35851ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35861ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 35871ae1b5e8Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 35881ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 35891ae1b5e8Smrg shlibpath_overrides_runpath=no 35901ae1b5e8Smrg # This implies no fast_install, which is unacceptable. 35911ae1b5e8Smrg # Some rework will be needed to allow for fast_install 35921ae1b5e8Smrg # before this can be enabled. 35931ae1b5e8Smrg hardcode_into_libs=yes 359476888252Smrg 35951ae1b5e8Smrg # Append ld.so.conf contents to the search path 35961ae1b5e8Smrg if test -f /etc/ld.so.conf; then 35971ae1b5e8Smrg 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' ' '` 35981ae1b5e8Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 35991ae1b5e8Smrg fi 360076888252Smrg 36011ae1b5e8Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 36021ae1b5e8Smrg # powerpc, because MkLinux only supported shared libraries with the 36031ae1b5e8Smrg # GNU dynamic linker. Since this was broken with cross compilers, 36041ae1b5e8Smrg # most powerpc-linux boxes support dynamic linking these days and 36051ae1b5e8Smrg # people can always --disable-shared, the test was removed, and we 36061ae1b5e8Smrg # assume the GNU/Linux dynamic linker is in use. 36071ae1b5e8Smrg dynamic_linker='GNU/Linux ld.so' 36081ae1b5e8Smrg ;; 360976888252Smrg 36101ae1b5e8Smrgknetbsd*-gnu) 36111ae1b5e8Smrg version_type=linux 36121ae1b5e8Smrg need_lib_prefix=no 36131ae1b5e8Smrg need_version=no 36141ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 36151ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 36161ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 36171ae1b5e8Smrg shlibpath_overrides_runpath=no 36181ae1b5e8Smrg hardcode_into_libs=yes 36191ae1b5e8Smrg dynamic_linker='GNU ld.so' 36201ae1b5e8Smrg ;; 362176888252Smrg 36221ae1b5e8Smrgnetbsd*) 36231ae1b5e8Smrg version_type=sunos 36241ae1b5e8Smrg need_lib_prefix=no 36251ae1b5e8Smrg need_version=no 36261ae1b5e8Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 36271ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 36281ae1b5e8Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 36291ae1b5e8Smrg dynamic_linker='NetBSD (a.out) ld.so' 36301ae1b5e8Smrg else 36311ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 36321ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 36331ae1b5e8Smrg dynamic_linker='NetBSD ld.elf_so' 36341ae1b5e8Smrg fi 36351ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 36361ae1b5e8Smrg shlibpath_overrides_runpath=yes 36371ae1b5e8Smrg hardcode_into_libs=yes 36381ae1b5e8Smrg ;; 363976888252Smrg 36401ae1b5e8Smrgnewsos6) 36411ae1b5e8Smrg version_type=linux 36421ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36431ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 36441ae1b5e8Smrg shlibpath_overrides_runpath=yes 36451ae1b5e8Smrg ;; 364676888252Smrg 36471ae1b5e8Smrgnto-qnx*) 36481ae1b5e8Smrg version_type=linux 36491ae1b5e8Smrg need_lib_prefix=no 36501ae1b5e8Smrg need_version=no 36511ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36521ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 36531ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 36541ae1b5e8Smrg shlibpath_overrides_runpath=yes 36551ae1b5e8Smrg ;; 365676888252Smrg 36571ae1b5e8Smrgopenbsd*) 36581ae1b5e8Smrg version_type=sunos 36591ae1b5e8Smrg sys_lib_dlsearch_path_spec="/usr/lib" 36601ae1b5e8Smrg need_lib_prefix=no 36611ae1b5e8Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 36621ae1b5e8Smrg case $host_os in 36631ae1b5e8Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 36641ae1b5e8Smrg *) need_version=no ;; 36651ae1b5e8Smrg esac 36661ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 36671ae1b5e8Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 36681ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 36691ae1b5e8Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 36701ae1b5e8Smrg case $host_os in 36711ae1b5e8Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 36721ae1b5e8Smrg shlibpath_overrides_runpath=no 36731ae1b5e8Smrg ;; 36741ae1b5e8Smrg *) 36751ae1b5e8Smrg shlibpath_overrides_runpath=yes 36761ae1b5e8Smrg ;; 36771ae1b5e8Smrg esac 36781ae1b5e8Smrg else 36791ae1b5e8Smrg shlibpath_overrides_runpath=yes 36801ae1b5e8Smrg fi 36811ae1b5e8Smrg ;; 368276888252Smrg 36831ae1b5e8Smrgos2*) 36841ae1b5e8Smrg libname_spec='$name' 36851ae1b5e8Smrg shrext_cmds=".dll" 36861ae1b5e8Smrg need_lib_prefix=no 36871ae1b5e8Smrg library_names_spec='$libname${shared_ext} $libname.a' 36881ae1b5e8Smrg dynamic_linker='OS/2 ld.exe' 36891ae1b5e8Smrg shlibpath_var=LIBPATH 36901ae1b5e8Smrg ;; 369176888252Smrg 36921ae1b5e8Smrgosf3* | osf4* | osf5*) 36931ae1b5e8Smrg version_type=osf 36941ae1b5e8Smrg need_lib_prefix=no 36951ae1b5e8Smrg need_version=no 36961ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 36971ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36981ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 36991ae1b5e8Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 37001ae1b5e8Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 37011ae1b5e8Smrg ;; 370276888252Smrg 37031ae1b5e8Smrgsolaris*) 37041ae1b5e8Smrg version_type=linux 37051ae1b5e8Smrg need_lib_prefix=no 37061ae1b5e8Smrg need_version=no 37071ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37081ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 37091ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 37101ae1b5e8Smrg shlibpath_overrides_runpath=yes 37111ae1b5e8Smrg hardcode_into_libs=yes 37121ae1b5e8Smrg # ldd complains unless libraries are executable 37131ae1b5e8Smrg postinstall_cmds='chmod +x $lib' 37141ae1b5e8Smrg ;; 371576888252Smrg 37161ae1b5e8Smrgsunos4*) 37171ae1b5e8Smrg version_type=sunos 37181ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 37191ae1b5e8Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 37201ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 37211ae1b5e8Smrg shlibpath_overrides_runpath=yes 37221ae1b5e8Smrg if test "$with_gnu_ld" = yes; then 37231ae1b5e8Smrg need_lib_prefix=no 37241ae1b5e8Smrg fi 37251ae1b5e8Smrg need_version=yes 372676888252Smrg ;; 372776888252Smrg 37281ae1b5e8Smrgsysv4 | sysv4.3*) 37291ae1b5e8Smrg version_type=linux 37301ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37311ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 37321ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 37331ae1b5e8Smrg case $host_vendor in 37341ae1b5e8Smrg sni) 37351ae1b5e8Smrg shlibpath_overrides_runpath=no 37361ae1b5e8Smrg need_lib_prefix=no 37371ae1b5e8Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 37381ae1b5e8Smrg runpath_var=LD_RUN_PATH 37391ae1b5e8Smrg ;; 37401ae1b5e8Smrg siemens) 37411ae1b5e8Smrg need_lib_prefix=no 37421ae1b5e8Smrg ;; 37431ae1b5e8Smrg motorola) 37441ae1b5e8Smrg need_lib_prefix=no 37451ae1b5e8Smrg need_version=no 37461ae1b5e8Smrg shlibpath_overrides_runpath=no 37471ae1b5e8Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 37481ae1b5e8Smrg ;; 374976888252Smrg esac 375076888252Smrg ;; 375176888252Smrg 37521ae1b5e8Smrgsysv4*MP*) 37531ae1b5e8Smrg if test -d /usr/nec ;then 37541ae1b5e8Smrg version_type=linux 37551ae1b5e8Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 37561ae1b5e8Smrg soname_spec='$libname${shared_ext}.$major' 37571ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 37581ae1b5e8Smrg fi 37591ae1b5e8Smrg ;; 37601ae1b5e8Smrg 37611ae1b5e8Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 37621ae1b5e8Smrg version_type=freebsd-elf 37631ae1b5e8Smrg need_lib_prefix=no 37641ae1b5e8Smrg need_version=no 37651ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 37661ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 37671ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 37681ae1b5e8Smrg hardcode_into_libs=yes 37691ae1b5e8Smrg if test "$with_gnu_ld" = yes; then 37701ae1b5e8Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 37711ae1b5e8Smrg shlibpath_overrides_runpath=no 37721ae1b5e8Smrg else 37731ae1b5e8Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 37741ae1b5e8Smrg shlibpath_overrides_runpath=yes 37751ae1b5e8Smrg case $host_os in 37761ae1b5e8Smrg sco3.2v5*) 37771ae1b5e8Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 37781ae1b5e8Smrg ;; 37791ae1b5e8Smrg esac 37801ae1b5e8Smrg fi 37811ae1b5e8Smrg sys_lib_dlsearch_path_spec='/usr/lib' 37821ae1b5e8Smrg ;; 37831ae1b5e8Smrg 37841ae1b5e8Smrguts4*) 37851ae1b5e8Smrg version_type=linux 37861ae1b5e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37871ae1b5e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 37881ae1b5e8Smrg shlibpath_var=LD_LIBRARY_PATH 37891ae1b5e8Smrg ;; 37901ae1b5e8Smrg 37911ae1b5e8Smrg*) 37921ae1b5e8Smrg dynamic_linker=no 37931ae1b5e8Smrg ;; 379476888252Smrgesac 37951ae1b5e8SmrgAC_MSG_RESULT([$dynamic_linker]) 37961ae1b5e8Smrgtest "$dynamic_linker" = no && can_build_shared=no 379776888252Smrg 37981ae1b5e8Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 37991ae1b5e8Smrgif test "$GCC" = yes; then 38001ae1b5e8Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 38011ae1b5e8Smrgfi 38021ae1b5e8Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 380376888252Smrg 380476888252Smrg 38051ae1b5e8Smrg# _LT_AC_TAGCONFIG 38061ae1b5e8Smrg# ---------------- 38071ae1b5e8SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 38081ae1b5e8Smrg[AC_ARG_WITH([tags], 38091ae1b5e8Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 38101ae1b5e8Smrg [include additional configurations @<:@automatic@:>@])], 38111ae1b5e8Smrg [tagnames="$withval"]) 381276888252Smrg 38131ae1b5e8Smrgif test -f "$ltmain" && test -n "$tagnames"; then 38141ae1b5e8Smrg if test ! -f "${ofile}"; then 38151ae1b5e8Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 38161ae1b5e8Smrg fi 381776888252Smrg 38181ae1b5e8Smrg if test -z "$LTCC"; then 38191ae1b5e8Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 38201ae1b5e8Smrg if test -z "$LTCC"; then 38211ae1b5e8Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 38221ae1b5e8Smrg else 38231ae1b5e8Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 38241ae1b5e8Smrg fi 382576888252Smrg fi 38261ae1b5e8Smrg if test -z "$LTCFLAGS"; then 38271ae1b5e8Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 382876888252Smrg fi 382976888252Smrg 38301ae1b5e8Smrg # Extract list of available tagged configurations in $ofile. 38311ae1b5e8Smrg # Note that this assumes the entire list is on one line. 38321ae1b5e8Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 383376888252Smrg 38341ae1b5e8Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 38351ae1b5e8Smrg for tagname in $tagnames; do 38361ae1b5e8Smrg IFS="$lt_save_ifs" 38371ae1b5e8Smrg # Check whether tagname contains only valid characters 38381ae1b5e8Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 38391ae1b5e8Smrg "") ;; 38401ae1b5e8Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 38411ae1b5e8Smrg ;; 38421ae1b5e8Smrg esac 384376888252Smrg 38441ae1b5e8Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 38451ae1b5e8Smrg then 38461ae1b5e8Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 38471ae1b5e8Smrg fi 384876888252Smrg 38491ae1b5e8Smrg # Update the list of available tags. 38501ae1b5e8Smrg if test -n "$tagname"; then 38511ae1b5e8Smrg echo appending configuration tag \"$tagname\" to $ofile 385276888252Smrg 38531ae1b5e8Smrg case $tagname in 38541ae1b5e8Smrg CXX) 38551ae1b5e8Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 38561ae1b5e8Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 38571ae1b5e8Smrg (test "X$CXX" != "Xg++"))) ; then 38581ae1b5e8Smrg AC_LIBTOOL_LANG_CXX_CONFIG 38591ae1b5e8Smrg else 38601ae1b5e8Smrg tagname="" 38611ae1b5e8Smrg fi 38621ae1b5e8Smrg ;; 386376888252Smrg 38641ae1b5e8Smrg F77) 38651ae1b5e8Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 38661ae1b5e8Smrg AC_LIBTOOL_LANG_F77_CONFIG 38671ae1b5e8Smrg else 38681ae1b5e8Smrg tagname="" 38691ae1b5e8Smrg fi 38701ae1b5e8Smrg ;; 387176888252Smrg 38721ae1b5e8Smrg GCJ) 38731ae1b5e8Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 38741ae1b5e8Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 38751ae1b5e8Smrg else 38761ae1b5e8Smrg tagname="" 38771ae1b5e8Smrg fi 38781ae1b5e8Smrg ;; 387976888252Smrg 38801ae1b5e8Smrg RC) 38811ae1b5e8Smrg AC_LIBTOOL_LANG_RC_CONFIG 38821ae1b5e8Smrg ;; 388376888252Smrg 38841ae1b5e8Smrg *) 38851ae1b5e8Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 38861ae1b5e8Smrg ;; 38871ae1b5e8Smrg esac 388876888252Smrg 38891ae1b5e8Smrg # Append the new tag name to the list of available tags. 38901ae1b5e8Smrg if test -n "$tagname" ; then 38911ae1b5e8Smrg available_tags="$available_tags $tagname" 38921ae1b5e8Smrg fi 38931ae1b5e8Smrg fi 38941ae1b5e8Smrg done 38951ae1b5e8Smrg IFS="$lt_save_ifs" 389676888252Smrg 38971ae1b5e8Smrg # Now substitute the updated list of available tags. 38981ae1b5e8Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 38991ae1b5e8Smrg mv "${ofile}T" "$ofile" 39001ae1b5e8Smrg chmod +x "$ofile" 39011ae1b5e8Smrg else 39021ae1b5e8Smrg rm -f "${ofile}T" 39031ae1b5e8Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 39041ae1b5e8Smrg fi 39051ae1b5e8Smrgfi 39061ae1b5e8Smrg])# _LT_AC_TAGCONFIG 390776888252Smrg 390876888252Smrg 39091ae1b5e8Smrg# AC_LIBTOOL_DLOPEN 39101ae1b5e8Smrg# ----------------- 39111ae1b5e8Smrg# enable checks for dlopen support 39121ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 39131ae1b5e8Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 39141ae1b5e8Smrg])# AC_LIBTOOL_DLOPEN 391576888252Smrg 391676888252Smrg 39171ae1b5e8Smrg# AC_LIBTOOL_WIN32_DLL 39181ae1b5e8Smrg# -------------------- 39191ae1b5e8Smrg# declare package support for building win32 DLLs 39201ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 39211ae1b5e8Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 39221ae1b5e8Smrg])# AC_LIBTOOL_WIN32_DLL 392376888252Smrg 392476888252Smrg 39251ae1b5e8Smrg# AC_ENABLE_SHARED([DEFAULT]) 39261ae1b5e8Smrg# --------------------------- 39271ae1b5e8Smrg# implement the --enable-shared flag 39281ae1b5e8Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 39291ae1b5e8SmrgAC_DEFUN([AC_ENABLE_SHARED], 39301ae1b5e8Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 39311ae1b5e8SmrgAC_ARG_ENABLE([shared], 39321ae1b5e8Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 39331ae1b5e8Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 39341ae1b5e8Smrg [p=${PACKAGE-default} 39351ae1b5e8Smrg case $enableval in 39361ae1b5e8Smrg yes) enable_shared=yes ;; 39371ae1b5e8Smrg no) enable_shared=no ;; 39381ae1b5e8Smrg *) 39391ae1b5e8Smrg enable_shared=no 39401ae1b5e8Smrg # Look at the argument we got. We use all the common list separators. 39411ae1b5e8Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 39421ae1b5e8Smrg for pkg in $enableval; do 39431ae1b5e8Smrg IFS="$lt_save_ifs" 39441ae1b5e8Smrg if test "X$pkg" = "X$p"; then 39451ae1b5e8Smrg enable_shared=yes 39461ae1b5e8Smrg fi 39471ae1b5e8Smrg done 39481ae1b5e8Smrg IFS="$lt_save_ifs" 39491ae1b5e8Smrg ;; 39501ae1b5e8Smrg esac], 39511ae1b5e8Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 39521ae1b5e8Smrg])# AC_ENABLE_SHARED 395376888252Smrg 395476888252Smrg 39551ae1b5e8Smrg# AC_DISABLE_SHARED 39561ae1b5e8Smrg# ----------------- 39571ae1b5e8Smrg# set the default shared flag to --disable-shared 39581ae1b5e8SmrgAC_DEFUN([AC_DISABLE_SHARED], 39591ae1b5e8Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 39601ae1b5e8SmrgAC_ENABLE_SHARED(no) 39611ae1b5e8Smrg])# AC_DISABLE_SHARED 396276888252Smrg 396376888252Smrg 39641ae1b5e8Smrg# AC_ENABLE_STATIC([DEFAULT]) 39651ae1b5e8Smrg# --------------------------- 39661ae1b5e8Smrg# implement the --enable-static flag 39671ae1b5e8Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 39681ae1b5e8SmrgAC_DEFUN([AC_ENABLE_STATIC], 39691ae1b5e8Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 39701ae1b5e8SmrgAC_ARG_ENABLE([static], 39711ae1b5e8Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 39721ae1b5e8Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 39731ae1b5e8Smrg [p=${PACKAGE-default} 39741ae1b5e8Smrg case $enableval in 39751ae1b5e8Smrg yes) enable_static=yes ;; 39761ae1b5e8Smrg no) enable_static=no ;; 39771ae1b5e8Smrg *) 39781ae1b5e8Smrg enable_static=no 39791ae1b5e8Smrg # Look at the argument we got. We use all the common list separators. 39801ae1b5e8Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 39811ae1b5e8Smrg for pkg in $enableval; do 39821ae1b5e8Smrg IFS="$lt_save_ifs" 39831ae1b5e8Smrg if test "X$pkg" = "X$p"; then 39841ae1b5e8Smrg enable_static=yes 39851ae1b5e8Smrg fi 39861ae1b5e8Smrg done 39871ae1b5e8Smrg IFS="$lt_save_ifs" 39881ae1b5e8Smrg ;; 39891ae1b5e8Smrg esac], 39901ae1b5e8Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 39911ae1b5e8Smrg])# AC_ENABLE_STATIC 399276888252Smrg 399376888252Smrg 39941ae1b5e8Smrg# AC_DISABLE_STATIC 39951ae1b5e8Smrg# ----------------- 39961ae1b5e8Smrg# set the default static flag to --disable-static 39971ae1b5e8SmrgAC_DEFUN([AC_DISABLE_STATIC], 39981ae1b5e8Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 39991ae1b5e8SmrgAC_ENABLE_STATIC(no) 40001ae1b5e8Smrg])# AC_DISABLE_STATIC 400176888252Smrg 400276888252Smrg 40031ae1b5e8Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 40041ae1b5e8Smrg# --------------------------------- 40051ae1b5e8Smrg# implement the --enable-fast-install flag 40061ae1b5e8Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 40071ae1b5e8SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 40081ae1b5e8Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 40091ae1b5e8SmrgAC_ARG_ENABLE([fast-install], 40101ae1b5e8Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 40111ae1b5e8Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 40121ae1b5e8Smrg [p=${PACKAGE-default} 40131ae1b5e8Smrg case $enableval in 40141ae1b5e8Smrg yes) enable_fast_install=yes ;; 40151ae1b5e8Smrg no) enable_fast_install=no ;; 40161ae1b5e8Smrg *) 40171ae1b5e8Smrg enable_fast_install=no 40181ae1b5e8Smrg # Look at the argument we got. We use all the common list separators. 40191ae1b5e8Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 40201ae1b5e8Smrg for pkg in $enableval; do 40211ae1b5e8Smrg IFS="$lt_save_ifs" 40221ae1b5e8Smrg if test "X$pkg" = "X$p"; then 40231ae1b5e8Smrg enable_fast_install=yes 40241ae1b5e8Smrg fi 40251ae1b5e8Smrg done 40261ae1b5e8Smrg IFS="$lt_save_ifs" 40271ae1b5e8Smrg ;; 40281ae1b5e8Smrg esac], 40291ae1b5e8Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 40301ae1b5e8Smrg])# AC_ENABLE_FAST_INSTALL 403176888252Smrg 403276888252Smrg 40331ae1b5e8Smrg# AC_DISABLE_FAST_INSTALL 40341ae1b5e8Smrg# ----------------------- 40351ae1b5e8Smrg# set the default to --disable-fast-install 40361ae1b5e8SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 40371ae1b5e8Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 40381ae1b5e8SmrgAC_ENABLE_FAST_INSTALL(no) 40391ae1b5e8Smrg])# AC_DISABLE_FAST_INSTALL 404076888252Smrg 404176888252Smrg 40421ae1b5e8Smrg# AC_LIBTOOL_PICMODE([MODE]) 40431ae1b5e8Smrg# -------------------------- 40441ae1b5e8Smrg# implement the --with-pic flag 40451ae1b5e8Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 40461ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 40471ae1b5e8Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 40481ae1b5e8Smrgpic_mode=ifelse($#,1,$1,default) 40491ae1b5e8Smrg])# AC_LIBTOOL_PICMODE 405076888252Smrg 405176888252Smrg 40521ae1b5e8Smrg# AC_PROG_EGREP 40531ae1b5e8Smrg# ------------- 40541ae1b5e8Smrg# This is predefined starting with Autoconf 2.54, so this conditional 40551ae1b5e8Smrg# definition can be removed once we require Autoconf 2.54 or later. 40561ae1b5e8Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 40571ae1b5e8Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 40581ae1b5e8Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 40591ae1b5e8Smrg then ac_cv_prog_egrep='grep -E' 40601ae1b5e8Smrg else ac_cv_prog_egrep='egrep' 40611ae1b5e8Smrg fi]) 40621ae1b5e8Smrg EGREP=$ac_cv_prog_egrep 40631ae1b5e8Smrg AC_SUBST([EGREP]) 40641ae1b5e8Smrg])]) 406576888252Smrg 406676888252Smrg 40671ae1b5e8Smrg# AC_PATH_TOOL_PREFIX 40681ae1b5e8Smrg# ------------------- 40691ae1b5e8Smrg# find a file program which can recognise shared library 40701ae1b5e8SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 40711ae1b5e8Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 40721ae1b5e8SmrgAC_MSG_CHECKING([for $1]) 40731ae1b5e8SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 40741ae1b5e8Smrg[case $MAGIC_CMD in 40751ae1b5e8Smrg[[\\/*] | ?:[\\/]*]) 40761ae1b5e8Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 40771ae1b5e8Smrg ;; 40781ae1b5e8Smrg*) 40791ae1b5e8Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 40801ae1b5e8Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40811ae1b5e8Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 40821ae1b5e8Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 40831ae1b5e8Smrgdnl not every word. This closes a longstanding sh security hole. 40841ae1b5e8Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 40851ae1b5e8Smrg for ac_dir in $ac_dummy; do 40861ae1b5e8Smrg IFS="$lt_save_ifs" 40871ae1b5e8Smrg test -z "$ac_dir" && ac_dir=. 40881ae1b5e8Smrg if test -f $ac_dir/$1; then 40891ae1b5e8Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 40901ae1b5e8Smrg if test -n "$file_magic_test_file"; then 40911ae1b5e8Smrg case $deplibs_check_method in 40921ae1b5e8Smrg "file_magic "*) 40931ae1b5e8Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 40941ae1b5e8Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 40951ae1b5e8Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 40961ae1b5e8Smrg $EGREP "$file_magic_regex" > /dev/null; then 40971ae1b5e8Smrg : 40981ae1b5e8Smrg else 40991ae1b5e8Smrg cat <<EOF 1>&2 410076888252Smrg 41011ae1b5e8Smrg*** Warning: the command libtool uses to detect shared libraries, 41021ae1b5e8Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 41031ae1b5e8Smrg*** The result is that libtool may fail to recognize shared libraries 41041ae1b5e8Smrg*** as such. This will affect the creation of libtool libraries that 41051ae1b5e8Smrg*** depend on shared libraries, but programs linked with such libtool 41061ae1b5e8Smrg*** libraries will work regardless of this problem. Nevertheless, you 41071ae1b5e8Smrg*** may want to report the problem to your system manager and/or to 41081ae1b5e8Smrg*** bug-libtool@gnu.org 410976888252Smrg 41101ae1b5e8SmrgEOF 41111ae1b5e8Smrg fi ;; 41121ae1b5e8Smrg esac 41131ae1b5e8Smrg fi 41141ae1b5e8Smrg break 41151ae1b5e8Smrg fi 41161ae1b5e8Smrg done 41171ae1b5e8Smrg IFS="$lt_save_ifs" 41181ae1b5e8Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 41191ae1b5e8Smrg ;; 41201ae1b5e8Smrgesac]) 41211ae1b5e8SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 41221ae1b5e8Smrgif test -n "$MAGIC_CMD"; then 41231ae1b5e8Smrg AC_MSG_RESULT($MAGIC_CMD) 41241ae1b5e8Smrgelse 41251ae1b5e8Smrg AC_MSG_RESULT(no) 41261ae1b5e8Smrgfi 41271ae1b5e8Smrg])# AC_PATH_TOOL_PREFIX 412876888252Smrg 412976888252Smrg 41301ae1b5e8Smrg# AC_PATH_MAGIC 41311ae1b5e8Smrg# ------------- 41321ae1b5e8Smrg# find a file program which can recognise a shared library 41331ae1b5e8SmrgAC_DEFUN([AC_PATH_MAGIC], 41341ae1b5e8Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 41351ae1b5e8Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 41361ae1b5e8Smrg if test -n "$ac_tool_prefix"; then 41371ae1b5e8Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 41381ae1b5e8Smrg else 41391ae1b5e8Smrg MAGIC_CMD=: 41401ae1b5e8Smrg fi 41411ae1b5e8Smrgfi 41421ae1b5e8Smrg])# AC_PATH_MAGIC 414376888252Smrg 414476888252Smrg 41451ae1b5e8Smrg# AC_PROG_LD 41461ae1b5e8Smrg# ---------- 41471ae1b5e8Smrg# find the pathname to the GNU or non-GNU linker 41481ae1b5e8SmrgAC_DEFUN([AC_PROG_LD], 41491ae1b5e8Smrg[AC_ARG_WITH([gnu-ld], 41501ae1b5e8Smrg [AC_HELP_STRING([--with-gnu-ld], 41511ae1b5e8Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 41521ae1b5e8Smrg [test "$withval" = no || with_gnu_ld=yes], 41531ae1b5e8Smrg [with_gnu_ld=no]) 41541ae1b5e8SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 41551ae1b5e8SmrgAC_REQUIRE([AC_PROG_CC])dnl 41561ae1b5e8SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 41571ae1b5e8SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 41581ae1b5e8Smrgac_prog=ld 41591ae1b5e8Smrgif test "$GCC" = yes; then 41601ae1b5e8Smrg # Check if gcc -print-prog-name=ld gives a path. 41611ae1b5e8Smrg AC_MSG_CHECKING([for ld used by $CC]) 41621ae1b5e8Smrg case $host in 41631ae1b5e8Smrg *-*-mingw*) 41641ae1b5e8Smrg # gcc leaves a trailing carriage return which upsets mingw 41651ae1b5e8Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 41661ae1b5e8Smrg *) 41671ae1b5e8Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 41681ae1b5e8Smrg esac 41691ae1b5e8Smrg case $ac_prog in 41701ae1b5e8Smrg # Accept absolute paths. 41711ae1b5e8Smrg [[\\/]]* | ?:[[\\/]]*) 41721ae1b5e8Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 41731ae1b5e8Smrg # Canonicalize the pathname of ld 41741ae1b5e8Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 41751ae1b5e8Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 41761ae1b5e8Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 41771ae1b5e8Smrg done 41781ae1b5e8Smrg test -z "$LD" && LD="$ac_prog" 41791ae1b5e8Smrg ;; 41801ae1b5e8Smrg "") 41811ae1b5e8Smrg # If it fails, then pretend we aren't using GCC. 41821ae1b5e8Smrg ac_prog=ld 41831ae1b5e8Smrg ;; 41841ae1b5e8Smrg *) 41851ae1b5e8Smrg # If it is relative, then search for the first ld in PATH. 41861ae1b5e8Smrg with_gnu_ld=unknown 41871ae1b5e8Smrg ;; 41881ae1b5e8Smrg esac 41891ae1b5e8Smrgelif test "$with_gnu_ld" = yes; then 41901ae1b5e8Smrg AC_MSG_CHECKING([for GNU ld]) 41911ae1b5e8Smrgelse 41921ae1b5e8Smrg AC_MSG_CHECKING([for non-GNU ld]) 41931ae1b5e8Smrgfi 41941ae1b5e8SmrgAC_CACHE_VAL(lt_cv_path_LD, 41951ae1b5e8Smrg[if test -z "$LD"; then 41961ae1b5e8Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 41971ae1b5e8Smrg for ac_dir in $PATH; do 41981ae1b5e8Smrg IFS="$lt_save_ifs" 41991ae1b5e8Smrg test -z "$ac_dir" && ac_dir=. 42001ae1b5e8Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 42011ae1b5e8Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 42021ae1b5e8Smrg # Check to see if the program is GNU ld. I'd rather use --version, 42031ae1b5e8Smrg # but apparently some variants of GNU ld only accept -v. 42041ae1b5e8Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 42051ae1b5e8Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 42061ae1b5e8Smrg *GNU* | *'with BFD'*) 42071ae1b5e8Smrg test "$with_gnu_ld" != no && break 42081ae1b5e8Smrg ;; 42091ae1b5e8Smrg *) 42101ae1b5e8Smrg test "$with_gnu_ld" != yes && break 42111ae1b5e8Smrg ;; 42121ae1b5e8Smrg esac 42131ae1b5e8Smrg fi 42141ae1b5e8Smrg done 42151ae1b5e8Smrg IFS="$lt_save_ifs" 42161ae1b5e8Smrgelse 42171ae1b5e8Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 42181ae1b5e8Smrgfi]) 42191ae1b5e8SmrgLD="$lt_cv_path_LD" 42201ae1b5e8Smrgif test -n "$LD"; then 42211ae1b5e8Smrg AC_MSG_RESULT($LD) 42221ae1b5e8Smrgelse 42231ae1b5e8Smrg AC_MSG_RESULT(no) 42241ae1b5e8Smrgfi 42251ae1b5e8Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 42261ae1b5e8SmrgAC_PROG_LD_GNU 42271ae1b5e8Smrg])# AC_PROG_LD 422876888252Smrg 422976888252Smrg 42301ae1b5e8Smrg# AC_PROG_LD_GNU 42311ae1b5e8Smrg# -------------- 42321ae1b5e8SmrgAC_DEFUN([AC_PROG_LD_GNU], 42331ae1b5e8Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 42341ae1b5e8SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 42351ae1b5e8Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 42361ae1b5e8Smrgcase `$LD -v 2>&1 </dev/null` in 42371ae1b5e8Smrg*GNU* | *'with BFD'*) 42381ae1b5e8Smrg lt_cv_prog_gnu_ld=yes 42391ae1b5e8Smrg ;; 42401ae1b5e8Smrg*) 42411ae1b5e8Smrg lt_cv_prog_gnu_ld=no 42421ae1b5e8Smrg ;; 42431ae1b5e8Smrgesac]) 42441ae1b5e8Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 42451ae1b5e8Smrg])# AC_PROG_LD_GNU 424676888252Smrg 424776888252Smrg 42481ae1b5e8Smrg# AC_PROG_LD_RELOAD_FLAG 42491ae1b5e8Smrg# ---------------------- 42501ae1b5e8Smrg# find reload flag for linker 42511ae1b5e8Smrg# -- PORTME Some linkers may need a different reload flag. 42521ae1b5e8SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 42531ae1b5e8Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 42541ae1b5e8Smrg lt_cv_ld_reload_flag, 42551ae1b5e8Smrg [lt_cv_ld_reload_flag='-r']) 42561ae1b5e8Smrgreload_flag=$lt_cv_ld_reload_flag 42571ae1b5e8Smrgcase $reload_flag in 42581ae1b5e8Smrg"" | " "*) ;; 42591ae1b5e8Smrg*) reload_flag=" $reload_flag" ;; 42601ae1b5e8Smrgesac 42611ae1b5e8Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 42621ae1b5e8Smrgcase $host_os in 42631ae1b5e8Smrg darwin*) 42641ae1b5e8Smrg if test "$GCC" = yes; then 42651ae1b5e8Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 42661ae1b5e8Smrg else 42671ae1b5e8Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 42681ae1b5e8Smrg fi 42691ae1b5e8Smrg ;; 42701ae1b5e8Smrgesac 42711ae1b5e8Smrg])# AC_PROG_LD_RELOAD_FLAG 427276888252Smrg 427376888252Smrg 42741ae1b5e8Smrg# AC_DEPLIBS_CHECK_METHOD 42751ae1b5e8Smrg# ----------------------- 42761ae1b5e8Smrg# how to check for library dependencies 42771ae1b5e8Smrg# -- PORTME fill in with the dynamic library characteristics 42781ae1b5e8SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 42791ae1b5e8Smrg[AC_CACHE_CHECK([how to recognise dependent libraries], 42801ae1b5e8Smrglt_cv_deplibs_check_method, 42811ae1b5e8Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 42821ae1b5e8Smrglt_cv_file_magic_test_file= 42831ae1b5e8Smrglt_cv_deplibs_check_method='unknown' 42841ae1b5e8Smrg# Need to set the preceding variable on all platforms that support 42851ae1b5e8Smrg# interlibrary dependencies. 42861ae1b5e8Smrg# 'none' -- dependencies not supported. 42871ae1b5e8Smrg# `unknown' -- same as none, but documents that we really don't know. 42881ae1b5e8Smrg# 'pass_all' -- all dependencies passed with no checks. 42891ae1b5e8Smrg# 'test_compile' -- check by making test program. 42901ae1b5e8Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 42911ae1b5e8Smrg# which responds to the $file_magic_cmd with a given extended regex. 42921ae1b5e8Smrg# If you have `file' or equivalent on your system and you're not sure 42931ae1b5e8Smrg# whether `pass_all' will *always* work, you probably want this one. 429476888252Smrg 42951ae1b5e8Smrgcase $host_os in 42961ae1b5e8Smrgaix4* | aix5*) 42971ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 42981ae1b5e8Smrg ;; 429976888252Smrg 43001ae1b5e8Smrgbeos*) 43011ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 43021ae1b5e8Smrg ;; 430376888252Smrg 43041ae1b5e8Smrgbsdi[[45]]*) 43051ae1b5e8Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 43061ae1b5e8Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 43071ae1b5e8Smrg lt_cv_file_magic_test_file=/shlib/libc.so 43081ae1b5e8Smrg ;; 430976888252Smrg 43101ae1b5e8Smrgcygwin*) 43111ae1b5e8Smrg # func_win32_libid is a shell function defined in ltmain.sh 43121ae1b5e8Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43131ae1b5e8Smrg lt_cv_file_magic_cmd='func_win32_libid' 43141ae1b5e8Smrg ;; 431576888252Smrg 43161ae1b5e8Smrgmingw* | pw32*) 43171ae1b5e8Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 43181ae1b5e8Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 43191ae1b5e8Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 43201ae1b5e8Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43211ae1b5e8Smrg ;; 432276888252Smrg 43231ae1b5e8Smrgdarwin* | rhapsody*) 43241ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 43251ae1b5e8Smrg ;; 432676888252Smrg 43271ae1b5e8Smrgfreebsd* | kfreebsd*-gnu | dragonfly*) 43281ae1b5e8Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 43291ae1b5e8Smrg case $host_cpu in 43301ae1b5e8Smrg i*86 ) 43311ae1b5e8Smrg # Not sure whether the presence of OpenBSD here was a mistake. 43321ae1b5e8Smrg # Let's accept both of them until this is cleared up. 43331ae1b5e8Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 43341ae1b5e8Smrg lt_cv_file_magic_cmd=/usr/bin/file 43351ae1b5e8Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 43361ae1b5e8Smrg ;; 43371ae1b5e8Smrg esac 43381ae1b5e8Smrg else 43391ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 43401ae1b5e8Smrg fi 43411ae1b5e8Smrg ;; 434276888252Smrg 43431ae1b5e8Smrggnu*) 43441ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 43451ae1b5e8Smrg ;; 434676888252Smrg 43471ae1b5e8Smrghpux10.20* | hpux11*) 43481ae1b5e8Smrg lt_cv_file_magic_cmd=/usr/bin/file 43491ae1b5e8Smrg case $host_cpu in 43501ae1b5e8Smrg ia64*) 43511ae1b5e8Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 43521ae1b5e8Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 43531ae1b5e8Smrg ;; 43541ae1b5e8Smrg hppa*64*) 43551ae1b5e8Smrg [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]'] 43561ae1b5e8Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 43571ae1b5e8Smrg ;; 43581ae1b5e8Smrg *) 43591ae1b5e8Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 43601ae1b5e8Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 43611ae1b5e8Smrg ;; 43621ae1b5e8Smrg esac 43631ae1b5e8Smrg ;; 436476888252Smrg 43651ae1b5e8Smrginterix3*) 43661ae1b5e8Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 43671ae1b5e8Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 43681ae1b5e8Smrg ;; 436976888252Smrg 43701ae1b5e8Smrgirix5* | irix6* | nonstopux*) 43711ae1b5e8Smrg case $LD in 43721ae1b5e8Smrg *-32|*"-32 ") libmagic=32-bit;; 43731ae1b5e8Smrg *-n32|*"-n32 ") libmagic=N32;; 43741ae1b5e8Smrg *-64|*"-64 ") libmagic=64-bit;; 43751ae1b5e8Smrg *) libmagic=never-match;; 43761ae1b5e8Smrg esac 43771ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 43781ae1b5e8Smrg ;; 437976888252Smrg 43801ae1b5e8Smrg# This must be Linux ELF. 43811ae1b5e8Smrglinux*) 43821ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 43831ae1b5e8Smrg ;; 438476888252Smrg 43851ae1b5e8Smrgnetbsd*) 43861ae1b5e8Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 43871ae1b5e8Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 43881ae1b5e8Smrg else 43891ae1b5e8Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 43901ae1b5e8Smrg fi 43911ae1b5e8Smrg ;; 439276888252Smrg 43931ae1b5e8Smrgnewos6*) 43941ae1b5e8Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 43951ae1b5e8Smrg lt_cv_file_magic_cmd=/usr/bin/file 43961ae1b5e8Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 43971ae1b5e8Smrg ;; 439876888252Smrg 43991ae1b5e8Smrgnto-qnx*) 44001ae1b5e8Smrg lt_cv_deplibs_check_method=unknown 44011ae1b5e8Smrg ;; 440276888252Smrg 44031ae1b5e8Smrgopenbsd*) 44041ae1b5e8Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 44051ae1b5e8Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 44061ae1b5e8Smrg else 44071ae1b5e8Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44081ae1b5e8Smrg fi 44091ae1b5e8Smrg ;; 441076888252Smrg 44111ae1b5e8Smrgosf3* | osf4* | osf5*) 44121ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 44131ae1b5e8Smrg ;; 441476888252Smrg 44151ae1b5e8Smrgsolaris*) 44161ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 44171ae1b5e8Smrg ;; 441876888252Smrg 44191ae1b5e8Smrgsysv4 | sysv4.3*) 44201ae1b5e8Smrg case $host_vendor in 44211ae1b5e8Smrg motorola) 44221ae1b5e8Smrg 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]]' 44231ae1b5e8Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 44241ae1b5e8Smrg ;; 44251ae1b5e8Smrg ncr) 44261ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 44271ae1b5e8Smrg ;; 44281ae1b5e8Smrg sequent) 44291ae1b5e8Smrg lt_cv_file_magic_cmd='/bin/file' 44301ae1b5e8Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 44311ae1b5e8Smrg ;; 44321ae1b5e8Smrg sni) 44331ae1b5e8Smrg lt_cv_file_magic_cmd='/bin/file' 44341ae1b5e8Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 44351ae1b5e8Smrg lt_cv_file_magic_test_file=/lib/libc.so 44361ae1b5e8Smrg ;; 44371ae1b5e8Smrg siemens) 44381ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 44391ae1b5e8Smrg ;; 44401ae1b5e8Smrg pc) 44411ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 44421ae1b5e8Smrg ;; 44431ae1b5e8Smrg esac 44441ae1b5e8Smrg ;; 444576888252Smrg 44461ae1b5e8Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 44471ae1b5e8Smrg lt_cv_deplibs_check_method=pass_all 44481ae1b5e8Smrg ;; 44491ae1b5e8Smrgesac 44501ae1b5e8Smrg]) 44511ae1b5e8Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 44521ae1b5e8Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 44531ae1b5e8Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 44541ae1b5e8Smrg])# AC_DEPLIBS_CHECK_METHOD 445576888252Smrg 445676888252Smrg 44571ae1b5e8Smrg# AC_PROG_NM 44581ae1b5e8Smrg# ---------- 44591ae1b5e8Smrg# find the pathname to a BSD-compatible name lister 44601ae1b5e8SmrgAC_DEFUN([AC_PROG_NM], 44611ae1b5e8Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 44621ae1b5e8Smrg[if test -n "$NM"; then 44631ae1b5e8Smrg # Let the user override the test. 44641ae1b5e8Smrg lt_cv_path_NM="$NM" 44651ae1b5e8Smrgelse 44661ae1b5e8Smrg lt_nm_to_check="${ac_tool_prefix}nm" 44671ae1b5e8Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 44681ae1b5e8Smrg lt_nm_to_check="$lt_nm_to_check nm" 44691ae1b5e8Smrg fi 44701ae1b5e8Smrg for lt_tmp_nm in $lt_nm_to_check; do 44711ae1b5e8Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 44721ae1b5e8Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 44731ae1b5e8Smrg IFS="$lt_save_ifs" 44741ae1b5e8Smrg test -z "$ac_dir" && ac_dir=. 44751ae1b5e8Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 44761ae1b5e8Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 44771ae1b5e8Smrg # Check to see if the nm accepts a BSD-compat flag. 44781ae1b5e8Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 44791ae1b5e8Smrg # nm: unknown option "B" ignored 44801ae1b5e8Smrg # Tru64's nm complains that /dev/null is an invalid object file 44811ae1b5e8Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 44821ae1b5e8Smrg */dev/null* | *'Invalid file or object type'*) 44831ae1b5e8Smrg lt_cv_path_NM="$tmp_nm -B" 44841ae1b5e8Smrg break 44851ae1b5e8Smrg ;; 44861ae1b5e8Smrg *) 44871ae1b5e8Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 44881ae1b5e8Smrg */dev/null*) 44891ae1b5e8Smrg lt_cv_path_NM="$tmp_nm -p" 44901ae1b5e8Smrg break 44911ae1b5e8Smrg ;; 44921ae1b5e8Smrg *) 44931ae1b5e8Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 44941ae1b5e8Smrg continue # so that we can try to find one that supports BSD flags 44951ae1b5e8Smrg ;; 44961ae1b5e8Smrg esac 44971ae1b5e8Smrg ;; 44981ae1b5e8Smrg esac 44991ae1b5e8Smrg fi 45001ae1b5e8Smrg done 45011ae1b5e8Smrg IFS="$lt_save_ifs" 45021ae1b5e8Smrg done 45031ae1b5e8Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 45041ae1b5e8Smrgfi]) 45051ae1b5e8SmrgNM="$lt_cv_path_NM" 45061ae1b5e8Smrg])# AC_PROG_NM 450776888252Smrg 450876888252Smrg 45091ae1b5e8Smrg# AC_CHECK_LIBM 45101ae1b5e8Smrg# ------------- 45111ae1b5e8Smrg# check for math library 45121ae1b5e8SmrgAC_DEFUN([AC_CHECK_LIBM], 45131ae1b5e8Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 45141ae1b5e8SmrgLIBM= 45151ae1b5e8Smrgcase $host in 45161ae1b5e8Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 45171ae1b5e8Smrg # These system don't have libm, or don't need it 45181ae1b5e8Smrg ;; 45191ae1b5e8Smrg*-ncr-sysv4.3*) 45201ae1b5e8Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 45211ae1b5e8Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 45221ae1b5e8Smrg ;; 45231ae1b5e8Smrg*) 45241ae1b5e8Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 45251ae1b5e8Smrg ;; 45261ae1b5e8Smrgesac 45271ae1b5e8Smrg])# AC_CHECK_LIBM 452876888252Smrg 452976888252Smrg 45301ae1b5e8Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 45311ae1b5e8Smrg# ----------------------------------- 45321ae1b5e8Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 45331ae1b5e8Smrg# LTDLINCL to the include flags for the libltdl header and adds 45341ae1b5e8Smrg# --enable-ltdl-convenience to the configure arguments. Note that 45351ae1b5e8Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 45361ae1b5e8Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 45371ae1b5e8Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 45381ae1b5e8Smrg# (note the single quotes!). If your package is not flat and you're not 45391ae1b5e8Smrg# using automake, define top_builddir and top_srcdir appropriately in 45401ae1b5e8Smrg# the Makefiles. 45411ae1b5e8SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 45421ae1b5e8Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 45431ae1b5e8Smrg case $enable_ltdl_convenience in 45441ae1b5e8Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 45451ae1b5e8Smrg "") enable_ltdl_convenience=yes 45461ae1b5e8Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 45471ae1b5e8Smrg esac 45481ae1b5e8Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 45491ae1b5e8Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 45501ae1b5e8Smrg # For backwards non-gettext consistent compatibility... 45511ae1b5e8Smrg INCLTDL="$LTDLINCL" 45521ae1b5e8Smrg])# AC_LIBLTDL_CONVENIENCE 455376888252Smrg 455476888252Smrg 45551ae1b5e8Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 45561ae1b5e8Smrg# ----------------------------------- 45571ae1b5e8Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 45581ae1b5e8Smrg# LTDLINCL to the include flags for the libltdl header and adds 45591ae1b5e8Smrg# --enable-ltdl-install to the configure arguments. Note that 45601ae1b5e8Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 45611ae1b5e8Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 45621ae1b5e8Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 45631ae1b5e8Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 45641ae1b5e8Smrg# flat and you're not using automake, define top_builddir and top_srcdir 45651ae1b5e8Smrg# appropriately in the Makefiles. 45661ae1b5e8Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 45671ae1b5e8SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 45681ae1b5e8Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 45691ae1b5e8Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 45701ae1b5e8Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 45711ae1b5e8Smrg [if test x"$enable_ltdl_install" = xno; then 45721ae1b5e8Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 45731ae1b5e8Smrg else 45741ae1b5e8Smrg enable_ltdl_install=yes 45751ae1b5e8Smrg fi 45761ae1b5e8Smrg ]) 45771ae1b5e8Smrg if test x"$enable_ltdl_install" = x"yes"; then 45781ae1b5e8Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 45791ae1b5e8Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 45801ae1b5e8Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 45811ae1b5e8Smrg else 45821ae1b5e8Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 45831ae1b5e8Smrg LIBLTDL="-lltdl" 45841ae1b5e8Smrg LTDLINCL= 45851ae1b5e8Smrg fi 45861ae1b5e8Smrg # For backwards non-gettext consistent compatibility... 45871ae1b5e8Smrg INCLTDL="$LTDLINCL" 45881ae1b5e8Smrg])# AC_LIBLTDL_INSTALLABLE 458976888252Smrg 459076888252Smrg 45911ae1b5e8Smrg# AC_LIBTOOL_CXX 45921ae1b5e8Smrg# -------------- 45931ae1b5e8Smrg# enable support for C++ libraries 45941ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_CXX], 45951ae1b5e8Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 45961ae1b5e8Smrg])# AC_LIBTOOL_CXX 459776888252Smrg 459876888252Smrg 45991ae1b5e8Smrg# _LT_AC_LANG_CXX 46001ae1b5e8Smrg# --------------- 46011ae1b5e8SmrgAC_DEFUN([_LT_AC_LANG_CXX], 46021ae1b5e8Smrg[AC_REQUIRE([AC_PROG_CXX]) 46031ae1b5e8SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 46041ae1b5e8Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 46051ae1b5e8Smrg])# _LT_AC_LANG_CXX 460676888252Smrg 46071ae1b5e8Smrg# _LT_AC_PROG_CXXCPP 46081ae1b5e8Smrg# ------------------ 46091ae1b5e8SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 46101ae1b5e8Smrg[ 46111ae1b5e8SmrgAC_REQUIRE([AC_PROG_CXX]) 46121ae1b5e8Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 46131ae1b5e8Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 46141ae1b5e8Smrg (test "X$CXX" != "Xg++"))) ; then 46151ae1b5e8Smrg AC_PROG_CXXCPP 46161ae1b5e8Smrgfi 46171ae1b5e8Smrg])# _LT_AC_PROG_CXXCPP 461876888252Smrg 46191ae1b5e8Smrg# AC_LIBTOOL_F77 46201ae1b5e8Smrg# -------------- 46211ae1b5e8Smrg# enable support for Fortran 77 libraries 46221ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_F77], 46231ae1b5e8Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 46241ae1b5e8Smrg])# AC_LIBTOOL_F77 462576888252Smrg 462676888252Smrg 46271ae1b5e8Smrg# _LT_AC_LANG_F77 46281ae1b5e8Smrg# --------------- 46291ae1b5e8SmrgAC_DEFUN([_LT_AC_LANG_F77], 46301ae1b5e8Smrg[AC_REQUIRE([AC_PROG_F77]) 46311ae1b5e8Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 46321ae1b5e8Smrg])# _LT_AC_LANG_F77 463376888252Smrg 463476888252Smrg 46351ae1b5e8Smrg# AC_LIBTOOL_GCJ 46361ae1b5e8Smrg# -------------- 46371ae1b5e8Smrg# enable support for GCJ libraries 46381ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 46391ae1b5e8Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 46401ae1b5e8Smrg])# AC_LIBTOOL_GCJ 464176888252Smrg 464276888252Smrg 46431ae1b5e8Smrg# _LT_AC_LANG_GCJ 46441ae1b5e8Smrg# --------------- 46451ae1b5e8SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 46461ae1b5e8Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 46471ae1b5e8Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 46481ae1b5e8Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 46491ae1b5e8Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 46501ae1b5e8Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 46511ae1b5e8Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 46521ae1b5e8Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 46531ae1b5e8Smrg])# _LT_AC_LANG_GCJ 465476888252Smrg 465576888252Smrg 46561ae1b5e8Smrg# AC_LIBTOOL_RC 46571ae1b5e8Smrg# ------------- 46581ae1b5e8Smrg# enable support for Windows resource files 46591ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_RC], 46601ae1b5e8Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 46611ae1b5e8Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 46621ae1b5e8Smrg])# AC_LIBTOOL_RC 466376888252Smrg 466476888252Smrg 46651ae1b5e8Smrg# AC_LIBTOOL_LANG_C_CONFIG 46661ae1b5e8Smrg# ------------------------ 46671ae1b5e8Smrg# Ensure that the configuration vars for the C compiler are 46681ae1b5e8Smrg# suitably defined. Those variables are subsequently used by 46691ae1b5e8Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 46701ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 46711ae1b5e8SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 46721ae1b5e8Smrg[lt_save_CC="$CC" 46731ae1b5e8SmrgAC_LANG_PUSH(C) 467476888252Smrg 46751ae1b5e8Smrg# Source file extension for C test sources. 46761ae1b5e8Smrgac_ext=c 467776888252Smrg 46781ae1b5e8Smrg# Object file extension for compiled C test sources. 46791ae1b5e8Smrgobjext=o 46801ae1b5e8Smrg_LT_AC_TAGVAR(objext, $1)=$objext 468176888252Smrg 46821ae1b5e8Smrg# Code to be used in simple compile tests 46831ae1b5e8Smrglt_simple_compile_test_code="int some_variable = 0;\n" 468476888252Smrg 46851ae1b5e8Smrg# Code to be used in simple link tests 46861ae1b5e8Smrglt_simple_link_test_code='int main(){return(0);}\n' 468776888252Smrg 46881ae1b5e8Smrg_LT_AC_SYS_COMPILER 468976888252Smrg 46901ae1b5e8Smrg# save warnings/boilerplate of simple test code 46911ae1b5e8Smrg_LT_COMPILER_BOILERPLATE 46921ae1b5e8Smrg_LT_LINKER_BOILERPLATE 469376888252Smrg 46941ae1b5e8SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 46951ae1b5e8SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 46961ae1b5e8SmrgAC_LIBTOOL_PROG_CC_C_O($1) 46971ae1b5e8SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 46981ae1b5e8SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 46991ae1b5e8SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 47001ae1b5e8SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 47011ae1b5e8SmrgAC_LIBTOOL_SYS_LIB_STRIP 47021ae1b5e8SmrgAC_LIBTOOL_DLOPEN_SELF 470376888252Smrg 47041ae1b5e8Smrg# Report which library types will actually be built 47051ae1b5e8SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 47061ae1b5e8SmrgAC_MSG_RESULT([$can_build_shared]) 470776888252Smrg 47081ae1b5e8SmrgAC_MSG_CHECKING([whether to build shared libraries]) 47091ae1b5e8Smrgtest "$can_build_shared" = "no" && enable_shared=no 471076888252Smrg 47111ae1b5e8Smrg# On AIX, shared libraries and static libraries use the same namespace, and 47121ae1b5e8Smrg# are all built from PIC. 47131ae1b5e8Smrgcase $host_os in 47141ae1b5e8Smrgaix3*) 47151ae1b5e8Smrg test "$enable_shared" = yes && enable_static=no 47161ae1b5e8Smrg if test -n "$RANLIB"; then 47171ae1b5e8Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 47181ae1b5e8Smrg postinstall_cmds='$RANLIB $lib' 47191ae1b5e8Smrg fi 47201ae1b5e8Smrg ;; 472176888252Smrg 47221ae1b5e8Smrgaix4* | aix5*) 47231ae1b5e8Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 47241ae1b5e8Smrg test "$enable_shared" = yes && enable_static=no 47251ae1b5e8Smrg fi 47261ae1b5e8Smrg ;; 47271ae1b5e8Smrgesac 47281ae1b5e8SmrgAC_MSG_RESULT([$enable_shared]) 472976888252Smrg 47301ae1b5e8SmrgAC_MSG_CHECKING([whether to build static libraries]) 47311ae1b5e8Smrg# Make sure either enable_shared or enable_static is yes. 47321ae1b5e8Smrgtest "$enable_shared" = yes || enable_static=yes 47331ae1b5e8SmrgAC_MSG_RESULT([$enable_static]) 473476888252Smrg 47351ae1b5e8SmrgAC_LIBTOOL_CONFIG($1) 473676888252Smrg 47371ae1b5e8SmrgAC_LANG_POP 47381ae1b5e8SmrgCC="$lt_save_CC" 47391ae1b5e8Smrg])# AC_LIBTOOL_LANG_C_CONFIG 474076888252Smrg 474176888252Smrg 47421ae1b5e8Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 47431ae1b5e8Smrg# -------------------------- 47441ae1b5e8Smrg# Ensure that the configuration vars for the C compiler are 47451ae1b5e8Smrg# suitably defined. Those variables are subsequently used by 47461ae1b5e8Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 47471ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 47481ae1b5e8SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 47491ae1b5e8Smrg[AC_LANG_PUSH(C++) 47501ae1b5e8SmrgAC_REQUIRE([AC_PROG_CXX]) 47511ae1b5e8SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 475276888252Smrg 47531ae1b5e8Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 47541ae1b5e8Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 47551ae1b5e8Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 47561ae1b5e8Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 47571ae1b5e8Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 47581ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 47591ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 47601ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 47611ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 47621ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 47631ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 47641ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 47651ae1b5e8Smrg_LT_AC_TAGVAR(module_cmds, $1)= 47661ae1b5e8Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 47671ae1b5e8Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 47681ae1b5e8Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 47691ae1b5e8Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 47701ae1b5e8Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 47711ae1b5e8Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 477276888252Smrg 47731ae1b5e8Smrg# Dependencies to place before and after the object being linked: 47741ae1b5e8Smrg_LT_AC_TAGVAR(predep_objects, $1)= 47751ae1b5e8Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 47761ae1b5e8Smrg_LT_AC_TAGVAR(predeps, $1)= 47771ae1b5e8Smrg_LT_AC_TAGVAR(postdeps, $1)= 47781ae1b5e8Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 477976888252Smrg 47801ae1b5e8Smrg# Source file extension for C++ test sources. 47811ae1b5e8Smrgac_ext=cpp 478276888252Smrg 47831ae1b5e8Smrg# Object file extension for compiled C++ test sources. 47841ae1b5e8Smrgobjext=o 47851ae1b5e8Smrg_LT_AC_TAGVAR(objext, $1)=$objext 478676888252Smrg 47871ae1b5e8Smrg# Code to be used in simple compile tests 47881ae1b5e8Smrglt_simple_compile_test_code="int some_variable = 0;\n" 478976888252Smrg 47901ae1b5e8Smrg# Code to be used in simple link tests 47911ae1b5e8Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 479276888252Smrg 47931ae1b5e8Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 47941ae1b5e8Smrg_LT_AC_SYS_COMPILER 479576888252Smrg 47961ae1b5e8Smrg# save warnings/boilerplate of simple test code 47971ae1b5e8Smrg_LT_COMPILER_BOILERPLATE 47981ae1b5e8Smrg_LT_LINKER_BOILERPLATE 479976888252Smrg 48001ae1b5e8Smrg# Allow CC to be a program name with arguments. 48011ae1b5e8Smrglt_save_CC=$CC 48021ae1b5e8Smrglt_save_LD=$LD 48031ae1b5e8Smrglt_save_GCC=$GCC 48041ae1b5e8SmrgGCC=$GXX 48051ae1b5e8Smrglt_save_with_gnu_ld=$with_gnu_ld 48061ae1b5e8Smrglt_save_path_LD=$lt_cv_path_LD 48071ae1b5e8Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 48081ae1b5e8Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 48091ae1b5e8Smrgelse 48101ae1b5e8Smrg $as_unset lt_cv_prog_gnu_ld 48111ae1b5e8Smrgfi 48121ae1b5e8Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 48131ae1b5e8Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 48141ae1b5e8Smrgelse 48151ae1b5e8Smrg $as_unset lt_cv_path_LD 48161ae1b5e8Smrgfi 48171ae1b5e8Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 48181ae1b5e8SmrgCC=${CXX-"c++"} 48191ae1b5e8Smrgcompiler=$CC 48201ae1b5e8Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 48211ae1b5e8Smrg_LT_CC_BASENAME([$compiler]) 482276888252Smrg 48231ae1b5e8Smrg# We don't want -fno-exception wen compiling C++ code, so set the 48241ae1b5e8Smrg# no_builtin_flag separately 48251ae1b5e8Smrgif test "$GXX" = yes; then 48261ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 48271ae1b5e8Smrgelse 48281ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 48291ae1b5e8Smrgfi 483076888252Smrg 48311ae1b5e8Smrgif test "$GXX" = yes; then 48321ae1b5e8Smrg # Set up default GNU C++ configuration 483376888252Smrg 48341ae1b5e8Smrg AC_PROG_LD 483576888252Smrg 48361ae1b5e8Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 48371ae1b5e8Smrg # archiving commands below assume that GNU ld is being used. 48381ae1b5e8Smrg if test "$with_gnu_ld" = yes; then 48391ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 48401ae1b5e8Smrg _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' 484176888252Smrg 48421ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 48431ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 484476888252Smrg 48451ae1b5e8Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 48461ae1b5e8Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 48471ae1b5e8Smrg # investigate it a little bit more. (MM) 48481ae1b5e8Smrg wlarc='${wl}' 484976888252Smrg 48501ae1b5e8Smrg # ancient GNU ld didn't support --whole-archive et. al. 48511ae1b5e8Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 48521ae1b5e8Smrg grep 'no-whole-archive' > /dev/null; then 48531ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 48541ae1b5e8Smrg else 48551ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 48561ae1b5e8Smrg fi 48571ae1b5e8Smrg else 48581ae1b5e8Smrg with_gnu_ld=no 48591ae1b5e8Smrg wlarc= 486076888252Smrg 48611ae1b5e8Smrg # A generic and very simple default shared library creation 48621ae1b5e8Smrg # command for GNU C++ for the case where it uses the native 48631ae1b5e8Smrg # linker, instead of GNU ld. If possible, this setting should 48641ae1b5e8Smrg # overridden to take advantage of the native linker features on 48651ae1b5e8Smrg # the platform it is being used on. 48661ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 48671ae1b5e8Smrg fi 486876888252Smrg 48691ae1b5e8Smrg # Commands to make compiler produce verbose output that lists 48701ae1b5e8Smrg # what "hidden" libraries, object files and flags are used when 48711ae1b5e8Smrg # linking a shared library. 48721ae1b5e8Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 487376888252Smrg 48741ae1b5e8Smrgelse 48751ae1b5e8Smrg GXX=no 48761ae1b5e8Smrg with_gnu_ld=no 48771ae1b5e8Smrg wlarc= 48781ae1b5e8Smrgfi 487976888252Smrg 48801ae1b5e8Smrg# PORTME: fill in a description of your system's C++ link characteristics 48811ae1b5e8SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 48821ae1b5e8Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 48831ae1b5e8Smrgcase $host_os in 488476888252Smrg aix3*) 48851ae1b5e8Smrg # FIXME: insert proper C++ library support 48861ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 488776888252Smrg ;; 48881ae1b5e8Smrg aix4* | aix5*) 48891ae1b5e8Smrg if test "$host_cpu" = ia64; then 48901ae1b5e8Smrg # On IA64, the linker does run time linking by default, so we don't 48911ae1b5e8Smrg # have to do anything special. 48921ae1b5e8Smrg aix_use_runtimelinking=no 48931ae1b5e8Smrg exp_sym_flag='-Bexport' 48941ae1b5e8Smrg no_entry_flag="" 48951ae1b5e8Smrg else 48961ae1b5e8Smrg aix_use_runtimelinking=no 489776888252Smrg 48981ae1b5e8Smrg # Test if we are trying to use run time linking or normal 48991ae1b5e8Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 49001ae1b5e8Smrg # need to do runtime linking. 49011ae1b5e8Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 49021ae1b5e8Smrg for ld_flag in $LDFLAGS; do 49031ae1b5e8Smrg case $ld_flag in 49041ae1b5e8Smrg *-brtl*) 49051ae1b5e8Smrg aix_use_runtimelinking=yes 49061ae1b5e8Smrg break 49071ae1b5e8Smrg ;; 49081ae1b5e8Smrg esac 49091ae1b5e8Smrg done 49101ae1b5e8Smrg ;; 49111ae1b5e8Smrg esac 491276888252Smrg 49131ae1b5e8Smrg exp_sym_flag='-bexport' 49141ae1b5e8Smrg no_entry_flag='-bnoentry' 49151ae1b5e8Smrg fi 491676888252Smrg 49171ae1b5e8Smrg # When large executables or shared objects are built, AIX ld can 49181ae1b5e8Smrg # have problems creating the table of contents. If linking a library 49191ae1b5e8Smrg # or program results in "error TOC overflow" add -mminimal-toc to 49201ae1b5e8Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 49211ae1b5e8Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 492276888252Smrg 49231ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 49241ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 49251ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 49261ae1b5e8Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 492776888252Smrg 49281ae1b5e8Smrg if test "$GXX" = yes; then 49291ae1b5e8Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 49301ae1b5e8Smrg # We only want to do this on AIX 4.2 and lower, the check 49311ae1b5e8Smrg # below for broken collect2 doesn't work under 4.3+ 49321ae1b5e8Smrg collect2name=`${CC} -print-prog-name=collect2` 49331ae1b5e8Smrg if test -f "$collect2name" && \ 49341ae1b5e8Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 49351ae1b5e8Smrg then 49361ae1b5e8Smrg # We have reworked collect2 49371ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 49381ae1b5e8Smrg else 49391ae1b5e8Smrg # We have old collect2 49401ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 49411ae1b5e8Smrg # It fails to find uninstalled libraries when the uninstalled 49421ae1b5e8Smrg # path is not listed in the libpath. Setting hardcode_minus_L 49431ae1b5e8Smrg # to unsupported forces relinking 49441ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 49451ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 49461ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 49471ae1b5e8Smrg fi 49481ae1b5e8Smrg ;; 49491ae1b5e8Smrg esac 49501ae1b5e8Smrg shared_flag='-shared' 49511ae1b5e8Smrg if test "$aix_use_runtimelinking" = yes; then 49521ae1b5e8Smrg shared_flag="$shared_flag "'${wl}-G' 49531ae1b5e8Smrg fi 49541ae1b5e8Smrg else 49551ae1b5e8Smrg # not using gcc 49561ae1b5e8Smrg if test "$host_cpu" = ia64; then 49571ae1b5e8Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 49581ae1b5e8Smrg # chokes on -Wl,-G. The following line is correct: 49591ae1b5e8Smrg shared_flag='-G' 49601ae1b5e8Smrg else 49611ae1b5e8Smrg if test "$aix_use_runtimelinking" = yes; then 49621ae1b5e8Smrg shared_flag='${wl}-G' 49631ae1b5e8Smrg else 49641ae1b5e8Smrg shared_flag='${wl}-bM:SRE' 49651ae1b5e8Smrg fi 49661ae1b5e8Smrg fi 49671ae1b5e8Smrg fi 496876888252Smrg 49691ae1b5e8Smrg # It seems that -bexpall does not export symbols beginning with 49701ae1b5e8Smrg # underscore (_), so it is better to generate a list of symbols to export. 49711ae1b5e8Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 49721ae1b5e8Smrg if test "$aix_use_runtimelinking" = yes; then 49731ae1b5e8Smrg # Warning - without using the other runtime loading flags (-brtl), 49741ae1b5e8Smrg # -berok will link without error, but may produce a broken library. 49751ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 49761ae1b5e8Smrg # Determine the default libpath from the value encoded in an empty executable. 49771ae1b5e8Smrg _LT_AC_SYS_LIBPATH_AIX 49781ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 497976888252Smrg 49801ae1b5e8Smrg _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" 49811ae1b5e8Smrg else 49821ae1b5e8Smrg if test "$host_cpu" = ia64; then 49831ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 49841ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 49851ae1b5e8Smrg _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" 49861ae1b5e8Smrg else 49871ae1b5e8Smrg # Determine the default libpath from the value encoded in an empty executable. 49881ae1b5e8Smrg _LT_AC_SYS_LIBPATH_AIX 49891ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 49901ae1b5e8Smrg # Warning - without using the other run time loading flags, 49911ae1b5e8Smrg # -berok will link without error, but may produce a broken library. 49921ae1b5e8Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 49931ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 49941ae1b5e8Smrg # Exported symbols can be pulled into shared objects from archives 49951ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 49961ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 49971ae1b5e8Smrg # This is similar to how AIX traditionally builds its shared libraries. 49981ae1b5e8Smrg _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' 49991ae1b5e8Smrg fi 50001ae1b5e8Smrg fi 50011ae1b5e8Smrg ;; 500276888252Smrg 50031ae1b5e8Smrg beos*) 50041ae1b5e8Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 50051ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 50061ae1b5e8Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 50071ae1b5e8Smrg # support --undefined. This deserves some investigation. FIXME 50081ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 50091ae1b5e8Smrg else 50101ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 50111ae1b5e8Smrg fi 50121ae1b5e8Smrg ;; 501376888252Smrg 50141ae1b5e8Smrg chorus*) 50151ae1b5e8Smrg case $cc_basename in 50161ae1b5e8Smrg *) 50171ae1b5e8Smrg # FIXME: insert proper C++ library support 50181ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 50191ae1b5e8Smrg ;; 50201ae1b5e8Smrg esac 50211ae1b5e8Smrg ;; 502276888252Smrg 50231ae1b5e8Smrg cygwin* | mingw* | pw32*) 50241ae1b5e8Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 50251ae1b5e8Smrg # as there is no search path for DLLs. 50261ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50271ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 50281ae1b5e8Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 50291ae1b5e8Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 503076888252Smrg 50311ae1b5e8Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 50321ae1b5e8Smrg _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' 50331ae1b5e8Smrg # If the export-symbols file already is a .def file (1st line 50341ae1b5e8Smrg # is EXPORTS), use it as is; otherwise, prepend... 50351ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 50361ae1b5e8Smrg cp $export_symbols $output_objdir/$soname.def; 50371ae1b5e8Smrg else 50381ae1b5e8Smrg echo EXPORTS > $output_objdir/$soname.def; 50391ae1b5e8Smrg cat $export_symbols >> $output_objdir/$soname.def; 50401ae1b5e8Smrg fi~ 50411ae1b5e8Smrg $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' 50421ae1b5e8Smrg else 50431ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 50441ae1b5e8Smrg fi 504576888252Smrg ;; 50461ae1b5e8Smrg darwin* | rhapsody*) 50471ae1b5e8Smrg case $host_os in 50481ae1b5e8Smrg rhapsody* | darwin1.[[012]]) 50491ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 50501ae1b5e8Smrg ;; 50511ae1b5e8Smrg *) # Darwin 1.3 on 50521ae1b5e8Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 50531ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 50541ae1b5e8Smrg else 50551ae1b5e8Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 50561ae1b5e8Smrg 10.[[012]]) 50571ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 50581ae1b5e8Smrg ;; 50591ae1b5e8Smrg 10.*) 50601ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 50611ae1b5e8Smrg ;; 50621ae1b5e8Smrg esac 50631ae1b5e8Smrg fi 50641ae1b5e8Smrg ;; 50651ae1b5e8Smrg esac 50661ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 50671ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 50681ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 50691ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 50701ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 50711ae1b5e8Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 507276888252Smrg 50731ae1b5e8Smrg if test "$GXX" = yes ; then 50741ae1b5e8Smrg lt_int_apple_cc_single_mod=no 50751ae1b5e8Smrg output_verbose_link_cmd='echo' 50761ae1b5e8Smrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 50771ae1b5e8Smrg lt_int_apple_cc_single_mod=yes 50781ae1b5e8Smrg fi 50791ae1b5e8Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 50801ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 50811ae1b5e8Smrg else 50821ae1b5e8Smrg _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' 50831ae1b5e8Smrg fi 50841ae1b5e8Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 50851ae1b5e8Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 50861ae1b5e8Smrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 50871ae1b5e8Smrg _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}' 50881ae1b5e8Smrg else 50891ae1b5e8Smrg _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}' 50901ae1b5e8Smrg fi 50911ae1b5e8Smrg _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}' 50921ae1b5e8Smrg else 50931ae1b5e8Smrg case $cc_basename in 50941ae1b5e8Smrg xlc*) 50951ae1b5e8Smrg output_verbose_link_cmd='echo' 50961ae1b5e8Smrg _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' 50971ae1b5e8Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 50981ae1b5e8Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 50991ae1b5e8Smrg _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}' 51001ae1b5e8Smrg _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}' 51011ae1b5e8Smrg ;; 51021ae1b5e8Smrg *) 51031ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 51041ae1b5e8Smrg ;; 51051ae1b5e8Smrg esac 51061ae1b5e8Smrg fi 51071ae1b5e8Smrg ;; 510876888252Smrg 51091ae1b5e8Smrg dgux*) 51101ae1b5e8Smrg case $cc_basename in 51111ae1b5e8Smrg ec++*) 51121ae1b5e8Smrg # FIXME: insert proper C++ library support 51131ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 51141ae1b5e8Smrg ;; 51151ae1b5e8Smrg ghcx*) 51161ae1b5e8Smrg # Green Hills C++ Compiler 51171ae1b5e8Smrg # FIXME: insert proper C++ library support 51181ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 51191ae1b5e8Smrg ;; 51201ae1b5e8Smrg *) 51211ae1b5e8Smrg # FIXME: insert proper C++ library support 51221ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 51231ae1b5e8Smrg ;; 51241ae1b5e8Smrg esac 51251ae1b5e8Smrg ;; 51261ae1b5e8Smrg freebsd[[12]]*) 51271ae1b5e8Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 51281ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 51291ae1b5e8Smrg ;; 51301ae1b5e8Smrg freebsd-elf*) 51311ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 51321ae1b5e8Smrg ;; 51331ae1b5e8Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 51341ae1b5e8Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 51351ae1b5e8Smrg # conventions 51361ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 51371ae1b5e8Smrg ;; 51381ae1b5e8Smrg gnu*) 51391ae1b5e8Smrg ;; 51401ae1b5e8Smrg hpux9*) 51411ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 51421ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 51431ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 51441ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 51451ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 51461ae1b5e8Smrg # but as the default 51471ae1b5e8Smrg # location of the library. 514876888252Smrg 51491ae1b5e8Smrg case $cc_basename in 51501ae1b5e8Smrg CC*) 51511ae1b5e8Smrg # FIXME: insert proper C++ library support 51521ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 515376888252Smrg ;; 51541ae1b5e8Smrg aCC*) 51551ae1b5e8Smrg _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' 51561ae1b5e8Smrg # Commands to make compiler produce verbose output that lists 51571ae1b5e8Smrg # what "hidden" libraries, object files and flags are used when 51581ae1b5e8Smrg # linking a shared library. 51591ae1b5e8Smrg # 51601ae1b5e8Smrg # There doesn't appear to be a way to prevent this compiler from 51611ae1b5e8Smrg # explicitly linking system object files so we need to strip them 51621ae1b5e8Smrg # from the output so that they don't get included in the library 51631ae1b5e8Smrg # dependencies. 51641ae1b5e8Smrg 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' 516576888252Smrg ;; 51661ae1b5e8Smrg *) 51671ae1b5e8Smrg if test "$GXX" = yes; then 51681ae1b5e8Smrg _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' 51691ae1b5e8Smrg else 51701ae1b5e8Smrg # FIXME: insert proper C++ library support 51711ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 517276888252Smrg fi 517376888252Smrg ;; 51741ae1b5e8Smrg esac 51751ae1b5e8Smrg ;; 51761ae1b5e8Smrg hpux10*|hpux11*) 51771ae1b5e8Smrg if test $with_gnu_ld = no; then 51781ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 51791ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 51801ae1b5e8Smrg 518176888252Smrg case $host_cpu in 518276888252Smrg hppa*64*|ia64*) 51831ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 51841ae1b5e8Smrg ;; 518576888252Smrg *) 51861ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 51871ae1b5e8Smrg ;; 518876888252Smrg esac 51891ae1b5e8Smrg fi 51901ae1b5e8Smrg case $host_cpu in 51911ae1b5e8Smrg hppa*64*|ia64*) 51921ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 51931ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 519476888252Smrg ;; 519576888252Smrg *) 51961ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 51971ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 51981ae1b5e8Smrg # but as the default 51991ae1b5e8Smrg # location of the library. 52001ae1b5e8Smrg ;; 520176888252Smrg esac 52021ae1b5e8Smrg 52031ae1b5e8Smrg case $cc_basename in 52041ae1b5e8Smrg CC*) 52051ae1b5e8Smrg # FIXME: insert proper C++ library support 52061ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 520776888252Smrg ;; 52081ae1b5e8Smrg aCC*) 52091ae1b5e8Smrg case $host_cpu in 52101ae1b5e8Smrg hppa*64*) 52111ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 52121ae1b5e8Smrg ;; 52131ae1b5e8Smrg ia64*) 52141ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 52151ae1b5e8Smrg ;; 52161ae1b5e8Smrg *) 52171ae1b5e8Smrg _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' 521876888252Smrg ;; 521976888252Smrg esac 52201ae1b5e8Smrg # Commands to make compiler produce verbose output that lists 52211ae1b5e8Smrg # what "hidden" libraries, object files and flags are used when 52221ae1b5e8Smrg # linking a shared library. 52231ae1b5e8Smrg # 52241ae1b5e8Smrg # There doesn't appear to be a way to prevent this compiler from 52251ae1b5e8Smrg # explicitly linking system object files so we need to strip them 52261ae1b5e8Smrg # from the output so that they don't get included in the library 52271ae1b5e8Smrg # dependencies. 52281ae1b5e8Smrg 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' 522976888252Smrg ;; 52301ae1b5e8Smrg *) 52311ae1b5e8Smrg if test "$GXX" = yes; then 52321ae1b5e8Smrg if test $with_gnu_ld = no; then 523376888252Smrg case $host_cpu in 52341ae1b5e8Smrg hppa*64*) 52351ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 52361ae1b5e8Smrg ;; 52371ae1b5e8Smrg ia64*) 52381ae1b5e8Smrg _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' 523976888252Smrg ;; 524076888252Smrg *) 52411ae1b5e8Smrg _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' 524276888252Smrg ;; 524376888252Smrg esac 52441ae1b5e8Smrg fi 52451ae1b5e8Smrg else 52461ae1b5e8Smrg # FIXME: insert proper C++ library support 52471ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 52481ae1b5e8Smrg fi 524976888252Smrg ;; 52501ae1b5e8Smrg esac 52511ae1b5e8Smrg ;; 52521ae1b5e8Smrg interix3*) 52531ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 52541ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 52551ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 52561ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52571ae1b5e8Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 52581ae1b5e8Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 52591ae1b5e8Smrg # default) and relocated if they conflict, which is a slow very memory 52601ae1b5e8Smrg # consuming and fragmenting process. To avoid this, we pick a random, 52611ae1b5e8Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 52621ae1b5e8Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 52631ae1b5e8Smrg _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' 52641ae1b5e8Smrg _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' 52651ae1b5e8Smrg ;; 52661ae1b5e8Smrg irix5* | irix6*) 52671ae1b5e8Smrg case $cc_basename in 52681ae1b5e8Smrg CC*) 52691ae1b5e8Smrg # SGI C++ 52701ae1b5e8Smrg _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' 52711ae1b5e8Smrg 52721ae1b5e8Smrg # Archives containing C++ object files must be created using 52731ae1b5e8Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 52741ae1b5e8Smrg # necessary to make sure instantiated templates are included 52751ae1b5e8Smrg # in the archive. 52761ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 527776888252Smrg ;; 52781ae1b5e8Smrg *) 52791ae1b5e8Smrg if test "$GXX" = yes; then 52801ae1b5e8Smrg if test "$with_gnu_ld" = no; then 52811ae1b5e8Smrg _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' 52821ae1b5e8Smrg else 52831ae1b5e8Smrg _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' 52841ae1b5e8Smrg fi 52851ae1b5e8Smrg fi 52861ae1b5e8Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 528776888252Smrg ;; 52881ae1b5e8Smrg esac 52891ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 52901ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 52911ae1b5e8Smrg ;; 52921ae1b5e8Smrg linux*) 52931ae1b5e8Smrg case $cc_basename in 52941ae1b5e8Smrg KCC*) 52951ae1b5e8Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 52961ae1b5e8Smrg 52971ae1b5e8Smrg # KCC will only create a shared library if the output file 52981ae1b5e8Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 52991ae1b5e8Smrg # to its proper name (with version) after linking. 53001ae1b5e8Smrg _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' 53011ae1b5e8Smrg _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' 53021ae1b5e8Smrg # Commands to make compiler produce verbose output that lists 53031ae1b5e8Smrg # what "hidden" libraries, object files and flags are used when 53041ae1b5e8Smrg # linking a shared library. 53051ae1b5e8Smrg # 53061ae1b5e8Smrg # There doesn't appear to be a way to prevent this compiler from 53071ae1b5e8Smrg # explicitly linking system object files so we need to strip them 53081ae1b5e8Smrg # from the output so that they don't get included in the library 53091ae1b5e8Smrg # dependencies. 53101ae1b5e8Smrg 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' 53111ae1b5e8Smrg 53121ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 53131ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 53141ae1b5e8Smrg 53151ae1b5e8Smrg # Archives containing C++ object files must be created using 53161ae1b5e8Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 53171ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 531876888252Smrg ;; 53191ae1b5e8Smrg icpc*) 53201ae1b5e8Smrg # Intel C++ 53211ae1b5e8Smrg with_gnu_ld=yes 53221ae1b5e8Smrg # version 8.0 and above of icpc choke on multiply defined symbols 53231ae1b5e8Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 53241ae1b5e8Smrg # earlier do not add the objects themselves. 53251ae1b5e8Smrg case `$CC -V 2>&1` in 53261ae1b5e8Smrg *"Version 7."*) 53271ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 53281ae1b5e8Smrg _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' 53291ae1b5e8Smrg ;; 53301ae1b5e8Smrg *) # Version 8.0 or newer 53311ae1b5e8Smrg tmp_idyn= 53321ae1b5e8Smrg case $host_cpu in 53331ae1b5e8Smrg ia64*) tmp_idyn=' -i_dynamic';; 53341ae1b5e8Smrg esac 53351ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 53361ae1b5e8Smrg _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' 53371ae1b5e8Smrg ;; 533876888252Smrg esac 53391ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 53401ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 53411ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 53421ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 534376888252Smrg ;; 53441ae1b5e8Smrg pgCC*) 53451ae1b5e8Smrg # Portland Group C++ compiler 53461ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 53471ae1b5e8Smrg _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' 53481ae1b5e8Smrg 53491ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 53501ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 53511ae1b5e8Smrg _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' 53521ae1b5e8Smrg ;; 53531ae1b5e8Smrg cxx*) 53541ae1b5e8Smrg # Compaq C++ 53551ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 53561ae1b5e8Smrg _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' 53571ae1b5e8Smrg 53581ae1b5e8Smrg runpath_var=LD_RUN_PATH 53591ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 53601ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 53611ae1b5e8Smrg 53621ae1b5e8Smrg # Commands to make compiler produce verbose output that lists 53631ae1b5e8Smrg # what "hidden" libraries, object files and flags are used when 53641ae1b5e8Smrg # linking a shared library. 53651ae1b5e8Smrg # 53661ae1b5e8Smrg # There doesn't appear to be a way to prevent this compiler from 53671ae1b5e8Smrg # explicitly linking system object files so we need to strip them 53681ae1b5e8Smrg # from the output so that they don't get included in the library 53691ae1b5e8Smrg # dependencies. 53701ae1b5e8Smrg 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' 537176888252Smrg ;; 53721ae1b5e8Smrg esac 53731ae1b5e8Smrg ;; 53741ae1b5e8Smrg lynxos*) 53751ae1b5e8Smrg # FIXME: insert proper C++ library support 53761ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 53771ae1b5e8Smrg ;; 53781ae1b5e8Smrg m88k*) 53791ae1b5e8Smrg # FIXME: insert proper C++ library support 53801ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 53811ae1b5e8Smrg ;; 53821ae1b5e8Smrg mvs*) 53831ae1b5e8Smrg case $cc_basename in 53841ae1b5e8Smrg cxx*) 53851ae1b5e8Smrg # FIXME: insert proper C++ library support 53861ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 538776888252Smrg ;; 53881ae1b5e8Smrg *) 53891ae1b5e8Smrg # FIXME: insert proper C++ library support 53901ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 539176888252Smrg ;; 53921ae1b5e8Smrg esac 53931ae1b5e8Smrg ;; 53941ae1b5e8Smrg netbsd*) 53951ae1b5e8Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 53961ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 53971ae1b5e8Smrg wlarc= 53981ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53991ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 54001ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 54011ae1b5e8Smrg fi 54021ae1b5e8Smrg # Workaround some broken pre-1.5 toolchains 54031ae1b5e8Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 54041ae1b5e8Smrg ;; 54051ae1b5e8Smrg openbsd2*) 54061ae1b5e8Smrg # C++ shared libraries are fairly broken 54071ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 54081ae1b5e8Smrg ;; 54091ae1b5e8Smrg openbsd*) 54101ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 54111ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 54121ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 54131ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54141ae1b5e8Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 54151ae1b5e8Smrg _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' 54161ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 54171ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 54181ae1b5e8Smrg fi 54191ae1b5e8Smrg output_verbose_link_cmd='echo' 54201ae1b5e8Smrg ;; 54211ae1b5e8Smrg osf3*) 54221ae1b5e8Smrg case $cc_basename in 54231ae1b5e8Smrg KCC*) 54241ae1b5e8Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 54251ae1b5e8Smrg 54261ae1b5e8Smrg # KCC will only create a shared library if the output file 54271ae1b5e8Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 54281ae1b5e8Smrg # to its proper name (with version) after linking. 54291ae1b5e8Smrg _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' 54301ae1b5e8Smrg 54311ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54321ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 54331ae1b5e8Smrg 54341ae1b5e8Smrg # Archives containing C++ object files must be created using 54351ae1b5e8Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 54361ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 54371ae1b5e8Smrg 543876888252Smrg ;; 54391ae1b5e8Smrg RCC*) 54401ae1b5e8Smrg # Rational C++ 2.4.1 54411ae1b5e8Smrg # FIXME: insert proper C++ library support 54421ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 544376888252Smrg ;; 54441ae1b5e8Smrg cxx*) 54451ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 54461ae1b5e8Smrg _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' 54471ae1b5e8Smrg 54481ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54491ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 54501ae1b5e8Smrg 54511ae1b5e8Smrg # Commands to make compiler produce verbose output that lists 54521ae1b5e8Smrg # what "hidden" libraries, object files and flags are used when 54531ae1b5e8Smrg # linking a shared library. 54541ae1b5e8Smrg # 54551ae1b5e8Smrg # There doesn't appear to be a way to prevent this compiler from 54561ae1b5e8Smrg # explicitly linking system object files so we need to strip them 54571ae1b5e8Smrg # from the output so that they don't get included in the library 54581ae1b5e8Smrg # dependencies. 54591ae1b5e8Smrg 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' 546076888252Smrg ;; 54611ae1b5e8Smrg *) 54621ae1b5e8Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 54631ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 54641ae1b5e8Smrg _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' 54651ae1b5e8Smrg 54661ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54671ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 54681ae1b5e8Smrg 54691ae1b5e8Smrg # Commands to make compiler produce verbose output that lists 54701ae1b5e8Smrg # what "hidden" libraries, object files and flags are used when 54711ae1b5e8Smrg # linking a shared library. 54721ae1b5e8Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 54731ae1b5e8Smrg 54741ae1b5e8Smrg else 54751ae1b5e8Smrg # FIXME: insert proper C++ library support 54761ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 54771ae1b5e8Smrg fi 54781ae1b5e8Smrg ;; 54791ae1b5e8Smrg esac 54801ae1b5e8Smrg ;; 54811ae1b5e8Smrg osf4* | osf5*) 54821ae1b5e8Smrg case $cc_basename in 54831ae1b5e8Smrg KCC*) 54841ae1b5e8Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 54851ae1b5e8Smrg 54861ae1b5e8Smrg # KCC will only create a shared library if the output file 54871ae1b5e8Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 54881ae1b5e8Smrg # to its proper name (with version) after linking. 54891ae1b5e8Smrg _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' 54901ae1b5e8Smrg 54911ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54921ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 54931ae1b5e8Smrg 54941ae1b5e8Smrg # Archives containing C++ object files must be created using 54951ae1b5e8Smrg # the KAI C++ compiler. 54961ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 54971ae1b5e8Smrg ;; 54981ae1b5e8Smrg RCC*) 54991ae1b5e8Smrg # Rational C++ 2.4.1 55001ae1b5e8Smrg # FIXME: insert proper C++ library support 55011ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 55021ae1b5e8Smrg ;; 55031ae1b5e8Smrg cxx*) 55041ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 55051ae1b5e8Smrg _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' 55061ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 55071ae1b5e8Smrg echo "-hidden">> $lib.exp~ 55081ae1b5e8Smrg $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~ 55091ae1b5e8Smrg $rm $lib.exp' 55101ae1b5e8Smrg 55111ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 55121ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 55131ae1b5e8Smrg 55141ae1b5e8Smrg # Commands to make compiler produce verbose output that lists 55151ae1b5e8Smrg # what "hidden" libraries, object files and flags are used when 55161ae1b5e8Smrg # linking a shared library. 55171ae1b5e8Smrg # 55181ae1b5e8Smrg # There doesn't appear to be a way to prevent this compiler from 55191ae1b5e8Smrg # explicitly linking system object files so we need to strip them 55201ae1b5e8Smrg # from the output so that they don't get included in the library 55211ae1b5e8Smrg # dependencies. 55221ae1b5e8Smrg 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' 552376888252Smrg ;; 552476888252Smrg *) 55251ae1b5e8Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 55261ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 55271ae1b5e8Smrg _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' 55281ae1b5e8Smrg 55291ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 55301ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 55311ae1b5e8Smrg 55321ae1b5e8Smrg # Commands to make compiler produce verbose output that lists 55331ae1b5e8Smrg # what "hidden" libraries, object files and flags are used when 55341ae1b5e8Smrg # linking a shared library. 55351ae1b5e8Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 55361ae1b5e8Smrg 55371ae1b5e8Smrg else 55381ae1b5e8Smrg # FIXME: insert proper C++ library support 55391ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 55401ae1b5e8Smrg fi 554176888252Smrg ;; 554276888252Smrg esac 55431ae1b5e8Smrg ;; 55441ae1b5e8Smrg psos*) 55451ae1b5e8Smrg # FIXME: insert proper C++ library support 55461ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 55471ae1b5e8Smrg ;; 55481ae1b5e8Smrg sunos4*) 55491ae1b5e8Smrg case $cc_basename in 55501ae1b5e8Smrg CC*) 55511ae1b5e8Smrg # Sun C++ 4.x 55521ae1b5e8Smrg # FIXME: insert proper C++ library support 55531ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 55541ae1b5e8Smrg ;; 55551ae1b5e8Smrg lcc*) 55561ae1b5e8Smrg # Lucid 55571ae1b5e8Smrg # FIXME: insert proper C++ library support 55581ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 55591ae1b5e8Smrg ;; 55601ae1b5e8Smrg *) 55611ae1b5e8Smrg # FIXME: insert proper C++ library support 55621ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 55631ae1b5e8Smrg ;; 55641ae1b5e8Smrg esac 55651ae1b5e8Smrg ;; 55661ae1b5e8Smrg solaris*) 55671ae1b5e8Smrg case $cc_basename in 55681ae1b5e8Smrg CC*) 55691ae1b5e8Smrg # Sun C++ 4.2, 5.x and Centerline C++ 55701ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 55711ae1b5e8Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 55721ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 55731ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 55741ae1b5e8Smrg $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' 55751ae1b5e8Smrg 55761ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 55771ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 55781ae1b5e8Smrg case $host_os in 55791ae1b5e8Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 55801ae1b5e8Smrg *) 55811ae1b5e8Smrg # The C++ compiler is used as linker so we must use $wl 55821ae1b5e8Smrg # flag to pass the commands to the underlying system 55831ae1b5e8Smrg # linker. We must also pass each convience library through 55841ae1b5e8Smrg # to the system linker between allextract/defaultextract. 55851ae1b5e8Smrg # The C++ compiler will combine linker options so we 55861ae1b5e8Smrg # cannot just pass the convience library names through 55871ae1b5e8Smrg # without $wl. 55881ae1b5e8Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 55891ae1b5e8Smrg _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' 55901ae1b5e8Smrg ;; 55911ae1b5e8Smrg esac 55921ae1b5e8Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 55931ae1b5e8Smrg 55941ae1b5e8Smrg output_verbose_link_cmd='echo' 55951ae1b5e8Smrg 55961ae1b5e8Smrg # Archives containing C++ object files must be created using 55971ae1b5e8Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 55981ae1b5e8Smrg # necessary to make sure instantiated templates are included 55991ae1b5e8Smrg # in the archive. 56001ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 56011ae1b5e8Smrg ;; 56021ae1b5e8Smrg gcx*) 56031ae1b5e8Smrg # Green Hills C++ Compiler 56041ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 56051ae1b5e8Smrg 56061ae1b5e8Smrg # The C++ compiler must be used to create the archive. 56071ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 56081ae1b5e8Smrg ;; 56091ae1b5e8Smrg *) 56101ae1b5e8Smrg # GNU C++ compiler with Solaris linker 56111ae1b5e8Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 56121ae1b5e8Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 56131ae1b5e8Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 56141ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 56151ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 56161ae1b5e8Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 56171ae1b5e8Smrg 56181ae1b5e8Smrg # Commands to make compiler produce verbose output that lists 56191ae1b5e8Smrg # what "hidden" libraries, object files and flags are used when 56201ae1b5e8Smrg # linking a shared library. 56211ae1b5e8Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 56221ae1b5e8Smrg else 56231ae1b5e8Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 56241ae1b5e8Smrg # platform. 56251ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 56261ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 56271ae1b5e8Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 56281ae1b5e8Smrg 56291ae1b5e8Smrg # Commands to make compiler produce verbose output that lists 56301ae1b5e8Smrg # what "hidden" libraries, object files and flags are used when 56311ae1b5e8Smrg # linking a shared library. 56321ae1b5e8Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 56331ae1b5e8Smrg fi 56341ae1b5e8Smrg 56351ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 56361ae1b5e8Smrg fi 56371ae1b5e8Smrg ;; 56381ae1b5e8Smrg esac 56391ae1b5e8Smrg ;; 56401ae1b5e8Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 56411ae1b5e8Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 56421ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 56431ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 56441ae1b5e8Smrg runpath_var='LD_RUN_PATH' 56451ae1b5e8Smrg 56461ae1b5e8Smrg case $cc_basename in 56471ae1b5e8Smrg CC*) 56481ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 56491ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 56501ae1b5e8Smrg ;; 56511ae1b5e8Smrg *) 56521ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 56531ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 56541ae1b5e8Smrg ;; 56551ae1b5e8Smrg esac 56561ae1b5e8Smrg ;; 56571ae1b5e8Smrg sysv5* | sco3.2v5* | sco5v6*) 56581ae1b5e8Smrg # Note: We can NOT use -z defs as we might desire, because we do not 56591ae1b5e8Smrg # link with -lc, and that would cause any symbols used from libc to 56601ae1b5e8Smrg # always be unresolved, which means just about no library would 56611ae1b5e8Smrg # ever link correctly. If we're not using GNU ld we use -z text 56621ae1b5e8Smrg # though, which does catch some bad symbols but isn't as heavy-handed 56631ae1b5e8Smrg # as -z defs. 56641ae1b5e8Smrg # For security reasons, it is highly recommended that you always 56651ae1b5e8Smrg # use absolute paths for naming shared libraries, and exclude the 56661ae1b5e8Smrg # DT_RUNPATH tag from executables and libraries. But doing so 56671ae1b5e8Smrg # requires that you compile everything twice, which is a pain. 56681ae1b5e8Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 56691ae1b5e8Smrg # non-empty value in the environment. Most likely only useful for 56701ae1b5e8Smrg # creating official distributions of packages. 56711ae1b5e8Smrg # This is a hack until libtool officially supports absolute path 56721ae1b5e8Smrg # names for shared libraries. 56731ae1b5e8Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 56741ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 56751ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 56761ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 56771ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 56781ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 56791ae1b5e8Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 56801ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 56811ae1b5e8Smrg runpath_var='LD_RUN_PATH' 56821ae1b5e8Smrg 56831ae1b5e8Smrg case $cc_basename in 56841ae1b5e8Smrg CC*) 56851ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 56861ae1b5e8Smrg _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' 56871ae1b5e8Smrg ;; 56881ae1b5e8Smrg *) 56891ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 56901ae1b5e8Smrg _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' 56911ae1b5e8Smrg ;; 56921ae1b5e8Smrg esac 56931ae1b5e8Smrg ;; 56941ae1b5e8Smrg tandem*) 56951ae1b5e8Smrg case $cc_basename in 56961ae1b5e8Smrg NCC*) 56971ae1b5e8Smrg # NonStop-UX NCC 3.20 56981ae1b5e8Smrg # FIXME: insert proper C++ library support 56991ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57001ae1b5e8Smrg ;; 57011ae1b5e8Smrg *) 57021ae1b5e8Smrg # FIXME: insert proper C++ library support 57031ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57041ae1b5e8Smrg ;; 57051ae1b5e8Smrg esac 57061ae1b5e8Smrg ;; 57071ae1b5e8Smrg vxworks*) 57081ae1b5e8Smrg # FIXME: insert proper C++ library support 57091ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57101ae1b5e8Smrg ;; 57111ae1b5e8Smrg *) 57121ae1b5e8Smrg # FIXME: insert proper C++ library support 57131ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 57141ae1b5e8Smrg ;; 57151ae1b5e8Smrgesac 57161ae1b5e8SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 57171ae1b5e8Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 57181ae1b5e8Smrg 57191ae1b5e8Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 57201ae1b5e8Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 57211ae1b5e8Smrg 57221ae1b5e8SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 57231ae1b5e8SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 57241ae1b5e8SmrgAC_LIBTOOL_PROG_CC_C_O($1) 57251ae1b5e8SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 57261ae1b5e8SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 57271ae1b5e8SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 57281ae1b5e8SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 57291ae1b5e8Smrg 57301ae1b5e8SmrgAC_LIBTOOL_CONFIG($1) 57311ae1b5e8Smrg 57321ae1b5e8SmrgAC_LANG_POP 57331ae1b5e8SmrgCC=$lt_save_CC 57341ae1b5e8SmrgLDCXX=$LD 57351ae1b5e8SmrgLD=$lt_save_LD 57361ae1b5e8SmrgGCC=$lt_save_GCC 57371ae1b5e8Smrgwith_gnu_ldcxx=$with_gnu_ld 57381ae1b5e8Smrgwith_gnu_ld=$lt_save_with_gnu_ld 57391ae1b5e8Smrglt_cv_path_LDCXX=$lt_cv_path_LD 57401ae1b5e8Smrglt_cv_path_LD=$lt_save_path_LD 57411ae1b5e8Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 57421ae1b5e8Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 57431ae1b5e8Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 57441ae1b5e8Smrg 57451ae1b5e8Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 57461ae1b5e8Smrg# ------------------------------------ 57471ae1b5e8Smrg# Figure out "hidden" library dependencies from verbose 57481ae1b5e8Smrg# compiler output when linking a shared library. 57491ae1b5e8Smrg# Parse the compiler output and extract the necessary 57501ae1b5e8Smrg# objects, libraries and library flags. 57511ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 57521ae1b5e8Smrgdnl we can't use the lt_simple_compile_test_code here, 57531ae1b5e8Smrgdnl because it contains code intended for an executable, 57541ae1b5e8Smrgdnl not a library. It's possible we should let each 57551ae1b5e8Smrgdnl tag define a new lt_????_link_test_code variable, 57561ae1b5e8Smrgdnl but it's only used here... 57571ae1b5e8Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 57581ae1b5e8Smrgint a; 57591ae1b5e8Smrgvoid foo (void) { a = 0; } 57601ae1b5e8SmrgEOF 57611ae1b5e8Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 57621ae1b5e8Smrgclass Foo 57631ae1b5e8Smrg{ 57641ae1b5e8Smrgpublic: 57651ae1b5e8Smrg Foo (void) { a = 0; } 57661ae1b5e8Smrgprivate: 57671ae1b5e8Smrg int a; 57681ae1b5e8Smrg}; 57691ae1b5e8SmrgEOF 57701ae1b5e8Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 57711ae1b5e8Smrg subroutine foo 57721ae1b5e8Smrg implicit none 57731ae1b5e8Smrg integer*4 a 57741ae1b5e8Smrg a=0 57751ae1b5e8Smrg return 57761ae1b5e8Smrg end 57771ae1b5e8SmrgEOF 57781ae1b5e8Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 57791ae1b5e8Smrgpublic class foo { 57801ae1b5e8Smrg private int a; 57811ae1b5e8Smrg public void bar (void) { 57821ae1b5e8Smrg a = 0; 57831ae1b5e8Smrg } 57841ae1b5e8Smrg}; 57851ae1b5e8SmrgEOF 57861ae1b5e8Smrg]) 57871ae1b5e8Smrgdnl Parse the compiler output and extract the necessary 57881ae1b5e8Smrgdnl objects, libraries and library flags. 57891ae1b5e8Smrgif AC_TRY_EVAL(ac_compile); then 57901ae1b5e8Smrg # Parse the compiler output and extract the necessary 57911ae1b5e8Smrg # objects, libraries and library flags. 57921ae1b5e8Smrg 57931ae1b5e8Smrg # Sentinel used to keep track of whether or not we are before 57941ae1b5e8Smrg # the conftest object file. 57951ae1b5e8Smrg pre_test_object_deps_done=no 57961ae1b5e8Smrg 57971ae1b5e8Smrg # The `*' in the case matches for architectures that use `case' in 57981ae1b5e8Smrg # $output_verbose_cmd can trigger glob expansion during the loop 57991ae1b5e8Smrg # eval without this substitution. 58001ae1b5e8Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 58011ae1b5e8Smrg 58021ae1b5e8Smrg for p in `eval $output_verbose_link_cmd`; do 58031ae1b5e8Smrg case $p in 58041ae1b5e8Smrg 58051ae1b5e8Smrg -L* | -R* | -l*) 58061ae1b5e8Smrg # Some compilers place space between "-{L,R}" and the path. 58071ae1b5e8Smrg # Remove the space. 58081ae1b5e8Smrg if test $p = "-L" \ 58091ae1b5e8Smrg || test $p = "-R"; then 58101ae1b5e8Smrg prev=$p 58111ae1b5e8Smrg continue 58121ae1b5e8Smrg else 58131ae1b5e8Smrg prev= 58141ae1b5e8Smrg fi 58151ae1b5e8Smrg 58161ae1b5e8Smrg if test "$pre_test_object_deps_done" = no; then 58171ae1b5e8Smrg case $p in 58181ae1b5e8Smrg -L* | -R*) 58191ae1b5e8Smrg # Internal compiler library paths should come after those 58201ae1b5e8Smrg # provided the user. The postdeps already come after the 58211ae1b5e8Smrg # user supplied libs so there is no need to process them. 58221ae1b5e8Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 58231ae1b5e8Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 58241ae1b5e8Smrg else 58251ae1b5e8Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 58261ae1b5e8Smrg fi 58271ae1b5e8Smrg ;; 58281ae1b5e8Smrg # The "-l" case would never come before the object being 58291ae1b5e8Smrg # linked, so don't bother handling this case. 58301ae1b5e8Smrg esac 58311ae1b5e8Smrg else 58321ae1b5e8Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 58331ae1b5e8Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 58341ae1b5e8Smrg else 58351ae1b5e8Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 58361ae1b5e8Smrg fi 58371ae1b5e8Smrg fi 58381ae1b5e8Smrg ;; 58391ae1b5e8Smrg 58401ae1b5e8Smrg *.$objext) 58411ae1b5e8Smrg # This assumes that the test object file only shows up 58421ae1b5e8Smrg # once in the compiler output. 58431ae1b5e8Smrg if test "$p" = "conftest.$objext"; then 58441ae1b5e8Smrg pre_test_object_deps_done=yes 58451ae1b5e8Smrg continue 58461ae1b5e8Smrg fi 58471ae1b5e8Smrg 58481ae1b5e8Smrg if test "$pre_test_object_deps_done" = no; then 58491ae1b5e8Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 58501ae1b5e8Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 58511ae1b5e8Smrg else 58521ae1b5e8Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 58531ae1b5e8Smrg fi 58541ae1b5e8Smrg else 58551ae1b5e8Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 58561ae1b5e8Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 58571ae1b5e8Smrg else 58581ae1b5e8Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 58591ae1b5e8Smrg fi 58601ae1b5e8Smrg fi 58611ae1b5e8Smrg ;; 58621ae1b5e8Smrg 58631ae1b5e8Smrg *) ;; # Ignore the rest. 58641ae1b5e8Smrg 58651ae1b5e8Smrg esac 58661ae1b5e8Smrg done 58671ae1b5e8Smrg 58681ae1b5e8Smrg # Clean up. 58691ae1b5e8Smrg rm -f a.out a.exe 58701ae1b5e8Smrgelse 58711ae1b5e8Smrg echo "libtool.m4: error: problem compiling $1 test program" 58721ae1b5e8Smrgfi 58731ae1b5e8Smrg 58741ae1b5e8Smrg$rm -f confest.$objext 58751ae1b5e8Smrg 58761ae1b5e8Smrg# PORTME: override above test on systems where it is broken 58771ae1b5e8Smrgifelse([$1],[CXX], 58781ae1b5e8Smrg[case $host_os in 58791ae1b5e8Smrginterix3*) 58801ae1b5e8Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 58811ae1b5e8Smrg # hack all around it, let's just trust "g++" to DTRT. 58821ae1b5e8Smrg _LT_AC_TAGVAR(predep_objects,$1)= 58831ae1b5e8Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 58841ae1b5e8Smrg _LT_AC_TAGVAR(postdeps,$1)= 58851ae1b5e8Smrg ;; 58861ae1b5e8Smrg 58871ae1b5e8Smrgsolaris*) 58881ae1b5e8Smrg case $cc_basename in 58891ae1b5e8Smrg CC*) 58901ae1b5e8Smrg # Adding this requires a known-good setup of shared libraries for 58911ae1b5e8Smrg # Sun compiler versions before 5.6, else PIC objects from an old 58921ae1b5e8Smrg # archive will be linked into the output, leading to subtle bugs. 58931ae1b5e8Smrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 58941ae1b5e8Smrg ;; 58951ae1b5e8Smrg esac 58961ae1b5e8Smrg ;; 58971ae1b5e8Smrgesac 58981ae1b5e8Smrg]) 58991ae1b5e8Smrg 59001ae1b5e8Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 59011ae1b5e8Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 59021ae1b5e8Smrgesac 59031ae1b5e8Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 59041ae1b5e8Smrg 59051ae1b5e8Smrg# AC_LIBTOOL_LANG_F77_CONFIG 59061ae1b5e8Smrg# -------------------------- 59071ae1b5e8Smrg# Ensure that the configuration vars for the C compiler are 59081ae1b5e8Smrg# suitably defined. Those variables are subsequently used by 59091ae1b5e8Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 59101ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 59111ae1b5e8SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 59121ae1b5e8Smrg[AC_REQUIRE([AC_PROG_F77]) 59131ae1b5e8SmrgAC_LANG_PUSH(Fortran 77) 59141ae1b5e8Smrg 59151ae1b5e8Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 59161ae1b5e8Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 59171ae1b5e8Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 59181ae1b5e8Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 59191ae1b5e8Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 59201ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 59211ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 59221ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 59231ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 59241ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 59251ae1b5e8Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 59261ae1b5e8Smrg_LT_AC_TAGVAR(module_cmds, $1)= 59271ae1b5e8Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 59281ae1b5e8Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 59291ae1b5e8Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 59301ae1b5e8Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 59311ae1b5e8Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 59321ae1b5e8Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 59331ae1b5e8Smrg 59341ae1b5e8Smrg# Source file extension for f77 test sources. 59351ae1b5e8Smrgac_ext=f 59361ae1b5e8Smrg 59371ae1b5e8Smrg# Object file extension for compiled f77 test sources. 59381ae1b5e8Smrgobjext=o 59391ae1b5e8Smrg_LT_AC_TAGVAR(objext, $1)=$objext 59401ae1b5e8Smrg 59411ae1b5e8Smrg# Code to be used in simple compile tests 59421ae1b5e8Smrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 59431ae1b5e8Smrg 59441ae1b5e8Smrg# Code to be used in simple link tests 59451ae1b5e8Smrglt_simple_link_test_code=" program t\n end\n" 59461ae1b5e8Smrg 59471ae1b5e8Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 59481ae1b5e8Smrg_LT_AC_SYS_COMPILER 59491ae1b5e8Smrg 59501ae1b5e8Smrg# save warnings/boilerplate of simple test code 59511ae1b5e8Smrg_LT_COMPILER_BOILERPLATE 59521ae1b5e8Smrg_LT_LINKER_BOILERPLATE 59531ae1b5e8Smrg 59541ae1b5e8Smrg# Allow CC to be a program name with arguments. 59551ae1b5e8Smrglt_save_CC="$CC" 59561ae1b5e8SmrgCC=${F77-"f77"} 59571ae1b5e8Smrgcompiler=$CC 59581ae1b5e8Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 59591ae1b5e8Smrg_LT_CC_BASENAME([$compiler]) 59601ae1b5e8Smrg 59611ae1b5e8SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 59621ae1b5e8SmrgAC_MSG_RESULT([$can_build_shared]) 59631ae1b5e8Smrg 59641ae1b5e8SmrgAC_MSG_CHECKING([whether to build shared libraries]) 59651ae1b5e8Smrgtest "$can_build_shared" = "no" && enable_shared=no 59661ae1b5e8Smrg 59671ae1b5e8Smrg# On AIX, shared libraries and static libraries use the same namespace, and 59681ae1b5e8Smrg# are all built from PIC. 59691ae1b5e8Smrgcase $host_os in 59701ae1b5e8Smrgaix3*) 59711ae1b5e8Smrg test "$enable_shared" = yes && enable_static=no 59721ae1b5e8Smrg if test -n "$RANLIB"; then 59731ae1b5e8Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 59741ae1b5e8Smrg postinstall_cmds='$RANLIB $lib' 59751ae1b5e8Smrg fi 59761ae1b5e8Smrg ;; 59771ae1b5e8Smrgaix4* | aix5*) 59781ae1b5e8Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 59791ae1b5e8Smrg test "$enable_shared" = yes && enable_static=no 59801ae1b5e8Smrg fi 59811ae1b5e8Smrg ;; 59821ae1b5e8Smrgesac 59831ae1b5e8SmrgAC_MSG_RESULT([$enable_shared]) 59841ae1b5e8Smrg 59851ae1b5e8SmrgAC_MSG_CHECKING([whether to build static libraries]) 59861ae1b5e8Smrg# Make sure either enable_shared or enable_static is yes. 59871ae1b5e8Smrgtest "$enable_shared" = yes || enable_static=yes 59881ae1b5e8SmrgAC_MSG_RESULT([$enable_static]) 59891ae1b5e8Smrg 59901ae1b5e8Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 59911ae1b5e8Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 59921ae1b5e8Smrg 59931ae1b5e8SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 59941ae1b5e8SmrgAC_LIBTOOL_PROG_CC_C_O($1) 59951ae1b5e8SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 59961ae1b5e8SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 59971ae1b5e8SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 59981ae1b5e8SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 59991ae1b5e8Smrg 60001ae1b5e8SmrgAC_LIBTOOL_CONFIG($1) 60011ae1b5e8Smrg 60021ae1b5e8SmrgAC_LANG_POP 60031ae1b5e8SmrgCC="$lt_save_CC" 60041ae1b5e8Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 60051ae1b5e8Smrg 60061ae1b5e8Smrg 60071ae1b5e8Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 60081ae1b5e8Smrg# -------------------------- 60091ae1b5e8Smrg# Ensure that the configuration vars for the C compiler are 60101ae1b5e8Smrg# suitably defined. Those variables are subsequently used by 60111ae1b5e8Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 60121ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 60131ae1b5e8SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 60141ae1b5e8Smrg[AC_LANG_SAVE 60151ae1b5e8Smrg 60161ae1b5e8Smrg# Source file extension for Java test sources. 60171ae1b5e8Smrgac_ext=java 60181ae1b5e8Smrg 60191ae1b5e8Smrg# Object file extension for compiled Java test sources. 60201ae1b5e8Smrgobjext=o 60211ae1b5e8Smrg_LT_AC_TAGVAR(objext, $1)=$objext 60221ae1b5e8Smrg 60231ae1b5e8Smrg# Code to be used in simple compile tests 60241ae1b5e8Smrglt_simple_compile_test_code="class foo {}\n" 60251ae1b5e8Smrg 60261ae1b5e8Smrg# Code to be used in simple link tests 60271ae1b5e8Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 60281ae1b5e8Smrg 60291ae1b5e8Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 60301ae1b5e8Smrg_LT_AC_SYS_COMPILER 60311ae1b5e8Smrg 60321ae1b5e8Smrg# save warnings/boilerplate of simple test code 60331ae1b5e8Smrg_LT_COMPILER_BOILERPLATE 60341ae1b5e8Smrg_LT_LINKER_BOILERPLATE 60351ae1b5e8Smrg 60361ae1b5e8Smrg# Allow CC to be a program name with arguments. 60371ae1b5e8Smrglt_save_CC="$CC" 60381ae1b5e8SmrgCC=${GCJ-"gcj"} 60391ae1b5e8Smrgcompiler=$CC 60401ae1b5e8Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 60411ae1b5e8Smrg_LT_CC_BASENAME([$compiler]) 60421ae1b5e8Smrg 60431ae1b5e8Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 60441ae1b5e8Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 60451ae1b5e8Smrg 60461ae1b5e8Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 60471ae1b5e8Smrg 60481ae1b5e8SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 60491ae1b5e8SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 60501ae1b5e8SmrgAC_LIBTOOL_PROG_CC_C_O($1) 60511ae1b5e8SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 60521ae1b5e8SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 60531ae1b5e8SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 60541ae1b5e8SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 60551ae1b5e8Smrg 60561ae1b5e8SmrgAC_LIBTOOL_CONFIG($1) 60571ae1b5e8Smrg 60581ae1b5e8SmrgAC_LANG_RESTORE 60591ae1b5e8SmrgCC="$lt_save_CC" 60601ae1b5e8Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 60611ae1b5e8Smrg 60621ae1b5e8Smrg 60631ae1b5e8Smrg# AC_LIBTOOL_LANG_RC_CONFIG 60641ae1b5e8Smrg# ------------------------- 60651ae1b5e8Smrg# Ensure that the configuration vars for the Windows resource compiler are 60661ae1b5e8Smrg# suitably defined. Those variables are subsequently used by 60671ae1b5e8Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 60681ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 60691ae1b5e8SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 60701ae1b5e8Smrg[AC_LANG_SAVE 60711ae1b5e8Smrg 60721ae1b5e8Smrg# Source file extension for RC test sources. 60731ae1b5e8Smrgac_ext=rc 60741ae1b5e8Smrg 60751ae1b5e8Smrg# Object file extension for compiled RC test sources. 60761ae1b5e8Smrgobjext=o 60771ae1b5e8Smrg_LT_AC_TAGVAR(objext, $1)=$objext 60781ae1b5e8Smrg 60791ae1b5e8Smrg# Code to be used in simple compile tests 60801ae1b5e8Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 60811ae1b5e8Smrg 60821ae1b5e8Smrg# Code to be used in simple link tests 60831ae1b5e8Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 60841ae1b5e8Smrg 60851ae1b5e8Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 60861ae1b5e8Smrg_LT_AC_SYS_COMPILER 60871ae1b5e8Smrg 60881ae1b5e8Smrg# save warnings/boilerplate of simple test code 60891ae1b5e8Smrg_LT_COMPILER_BOILERPLATE 60901ae1b5e8Smrg_LT_LINKER_BOILERPLATE 60911ae1b5e8Smrg 60921ae1b5e8Smrg# Allow CC to be a program name with arguments. 60931ae1b5e8Smrglt_save_CC="$CC" 60941ae1b5e8SmrgCC=${RC-"windres"} 60951ae1b5e8Smrgcompiler=$CC 60961ae1b5e8Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 60971ae1b5e8Smrg_LT_CC_BASENAME([$compiler]) 60981ae1b5e8Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 60991ae1b5e8Smrg 61001ae1b5e8SmrgAC_LIBTOOL_CONFIG($1) 61011ae1b5e8Smrg 61021ae1b5e8SmrgAC_LANG_RESTORE 61031ae1b5e8SmrgCC="$lt_save_CC" 61041ae1b5e8Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 61051ae1b5e8Smrg 61061ae1b5e8Smrg 61071ae1b5e8Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 61081ae1b5e8Smrg# ---------------------------- 61091ae1b5e8Smrg# If TAGNAME is not passed, then create an initial libtool script 61101ae1b5e8Smrg# with a default configuration from the untagged config vars. Otherwise 61111ae1b5e8Smrg# add code to config.status for appending the configuration named by 61121ae1b5e8Smrg# TAGNAME from the matching tagged config vars. 61131ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 61141ae1b5e8Smrg[# The else clause should only fire when bootstrapping the 61151ae1b5e8Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 61161ae1b5e8Smrg# with your package, and you will get complaints that there are 61171ae1b5e8Smrg# no rules to generate ltmain.sh. 61181ae1b5e8Smrgif test -f "$ltmain"; then 61191ae1b5e8Smrg # See if we are running on zsh, and set the options which allow our commands through 61201ae1b5e8Smrg # without removal of \ escapes. 61211ae1b5e8Smrg if test -n "${ZSH_VERSION+set}" ; then 61221ae1b5e8Smrg setopt NO_GLOB_SUBST 61231ae1b5e8Smrg fi 61241ae1b5e8Smrg # Now quote all the things that may contain metacharacters while being 61251ae1b5e8Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 61261ae1b5e8Smrg # variables and quote the copies for generation of the libtool script. 61271ae1b5e8Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 61281ae1b5e8Smrg SED SHELL STRIP \ 61291ae1b5e8Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 61301ae1b5e8Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 61311ae1b5e8Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 61321ae1b5e8Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 61331ae1b5e8Smrg lt_cv_sys_global_symbol_to_c_name_address \ 61341ae1b5e8Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 61351ae1b5e8Smrg old_postinstall_cmds old_postuninstall_cmds \ 61361ae1b5e8Smrg _LT_AC_TAGVAR(compiler, $1) \ 61371ae1b5e8Smrg _LT_AC_TAGVAR(CC, $1) \ 61381ae1b5e8Smrg _LT_AC_TAGVAR(LD, $1) \ 61391ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 61401ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 61411ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 61421ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 61431ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 61441ae1b5e8Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 61451ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 61461ae1b5e8Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 61471ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 61481ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 61491ae1b5e8Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 61501ae1b5e8Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 61511ae1b5e8Smrg _LT_AC_TAGVAR(predeps, $1) \ 61521ae1b5e8Smrg _LT_AC_TAGVAR(postdeps, $1) \ 61531ae1b5e8Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 61541ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 61551ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 61561ae1b5e8Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 61571ae1b5e8Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 61581ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 61591ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 61601ae1b5e8Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 61611ae1b5e8Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 61621ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 61631ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 61641ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 61651ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 61661ae1b5e8Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 61671ae1b5e8Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 61681ae1b5e8Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 61691ae1b5e8Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 61701ae1b5e8Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 61711ae1b5e8Smrg 61721ae1b5e8Smrg case $var in 61731ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 61741ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 61751ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 61761ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 61771ae1b5e8Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 61781ae1b5e8Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 61791ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 61801ae1b5e8Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 61811ae1b5e8Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 61821ae1b5e8Smrg postinstall_cmds | postuninstall_cmds | \ 61831ae1b5e8Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 61841ae1b5e8Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 61851ae1b5e8Smrg # Double-quote double-evaled strings. 61861ae1b5e8Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 61871ae1b5e8Smrg ;; 61881ae1b5e8Smrg *) 61891ae1b5e8Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 61901ae1b5e8Smrg ;; 61911ae1b5e8Smrg esac 61921ae1b5e8Smrg done 61931ae1b5e8Smrg 61941ae1b5e8Smrg case $lt_echo in 61951ae1b5e8Smrg *'\[$]0 --fallback-echo"') 61961ae1b5e8Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 61971ae1b5e8Smrg ;; 61981ae1b5e8Smrg esac 61991ae1b5e8Smrg 62001ae1b5e8Smrgifelse([$1], [], 62011ae1b5e8Smrg [cfgfile="${ofile}T" 62021ae1b5e8Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 62031ae1b5e8Smrg $rm -f "$cfgfile" 62041ae1b5e8Smrg AC_MSG_NOTICE([creating $ofile])], 62051ae1b5e8Smrg [cfgfile="$ofile"]) 62061ae1b5e8Smrg 62071ae1b5e8Smrg cat <<__EOF__ >> "$cfgfile" 62081ae1b5e8Smrgifelse([$1], [], 62091ae1b5e8Smrg[#! $SHELL 62101ae1b5e8Smrg 62111ae1b5e8Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 62121ae1b5e8Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 62131ae1b5e8Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 62141ae1b5e8Smrg# 62151ae1b5e8Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 62161ae1b5e8Smrg# Free Software Foundation, Inc. 62171ae1b5e8Smrg# 62181ae1b5e8Smrg# This file is part of GNU Libtool: 62191ae1b5e8Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 62201ae1b5e8Smrg# 62211ae1b5e8Smrg# This program is free software; you can redistribute it and/or modify 62221ae1b5e8Smrg# it under the terms of the GNU General Public License as published by 62231ae1b5e8Smrg# the Free Software Foundation; either version 2 of the License, or 62241ae1b5e8Smrg# (at your option) any later version. 62251ae1b5e8Smrg# 62261ae1b5e8Smrg# This program is distributed in the hope that it will be useful, but 62271ae1b5e8Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 62281ae1b5e8Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 62291ae1b5e8Smrg# General Public License for more details. 62301ae1b5e8Smrg# 62311ae1b5e8Smrg# You should have received a copy of the GNU General Public License 62321ae1b5e8Smrg# along with this program; if not, write to the Free Software 62331ae1b5e8Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62341ae1b5e8Smrg# 62351ae1b5e8Smrg# As a special exception to the GNU General Public License, if you 62361ae1b5e8Smrg# distribute this file as part of a program that contains a 62371ae1b5e8Smrg# configuration script generated by Autoconf, you may include it under 62381ae1b5e8Smrg# the same distribution terms that you use for the rest of that program. 62391ae1b5e8Smrg 62401ae1b5e8Smrg# A sed program that does not truncate output. 62411ae1b5e8SmrgSED=$lt_SED 62421ae1b5e8Smrg 62431ae1b5e8Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 62441ae1b5e8SmrgXsed="$SED -e 1s/^X//" 62451ae1b5e8Smrg 62461ae1b5e8Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 62471ae1b5e8Smrg# if CDPATH is set. 62481ae1b5e8Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 62491ae1b5e8Smrg 62501ae1b5e8Smrg# The names of the tagged configurations supported by this script. 62511ae1b5e8Smrgavailable_tags= 62521ae1b5e8Smrg 62531ae1b5e8Smrg# ### BEGIN LIBTOOL CONFIG], 62541ae1b5e8Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 62551ae1b5e8Smrg 62561ae1b5e8Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 62571ae1b5e8Smrg 62581ae1b5e8Smrg# Shell to use when invoking shell scripts. 62591ae1b5e8SmrgSHELL=$lt_SHELL 62601ae1b5e8Smrg 62611ae1b5e8Smrg# Whether or not to build shared libraries. 62621ae1b5e8Smrgbuild_libtool_libs=$enable_shared 626376888252Smrg 62641ae1b5e8Smrg# Whether or not to build static libraries. 62651ae1b5e8Smrgbuild_old_libs=$enable_static 626676888252Smrg 62671ae1b5e8Smrg# Whether or not to add -lc for building shared libraries. 62681ae1b5e8Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 626976888252Smrg 62701ae1b5e8Smrg# Whether or not to disallow shared libs when runtime libs are static 62711ae1b5e8Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 627276888252Smrg 62731ae1b5e8Smrg# Whether or not to optimize for fast installation. 62741ae1b5e8Smrgfast_install=$enable_fast_install 627576888252Smrg 62761ae1b5e8Smrg# The host system. 62771ae1b5e8Smrghost_alias=$host_alias 62781ae1b5e8Smrghost=$host 62791ae1b5e8Smrghost_os=$host_os 628076888252Smrg 62811ae1b5e8Smrg# The build system. 62821ae1b5e8Smrgbuild_alias=$build_alias 62831ae1b5e8Smrgbuild=$build 62841ae1b5e8Smrgbuild_os=$build_os 628576888252Smrg 62861ae1b5e8Smrg# An echo program that does not interpret backslashes. 62871ae1b5e8Smrgecho=$lt_echo 628876888252Smrg 62891ae1b5e8Smrg# The archiver. 62901ae1b5e8SmrgAR=$lt_AR 62911ae1b5e8SmrgAR_FLAGS=$lt_AR_FLAGS 629276888252Smrg 62931ae1b5e8Smrg# A C compiler. 62941ae1b5e8SmrgLTCC=$lt_LTCC 629576888252Smrg 62961ae1b5e8Smrg# LTCC compiler flags. 62971ae1b5e8SmrgLTCFLAGS=$lt_LTCFLAGS 629876888252Smrg 62991ae1b5e8Smrg# A language-specific compiler. 63001ae1b5e8SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 630176888252Smrg 63021ae1b5e8Smrg# Is the compiler the GNU C compiler? 63031ae1b5e8Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 630476888252Smrg 63051ae1b5e8Smrg# An ERE matcher. 63061ae1b5e8SmrgEGREP=$lt_EGREP 630776888252Smrg 63081ae1b5e8Smrg# The linker used to build libraries. 63091ae1b5e8SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 631076888252Smrg 63111ae1b5e8Smrg# Whether we need hard or soft links. 63121ae1b5e8SmrgLN_S=$lt_LN_S 631376888252Smrg 63141ae1b5e8Smrg# A BSD-compatible nm program. 63151ae1b5e8SmrgNM=$lt_NM 631676888252Smrg 63171ae1b5e8Smrg# A symbol stripping program 63181ae1b5e8SmrgSTRIP=$lt_STRIP 631976888252Smrg 63201ae1b5e8Smrg# Used to examine libraries when file_magic_cmd begins "file" 63211ae1b5e8SmrgMAGIC_CMD=$MAGIC_CMD 632276888252Smrg 63231ae1b5e8Smrg# Used on cygwin: DLL creation program. 63241ae1b5e8SmrgDLLTOOL="$DLLTOOL" 632576888252Smrg 63261ae1b5e8Smrg# Used on cygwin: object dumper. 63271ae1b5e8SmrgOBJDUMP="$OBJDUMP" 632876888252Smrg 63291ae1b5e8Smrg# Used on cygwin: assembler. 63301ae1b5e8SmrgAS="$AS" 63311ae1b5e8Smrg 63321ae1b5e8Smrg# The name of the directory that contains temporary libtool files. 63331ae1b5e8Smrgobjdir=$objdir 63341ae1b5e8Smrg 63351ae1b5e8Smrg# How to create reloadable object files. 63361ae1b5e8Smrgreload_flag=$lt_reload_flag 63371ae1b5e8Smrgreload_cmds=$lt_reload_cmds 63381ae1b5e8Smrg 63391ae1b5e8Smrg# How to pass a linker flag through the compiler. 63401ae1b5e8Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 63411ae1b5e8Smrg 63421ae1b5e8Smrg# Object file suffix (normally "o"). 63431ae1b5e8Smrgobjext="$ac_objext" 63441ae1b5e8Smrg 63451ae1b5e8Smrg# Old archive suffix (normally "a"). 63461ae1b5e8Smrglibext="$libext" 63471ae1b5e8Smrg 63481ae1b5e8Smrg# Shared library suffix (normally ".so"). 63491ae1b5e8Smrgshrext_cmds='$shrext_cmds' 63501ae1b5e8Smrg 63511ae1b5e8Smrg# Executable file suffix (normally ""). 63521ae1b5e8Smrgexeext="$exeext" 63531ae1b5e8Smrg 63541ae1b5e8Smrg# Additional compiler flags for building library objects. 63551ae1b5e8Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 63561ae1b5e8Smrgpic_mode=$pic_mode 63571ae1b5e8Smrg 63581ae1b5e8Smrg# What is the maximum length of a command? 63591ae1b5e8Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 63601ae1b5e8Smrg 63611ae1b5e8Smrg# Does compiler simultaneously support -c and -o options? 63621ae1b5e8Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 63631ae1b5e8Smrg 63641ae1b5e8Smrg# Must we lock files when doing compilation? 63651ae1b5e8Smrgneed_locks=$lt_need_locks 63661ae1b5e8Smrg 63671ae1b5e8Smrg# Do we need the lib prefix for modules? 63681ae1b5e8Smrgneed_lib_prefix=$need_lib_prefix 63691ae1b5e8Smrg 63701ae1b5e8Smrg# Do we need a version for libraries? 63711ae1b5e8Smrgneed_version=$need_version 637276888252Smrg 63731ae1b5e8Smrg# Whether dlopen is supported. 63741ae1b5e8Smrgdlopen_support=$enable_dlopen 637576888252Smrg 63761ae1b5e8Smrg# Whether dlopen of programs is supported. 63771ae1b5e8Smrgdlopen_self=$enable_dlopen_self 637876888252Smrg 63791ae1b5e8Smrg# Whether dlopen of statically linked programs is supported. 63801ae1b5e8Smrgdlopen_self_static=$enable_dlopen_self_static 638176888252Smrg 63821ae1b5e8Smrg# Compiler flag to prevent dynamic linking. 63831ae1b5e8Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 638476888252Smrg 63851ae1b5e8Smrg# Compiler flag to turn off builtin functions. 63861ae1b5e8Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 638776888252Smrg 63881ae1b5e8Smrg# Compiler flag to allow reflexive dlopens. 63891ae1b5e8Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 639076888252Smrg 63911ae1b5e8Smrg# Compiler flag to generate shared objects directly from archives. 63921ae1b5e8Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 639376888252Smrg 63941ae1b5e8Smrg# Compiler flag to generate thread-safe objects. 63951ae1b5e8Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 639676888252Smrg 63971ae1b5e8Smrg# Library versioning type. 63981ae1b5e8Smrgversion_type=$version_type 639976888252Smrg 64001ae1b5e8Smrg# Format of library name prefix. 64011ae1b5e8Smrglibname_spec=$lt_libname_spec 640276888252Smrg 64031ae1b5e8Smrg# List of archive names. First name is the real one, the rest are links. 64041ae1b5e8Smrg# The last name is the one that the linker finds with -lNAME. 64051ae1b5e8Smrglibrary_names_spec=$lt_library_names_spec 640676888252Smrg 64071ae1b5e8Smrg# The coded name of the library, if different from the real name. 64081ae1b5e8Smrgsoname_spec=$lt_soname_spec 640976888252Smrg 64101ae1b5e8Smrg# Commands used to build and install an old-style archive. 64111ae1b5e8SmrgRANLIB=$lt_RANLIB 64121ae1b5e8Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 64131ae1b5e8Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 64141ae1b5e8Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 641576888252Smrg 64161ae1b5e8Smrg# Create an old-style archive from a shared archive. 64171ae1b5e8Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 641876888252Smrg 64191ae1b5e8Smrg# Create a temporary old-style archive to link instead of a shared archive. 64201ae1b5e8Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 642176888252Smrg 64221ae1b5e8Smrg# Commands used to build and install a shared archive. 64231ae1b5e8Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 64241ae1b5e8Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 64251ae1b5e8Smrgpostinstall_cmds=$lt_postinstall_cmds 64261ae1b5e8Smrgpostuninstall_cmds=$lt_postuninstall_cmds 642776888252Smrg 64281ae1b5e8Smrg# Commands used to build a loadable module (assumed same as above if empty) 64291ae1b5e8Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 64301ae1b5e8Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 643176888252Smrg 64321ae1b5e8Smrg# Commands to strip libraries. 64331ae1b5e8Smrgold_striplib=$lt_old_striplib 64341ae1b5e8Smrgstriplib=$lt_striplib 643576888252Smrg 64361ae1b5e8Smrg# Dependencies to place before the objects being linked to create a 64371ae1b5e8Smrg# shared library. 64381ae1b5e8Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 643976888252Smrg 64401ae1b5e8Smrg# Dependencies to place after the objects being linked to create a 64411ae1b5e8Smrg# shared library. 64421ae1b5e8Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 644376888252Smrg 64441ae1b5e8Smrg# Dependencies to place before the objects being linked to create a 64451ae1b5e8Smrg# shared library. 64461ae1b5e8Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 644776888252Smrg 64481ae1b5e8Smrg# Dependencies to place after the objects being linked to create a 64491ae1b5e8Smrg# shared library. 64501ae1b5e8Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 645176888252Smrg 64521ae1b5e8Smrg# The library search path used internally by the compiler when linking 64531ae1b5e8Smrg# a shared library. 64541ae1b5e8Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 645576888252Smrg 64561ae1b5e8Smrg# Method to check whether dependent libraries are shared objects. 64571ae1b5e8Smrgdeplibs_check_method=$lt_deplibs_check_method 645876888252Smrg 64591ae1b5e8Smrg# Command to use when deplibs_check_method == file_magic. 64601ae1b5e8Smrgfile_magic_cmd=$lt_file_magic_cmd 646176888252Smrg 64621ae1b5e8Smrg# Flag that allows shared libraries with undefined symbols to be built. 64631ae1b5e8Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 646476888252Smrg 64651ae1b5e8Smrg# Flag that forces no undefined symbols. 64661ae1b5e8Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 646776888252Smrg 64681ae1b5e8Smrg# Commands used to finish a libtool library installation in a directory. 64691ae1b5e8Smrgfinish_cmds=$lt_finish_cmds 647076888252Smrg 64711ae1b5e8Smrg# Same as above, but a single script fragment to be evaled but not shown. 64721ae1b5e8Smrgfinish_eval=$lt_finish_eval 647376888252Smrg 64741ae1b5e8Smrg# Take the output of nm and produce a listing of raw symbols and C names. 64751ae1b5e8Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 647676888252Smrg 64771ae1b5e8Smrg# Transform the output of nm in a proper C declaration 64781ae1b5e8Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 647976888252Smrg 64801ae1b5e8Smrg# Transform the output of nm in a C name address pair 64811ae1b5e8Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 648276888252Smrg 64831ae1b5e8Smrg# This is the shared library runtime path variable. 64841ae1b5e8Smrgrunpath_var=$runpath_var 648576888252Smrg 64861ae1b5e8Smrg# This is the shared library path variable. 64871ae1b5e8Smrgshlibpath_var=$shlibpath_var 648876888252Smrg 64891ae1b5e8Smrg# Is shlibpath searched before the hard-coded library search path? 64901ae1b5e8Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 649176888252Smrg 64921ae1b5e8Smrg# How to hardcode a shared library path into an executable. 64931ae1b5e8Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 649476888252Smrg 64951ae1b5e8Smrg# Whether we should hardcode library paths into libraries. 64961ae1b5e8Smrghardcode_into_libs=$hardcode_into_libs 649776888252Smrg 64981ae1b5e8Smrg# Flag to hardcode \$libdir into a binary during linking. 64991ae1b5e8Smrg# This must work even if \$libdir does not exist. 65001ae1b5e8Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 650176888252Smrg 65021ae1b5e8Smrg# If ld is used when linking, flag to hardcode \$libdir into 65031ae1b5e8Smrg# a binary during linking. This must work even if \$libdir does 65041ae1b5e8Smrg# not exist. 65051ae1b5e8Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 650676888252Smrg 65071ae1b5e8Smrg# Whether we need a single -rpath flag with a separated argument. 65081ae1b5e8Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 650976888252Smrg 65101ae1b5e8Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 65111ae1b5e8Smrg# resulting binary. 65121ae1b5e8Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 651376888252Smrg 65141ae1b5e8Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 65151ae1b5e8Smrg# resulting binary. 65161ae1b5e8Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 651776888252Smrg 65181ae1b5e8Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 65191ae1b5e8Smrg# the resulting binary. 65201ae1b5e8Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 652176888252Smrg 65221ae1b5e8Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 65231ae1b5e8Smrg# and all subsequent libraries and executables linked against it. 65241ae1b5e8Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 652576888252Smrg 65261ae1b5e8Smrg# Variables whose values should be saved in libtool wrapper scripts and 65271ae1b5e8Smrg# restored at relink time. 65281ae1b5e8Smrgvariables_saved_for_relink="$variables_saved_for_relink" 652976888252Smrg 65301ae1b5e8Smrg# Whether libtool must link a program against all its dependency libraries. 65311ae1b5e8Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 653276888252Smrg 65331ae1b5e8Smrg# Compile-time system search path for libraries 65341ae1b5e8Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 653576888252Smrg 65361ae1b5e8Smrg# Run-time system search path for libraries 65371ae1b5e8Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 653876888252Smrg 65391ae1b5e8Smrg# Fix the shell variable \$srcfile for the compiler. 65401ae1b5e8Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 654176888252Smrg 65421ae1b5e8Smrg# Set to yes if exported symbols are required. 65431ae1b5e8Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 654476888252Smrg 65451ae1b5e8Smrg# The commands to list exported symbols. 65461ae1b5e8Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 654776888252Smrg 65481ae1b5e8Smrg# The commands to extract the exported symbol list from a shared archive. 65491ae1b5e8Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 655076888252Smrg 65511ae1b5e8Smrg# Symbols that should not be listed in the preloaded symbols. 65521ae1b5e8Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 65531ae1b5e8Smrg 65541ae1b5e8Smrg# Symbols that must always be exported. 65551ae1b5e8Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 655676888252Smrg 65571ae1b5e8Smrgifelse([$1],[], 65581ae1b5e8Smrg[# ### END LIBTOOL CONFIG], 65591ae1b5e8Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 656076888252Smrg 65611ae1b5e8Smrg__EOF__ 656276888252Smrg 65631ae1b5e8Smrgifelse([$1],[], [ 65641ae1b5e8Smrg case $host_os in 65651ae1b5e8Smrg aix3*) 65661ae1b5e8Smrg cat <<\EOF >> "$cfgfile" 656776888252Smrg 65681ae1b5e8Smrg# AIX sometimes has problems with the GCC collect2 program. For some 65691ae1b5e8Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 65701ae1b5e8Smrg# vanish in a puff of smoke. 65711ae1b5e8Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 65721ae1b5e8Smrg COLLECT_NAMES= 65731ae1b5e8Smrg export COLLECT_NAMES 65741ae1b5e8Smrgfi 65751ae1b5e8SmrgEOF 65761ae1b5e8Smrg ;; 65771ae1b5e8Smrg esac 657876888252Smrg 65791ae1b5e8Smrg # We use sed instead of cat because bash on DJGPP gets confused if 65801ae1b5e8Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 65811ae1b5e8Smrg # text mode, it properly converts lines to CR/LF. This bash problem 65821ae1b5e8Smrg # is reportedly fixed, but why not run on old versions too? 65831ae1b5e8Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 658476888252Smrg 65851ae1b5e8Smrg mv -f "$cfgfile" "$ofile" || \ 65861ae1b5e8Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 65871ae1b5e8Smrg chmod +x "$ofile" 65881ae1b5e8Smrg]) 65891ae1b5e8Smrgelse 65901ae1b5e8Smrg # If there is no Makefile yet, we rely on a make rule to execute 65911ae1b5e8Smrg # `config.status --recheck' to rerun these tests and create the 65921ae1b5e8Smrg # libtool script then. 65931ae1b5e8Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 65941ae1b5e8Smrg if test -f "$ltmain_in"; then 65951ae1b5e8Smrg test -f Makefile && make "$ltmain" 65961ae1b5e8Smrg fi 65971ae1b5e8Smrgfi 65981ae1b5e8Smrg])# AC_LIBTOOL_CONFIG 659976888252Smrg 660076888252Smrg 66011ae1b5e8Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 66021ae1b5e8Smrg# ------------------------------------------- 66031ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 66041ae1b5e8Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 660576888252Smrg 66061ae1b5e8Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 660776888252Smrg 66081ae1b5e8Smrgif test "$GCC" = yes; then 66091ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 661076888252Smrg 66111ae1b5e8Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 66121ae1b5e8Smrg lt_cv_prog_compiler_rtti_exceptions, 66131ae1b5e8Smrg [-fno-rtti -fno-exceptions], [], 66141ae1b5e8Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 66151ae1b5e8Smrgfi 66161ae1b5e8Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 661776888252Smrg 661876888252Smrg 66191ae1b5e8Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 66201ae1b5e8Smrg# --------------------------------- 66211ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 66221ae1b5e8Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 66231ae1b5e8SmrgAC_REQUIRE([AC_PROG_NM]) 66241ae1b5e8SmrgAC_REQUIRE([AC_OBJEXT]) 66251ae1b5e8Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 66261ae1b5e8SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 66271ae1b5e8SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 66281ae1b5e8Smrg[ 66291ae1b5e8Smrg# These are sane defaults that work on at least a few old systems. 66301ae1b5e8Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 663176888252Smrg 66321ae1b5e8Smrg# Character class describing NM global symbol codes. 66331ae1b5e8Smrgsymcode='[[BCDEGRST]]' 663476888252Smrg 66351ae1b5e8Smrg# Regexp to match symbols that can be accessed directly from C. 66361ae1b5e8Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 66371ae1b5e8Smrg 66381ae1b5e8Smrg# Transform an extracted symbol line into a proper C declaration 66391ae1b5e8Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 66401ae1b5e8Smrg 66411ae1b5e8Smrg# Transform an extracted symbol line into symbol name and symbol address 66421ae1b5e8Smrglt_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'" 66431ae1b5e8Smrg 66441ae1b5e8Smrg# Define system-specific variables. 66451ae1b5e8Smrgcase $host_os in 66461ae1b5e8Smrgaix*) 66471ae1b5e8Smrg symcode='[[BCDT]]' 66481ae1b5e8Smrg ;; 66491ae1b5e8Smrgcygwin* | mingw* | pw32*) 66501ae1b5e8Smrg symcode='[[ABCDGISTW]]' 66511ae1b5e8Smrg ;; 66521ae1b5e8Smrghpux*) # Its linker distinguishes data from code symbols 66531ae1b5e8Smrg if test "$host_cpu" = ia64; then 66541ae1b5e8Smrg symcode='[[ABCDEGRST]]' 66551ae1b5e8Smrg fi 66561ae1b5e8Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 66571ae1b5e8Smrg 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'" 66581ae1b5e8Smrg ;; 66591ae1b5e8Smrglinux*) 66601ae1b5e8Smrg if test "$host_cpu" = ia64; then 66611ae1b5e8Smrg symcode='[[ABCDGIRSTW]]' 66621ae1b5e8Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 66631ae1b5e8Smrg 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'" 66641ae1b5e8Smrg fi 66651ae1b5e8Smrg ;; 66661ae1b5e8Smrgirix* | nonstopux*) 66671ae1b5e8Smrg symcode='[[BCDEGRST]]' 66681ae1b5e8Smrg ;; 66691ae1b5e8Smrgosf*) 66701ae1b5e8Smrg symcode='[[BCDEGQRST]]' 66711ae1b5e8Smrg ;; 66721ae1b5e8Smrgsolaris*) 66731ae1b5e8Smrg symcode='[[BDRT]]' 66741ae1b5e8Smrg ;; 66751ae1b5e8Smrgsco3.2v5*) 66761ae1b5e8Smrg symcode='[[DT]]' 66771ae1b5e8Smrg ;; 66781ae1b5e8Smrgsysv4.2uw2*) 66791ae1b5e8Smrg symcode='[[DT]]' 66801ae1b5e8Smrg ;; 66811ae1b5e8Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 66821ae1b5e8Smrg symcode='[[ABDT]]' 66831ae1b5e8Smrg ;; 66841ae1b5e8Smrgsysv4) 66851ae1b5e8Smrg symcode='[[DFNSTU]]' 66861ae1b5e8Smrg ;; 66871ae1b5e8Smrgesac 668876888252Smrg 66891ae1b5e8Smrg# Handle CRLF in mingw tool chain 66901ae1b5e8Smrgopt_cr= 66911ae1b5e8Smrgcase $build_os in 66921ae1b5e8Smrgmingw*) 66931ae1b5e8Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 66941ae1b5e8Smrg ;; 66951ae1b5e8Smrgesac 669676888252Smrg 66971ae1b5e8Smrg# If we're using GNU nm, then use its standard symbol codes. 66981ae1b5e8Smrgcase `$NM -V 2>&1` in 66991ae1b5e8Smrg*GNU* | *'with BFD'*) 67001ae1b5e8Smrg symcode='[[ABCDGIRSTW]]' ;; 67011ae1b5e8Smrgesac 670276888252Smrg 67031ae1b5e8Smrg# Try without a prefix undercore, then with it. 67041ae1b5e8Smrgfor ac_symprfx in "" "_"; do 670576888252Smrg 67061ae1b5e8Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 67071ae1b5e8Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 670876888252Smrg 67091ae1b5e8Smrg # Write the raw and C identifiers. 67101ae1b5e8Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 671176888252Smrg 67121ae1b5e8Smrg # Check to see that the pipe works correctly. 67131ae1b5e8Smrg pipe_works=no 671476888252Smrg 67151ae1b5e8Smrg rm -f conftest* 67161ae1b5e8Smrg cat > conftest.$ac_ext <<EOF 67171ae1b5e8Smrg#ifdef __cplusplus 67181ae1b5e8Smrgextern "C" { 67191ae1b5e8Smrg#endif 67201ae1b5e8Smrgchar nm_test_var; 67211ae1b5e8Smrgvoid nm_test_func(){} 67221ae1b5e8Smrg#ifdef __cplusplus 67231ae1b5e8Smrg} 67241ae1b5e8Smrg#endif 67251ae1b5e8Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 67261ae1b5e8SmrgEOF 672776888252Smrg 67281ae1b5e8Smrg if AC_TRY_EVAL(ac_compile); then 67291ae1b5e8Smrg # Now try to grab the symbols. 67301ae1b5e8Smrg nlist=conftest.nm 67311ae1b5e8Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 67321ae1b5e8Smrg # Try sorting and uniquifying the output. 67331ae1b5e8Smrg if sort "$nlist" | uniq > "$nlist"T; then 67341ae1b5e8Smrg mv -f "$nlist"T "$nlist" 673576888252Smrg else 67361ae1b5e8Smrg rm -f "$nlist"T 673776888252Smrg fi 673876888252Smrg 67391ae1b5e8Smrg # Make sure that we snagged all the symbols we need. 67401ae1b5e8Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 67411ae1b5e8Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 67421ae1b5e8Smrg cat <<EOF > conftest.$ac_ext 67431ae1b5e8Smrg#ifdef __cplusplus 67441ae1b5e8Smrgextern "C" { 67451ae1b5e8Smrg#endif 674676888252Smrg 67471ae1b5e8SmrgEOF 67481ae1b5e8Smrg # Now generate the symbol file. 67491ae1b5e8Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 675076888252Smrg 67511ae1b5e8Smrg cat <<EOF >> conftest.$ac_ext 67521ae1b5e8Smrg#if defined (__STDC__) && __STDC__ 67531ae1b5e8Smrg# define lt_ptr_t void * 67541ae1b5e8Smrg#else 67551ae1b5e8Smrg# define lt_ptr_t char * 67561ae1b5e8Smrg# define const 67571ae1b5e8Smrg#endif 675876888252Smrg 67591ae1b5e8Smrg/* The mapping between symbol names and symbols. */ 67601ae1b5e8Smrgconst struct { 67611ae1b5e8Smrg const char *name; 67621ae1b5e8Smrg lt_ptr_t address; 67631ae1b5e8Smrg} 67641ae1b5e8Smrglt_preloaded_symbols[[]] = 67651ae1b5e8Smrg{ 67661ae1b5e8SmrgEOF 67671ae1b5e8Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 67681ae1b5e8Smrg cat <<\EOF >> conftest.$ac_ext 67691ae1b5e8Smrg {0, (lt_ptr_t) 0} 67701ae1b5e8Smrg}; 677176888252Smrg 67721ae1b5e8Smrg#ifdef __cplusplus 67731ae1b5e8Smrg} 67741ae1b5e8Smrg#endif 67751ae1b5e8SmrgEOF 67761ae1b5e8Smrg # Now try linking the two files. 67771ae1b5e8Smrg mv conftest.$ac_objext conftstm.$ac_objext 67781ae1b5e8Smrg lt_save_LIBS="$LIBS" 67791ae1b5e8Smrg lt_save_CFLAGS="$CFLAGS" 67801ae1b5e8Smrg LIBS="conftstm.$ac_objext" 67811ae1b5e8Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 67821ae1b5e8Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 67831ae1b5e8Smrg pipe_works=yes 67841ae1b5e8Smrg fi 67851ae1b5e8Smrg LIBS="$lt_save_LIBS" 67861ae1b5e8Smrg CFLAGS="$lt_save_CFLAGS" 67871ae1b5e8Smrg else 67881ae1b5e8Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 67891ae1b5e8Smrg fi 67901ae1b5e8Smrg else 67911ae1b5e8Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 67921ae1b5e8Smrg fi 67931ae1b5e8Smrg else 67941ae1b5e8Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 67951ae1b5e8Smrg fi 67961ae1b5e8Smrg else 67971ae1b5e8Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 67981ae1b5e8Smrg cat conftest.$ac_ext >&5 67991ae1b5e8Smrg fi 68001ae1b5e8Smrg rm -f conftest* conftst* 680176888252Smrg 68021ae1b5e8Smrg # Do not use the global_symbol_pipe unless it works. 68031ae1b5e8Smrg if test "$pipe_works" = yes; then 68041ae1b5e8Smrg break 68051ae1b5e8Smrg else 68061ae1b5e8Smrg lt_cv_sys_global_symbol_pipe= 68071ae1b5e8Smrg fi 68081ae1b5e8Smrgdone 68091ae1b5e8Smrg]) 68101ae1b5e8Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 68111ae1b5e8Smrg lt_cv_sys_global_symbol_to_cdecl= 68121ae1b5e8Smrgfi 68131ae1b5e8Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 68141ae1b5e8Smrg AC_MSG_RESULT(failed) 68151ae1b5e8Smrgelse 68161ae1b5e8Smrg AC_MSG_RESULT(ok) 68171ae1b5e8Smrgfi 68181ae1b5e8Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 681976888252Smrg 682076888252Smrg 68211ae1b5e8Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 68221ae1b5e8Smrg# --------------------------------------- 68231ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 68241ae1b5e8Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 68251ae1b5e8Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 68261ae1b5e8Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 682776888252Smrg 68281ae1b5e8SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 68291ae1b5e8Smrg ifelse([$1],[CXX],[ 68301ae1b5e8Smrg # C++ specific cases for pic, static, wl, etc. 68311ae1b5e8Smrg if test "$GXX" = yes; then 68321ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 68331ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 683476888252Smrg 68351ae1b5e8Smrg case $host_os in 68361ae1b5e8Smrg aix*) 68371ae1b5e8Smrg # All AIX code is PIC. 68381ae1b5e8Smrg if test "$host_cpu" = ia64; then 68391ae1b5e8Smrg # AIX 5 now supports IA64 processor 68401ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 684176888252Smrg fi 68421ae1b5e8Smrg ;; 68431ae1b5e8Smrg amigaos*) 68441ae1b5e8Smrg # FIXME: we need at least 68020 code to build shared libraries, but 68451ae1b5e8Smrg # adding the `-m68020' flag to GCC prevents building anything better, 68461ae1b5e8Smrg # like `-m68040'. 68471ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 68481ae1b5e8Smrg ;; 68491ae1b5e8Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 68501ae1b5e8Smrg # PIC is the default for these OSes. 68511ae1b5e8Smrg ;; 68521ae1b5e8Smrg mingw* | os2* | pw32*) 68531ae1b5e8Smrg # This hack is so that the source file can tell whether it is being 68541ae1b5e8Smrg # built for inclusion in a dll (and should export symbols for example). 68551ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 68561ae1b5e8Smrg ;; 68571ae1b5e8Smrg darwin* | rhapsody*) 68581ae1b5e8Smrg # PIC is the default on this platform 68591ae1b5e8Smrg # Common symbols not allowed in MH_DYLIB files 68601ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 68611ae1b5e8Smrg ;; 68621ae1b5e8Smrg *djgpp*) 68631ae1b5e8Smrg # DJGPP does not support shared libraries at all 68641ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 68651ae1b5e8Smrg ;; 68661ae1b5e8Smrg interix3*) 68671ae1b5e8Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 68681ae1b5e8Smrg # Instead, we relocate shared libraries at runtime. 68691ae1b5e8Smrg ;; 68701ae1b5e8Smrg sysv4*MP*) 68711ae1b5e8Smrg if test -d /usr/nec; then 68721ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 68731ae1b5e8Smrg fi 68741ae1b5e8Smrg ;; 68751ae1b5e8Smrg hpux*) 68761ae1b5e8Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 68771ae1b5e8Smrg # not for PA HP-UX. 68781ae1b5e8Smrg case $host_cpu in 68791ae1b5e8Smrg hppa*64*|ia64*) 68801ae1b5e8Smrg ;; 68811ae1b5e8Smrg *) 68821ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 68831ae1b5e8Smrg ;; 68841ae1b5e8Smrg esac 68851ae1b5e8Smrg ;; 68861ae1b5e8Smrg *) 68871ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 68881ae1b5e8Smrg ;; 68891ae1b5e8Smrg esac 68901ae1b5e8Smrg else 68911ae1b5e8Smrg case $host_os in 68921ae1b5e8Smrg aix4* | aix5*) 68931ae1b5e8Smrg # All AIX code is PIC. 68941ae1b5e8Smrg if test "$host_cpu" = ia64; then 68951ae1b5e8Smrg # AIX 5 now supports IA64 processor 68961ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 68971ae1b5e8Smrg else 68981ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 68991ae1b5e8Smrg fi 69001ae1b5e8Smrg ;; 69011ae1b5e8Smrg chorus*) 69021ae1b5e8Smrg case $cc_basename in 69031ae1b5e8Smrg cxch68*) 69041ae1b5e8Smrg # Green Hills C++ Compiler 69051ae1b5e8Smrg # _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" 69061ae1b5e8Smrg ;; 69071ae1b5e8Smrg esac 69081ae1b5e8Smrg ;; 69091ae1b5e8Smrg darwin*) 69101ae1b5e8Smrg # PIC is the default on this platform 69111ae1b5e8Smrg # Common symbols not allowed in MH_DYLIB files 69121ae1b5e8Smrg case $cc_basename in 69131ae1b5e8Smrg xlc*) 69141ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 69151ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 69161ae1b5e8Smrg ;; 69171ae1b5e8Smrg esac 69181ae1b5e8Smrg ;; 69191ae1b5e8Smrg dgux*) 69201ae1b5e8Smrg case $cc_basename in 69211ae1b5e8Smrg ec++*) 69221ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 69231ae1b5e8Smrg ;; 69241ae1b5e8Smrg ghcx*) 69251ae1b5e8Smrg # Green Hills C++ Compiler 69261ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 69271ae1b5e8Smrg ;; 69281ae1b5e8Smrg *) 69291ae1b5e8Smrg ;; 69301ae1b5e8Smrg esac 69311ae1b5e8Smrg ;; 69321ae1b5e8Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 69331ae1b5e8Smrg # FreeBSD uses GNU C++ 69341ae1b5e8Smrg ;; 69351ae1b5e8Smrg hpux9* | hpux10* | hpux11*) 69361ae1b5e8Smrg case $cc_basename in 69371ae1b5e8Smrg CC*) 69381ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 69391ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 69401ae1b5e8Smrg if test "$host_cpu" != ia64; then 69411ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 69421ae1b5e8Smrg fi 69431ae1b5e8Smrg ;; 69441ae1b5e8Smrg aCC*) 69451ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 69461ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 69471ae1b5e8Smrg case $host_cpu in 69481ae1b5e8Smrg hppa*64*|ia64*) 69491ae1b5e8Smrg # +Z the default 69501ae1b5e8Smrg ;; 69511ae1b5e8Smrg *) 69521ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 69531ae1b5e8Smrg ;; 69541ae1b5e8Smrg esac 69551ae1b5e8Smrg ;; 69561ae1b5e8Smrg *) 69571ae1b5e8Smrg ;; 69581ae1b5e8Smrg esac 69591ae1b5e8Smrg ;; 69601ae1b5e8Smrg interix*) 69611ae1b5e8Smrg # This is c89, which is MS Visual C++ (no shared libs) 69621ae1b5e8Smrg # Anyone wants to do a port? 69631ae1b5e8Smrg ;; 69641ae1b5e8Smrg irix5* | irix6* | nonstopux*) 69651ae1b5e8Smrg case $cc_basename in 69661ae1b5e8Smrg CC*) 69671ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 69681ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 69691ae1b5e8Smrg # CC pic flag -KPIC is the default. 69701ae1b5e8Smrg ;; 69711ae1b5e8Smrg *) 69721ae1b5e8Smrg ;; 69731ae1b5e8Smrg esac 69741ae1b5e8Smrg ;; 69751ae1b5e8Smrg linux*) 69761ae1b5e8Smrg case $cc_basename in 69771ae1b5e8Smrg KCC*) 69781ae1b5e8Smrg # KAI C++ Compiler 69791ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 69801ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 69811ae1b5e8Smrg ;; 69821ae1b5e8Smrg icpc* | ecpc*) 69831ae1b5e8Smrg # Intel C++ 69841ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 69851ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 69861ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 69871ae1b5e8Smrg ;; 69881ae1b5e8Smrg pgCC*) 69891ae1b5e8Smrg # Portland Group C++ compiler. 69901ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 69911ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 69921ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 69931ae1b5e8Smrg ;; 69941ae1b5e8Smrg cxx*) 69951ae1b5e8Smrg # Compaq C++ 69961ae1b5e8Smrg # Make sure the PIC flag is empty. It appears that all Alpha 69971ae1b5e8Smrg # Linux and Compaq Tru64 Unix objects are PIC. 69981ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 69991ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 70001ae1b5e8Smrg ;; 70011ae1b5e8Smrg *) 70021ae1b5e8Smrg ;; 70031ae1b5e8Smrg esac 70041ae1b5e8Smrg ;; 70051ae1b5e8Smrg lynxos*) 70061ae1b5e8Smrg ;; 70071ae1b5e8Smrg m88k*) 70081ae1b5e8Smrg ;; 70091ae1b5e8Smrg mvs*) 70101ae1b5e8Smrg case $cc_basename in 70111ae1b5e8Smrg cxx*) 70121ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 70131ae1b5e8Smrg ;; 70141ae1b5e8Smrg *) 70151ae1b5e8Smrg ;; 70161ae1b5e8Smrg esac 70171ae1b5e8Smrg ;; 70181ae1b5e8Smrg netbsd*) 70191ae1b5e8Smrg ;; 70201ae1b5e8Smrg osf3* | osf4* | osf5*) 70211ae1b5e8Smrg case $cc_basename in 70221ae1b5e8Smrg KCC*) 70231ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 70241ae1b5e8Smrg ;; 70251ae1b5e8Smrg RCC*) 70261ae1b5e8Smrg # Rational C++ 2.4.1 70271ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 70281ae1b5e8Smrg ;; 70291ae1b5e8Smrg cxx*) 70301ae1b5e8Smrg # Digital/Compaq C++ 70311ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 70321ae1b5e8Smrg # Make sure the PIC flag is empty. It appears that all Alpha 70331ae1b5e8Smrg # Linux and Compaq Tru64 Unix objects are PIC. 70341ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 70351ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 70361ae1b5e8Smrg ;; 70371ae1b5e8Smrg *) 70381ae1b5e8Smrg ;; 70391ae1b5e8Smrg esac 70401ae1b5e8Smrg ;; 70411ae1b5e8Smrg psos*) 70421ae1b5e8Smrg ;; 70431ae1b5e8Smrg solaris*) 70441ae1b5e8Smrg case $cc_basename in 70451ae1b5e8Smrg CC*) 70461ae1b5e8Smrg # Sun C++ 4.2, 5.x and Centerline C++ 70471ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 70481ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 70491ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 70501ae1b5e8Smrg ;; 70511ae1b5e8Smrg gcx*) 70521ae1b5e8Smrg # Green Hills C++ Compiler 70531ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 70541ae1b5e8Smrg ;; 70551ae1b5e8Smrg *) 70561ae1b5e8Smrg ;; 70571ae1b5e8Smrg esac 70581ae1b5e8Smrg ;; 70591ae1b5e8Smrg sunos4*) 70601ae1b5e8Smrg case $cc_basename in 70611ae1b5e8Smrg CC*) 70621ae1b5e8Smrg # Sun C++ 4.x 70631ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 70641ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 70651ae1b5e8Smrg ;; 70661ae1b5e8Smrg lcc*) 70671ae1b5e8Smrg # Lucid 70681ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 70691ae1b5e8Smrg ;; 70701ae1b5e8Smrg *) 70711ae1b5e8Smrg ;; 70721ae1b5e8Smrg esac 70731ae1b5e8Smrg ;; 70741ae1b5e8Smrg tandem*) 70751ae1b5e8Smrg case $cc_basename in 70761ae1b5e8Smrg NCC*) 70771ae1b5e8Smrg # NonStop-UX NCC 3.20 70781ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 70791ae1b5e8Smrg ;; 70801ae1b5e8Smrg *) 70811ae1b5e8Smrg ;; 70821ae1b5e8Smrg esac 70831ae1b5e8Smrg ;; 70841ae1b5e8Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 70851ae1b5e8Smrg case $cc_basename in 70861ae1b5e8Smrg CC*) 70871ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 70881ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 70891ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 70901ae1b5e8Smrg ;; 70911ae1b5e8Smrg esac 70921ae1b5e8Smrg ;; 70931ae1b5e8Smrg vxworks*) 70941ae1b5e8Smrg ;; 70951ae1b5e8Smrg *) 70961ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 70971ae1b5e8Smrg ;; 70981ae1b5e8Smrg esac 709976888252Smrg fi 71001ae1b5e8Smrg], 71011ae1b5e8Smrg[ 71021ae1b5e8Smrg if test "$GCC" = yes; then 71031ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 71041ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 710576888252Smrg 71061ae1b5e8Smrg case $host_os in 71071ae1b5e8Smrg aix*) 71081ae1b5e8Smrg # All AIX code is PIC. 71091ae1b5e8Smrg if test "$host_cpu" = ia64; then 71101ae1b5e8Smrg # AIX 5 now supports IA64 processor 71111ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 71121ae1b5e8Smrg fi 71131ae1b5e8Smrg ;; 711476888252Smrg 71151ae1b5e8Smrg amigaos*) 71161ae1b5e8Smrg # FIXME: we need at least 68020 code to build shared libraries, but 71171ae1b5e8Smrg # adding the `-m68020' flag to GCC prevents building anything better, 71181ae1b5e8Smrg # like `-m68040'. 71191ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 71201ae1b5e8Smrg ;; 712176888252Smrg 71221ae1b5e8Smrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 71231ae1b5e8Smrg # PIC is the default for these OSes. 71241ae1b5e8Smrg ;; 712576888252Smrg 71261ae1b5e8Smrg mingw* | pw32* | os2*) 71271ae1b5e8Smrg # This hack is so that the source file can tell whether it is being 71281ae1b5e8Smrg # built for inclusion in a dll (and should export symbols for example). 71291ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 71301ae1b5e8Smrg ;; 713176888252Smrg 71321ae1b5e8Smrg darwin* | rhapsody*) 71331ae1b5e8Smrg # PIC is the default on this platform 71341ae1b5e8Smrg # Common symbols not allowed in MH_DYLIB files 71351ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 71361ae1b5e8Smrg ;; 713776888252Smrg 71381ae1b5e8Smrg interix3*) 71391ae1b5e8Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 71401ae1b5e8Smrg # Instead, we relocate shared libraries at runtime. 71411ae1b5e8Smrg ;; 714276888252Smrg 71431ae1b5e8Smrg msdosdjgpp*) 71441ae1b5e8Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 71451ae1b5e8Smrg # on systems that don't support them. 71461ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 71471ae1b5e8Smrg enable_shared=no 71481ae1b5e8Smrg ;; 714976888252Smrg 71501ae1b5e8Smrg sysv4*MP*) 71511ae1b5e8Smrg if test -d /usr/nec; then 71521ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 71531ae1b5e8Smrg fi 71541ae1b5e8Smrg ;; 715576888252Smrg 71561ae1b5e8Smrg hpux*) 71571ae1b5e8Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 71581ae1b5e8Smrg # not for PA HP-UX. 71591ae1b5e8Smrg case $host_cpu in 71601ae1b5e8Smrg hppa*64*|ia64*) 71611ae1b5e8Smrg # +Z the default 71621ae1b5e8Smrg ;; 71631ae1b5e8Smrg *) 71641ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 71651ae1b5e8Smrg ;; 71661ae1b5e8Smrg esac 71671ae1b5e8Smrg ;; 716876888252Smrg 71691ae1b5e8Smrg *) 71701ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 71711ae1b5e8Smrg ;; 71721ae1b5e8Smrg esac 71731ae1b5e8Smrg else 71741ae1b5e8Smrg # PORTME Check for flag to pass linker flags through the system compiler. 71751ae1b5e8Smrg case $host_os in 71761ae1b5e8Smrg aix*) 71771ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 71781ae1b5e8Smrg if test "$host_cpu" = ia64; then 71791ae1b5e8Smrg # AIX 5 now supports IA64 processor 71801ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 71811ae1b5e8Smrg else 71821ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 71831ae1b5e8Smrg fi 71841ae1b5e8Smrg ;; 71851ae1b5e8Smrg darwin*) 71861ae1b5e8Smrg # PIC is the default on this platform 71871ae1b5e8Smrg # Common symbols not allowed in MH_DYLIB files 71881ae1b5e8Smrg case $cc_basename in 71891ae1b5e8Smrg xlc*) 71901ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 71911ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 71921ae1b5e8Smrg ;; 71931ae1b5e8Smrg esac 71941ae1b5e8Smrg ;; 719576888252Smrg 71961ae1b5e8Smrg mingw* | pw32* | os2*) 71971ae1b5e8Smrg # This hack is so that the source file can tell whether it is being 71981ae1b5e8Smrg # built for inclusion in a dll (and should export symbols for example). 71991ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 72001ae1b5e8Smrg ;; 720176888252Smrg 72021ae1b5e8Smrg hpux9* | hpux10* | hpux11*) 72031ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72041ae1b5e8Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 72051ae1b5e8Smrg # not for PA HP-UX. 72061ae1b5e8Smrg case $host_cpu in 72071ae1b5e8Smrg hppa*64*|ia64*) 72081ae1b5e8Smrg # +Z the default 72091ae1b5e8Smrg ;; 72101ae1b5e8Smrg *) 72111ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 72121ae1b5e8Smrg ;; 72131ae1b5e8Smrg esac 72141ae1b5e8Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 72151ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 72161ae1b5e8Smrg ;; 721776888252Smrg 72181ae1b5e8Smrg irix5* | irix6* | nonstopux*) 72191ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72201ae1b5e8Smrg # PIC (with -KPIC) is the default. 72211ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 72221ae1b5e8Smrg ;; 722376888252Smrg 72241ae1b5e8Smrg newsos6) 72251ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 72261ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72271ae1b5e8Smrg ;; 722876888252Smrg 72291ae1b5e8Smrg linux*) 72301ae1b5e8Smrg case $cc_basename in 72311ae1b5e8Smrg icc* | ecc*) 72321ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72331ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 72341ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 72351ae1b5e8Smrg ;; 72361ae1b5e8Smrg pgcc* | pgf77* | pgf90* | pgf95*) 72371ae1b5e8Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 72381ae1b5e8Smrg # which looks to be a dead project) 72391ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72401ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 72411ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72421ae1b5e8Smrg ;; 72431ae1b5e8Smrg ccc*) 72441ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72451ae1b5e8Smrg # All Alpha code is PIC. 72461ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 72471ae1b5e8Smrg ;; 72481ae1b5e8Smrg esac 72491ae1b5e8Smrg ;; 725076888252Smrg 72511ae1b5e8Smrg osf3* | osf4* | osf5*) 72521ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72531ae1b5e8Smrg # All OSF/1 code is PIC. 72541ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 72551ae1b5e8Smrg ;; 725676888252Smrg 72571ae1b5e8Smrg solaris*) 72581ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 72591ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72601ae1b5e8Smrg case $cc_basename in 72611ae1b5e8Smrg f77* | f90* | f95*) 72621ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 72631ae1b5e8Smrg *) 72641ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 72651ae1b5e8Smrg esac 72661ae1b5e8Smrg ;; 726776888252Smrg 72681ae1b5e8Smrg sunos4*) 72691ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 72701ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 72711ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72721ae1b5e8Smrg ;; 727376888252Smrg 72741ae1b5e8Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 72751ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72761ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 72771ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72781ae1b5e8Smrg ;; 727976888252Smrg 72801ae1b5e8Smrg sysv4*MP*) 72811ae1b5e8Smrg if test -d /usr/nec ;then 72821ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 72831ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72841ae1b5e8Smrg fi 72851ae1b5e8Smrg ;; 728676888252Smrg 72871ae1b5e8Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 72881ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72891ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 72901ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72911ae1b5e8Smrg ;; 729276888252Smrg 72931ae1b5e8Smrg unicos*) 72941ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72951ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 72961ae1b5e8Smrg ;; 729776888252Smrg 72981ae1b5e8Smrg uts4*) 72991ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 73001ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 73011ae1b5e8Smrg ;; 730276888252Smrg 73031ae1b5e8Smrg *) 73041ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 73051ae1b5e8Smrg ;; 730676888252Smrg esac 73071ae1b5e8Smrg fi 73081ae1b5e8Smrg]) 73091ae1b5e8SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 73101ae1b5e8Smrg 73111ae1b5e8Smrg# 73121ae1b5e8Smrg# Check to make sure the PIC flag actually works. 73131ae1b5e8Smrg# 73141ae1b5e8Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 73151ae1b5e8Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 73161ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 73171ae1b5e8Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 73181ae1b5e8Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 73191ae1b5e8Smrg "" | " "*) ;; 73201ae1b5e8Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 73211ae1b5e8Smrg esac], 73221ae1b5e8Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 73231ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 732476888252Smrgfi 73251ae1b5e8Smrgcase $host_os in 73261ae1b5e8Smrg # For platforms which do not support PIC, -DPIC is meaningless: 73271ae1b5e8Smrg *djgpp*) 73281ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 73291ae1b5e8Smrg ;; 73301ae1b5e8Smrg *) 73311ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 73321ae1b5e8Smrg ;; 73331ae1b5e8Smrgesac 733476888252Smrg 73351ae1b5e8Smrg# 73361ae1b5e8Smrg# Check to make sure the static flag actually works. 73371ae1b5e8Smrg# 73381ae1b5e8Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 73391ae1b5e8SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 73401ae1b5e8Smrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 73411ae1b5e8Smrg $lt_tmp_static_flag, 73421ae1b5e8Smrg [], 73431ae1b5e8Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 73441ae1b5e8Smrg]) 734576888252Smrg 734676888252Smrg 73471ae1b5e8Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 73481ae1b5e8Smrg# ------------------------------------ 73491ae1b5e8Smrg# See if the linker supports building shared libraries. 73501ae1b5e8SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 73511ae1b5e8Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 73521ae1b5e8Smrgifelse([$1],[CXX],[ 73531ae1b5e8Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 73541ae1b5e8Smrg case $host_os in 73551ae1b5e8Smrg aix4* | aix5*) 73561ae1b5e8Smrg # If we're using GNU nm, then we don't want the "-C" option. 73571ae1b5e8Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 73581ae1b5e8Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 73591ae1b5e8Smrg _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' 73601ae1b5e8Smrg else 73611ae1b5e8Smrg _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' 73621ae1b5e8Smrg fi 73631ae1b5e8Smrg ;; 73641ae1b5e8Smrg pw32*) 73651ae1b5e8Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 73661ae1b5e8Smrg ;; 73671ae1b5e8Smrg cygwin* | mingw*) 73681ae1b5e8Smrg _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' 73691ae1b5e8Smrg ;; 73701ae1b5e8Smrg *) 73711ae1b5e8Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 73721ae1b5e8Smrg ;; 73731ae1b5e8Smrg esac 73741ae1b5e8Smrg],[ 73751ae1b5e8Smrg runpath_var= 73761ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 73771ae1b5e8Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 73781ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 73791ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 73801ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 73811ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 73821ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 73831ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 73841ae1b5e8Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 73851ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 73861ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 73871ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 73881ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 73891ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 73901ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 73911ae1b5e8Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 73921ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 73931ae1b5e8Smrg _LT_AC_TAGVAR(module_cmds, $1)= 73941ae1b5e8Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 73951ae1b5e8Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 73961ae1b5e8Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 73971ae1b5e8Smrg # include_expsyms should be a list of space-separated symbols to be *always* 73981ae1b5e8Smrg # included in the symbol list 73991ae1b5e8Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 74001ae1b5e8Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 74011ae1b5e8Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 74021ae1b5e8Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 74031ae1b5e8Smrg # as well as any symbol that contains `d'. 74041ae1b5e8Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 74051ae1b5e8Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 74061ae1b5e8Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 74071ae1b5e8Smrg # the symbol is explicitly referenced. Since portable code cannot 74081ae1b5e8Smrg # rely on this symbol name, it's probably fine to never include it in 74091ae1b5e8Smrg # preloaded symbol tables. 74101ae1b5e8Smrg extract_expsyms_cmds= 74111ae1b5e8Smrg # Just being paranoid about ensuring that cc_basename is set. 74121ae1b5e8Smrg _LT_CC_BASENAME([$compiler]) 74131ae1b5e8Smrg case $host_os in 74141ae1b5e8Smrg cygwin* | mingw* | pw32*) 74151ae1b5e8Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 74161ae1b5e8Smrg # When not using gcc, we currently assume that we are using 74171ae1b5e8Smrg # Microsoft Visual C++. 74181ae1b5e8Smrg if test "$GCC" != yes; then 74191ae1b5e8Smrg with_gnu_ld=no 74201ae1b5e8Smrg fi 74211ae1b5e8Smrg ;; 74221ae1b5e8Smrg interix*) 74231ae1b5e8Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 74241ae1b5e8Smrg with_gnu_ld=yes 74251ae1b5e8Smrg ;; 74261ae1b5e8Smrg openbsd*) 74271ae1b5e8Smrg with_gnu_ld=no 74281ae1b5e8Smrg ;; 74291ae1b5e8Smrg esac 743076888252Smrg 74311ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 74321ae1b5e8Smrg if test "$with_gnu_ld" = yes; then 74331ae1b5e8Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 74341ae1b5e8Smrg wlarc='${wl}' 743576888252Smrg 74361ae1b5e8Smrg # Set some defaults for GNU ld with shared library support. These 74371ae1b5e8Smrg # are reset later if shared libraries are not supported. Putting them 74381ae1b5e8Smrg # here allows them to be overridden if necessary. 74391ae1b5e8Smrg runpath_var=LD_RUN_PATH 74401ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 74411ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 74421ae1b5e8Smrg # ancient GNU ld didn't support --whole-archive et. al. 74431ae1b5e8Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 74441ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 74451ae1b5e8Smrg else 74461ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 74471ae1b5e8Smrg fi 74481ae1b5e8Smrg supports_anon_versioning=no 74491ae1b5e8Smrg case `$LD -v 2>/dev/null` in 74501ae1b5e8Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 74511ae1b5e8Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 74521ae1b5e8Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 74531ae1b5e8Smrg *\ 2.11.*) ;; # other 2.11 versions 74541ae1b5e8Smrg *) supports_anon_versioning=yes ;; 74551ae1b5e8Smrg esac 745676888252Smrg 74571ae1b5e8Smrg # See if GNU ld supports shared libraries. 74581ae1b5e8Smrg case $host_os in 74591ae1b5e8Smrg aix3* | aix4* | aix5*) 74601ae1b5e8Smrg # On AIX/PPC, the GNU linker is very broken 74611ae1b5e8Smrg if test "$host_cpu" != ia64; then 74621ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 74631ae1b5e8Smrg cat <<EOF 1>&2 746476888252Smrg 74651ae1b5e8Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 74661ae1b5e8Smrg*** to be unable to reliably create shared libraries on AIX. 74671ae1b5e8Smrg*** Therefore, libtool is disabling shared libraries support. If you 74681ae1b5e8Smrg*** really care for shared libraries, you may want to modify your PATH 74691ae1b5e8Smrg*** so that a non-GNU linker is found, and then restart. 747076888252Smrg 74711ae1b5e8SmrgEOF 74721ae1b5e8Smrg fi 74731ae1b5e8Smrg ;; 747476888252Smrg 74751ae1b5e8Smrg amigaos*) 74761ae1b5e8Smrg _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)' 74771ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 74781ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 747976888252Smrg 74801ae1b5e8Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 74811ae1b5e8Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 74821ae1b5e8Smrg # to version 4, is to share data among multiple programs linked 74831ae1b5e8Smrg # with the same dynamic library. Since this doesn't match the 74841ae1b5e8Smrg # behavior of shared libraries on other platforms, we can't use 74851ae1b5e8Smrg # them. 74861ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 74871ae1b5e8Smrg ;; 748876888252Smrg 74891ae1b5e8Smrg beos*) 74901ae1b5e8Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 74911ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 74921ae1b5e8Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 74931ae1b5e8Smrg # support --undefined. This deserves some investigation. FIXME 74941ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 74951ae1b5e8Smrg else 74961ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 74971ae1b5e8Smrg fi 74981ae1b5e8Smrg ;; 74991ae1b5e8Smrg 75001ae1b5e8Smrg cygwin* | mingw* | pw32*) 75011ae1b5e8Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 75021ae1b5e8Smrg # as there is no search path for DLLs. 75031ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 75041ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 75051ae1b5e8Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 75061ae1b5e8Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 75071ae1b5e8Smrg _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' 750876888252Smrg 75091ae1b5e8Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 75101ae1b5e8Smrg _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' 75111ae1b5e8Smrg # If the export-symbols file already is a .def file (1st line 75121ae1b5e8Smrg # is EXPORTS), use it as is; otherwise, prepend... 75131ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 75141ae1b5e8Smrg cp $export_symbols $output_objdir/$soname.def; 75151ae1b5e8Smrg else 75161ae1b5e8Smrg echo EXPORTS > $output_objdir/$soname.def; 75171ae1b5e8Smrg cat $export_symbols >> $output_objdir/$soname.def; 75181ae1b5e8Smrg fi~ 75191ae1b5e8Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 75201ae1b5e8Smrg else 75211ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 75221ae1b5e8Smrg fi 75231ae1b5e8Smrg ;; 752476888252Smrg 75251ae1b5e8Smrg interix3*) 75261ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 75271ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 75281ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75291ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 75301ae1b5e8Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 75311ae1b5e8Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 75321ae1b5e8Smrg # default) and relocated if they conflict, which is a slow very memory 75331ae1b5e8Smrg # consuming and fragmenting process. To avoid this, we pick a random, 75341ae1b5e8Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 75351ae1b5e8Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 75361ae1b5e8Smrg _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' 75371ae1b5e8Smrg _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' 75381ae1b5e8Smrg ;; 753976888252Smrg 75401ae1b5e8Smrg linux*) 75411ae1b5e8Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 75421ae1b5e8Smrg tmp_addflag= 75431ae1b5e8Smrg case $cc_basename,$host_cpu in 75441ae1b5e8Smrg pgcc*) # Portland Group C compiler 75451ae1b5e8Smrg _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' 75461ae1b5e8Smrg tmp_addflag=' $pic_flag' 75471ae1b5e8Smrg ;; 75481ae1b5e8Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 75491ae1b5e8Smrg _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' 75501ae1b5e8Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 75511ae1b5e8Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 75521ae1b5e8Smrg tmp_addflag=' -i_dynamic' ;; 75531ae1b5e8Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 75541ae1b5e8Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 75551ae1b5e8Smrg ifc* | ifort*) # Intel Fortran compiler 75561ae1b5e8Smrg tmp_addflag=' -nofor_main' ;; 75571ae1b5e8Smrg esac 75581ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 755976888252Smrg 75601ae1b5e8Smrg if test $supports_anon_versioning = yes; then 75611ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 75621ae1b5e8Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 75631ae1b5e8Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 75641ae1b5e8Smrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 75651ae1b5e8Smrg fi 75661ae1b5e8Smrg else 75671ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 75681ae1b5e8Smrg fi 75691ae1b5e8Smrg ;; 757076888252Smrg 75711ae1b5e8Smrg netbsd*) 75721ae1b5e8Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 75731ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 75741ae1b5e8Smrg wlarc= 75751ae1b5e8Smrg else 75761ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75771ae1b5e8Smrg _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' 75781ae1b5e8Smrg fi 75791ae1b5e8Smrg ;; 758076888252Smrg 75811ae1b5e8Smrg solaris*) 75821ae1b5e8Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 75831ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 75841ae1b5e8Smrg cat <<EOF 1>&2 758576888252Smrg 75861ae1b5e8Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 75871ae1b5e8Smrg*** create shared libraries on Solaris systems. Therefore, libtool 75881ae1b5e8Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 75891ae1b5e8Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 75901ae1b5e8Smrg*** your PATH or compiler configuration so that the native linker is 75911ae1b5e8Smrg*** used, and then restart. 759276888252Smrg 75931ae1b5e8SmrgEOF 75941ae1b5e8Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 75951ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75961ae1b5e8Smrg _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' 75971ae1b5e8Smrg else 75981ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 75991ae1b5e8Smrg fi 76001ae1b5e8Smrg ;; 760176888252Smrg 76021ae1b5e8Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 76031ae1b5e8Smrg case `$LD -v 2>&1` in 76041ae1b5e8Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 76051ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 76061ae1b5e8Smrg cat <<_LT_EOF 1>&2 760776888252Smrg 76081ae1b5e8Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 76091ae1b5e8Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 76101ae1b5e8Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 76111ae1b5e8Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 76121ae1b5e8Smrg*** your PATH or compiler configuration so that the native linker is 76131ae1b5e8Smrg*** used, and then restart. 761476888252Smrg 76151ae1b5e8Smrg_LT_EOF 76161ae1b5e8Smrg ;; 76171ae1b5e8Smrg *) 76181ae1b5e8Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 76191ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 76201ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 76211ae1b5e8Smrg _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' 76221ae1b5e8Smrg else 76231ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 76241ae1b5e8Smrg fi 76251ae1b5e8Smrg ;; 76261ae1b5e8Smrg esac 76271ae1b5e8Smrg ;; 762876888252Smrg 76291ae1b5e8Smrg sunos4*) 76301ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 76311ae1b5e8Smrg wlarc= 76321ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 76331ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 76341ae1b5e8Smrg ;; 763576888252Smrg 76361ae1b5e8Smrg *) 76371ae1b5e8Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 76381ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 76391ae1b5e8Smrg _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' 76401ae1b5e8Smrg else 76411ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 76421ae1b5e8Smrg fi 76431ae1b5e8Smrg ;; 76441ae1b5e8Smrg esac 764576888252Smrg 76461ae1b5e8Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 76471ae1b5e8Smrg runpath_var= 76481ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 76491ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 76501ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 76511ae1b5e8Smrg fi 76521ae1b5e8Smrg else 76531ae1b5e8Smrg # PORTME fill in a description of your system's linker (not GNU ld) 76541ae1b5e8Smrg case $host_os in 76551ae1b5e8Smrg aix3*) 76561ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 76571ae1b5e8Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 76581ae1b5e8Smrg _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' 76591ae1b5e8Smrg # Note: this linker hardcodes the directories in LIBPATH if there 76601ae1b5e8Smrg # are no directories specified by -L. 76611ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 76621ae1b5e8Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 76631ae1b5e8Smrg # Neither direct hardcoding nor static linking is supported with a 76641ae1b5e8Smrg # broken collect2. 76651ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 76661ae1b5e8Smrg fi 76671ae1b5e8Smrg ;; 766876888252Smrg 76691ae1b5e8Smrg aix4* | aix5*) 76701ae1b5e8Smrg if test "$host_cpu" = ia64; then 76711ae1b5e8Smrg # On IA64, the linker does run time linking by default, so we don't 76721ae1b5e8Smrg # have to do anything special. 76731ae1b5e8Smrg aix_use_runtimelinking=no 76741ae1b5e8Smrg exp_sym_flag='-Bexport' 76751ae1b5e8Smrg no_entry_flag="" 76761ae1b5e8Smrg else 76771ae1b5e8Smrg # If we're using GNU nm, then we don't want the "-C" option. 76781ae1b5e8Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 76791ae1b5e8Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 76801ae1b5e8Smrg _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' 76811ae1b5e8Smrg else 76821ae1b5e8Smrg _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' 76831ae1b5e8Smrg fi 76841ae1b5e8Smrg aix_use_runtimelinking=no 768576888252Smrg 76861ae1b5e8Smrg # Test if we are trying to use run time linking or normal 76871ae1b5e8Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 76881ae1b5e8Smrg # need to do runtime linking. 76891ae1b5e8Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 76901ae1b5e8Smrg for ld_flag in $LDFLAGS; do 76911ae1b5e8Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 76921ae1b5e8Smrg aix_use_runtimelinking=yes 76931ae1b5e8Smrg break 76941ae1b5e8Smrg fi 76951ae1b5e8Smrg done 76961ae1b5e8Smrg ;; 76971ae1b5e8Smrg esac 769876888252Smrg 76991ae1b5e8Smrg exp_sym_flag='-bexport' 77001ae1b5e8Smrg no_entry_flag='-bnoentry' 77011ae1b5e8Smrg fi 770276888252Smrg 77031ae1b5e8Smrg # When large executables or shared objects are built, AIX ld can 77041ae1b5e8Smrg # have problems creating the table of contents. If linking a library 77051ae1b5e8Smrg # or program results in "error TOC overflow" add -mminimal-toc to 77061ae1b5e8Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 77071ae1b5e8Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 770876888252Smrg 77091ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 77101ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 77111ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 77121ae1b5e8Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 771376888252Smrg 77141ae1b5e8Smrg if test "$GCC" = yes; then 77151ae1b5e8Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 77161ae1b5e8Smrg # We only want to do this on AIX 4.2 and lower, the check 77171ae1b5e8Smrg # below for broken collect2 doesn't work under 4.3+ 77181ae1b5e8Smrg collect2name=`${CC} -print-prog-name=collect2` 77191ae1b5e8Smrg if test -f "$collect2name" && \ 77201ae1b5e8Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 77211ae1b5e8Smrg then 77221ae1b5e8Smrg # We have reworked collect2 77231ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 77241ae1b5e8Smrg else 77251ae1b5e8Smrg # We have old collect2 77261ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 77271ae1b5e8Smrg # It fails to find uninstalled libraries when the uninstalled 77281ae1b5e8Smrg # path is not listed in the libpath. Setting hardcode_minus_L 77291ae1b5e8Smrg # to unsupported forces relinking 77301ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 77311ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 77321ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 77331ae1b5e8Smrg fi 77341ae1b5e8Smrg ;; 77351ae1b5e8Smrg esac 77361ae1b5e8Smrg shared_flag='-shared' 77371ae1b5e8Smrg if test "$aix_use_runtimelinking" = yes; then 77381ae1b5e8Smrg shared_flag="$shared_flag "'${wl}-G' 77391ae1b5e8Smrg fi 77401ae1b5e8Smrg else 77411ae1b5e8Smrg # not using gcc 77421ae1b5e8Smrg if test "$host_cpu" = ia64; then 77431ae1b5e8Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 77441ae1b5e8Smrg # chokes on -Wl,-G. The following line is correct: 77451ae1b5e8Smrg shared_flag='-G' 77461ae1b5e8Smrg else 77471ae1b5e8Smrg if test "$aix_use_runtimelinking" = yes; then 77481ae1b5e8Smrg shared_flag='${wl}-G' 77491ae1b5e8Smrg else 77501ae1b5e8Smrg shared_flag='${wl}-bM:SRE' 77511ae1b5e8Smrg fi 77521ae1b5e8Smrg fi 77531ae1b5e8Smrg fi 775476888252Smrg 77551ae1b5e8Smrg # It seems that -bexpall does not export symbols beginning with 77561ae1b5e8Smrg # underscore (_), so it is better to generate a list of symbols to export. 77571ae1b5e8Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 77581ae1b5e8Smrg if test "$aix_use_runtimelinking" = yes; then 77591ae1b5e8Smrg # Warning - without using the other runtime loading flags (-brtl), 77601ae1b5e8Smrg # -berok will link without error, but may produce a broken library. 77611ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 77621ae1b5e8Smrg # Determine the default libpath from the value encoded in an empty executable. 77631ae1b5e8Smrg _LT_AC_SYS_LIBPATH_AIX 77641ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 77651ae1b5e8Smrg _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" 77661ae1b5e8Smrg else 77671ae1b5e8Smrg if test "$host_cpu" = ia64; then 77681ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 77691ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 77701ae1b5e8Smrg _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" 77711ae1b5e8Smrg else 77721ae1b5e8Smrg # Determine the default libpath from the value encoded in an empty executable. 77731ae1b5e8Smrg _LT_AC_SYS_LIBPATH_AIX 77741ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 77751ae1b5e8Smrg # Warning - without using the other run time loading flags, 77761ae1b5e8Smrg # -berok will link without error, but may produce a broken library. 77771ae1b5e8Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 77781ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 77791ae1b5e8Smrg # Exported symbols can be pulled into shared objects from archives 77801ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 77811ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 77821ae1b5e8Smrg # This is similar to how AIX traditionally builds its shared libraries. 77831ae1b5e8Smrg _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' 77841ae1b5e8Smrg fi 77851ae1b5e8Smrg fi 77861ae1b5e8Smrg ;; 778776888252Smrg 77881ae1b5e8Smrg amigaos*) 77891ae1b5e8Smrg _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)' 77901ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 77911ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 77921ae1b5e8Smrg # see comment about different semantics on the GNU ld section 77931ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 77941ae1b5e8Smrg ;; 779576888252Smrg 77961ae1b5e8Smrg bsdi[[45]]*) 77971ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 77981ae1b5e8Smrg ;; 779976888252Smrg 78001ae1b5e8Smrg cygwin* | mingw* | pw32*) 78011ae1b5e8Smrg # When not using gcc, we currently assume that we are using 78021ae1b5e8Smrg # Microsoft Visual C++. 78031ae1b5e8Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 78041ae1b5e8Smrg # no search path for DLLs. 78051ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 78061ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 78071ae1b5e8Smrg # Tell ltmain to make .lib files, not .a files. 78081ae1b5e8Smrg libext=lib 78091ae1b5e8Smrg # Tell ltmain to make .dll files, not .so files. 78101ae1b5e8Smrg shrext_cmds=".dll" 78111ae1b5e8Smrg # FIXME: Setting linknames here is a bad hack. 78121ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 78131ae1b5e8Smrg # The linker will automatically build a .lib file if we build a DLL. 78141ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 78151ae1b5e8Smrg # FIXME: Should let the user specify the lib program. 78161ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 78171ae1b5e8Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 78181ae1b5e8Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 78191ae1b5e8Smrg ;; 782076888252Smrg 78211ae1b5e8Smrg darwin* | rhapsody*) 78221ae1b5e8Smrg case $host_os in 78231ae1b5e8Smrg rhapsody* | darwin1.[[012]]) 78241ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 78251ae1b5e8Smrg ;; 78261ae1b5e8Smrg *) # Darwin 1.3 on 78271ae1b5e8Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 78281ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 78291ae1b5e8Smrg else 78301ae1b5e8Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 78311ae1b5e8Smrg 10.[[012]]) 78321ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 78331ae1b5e8Smrg ;; 78341ae1b5e8Smrg 10.*) 78351ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 78361ae1b5e8Smrg ;; 78371ae1b5e8Smrg esac 78381ae1b5e8Smrg fi 78391ae1b5e8Smrg ;; 78401ae1b5e8Smrg esac 78411ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 78421ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 78431ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 78441ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 78451ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 78461ae1b5e8Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 78471ae1b5e8Smrg if test "$GCC" = yes ; then 78481ae1b5e8Smrg output_verbose_link_cmd='echo' 78491ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 78501ae1b5e8Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 78511ae1b5e8Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 78521ae1b5e8Smrg _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}' 78531ae1b5e8Smrg _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}' 78541ae1b5e8Smrg else 78551ae1b5e8Smrg case $cc_basename in 78561ae1b5e8Smrg xlc*) 78571ae1b5e8Smrg output_verbose_link_cmd='echo' 78581ae1b5e8Smrg _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' 78591ae1b5e8Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 78601ae1b5e8Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 78611ae1b5e8Smrg _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}' 78621ae1b5e8Smrg _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}' 78631ae1b5e8Smrg ;; 78641ae1b5e8Smrg *) 78651ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 78661ae1b5e8Smrg ;; 78671ae1b5e8Smrg esac 78681ae1b5e8Smrg fi 78691ae1b5e8Smrg ;; 787076888252Smrg 78711ae1b5e8Smrg dgux*) 78721ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 78731ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 78741ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 78751ae1b5e8Smrg ;; 787676888252Smrg 78771ae1b5e8Smrg freebsd1*) 78781ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 78791ae1b5e8Smrg ;; 788076888252Smrg 78811ae1b5e8Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 78821ae1b5e8Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 78831ae1b5e8Smrg # does not break anything, and helps significantly (at the cost of a little 78841ae1b5e8Smrg # extra space). 78851ae1b5e8Smrg freebsd2.2*) 78861ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 78871ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 78881ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 78891ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 78901ae1b5e8Smrg ;; 789176888252Smrg 78921ae1b5e8Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 78931ae1b5e8Smrg freebsd2*) 78941ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 78951ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 78961ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 78971ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 78981ae1b5e8Smrg ;; 789976888252Smrg 79001ae1b5e8Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 79011ae1b5e8Smrg freebsd* | kfreebsd*-gnu | dragonfly*) 79021ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 79031ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 79041ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 79051ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 79061ae1b5e8Smrg ;; 790776888252Smrg 79081ae1b5e8Smrg hpux9*) 79091ae1b5e8Smrg if test "$GCC" = yes; then 79101ae1b5e8Smrg _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' 79111ae1b5e8Smrg else 79121ae1b5e8Smrg _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' 79131ae1b5e8Smrg fi 79141ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 79151ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 79161ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 791776888252Smrg 79181ae1b5e8Smrg # hardcode_minus_L: Not really in the search PATH, 79191ae1b5e8Smrg # but as the default location of the library. 79201ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 79211ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 79221ae1b5e8Smrg ;; 792376888252Smrg 79241ae1b5e8Smrg hpux10*) 79251ae1b5e8Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 79261ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 792776888252Smrg else 79281ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 79291ae1b5e8Smrg fi 79301ae1b5e8Smrg if test "$with_gnu_ld" = no; then 79311ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 79321ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 79331ae1b5e8Smrg 79341ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 79351ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 79361ae1b5e8Smrg 79371ae1b5e8Smrg # hardcode_minus_L: Not really in the search PATH, 79381ae1b5e8Smrg # but as the default location of the library. 79391ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 794076888252Smrg fi 794176888252Smrg ;; 79421ae1b5e8Smrg 79431ae1b5e8Smrg hpux11*) 79441ae1b5e8Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 79451ae1b5e8Smrg case $host_cpu in 79461ae1b5e8Smrg hppa*64*) 79471ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 79481ae1b5e8Smrg ;; 79491ae1b5e8Smrg ia64*) 79501ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 79511ae1b5e8Smrg ;; 79521ae1b5e8Smrg *) 79531ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 79541ae1b5e8Smrg ;; 79551ae1b5e8Smrg esac 79561ae1b5e8Smrg else 79571ae1b5e8Smrg case $host_cpu in 79581ae1b5e8Smrg hppa*64*) 79591ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 79601ae1b5e8Smrg ;; 79611ae1b5e8Smrg ia64*) 79621ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 79631ae1b5e8Smrg ;; 79641ae1b5e8Smrg *) 79651ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 79661ae1b5e8Smrg ;; 79671ae1b5e8Smrg esac 796876888252Smrg fi 79691ae1b5e8Smrg if test "$with_gnu_ld" = no; then 79701ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 79711ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 79721ae1b5e8Smrg 79731ae1b5e8Smrg case $host_cpu in 79741ae1b5e8Smrg hppa*64*|ia64*) 79751ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 79761ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 79771ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 79781ae1b5e8Smrg ;; 79791ae1b5e8Smrg *) 79801ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 79811ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 798276888252Smrg 79831ae1b5e8Smrg # hardcode_minus_L: Not really in the search PATH, 79841ae1b5e8Smrg # but as the default location of the library. 79851ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 79861ae1b5e8Smrg ;; 79871ae1b5e8Smrg esac 79881ae1b5e8Smrg fi 79891ae1b5e8Smrg ;; 799076888252Smrg 79911ae1b5e8Smrg irix5* | irix6* | nonstopux*) 79921ae1b5e8Smrg if test "$GCC" = yes; then 79931ae1b5e8Smrg _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' 79941ae1b5e8Smrg else 79951ae1b5e8Smrg _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' 79961ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 79971ae1b5e8Smrg fi 79981ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 79991ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 80001ae1b5e8Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 80011ae1b5e8Smrg ;; 800276888252Smrg 80031ae1b5e8Smrg netbsd*) 80041ae1b5e8Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 80051ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 80061ae1b5e8Smrg else 80071ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 80081ae1b5e8Smrg fi 80091ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 80101ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 80111ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 80121ae1b5e8Smrg ;; 801376888252Smrg 80141ae1b5e8Smrg newsos6) 80151ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 80161ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 80171ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 80181ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 80191ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 80201ae1b5e8Smrg ;; 802176888252Smrg 80221ae1b5e8Smrg openbsd*) 80231ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 80241ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 80251ae1b5e8Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 80261ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 80271ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 80281ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 80291ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 80301ae1b5e8Smrg else 80311ae1b5e8Smrg case $host_os in 80321ae1b5e8Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 80331ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 80341ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 80351ae1b5e8Smrg ;; 80361ae1b5e8Smrg *) 80371ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 80381ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 80391ae1b5e8Smrg ;; 80401ae1b5e8Smrg esac 80411ae1b5e8Smrg fi 80421ae1b5e8Smrg ;; 804376888252Smrg 80441ae1b5e8Smrg os2*) 80451ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 80461ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 80471ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 80481ae1b5e8Smrg _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' 80491ae1b5e8Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 80501ae1b5e8Smrg ;; 805176888252Smrg 80521ae1b5e8Smrg osf3*) 80531ae1b5e8Smrg if test "$GCC" = yes; then 80541ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 80551ae1b5e8Smrg _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' 80561ae1b5e8Smrg else 80571ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 80581ae1b5e8Smrg _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' 80591ae1b5e8Smrg fi 80601ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 80611ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 80621ae1b5e8Smrg ;; 806376888252Smrg 80641ae1b5e8Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 80651ae1b5e8Smrg if test "$GCC" = yes; then 80661ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 80671ae1b5e8Smrg _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' 80681ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 80691ae1b5e8Smrg else 80701ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 80711ae1b5e8Smrg _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' 80721ae1b5e8Smrg _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~ 80731ae1b5e8Smrg $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' 807476888252Smrg 80751ae1b5e8Smrg # Both c and cxx compiler support -rpath directly 80761ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 80771ae1b5e8Smrg fi 80781ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 80791ae1b5e8Smrg ;; 808076888252Smrg 80811ae1b5e8Smrg solaris*) 80821ae1b5e8Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 80831ae1b5e8Smrg if test "$GCC" = yes; then 80841ae1b5e8Smrg wlarc='${wl}' 80851ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 80861ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 80871ae1b5e8Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 80881ae1b5e8Smrg else 80891ae1b5e8Smrg wlarc='' 80901ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 80911ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 80921ae1b5e8Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 80931ae1b5e8Smrg fi 80941ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 80951ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 80961ae1b5e8Smrg case $host_os in 80971ae1b5e8Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 80981ae1b5e8Smrg *) 80991ae1b5e8Smrg # The compiler driver will combine linker options so we 81001ae1b5e8Smrg # cannot just pass the convience library names through 81011ae1b5e8Smrg # without $wl, iff we do not link with $LD. 81021ae1b5e8Smrg # Luckily, gcc supports the same syntax we need for Sun Studio. 81031ae1b5e8Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 81041ae1b5e8Smrg case $wlarc in 81051ae1b5e8Smrg '') 81061ae1b5e8Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 81071ae1b5e8Smrg *) 81081ae1b5e8Smrg _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' ;; 81091ae1b5e8Smrg esac ;; 81101ae1b5e8Smrg esac 81111ae1b5e8Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 81121ae1b5e8Smrg ;; 811376888252Smrg 81141ae1b5e8Smrg sunos4*) 81151ae1b5e8Smrg if test "x$host_vendor" = xsequent; then 81161ae1b5e8Smrg # Use $CC to link under sequent, because it throws in some extra .o 81171ae1b5e8Smrg # files that make .init and .fini sections work. 81181ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 81191ae1b5e8Smrg else 81201ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 81211ae1b5e8Smrg fi 81221ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 81231ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 81241ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 81251ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81261ae1b5e8Smrg ;; 812776888252Smrg 81281ae1b5e8Smrg sysv4) 81291ae1b5e8Smrg case $host_vendor in 81301ae1b5e8Smrg sni) 81311ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 81321ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 81331ae1b5e8Smrg ;; 81341ae1b5e8Smrg siemens) 81351ae1b5e8Smrg ## LD is ld it makes a PLAMLIB 81361ae1b5e8Smrg ## CC just makes a GrossModule. 81371ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 81381ae1b5e8Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 81391ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 81401ae1b5e8Smrg ;; 81411ae1b5e8Smrg motorola) 81421ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 81431ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 81441ae1b5e8Smrg ;; 81451ae1b5e8Smrg esac 81461ae1b5e8Smrg runpath_var='LD_RUN_PATH' 81471ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81481ae1b5e8Smrg ;; 814976888252Smrg 81501ae1b5e8Smrg sysv4.3*) 81511ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 81521ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81531ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 81541ae1b5e8Smrg ;; 815576888252Smrg 81561ae1b5e8Smrg sysv4*MP*) 81571ae1b5e8Smrg if test -d /usr/nec; then 81581ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 81591ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81601ae1b5e8Smrg runpath_var=LD_RUN_PATH 81611ae1b5e8Smrg hardcode_runpath_var=yes 81621ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 81631ae1b5e8Smrg fi 81641ae1b5e8Smrg ;; 816576888252Smrg 81661ae1b5e8Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 81671ae1b5e8Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 81681ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 81691ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81701ae1b5e8Smrg runpath_var='LD_RUN_PATH' 817176888252Smrg 81721ae1b5e8Smrg if test "$GCC" = yes; then 81731ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 81741ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 81751ae1b5e8Smrg else 81761ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 81771ae1b5e8Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 81781ae1b5e8Smrg fi 81791ae1b5e8Smrg ;; 818076888252Smrg 81811ae1b5e8Smrg sysv5* | sco3.2v5* | sco5v6*) 81821ae1b5e8Smrg # Note: We can NOT use -z defs as we might desire, because we do not 81831ae1b5e8Smrg # link with -lc, and that would cause any symbols used from libc to 81841ae1b5e8Smrg # always be unresolved, which means just about no library would 81851ae1b5e8Smrg # ever link correctly. If we're not using GNU ld we use -z text 81861ae1b5e8Smrg # though, which does catch some bad symbols but isn't as heavy-handed 81871ae1b5e8Smrg # as -z defs. 81881ae1b5e8Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 81891ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 81901ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 81911ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81921ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 81931ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 81941ae1b5e8Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 81951ae1b5e8Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 81961ae1b5e8Smrg runpath_var='LD_RUN_PATH' 819776888252Smrg 81981ae1b5e8Smrg if test "$GCC" = yes; then 81991ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 82001ae1b5e8Smrg _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' 82011ae1b5e8Smrg else 82021ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 82031ae1b5e8Smrg _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' 82041ae1b5e8Smrg fi 82051ae1b5e8Smrg ;; 820676888252Smrg 82071ae1b5e8Smrg uts4*) 82081ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 82091ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 82101ae1b5e8Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 82111ae1b5e8Smrg ;; 821276888252Smrg 82131ae1b5e8Smrg *) 82141ae1b5e8Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 82151ae1b5e8Smrg ;; 82161ae1b5e8Smrg esac 821776888252Smrg fi 821876888252Smrg]) 82191ae1b5e8SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 82201ae1b5e8Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 822176888252Smrg 822276888252Smrg# 82231ae1b5e8Smrg# Do we need to explicitly link libc? 822476888252Smrg# 82251ae1b5e8Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 82261ae1b5e8Smrgx|xyes) 82271ae1b5e8Smrg # Assume -lc should be added 82281ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 822976888252Smrg 82301ae1b5e8Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 82311ae1b5e8Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 82321ae1b5e8Smrg *'~'*) 82331ae1b5e8Smrg # FIXME: we may have to deal with multi-command sequences. 82341ae1b5e8Smrg ;; 82351ae1b5e8Smrg '$CC '*) 82361ae1b5e8Smrg # Test whether the compiler implicitly links with -lc since on some 82371ae1b5e8Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 82381ae1b5e8Smrg # to ld, don't add -lc before -lgcc. 82391ae1b5e8Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 82401ae1b5e8Smrg $rm conftest* 82411ae1b5e8Smrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 824276888252Smrg 82431ae1b5e8Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 82441ae1b5e8Smrg soname=conftest 82451ae1b5e8Smrg lib=conftest 82461ae1b5e8Smrg libobjs=conftest.$ac_objext 82471ae1b5e8Smrg deplibs= 82481ae1b5e8Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 82491ae1b5e8Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 82501ae1b5e8Smrg compiler_flags=-v 82511ae1b5e8Smrg linker_flags=-v 82521ae1b5e8Smrg verstring= 82531ae1b5e8Smrg output_objdir=. 82541ae1b5e8Smrg libname=conftest 82551ae1b5e8Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 82561ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 82571ae1b5e8Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 82581ae1b5e8Smrg then 82591ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 82601ae1b5e8Smrg else 82611ae1b5e8Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 82621ae1b5e8Smrg fi 82631ae1b5e8Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 82641ae1b5e8Smrg else 82651ae1b5e8Smrg cat conftest.err 1>&5 82661ae1b5e8Smrg fi 82671ae1b5e8Smrg $rm conftest* 82681ae1b5e8Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 82691ae1b5e8Smrg ;; 82701ae1b5e8Smrg esac 82711ae1b5e8Smrg fi 82721ae1b5e8Smrg ;; 82731ae1b5e8Smrgesac 82741ae1b5e8Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 827576888252Smrg 827676888252Smrg 82771ae1b5e8Smrg# _LT_AC_FILE_LTDLL_C 82781ae1b5e8Smrg# ------------------- 82791ae1b5e8Smrg# Be careful that the start marker always follows a newline. 82801ae1b5e8SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 82811ae1b5e8Smrg# /* ltdll.c starts here */ 82821ae1b5e8Smrg# #define WIN32_LEAN_AND_MEAN 82831ae1b5e8Smrg# #include <windows.h> 82841ae1b5e8Smrg# #undef WIN32_LEAN_AND_MEAN 82851ae1b5e8Smrg# #include <stdio.h> 828676888252Smrg# 82871ae1b5e8Smrg# #ifndef __CYGWIN__ 82881ae1b5e8Smrg# # ifdef __CYGWIN32__ 82891ae1b5e8Smrg# # define __CYGWIN__ __CYGWIN32__ 82901ae1b5e8Smrg# # endif 82911ae1b5e8Smrg# #endif 82921ae1b5e8Smrg# 82931ae1b5e8Smrg# #ifdef __cplusplus 82941ae1b5e8Smrg# extern "C" { 82951ae1b5e8Smrg# #endif 82961ae1b5e8Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 82971ae1b5e8Smrg# #ifdef __cplusplus 82981ae1b5e8Smrg# } 82991ae1b5e8Smrg# #endif 83001ae1b5e8Smrg# 83011ae1b5e8Smrg# #ifdef __CYGWIN__ 83021ae1b5e8Smrg# #include <cygwin/cygwin_dll.h> 83031ae1b5e8Smrg# DECLARE_CYGWIN_DLL( DllMain ); 83041ae1b5e8Smrg# #endif 83051ae1b5e8Smrg# HINSTANCE __hDllInstance_base; 83061ae1b5e8Smrg# 83071ae1b5e8Smrg# BOOL APIENTRY 83081ae1b5e8Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 83091ae1b5e8Smrg# { 83101ae1b5e8Smrg# __hDllInstance_base = hInst; 83111ae1b5e8Smrg# return TRUE; 83121ae1b5e8Smrg# } 83131ae1b5e8Smrg# /* ltdll.c ends here */ 83141ae1b5e8Smrg])# _LT_AC_FILE_LTDLL_C 831576888252Smrg 831676888252Smrg 83171ae1b5e8Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 83181ae1b5e8Smrg# --------------------------------- 83191ae1b5e8SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 832076888252Smrg 832176888252Smrg 83221ae1b5e8Smrg# old names 83231ae1b5e8SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 83241ae1b5e8SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 83251ae1b5e8SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 83261ae1b5e8SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 83271ae1b5e8SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 83281ae1b5e8SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 83291ae1b5e8SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 833076888252Smrg 83311ae1b5e8Smrg# This is just to silence aclocal about the macro not being used 83321ae1b5e8Smrgifelse([AC_DISABLE_FAST_INSTALL]) 833376888252Smrg 83341ae1b5e8SmrgAC_DEFUN([LT_AC_PROG_GCJ], 83351ae1b5e8Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 83361ae1b5e8Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 83371ae1b5e8Smrg AC_SUBST(GCJFLAGS) 83381ae1b5e8Smrg]) 833976888252Smrg 83401ae1b5e8SmrgAC_DEFUN([LT_AC_PROG_RC], 83411ae1b5e8Smrg[AC_CHECK_TOOL(RC, windres, no) 834276888252Smrg]) 834376888252Smrg 83441ae1b5e8Smrg# NOTE: This macro has been submitted for inclusion into # 83451ae1b5e8Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 83461ae1b5e8Smrg# a released version of Autoconf we should remove this # 83471ae1b5e8Smrg# macro and use it instead. # 83481ae1b5e8Smrg# LT_AC_PROG_SED 83491ae1b5e8Smrg# -------------- 83501ae1b5e8Smrg# Check for a fully-functional sed program, that truncates 83511ae1b5e8Smrg# as few characters as possible. Prefer GNU sed if found. 83521ae1b5e8SmrgAC_DEFUN([LT_AC_PROG_SED], 83531ae1b5e8Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 83541ae1b5e8SmrgAC_CACHE_VAL(lt_cv_path_SED, 83551ae1b5e8Smrg[# Loop through the user's path and test for sed and gsed. 83561ae1b5e8Smrg# Then use that list of sed's as ones to test for truncation. 83571ae1b5e8Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 83581ae1b5e8Smrgfor as_dir in $PATH 83591ae1b5e8Smrgdo 83601ae1b5e8Smrg IFS=$as_save_IFS 83611ae1b5e8Smrg test -z "$as_dir" && as_dir=. 83621ae1b5e8Smrg for lt_ac_prog in sed gsed; do 83631ae1b5e8Smrg for ac_exec_ext in '' $ac_executable_extensions; do 83641ae1b5e8Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 83651ae1b5e8Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 83661ae1b5e8Smrg fi 83671ae1b5e8Smrg done 83681ae1b5e8Smrg done 83691ae1b5e8Smrgdone 83701ae1b5e8Smrglt_ac_max=0 83711ae1b5e8Smrglt_ac_count=0 83721ae1b5e8Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 83731ae1b5e8Smrg# along with /bin/sed that truncates output. 83741ae1b5e8Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 83751ae1b5e8Smrg test ! -f $lt_ac_sed && continue 83761ae1b5e8Smrg cat /dev/null > conftest.in 83771ae1b5e8Smrg lt_ac_count=0 83781ae1b5e8Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 83791ae1b5e8Smrg # Check for GNU sed and select it if it is found. 83801ae1b5e8Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 83811ae1b5e8Smrg lt_cv_path_SED=$lt_ac_sed 83821ae1b5e8Smrg break 83831ae1b5e8Smrg fi 83841ae1b5e8Smrg while true; do 83851ae1b5e8Smrg cat conftest.in conftest.in >conftest.tmp 83861ae1b5e8Smrg mv conftest.tmp conftest.in 83871ae1b5e8Smrg cp conftest.in conftest.nl 83881ae1b5e8Smrg echo >>conftest.nl 83891ae1b5e8Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 83901ae1b5e8Smrg cmp -s conftest.out conftest.nl || break 83911ae1b5e8Smrg # 10000 chars as input seems more than enough 83921ae1b5e8Smrg test $lt_ac_count -gt 10 && break 83931ae1b5e8Smrg lt_ac_count=`expr $lt_ac_count + 1` 83941ae1b5e8Smrg if test $lt_ac_count -gt $lt_ac_max; then 83951ae1b5e8Smrg lt_ac_max=$lt_ac_count 83961ae1b5e8Smrg lt_cv_path_SED=$lt_ac_sed 83971ae1b5e8Smrg fi 83981ae1b5e8Smrg done 83991ae1b5e8Smrgdone 84001ae1b5e8Smrg]) 84011ae1b5e8SmrgSED=$lt_cv_path_SED 84021ae1b5e8SmrgAC_MSG_RESULT([$SED]) 84031ae1b5e8Smrg]) 840476888252Smrg 84051ae1b5e8Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 84061ae1b5e8Smrg# 84071ae1b5e8Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 840876888252Smrg# 84091ae1b5e8Smrg# This program is free software; you can redistribute it and/or modify 84101ae1b5e8Smrg# it under the terms of the GNU General Public License as published by 84111ae1b5e8Smrg# the Free Software Foundation; either version 2 of the License, or 84121ae1b5e8Smrg# (at your option) any later version. 841376888252Smrg# 84141ae1b5e8Smrg# This program is distributed in the hope that it will be useful, but 84151ae1b5e8Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 84161ae1b5e8Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 84171ae1b5e8Smrg# General Public License for more details. 841876888252Smrg# 84191ae1b5e8Smrg# You should have received a copy of the GNU General Public License 84201ae1b5e8Smrg# along with this program; if not, write to the Free Software 84211ae1b5e8Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 842276888252Smrg# 84231ae1b5e8Smrg# As a special exception to the GNU General Public License, if you 84241ae1b5e8Smrg# distribute this file as part of a program that contains a 84251ae1b5e8Smrg# configuration script generated by Autoconf, you may include it under 84261ae1b5e8Smrg# the same distribution terms that you use for the rest of that program. 842776888252Smrg 84281ae1b5e8Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 842976888252Smrg# ---------------------------------- 84301ae1b5e8SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 84311ae1b5e8Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 84321ae1b5e8Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 84331ae1b5e8SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 84341ae1b5e8Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 84351ae1b5e8Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 84361ae1b5e8Smrgfi 84371ae1b5e8Smrgif test -n "$PKG_CONFIG"; then 84381ae1b5e8Smrg _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) 84391ae1b5e8Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 84401ae1b5e8Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 84411ae1b5e8Smrg AC_MSG_RESULT([yes]) 84421ae1b5e8Smrg else 84431ae1b5e8Smrg AC_MSG_RESULT([no]) 84441ae1b5e8Smrg PKG_CONFIG="" 84451ae1b5e8Smrg fi 84461ae1b5e8Smrg 84471ae1b5e8Smrgfi[]dnl 84481ae1b5e8Smrg])# PKG_PROG_PKG_CONFIG 844976888252Smrg 84501ae1b5e8Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 845176888252Smrg# 84521ae1b5e8Smrg# Check to see whether a particular set of modules exists. Similar 84531ae1b5e8Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 84541ae1b5e8Smrg# 84551ae1b5e8Smrg# 84561ae1b5e8Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 84571ae1b5e8Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 84581ae1b5e8Smrg# PKG_CHECK_EXISTS manually 84591ae1b5e8Smrg# -------------------------------------------------------------- 84601ae1b5e8SmrgAC_DEFUN([PKG_CHECK_EXISTS], 84611ae1b5e8Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 84621ae1b5e8Smrgif test -n "$PKG_CONFIG" && \ 84631ae1b5e8Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 84641ae1b5e8Smrg m4_ifval([$2], [$2], [:]) 84651ae1b5e8Smrgm4_ifvaln([$3], [else 84661ae1b5e8Smrg $3])dnl 84671ae1b5e8Smrgfi]) 846876888252Smrg 846976888252Smrg 84701ae1b5e8Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 84711ae1b5e8Smrg# --------------------------------------------- 84721ae1b5e8Smrgm4_define([_PKG_CONFIG], 84731ae1b5e8Smrg[if test -n "$PKG_CONFIG"; then 84741ae1b5e8Smrg PKG_CHECK_EXISTS([$3], 84751ae1b5e8Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 84761ae1b5e8Smrg [pkg_failed=yes]) 847776888252Smrgelse 84781ae1b5e8Smrg pkg_failed=untried 84791ae1b5e8Smrgfi[]dnl 84801ae1b5e8Smrg])# _PKG_CONFIG 848176888252Smrg 84821ae1b5e8Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 84831ae1b5e8Smrg# [ACTION-IF-NOT-FOUND]) 848476888252Smrg# 84851ae1b5e8Smrg# 84861ae1b5e8Smrg# Note that if there is a possibility the first call to 84871ae1b5e8Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 84881ae1b5e8Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 84891ae1b5e8Smrg# 84901ae1b5e8Smrg# 84911ae1b5e8Smrg# -------------------------------------------------------------- 84921ae1b5e8SmrgAC_DEFUN([PKG_CHECK_MODULES], 84931ae1b5e8Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 84941ae1b5e8SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 84951ae1b5e8SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 849676888252Smrg 84971ae1b5e8Smrgpkg_failed=no 84981ae1b5e8SmrgAC_MSG_CHECKING([for $1]) 849976888252Smrg 85001ae1b5e8Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 85011ae1b5e8Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 850276888252Smrg 85031ae1b5e8Smrgif test $pkg_failed = yes; then 85041ae1b5e8Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 85051ae1b5e8Smrg # Put the nasty error message in config.log where it belongs 85061ae1b5e8Smrg echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD 850776888252Smrg 85081ae1b5e8Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 85091ae1b5e8Smrg[Package requirements ($2) were not met. 85101ae1b5e8SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 85111ae1b5e8Smrginstalled software in a non-standard prefix. 851276888252Smrg 85131ae1b5e8SmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables 85141ae1b5e8Smrgto avoid the need to call pkg-config. See the pkg-config man page for 85151ae1b5e8Smrgmore details.])], 85161ae1b5e8Smrg [$4]) 85171ae1b5e8Smrgelif test $pkg_failed = untried; then 85181ae1b5e8Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 85191ae1b5e8Smrg[The pkg-config script could not be found or is too old. Make sure it 85201ae1b5e8Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 85211ae1b5e8Smrgpath to pkg-config. 852276888252Smrg 85231ae1b5e8SmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables 85241ae1b5e8Smrgto avoid the need to call pkg-config. See the pkg-config man page for 85251ae1b5e8Smrgmore details. 852676888252Smrg 85271ae1b5e8SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 85281ae1b5e8Smrg [$4]) 85291ae1b5e8Smrgelse 85301ae1b5e8Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 85311ae1b5e8Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 85321ae1b5e8Smrg AC_MSG_RESULT([yes]) 85331ae1b5e8Smrg ifelse([$3], , :, [$3]) 85341ae1b5e8Smrgfi[]dnl 85351ae1b5e8Smrg])# PKG_CHECK_MODULES 853676888252Smrg 8537