1018
# Shorthand for --mode=foo, only valid as the first argument
1021
shift; set dummy --mode clean ${1+"$@"}; shift
1023
compile|compil|compi|comp|com|co|c)
1024
shift; set dummy --mode compile ${1+"$@"}; shift
1026
execute|execut|execu|exec|exe|ex|e)
1027
shift; set dummy --mode execute ${1+"$@"}; shift
1029
finish|finis|fini|fin|fi|f)
1030
shift; set dummy --mode finish ${1+"$@"}; shift
1032
install|instal|insta|inst|ins|in|i)
1033
shift; set dummy --mode install ${1+"$@"}; shift
1036
shift; set dummy --mode link ${1+"$@"}; shift
1038
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
1039
shift; set dummy --mode uninstall ${1+"$@"}; shift
1049
opt_preserve_dup_deps=false
1060
# Parse options once, thoroughly. This comes as soon as possible in the
1061
# script to make things like `--version' happen as quickly as we can.
1063
# this just eases exit handling
1064
while test $# -gt 0; do
1068
--debug|-x) opt_debug='set -x'
1069
func_echo "enabling shell trace mode"
1072
--dry-run|--dryrun|-n)
1081
opt_dlopen="${opt_dlopen+$opt_dlopen
1085
--preserve-dup-deps)
1086
opt_preserve_dup_deps=:
1094
set dummy --mode finish ${1+"$@"}; shift
1101
opt_help=': help-all'
1104
test $# = 0 && func_missing_arg $opt && break
1108
# Valid mode arguments:
1109
clean|compile|execute|finish|install|link|relink|uninstall) ;;
1111
# Catch anything else as an error
1112
*) func_error "invalid argument for $opt"
1119
--no-silent|--no-quiet)
1121
func_append preserve_args " $opt"
1125
func_append preserve_args " $opt"
1129
func_append preserve_args " $opt"
1134
func_append preserve_args " $opt"
1138
test $# = 0 && func_missing_arg $opt && break
1141
func_append preserve_args " $opt $optarg"
1142
func_enable_tag "$optarg"
1146
-\?|-h) func_usage ;;
1147
--help) func_help ;;
1148
--version) func_version ;;
1150
# Separate optargs to long options:
1152
func_split_long_opt "$opt"
1153
set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
1157
# Separate non-argument short options:
1159
func_split_short_opt "$opt"
1160
set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
1165
-*) func_fatal_help "unrecognized option \`$opt'" ;;
1166
*) set dummy "$opt" ${1+"$@"}; shift; break ;;
1172
# save first non-option argument
1173
if test "$#" -gt 0; then
1179
test "$opt_debug" = : || func_append preserve_args " --debug"
1182
*cygwin* | *mingw* | *pw32* | *cegcc*)
1183
# don't eliminate duplications in $postdeps and $predeps
1184
opt_duplicate_compiler_generated_deps=:
1187
opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
1192
# Sanity checks first:
1193
func_check_version_match
1195
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1196
func_fatal_configuration "not configured to build any kind of library"
1200
eval std_shrext=\"$shrext_cmds\"
1202
# Only execute mode is allowed to have -dlopen flags.
1203
if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
1204
func_error "unrecognized option \`-dlopen'"
1209
# Change the help message to a mode-specific one.
1210
generic_help="$help"
1211
help="Try \`$progname --help --mode=$opt_mode' for more information."
1215
# Bail if the options were screwed
1216
$exit_cmd $EXIT_FAILURE
1018
1222
## ----------- ##
1020
1224
## ----------- ##
1023
# Sanity checks first:
1024
func_check_version_match
1026
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1027
func_fatal_configuration "not configured to build any kind of library"
1030
test -z "$mode" && func_fatal_error "error: you must specify a MODE."
1034
eval std_shrext=\"$shrext_cmds\"
1037
# Only execute mode is allowed to have -dlopen flags.
1038
if test -n "$execute_dlfiles" && test "$mode" != execute; then
1039
func_error "unrecognized option \`-dlopen'"
1044
# Change the help message to a mode-specific one.
1045
generic_help="$help"
1046
help="Try \`$progname --help --mode=$mode' for more information."
1050
1226
# func_lalib_p file
1051
1227
# True iff FILE is a libtool `.la' library or `.lo' object file.
1052
1228
# This function is only a basic sanity check; it will hardly flush out
1469
##################################################
1470
# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
1471
##################################################
1473
# func_convert_core_file_wine_to_w32 ARG
1474
# Helper function used by file name conversion functions when $build is *nix,
1475
# and $host is mingw, cygwin, or some other w32 environment. Relies on a
1476
# correctly configured wine environment available, with the winepath program
1477
# in $build's $PATH.
1479
# ARG is the $build file name to be converted to w32 format.
1480
# Result is available in $func_convert_core_file_wine_to_w32_result, and will
1481
# be empty on error (or when ARG is empty)
1482
func_convert_core_file_wine_to_w32 ()
1485
func_convert_core_file_wine_to_w32_result="$1"
1486
if test -n "$1"; then
1487
# Unfortunately, winepath does not exit with a non-zero error code, so we
1488
# are forced to check the contents of stdout. On the other hand, if the
1489
# command is not found, the shell will set an exit code of 127 and print
1490
# *an error message* to stdout. So we must check for both error code of
1491
# zero AND non-empty stdout, which explains the odd construction:
1492
func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
1493
if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
1494
func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
1495
$SED -e "$lt_sed_naive_backslashify"`
1497
func_convert_core_file_wine_to_w32_result=
1501
# end: func_convert_core_file_wine_to_w32
1504
# func_convert_core_path_wine_to_w32 ARG
1505
# Helper function used by path conversion functions when $build is *nix, and
1506
# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
1507
# configured wine environment available, with the winepath program in $build's
1508
# $PATH. Assumes ARG has no leading or trailing path separator characters.
1510
# ARG is path to be converted from $build format to win32.
1511
# Result is available in $func_convert_core_path_wine_to_w32_result.
1512
# Unconvertible file (directory) names in ARG are skipped; if no directory names
1513
# are convertible, then the result may be empty.
1514
func_convert_core_path_wine_to_w32 ()
1517
# unfortunately, winepath doesn't convert paths, only file names
1518
func_convert_core_path_wine_to_w32_result=""
1519
if test -n "$1"; then
1522
for func_convert_core_path_wine_to_w32_f in $1; do
1524
func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
1525
if test -n "$func_convert_core_file_wine_to_w32_result" ; then
1526
if test -z "$func_convert_core_path_wine_to_w32_result"; then
1527
func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
1529
func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
1536
# end: func_convert_core_path_wine_to_w32
1539
# func_cygpath ARGS...
1540
# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
1541
# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
1542
# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
1543
# (2), returns the Cygwin file name or path in func_cygpath_result (input
1544
# file name or path is assumed to be in w32 format, as previously converted
1545
# from $build's *nix or MSYS format). In case (3), returns the w32 file name
1546
# or path in func_cygpath_result (input file name or path is assumed to be in
1547
# Cygwin format). Returns an empty string on error.
1549
# ARGS are passed to cygpath, with the last one being the file name or path to
1552
# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
1553
# environment variable; do not put it in $PATH.
1557
if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
1558
func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
1559
if test "$?" -ne 0; then
1560
# on failure, ensure result is empty
1561
func_cygpath_result=
1564
func_cygpath_result=
1565
func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
1571
# func_convert_core_msys_to_w32 ARG
1572
# Convert file name or path ARG from MSYS format to w32 format. Return
1573
# result in func_convert_core_msys_to_w32_result.
1574
func_convert_core_msys_to_w32 ()
1577
# awkward: cmd appends spaces to result
1578
func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
1579
$SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
1581
#end: func_convert_core_msys_to_w32
1584
# func_convert_file_check ARG1 ARG2
1585
# Verify that ARG1 (a file name in $build format) was converted to $host
1586
# format in ARG2. Otherwise, emit an error message, but continue (resetting
1587
# func_to_host_file_result to ARG1).
1588
func_convert_file_check ()
1591
if test -z "$2" && test -n "$1" ; then
1592
func_error "Could not determine host file name corresponding to"
1594
func_error "Continuing, but uninstalled executables may not work."
1596
func_to_host_file_result="$1"
1599
# end func_convert_file_check
1602
# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
1603
# Verify that FROM_PATH (a path in $build format) was converted to $host
1604
# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
1605
# func_to_host_file_result to a simplistic fallback value (see below).
1606
func_convert_path_check ()
1609
if test -z "$4" && test -n "$3"; then
1610
func_error "Could not determine the host path corresponding to"
1612
func_error "Continuing, but uninstalled executables may not work."
1613
# Fallback. This is a deliberately simplistic "conversion" and
1614
# should not be "improved". See libtool.info.
1615
if test "x$1" != "x$2"; then
1616
lt_replace_pathsep_chars="s|$1|$2|g"
1617
func_to_host_path_result=`echo "$3" |
1618
$SED -e "$lt_replace_pathsep_chars"`
1620
func_to_host_path_result="$3"
1624
# end func_convert_path_check
1627
# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
1628
# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
1629
# and appending REPL if ORIG matches BACKPAT.
1630
func_convert_path_front_back_pathsep ()
1634
$1 ) func_to_host_path_result="$3$func_to_host_path_result"
1638
$2 ) func_append func_to_host_path_result "$3"
1642
# end func_convert_path_front_back_pathsep
1645
##################################################
1646
# $build to $host FILE NAME CONVERSION FUNCTIONS #
1647
##################################################
1648
# invoked via `$to_host_file_cmd ARG'
1650
# In each case, ARG is the path to be converted from $build to $host format.
1651
# Result will be available in $func_to_host_file_result.
1654
# func_to_host_file ARG
1655
# Converts the file name ARG from $build format to $host format. Return result
1656
# in func_to_host_file_result.
1657
func_to_host_file ()
1660
$to_host_file_cmd "$1"
1662
# end func_to_host_file
1665
# func_to_tool_file ARG LAZY
1666
# converts the file name ARG from $build format to toolchain format. Return
1667
# result in func_to_tool_file_result. If the conversion in use is listed
1668
# in (the comma separated) LAZY, no conversion takes place.
1669
func_to_tool_file ()
1673
*,"$to_tool_file_cmd",*)
1674
func_to_tool_file_result=$1
1677
$to_tool_file_cmd "$1"
1678
func_to_tool_file_result=$func_to_host_file_result
1682
# end func_to_tool_file
1685
# func_convert_file_noop ARG
1686
# Copy ARG to func_to_host_file_result.
1687
func_convert_file_noop ()
1689
func_to_host_file_result="$1"
1691
# end func_convert_file_noop
1694
# func_convert_file_msys_to_w32 ARG
1695
# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
1696
# conversion to w32 is not available inside the cwrapper. Returns result in
1697
# func_to_host_file_result.
1698
func_convert_file_msys_to_w32 ()
1701
func_to_host_file_result="$1"
1702
if test -n "$1"; then
1703
func_convert_core_msys_to_w32 "$1"
1704
func_to_host_file_result="$func_convert_core_msys_to_w32_result"
1706
func_convert_file_check "$1" "$func_to_host_file_result"
1708
# end func_convert_file_msys_to_w32
1711
# func_convert_file_cygwin_to_w32 ARG
1712
# Convert file name ARG from Cygwin to w32 format. Returns result in
1713
# func_to_host_file_result.
1714
func_convert_file_cygwin_to_w32 ()
1717
func_to_host_file_result="$1"
1718
if test -n "$1"; then
1719
# because $build is cygwin, we call "the" cygpath in $PATH; no need to use
1720
# LT_CYGPATH in this case.
1721
func_to_host_file_result=`cygpath -m "$1"`
1723
func_convert_file_check "$1" "$func_to_host_file_result"
1725
# end func_convert_file_cygwin_to_w32
1728
# func_convert_file_nix_to_w32 ARG
1729
# Convert file name ARG from *nix to w32 format. Requires a wine environment
1730
# and a working winepath. Returns result in func_to_host_file_result.
1731
func_convert_file_nix_to_w32 ()
1734
func_to_host_file_result="$1"
1735
if test -n "$1"; then
1736
func_convert_core_file_wine_to_w32 "$1"
1737
func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
1739
func_convert_file_check "$1" "$func_to_host_file_result"
1741
# end func_convert_file_nix_to_w32
1744
# func_convert_file_msys_to_cygwin ARG
1745
# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1746
# Returns result in func_to_host_file_result.
1747
func_convert_file_msys_to_cygwin ()
1750
func_to_host_file_result="$1"
1751
if test -n "$1"; then
1752
func_convert_core_msys_to_w32 "$1"
1753
func_cygpath -u "$func_convert_core_msys_to_w32_result"
1754
func_to_host_file_result="$func_cygpath_result"
1756
func_convert_file_check "$1" "$func_to_host_file_result"
1758
# end func_convert_file_msys_to_cygwin
1761
# func_convert_file_nix_to_cygwin ARG
1762
# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
1763
# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
1764
# in func_to_host_file_result.
1765
func_convert_file_nix_to_cygwin ()
1768
func_to_host_file_result="$1"
1769
if test -n "$1"; then
1770
# convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
1771
func_convert_core_file_wine_to_w32 "$1"
1772
func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
1773
func_to_host_file_result="$func_cygpath_result"
1775
func_convert_file_check "$1" "$func_to_host_file_result"
1777
# end func_convert_file_nix_to_cygwin
1780
#############################################
1781
# $build to $host PATH CONVERSION FUNCTIONS #
1782
#############################################
1783
# invoked via `$to_host_path_cmd ARG'
1785
# In each case, ARG is the path to be converted from $build to $host format.
1786
# The result will be available in $func_to_host_path_result.
1788
# Path separators are also converted from $build format to $host format. If
1789
# ARG begins or ends with a path separator character, it is preserved (but
1790
# converted to $host format) on output.
1792
# All path conversion functions are named using the following convention:
1793
# file name conversion function : func_convert_file_X_to_Y ()
1794
# path conversion function : func_convert_path_X_to_Y ()
1795
# where, for any given $build/$host combination the 'X_to_Y' value is the
1796
# same. If conversion functions are added for new $build/$host combinations,
1797
# the two new functions must follow this pattern, or func_init_to_host_path_cmd
1801
# func_init_to_host_path_cmd
1802
# Ensures that function "pointer" variable $to_host_path_cmd is set to the
1803
# appropriate value, based on the value of $to_host_file_cmd.
1805
func_init_to_host_path_cmd ()
1808
if test -z "$to_host_path_cmd"; then
1809
func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
1810
to_host_path_cmd="func_convert_path_${func_stripname_result}"
1815
# func_to_host_path ARG
1816
# Converts the path ARG from $build format to $host format. Return result
1817
# in func_to_host_path_result.
1818
func_to_host_path ()
1821
func_init_to_host_path_cmd
1822
$to_host_path_cmd "$1"
1824
# end func_to_host_path
1827
# func_convert_path_noop ARG
1828
# Copy ARG to func_to_host_path_result.
1829
func_convert_path_noop ()
1831
func_to_host_path_result="$1"
1833
# end func_convert_path_noop
1836
# func_convert_path_msys_to_w32 ARG
1837
# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
1838
# conversion to w32 is not available inside the cwrapper. Returns result in
1839
# func_to_host_path_result.
1840
func_convert_path_msys_to_w32 ()
1843
func_to_host_path_result="$1"
1844
if test -n "$1"; then
1845
# Remove leading and trailing path separator characters from ARG. MSYS
1846
# behavior is inconsistent here; cygpath turns them into '.;' and ';.';
1847
# and winepath ignores them completely.
1848
func_stripname : : "$1"
1849
func_to_host_path_tmp1=$func_stripname_result
1850
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1851
func_to_host_path_result="$func_convert_core_msys_to_w32_result"
1852
func_convert_path_check : ";" \
1853
"$func_to_host_path_tmp1" "$func_to_host_path_result"
1854
func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1857
# end func_convert_path_msys_to_w32
1860
# func_convert_path_cygwin_to_w32 ARG
1861
# Convert path ARG from Cygwin to w32 format. Returns result in
1862
# func_to_host_file_result.
1863
func_convert_path_cygwin_to_w32 ()
1866
func_to_host_path_result="$1"
1867
if test -n "$1"; then
1868
# See func_convert_path_msys_to_w32:
1869
func_stripname : : "$1"
1870
func_to_host_path_tmp1=$func_stripname_result
1871
func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
1872
func_convert_path_check : ";" \
1873
"$func_to_host_path_tmp1" "$func_to_host_path_result"
1874
func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1877
# end func_convert_path_cygwin_to_w32
1880
# func_convert_path_nix_to_w32 ARG
1881
# Convert path ARG from *nix to w32 format. Requires a wine environment and
1882
# a working winepath. Returns result in func_to_host_file_result.
1883
func_convert_path_nix_to_w32 ()
1886
func_to_host_path_result="$1"
1887
if test -n "$1"; then
1888
# See func_convert_path_msys_to_w32:
1889
func_stripname : : "$1"
1890
func_to_host_path_tmp1=$func_stripname_result
1891
func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1892
func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
1893
func_convert_path_check : ";" \
1894
"$func_to_host_path_tmp1" "$func_to_host_path_result"
1895
func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1898
# end func_convert_path_nix_to_w32
1901
# func_convert_path_msys_to_cygwin ARG
1902
# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1903
# Returns result in func_to_host_file_result.
1904
func_convert_path_msys_to_cygwin ()
1907
func_to_host_path_result="$1"
1908
if test -n "$1"; then
1909
# See func_convert_path_msys_to_w32:
1910
func_stripname : : "$1"
1911
func_to_host_path_tmp1=$func_stripname_result
1912
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1913
func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
1914
func_to_host_path_result="$func_cygpath_result"
1915
func_convert_path_check : : \
1916
"$func_to_host_path_tmp1" "$func_to_host_path_result"
1917
func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1920
# end func_convert_path_msys_to_cygwin
1923
# func_convert_path_nix_to_cygwin ARG
1924
# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
1925
# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
1926
# func_to_host_file_result.
1927
func_convert_path_nix_to_cygwin ()
1930
func_to_host_path_result="$1"
1931
if test -n "$1"; then
1932
# Remove leading and trailing path separator characters from
1933
# ARG. msys behavior is inconsistent here, cygpath turns them
1934
# into '.;' and ';.', and winepath ignores them completely.
1935
func_stripname : : "$1"
1936
func_to_host_path_tmp1=$func_stripname_result
1937
func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1938
func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
1939
func_to_host_path_result="$func_cygpath_result"
1940
func_convert_path_check : : \
1941
"$func_to_host_path_tmp1" "$func_to_host_path_result"
1942
func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1945
# end func_convert_path_nix_to_cygwin
1266
1948
# func_mode_compile arg...
1267
1949
func_mode_compile ()
1995
2713
# Exit here if they wanted silent mode.
1996
2714
$opt_silent && exit $EXIT_SUCCESS
1998
echo "----------------------------------------------------------------------"
1999
echo "Libraries have been installed in:"
2000
for libdir in $libdirs; do
2004
echo "If you ever happen to want to link against installed libraries"
2005
echo "in a given directory, LIBDIR, you must either use libtool, and"
2006
echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2007
echo "flag during linking and do at least one of the following:"
2008
if test -n "$shlibpath_var"; then
2009
echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2010
echo " during execution"
2012
if test -n "$runpath_var"; then
2013
echo " - add LIBDIR to the \`$runpath_var' environment variable"
2014
echo " during linking"
2016
if test -n "$hardcode_libdir_flag_spec"; then
2018
eval flag=\"$hardcode_libdir_flag_spec\"
2020
$ECHO " - use the \`$flag' linker flag"
2022
if test -n "$admincmds"; then
2023
$ECHO " - have your system administrator run these commands:$admincmds"
2025
if test -f /etc/ld.so.conf; then
2026
echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2030
echo "See any operating system documentation about shared libraries for"
2032
solaris2.[6789]|solaris2.1[0-9])
2033
echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2037
echo "more information, such as the ld(1) and ld.so(8) manual pages."
2040
echo "----------------------------------------------------------------------"
2716
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2717
echo "----------------------------------------------------------------------"
2718
echo "Libraries have been installed in:"
2719
for libdir in $libdirs; do
2723
echo "If you ever happen to want to link against installed libraries"
2724
echo "in a given directory, LIBDIR, you must either use libtool, and"
2725
echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2726
echo "flag during linking and do at least one of the following:"
2727
if test -n "$shlibpath_var"; then
2728
echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2729
echo " during execution"
2731
if test -n "$runpath_var"; then
2732
echo " - add LIBDIR to the \`$runpath_var' environment variable"
2733
echo " during linking"
2735
if test -n "$hardcode_libdir_flag_spec"; then
2737
eval flag=\"$hardcode_libdir_flag_spec\"
2739
$ECHO " - use the \`$flag' linker flag"
2741
if test -n "$admincmds"; then
2742
$ECHO " - have your system administrator run these commands:$admincmds"
2744
if test -f /etc/ld.so.conf; then
2745
echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2749
echo "See any operating system documentation about shared libraries for"
2751
solaris2.[6789]|solaris2.1[0-9])
2752
echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2756
echo "more information, such as the ld(1) and ld.so(8) manual pages."
2759
echo "----------------------------------------------------------------------"
2041
2761
exit $EXIT_SUCCESS
2044
test "$mode" = finish && func_mode_finish ${1+"$@"}
2764
test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
2047
2767
# func_mode_install arg...
2817
3579
$ECHO "$win32_libid_type"
3582
# func_cygming_dll_for_implib ARG
3584
# Platform-specific function to extract the
3585
# name of the DLL associated with the specified
3586
# import library ARG.
3587
# Invoked by eval'ing the libtool variable
3588
# $sharedlib_from_linklib_cmd
3589
# Result is available in the variable
3590
# $sharedlib_from_linklib_result
3591
func_cygming_dll_for_implib ()
3594
sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
3597
# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
3599
# The is the core of a fallback implementation of a
3600
# platform-specific function to extract the name of the
3601
# DLL associated with the specified import library LIBNAME.
3603
# SECTION_NAME is either .idata$6 or .idata$7, depending
3604
# on the platform and compiler that created the implib.
3606
# Echos the name of the DLL associated with the
3607
# specified import library.
3608
func_cygming_dll_for_implib_fallback_core ()
3611
match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
3612
$OBJDUMP -s --section "$1" "$2" 2>/dev/null |
3613
$SED '/^Contents of section '"$match_literal"':/{
3614
# Place marker at beginning of archive member dllname section
3619
# These lines can sometimes be longer than 43 characters, but
3620
# are always uninteresting
3621
/:[ ]*file format pe[i]\{,1\}-/d
3622
/^In archive [^:]*:/d
3623
# Ensure marker is printed
3625
# Remove all lines with less than 43 characters
3627
# From remaining lines, remove first 43 characters
3630
# Join marker and all lines until next marker into a single line
3631
/^====MARK====/ b para
3640
# Remove trailing dots and whitespace
3644
# we now have a list, one entry per line, of the stringified
3645
# contents of the appropriate section of all members of the
3646
# archive which possess that section. Heuristic: eliminate
3647
# all those which have a first or second character that is
3648
# a '.' (that is, objdump's representation of an unprintable
3649
# character.) This should work for all archives with less than
3650
# 0x302f exports -- but will fail for DLLs whose name actually
3651
# begins with a literal '.' or a single character followed by
3654
# Of those that remain, print the first one.
3655
$SED -e '/^\./d;/^.\./d;q'
3658
# func_cygming_gnu_implib_p ARG
3659
# This predicate returns with zero status (TRUE) if
3660
# ARG is a GNU/binutils-style import library. Returns
3661
# with nonzero status (FALSE) otherwise.
3662
func_cygming_gnu_implib_p ()
3665
func_to_tool_file "$1" func_convert_file_msys_to_w32
3666
func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
3667
test -n "$func_cygming_gnu_implib_tmp"
3670
# func_cygming_ms_implib_p ARG
3671
# This predicate returns with zero status (TRUE) if
3672
# ARG is an MS-style import library. Returns
3673
# with nonzero status (FALSE) otherwise.
3674
func_cygming_ms_implib_p ()
3677
func_to_tool_file "$1" func_convert_file_msys_to_w32
3678
func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3679
test -n "$func_cygming_ms_implib_tmp"
3682
# func_cygming_dll_for_implib_fallback ARG
3683
# Platform-specific function to extract the
3684
# name of the DLL associated with the specified
3685
# import library ARG.
3687
# This fallback implementation is for use when $DLLTOOL
3688
# does not support the --identify-strict option.
3689
# Invoked by eval'ing the libtool variable
3690
# $sharedlib_from_linklib_cmd
3691
# Result is available in the variable
3692
# $sharedlib_from_linklib_result
3693
func_cygming_dll_for_implib_fallback ()
3696
if func_cygming_gnu_implib_p "$1" ; then
3697
# binutils import library
3698
sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3699
elif func_cygming_ms_implib_p "$1" ; then
3700
# ms-generated import library
3701
sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
3704
sharedlib_from_linklib_result=""
2822
3709
# func_extract_an_archive dir oldlib
3237
# func_to_host_path arg
3239
# Convert paths to host format when used with build tools.
3240
# Intended for use with "native" mingw (where libtool itself
3241
# is running under the msys shell), or in the following cross-
3242
# build environments:
3244
# mingw (msys) mingw [e.g. native]
3247
# where wine is equipped with the `winepath' executable.
3248
# In the native mingw case, the (msys) shell automatically
3249
# converts paths for any non-msys applications it launches,
3250
# but that facility isn't available from inside the cwrapper.
3251
# Similar accommodations are necessary for $host mingw and
3252
# $build cygwin. Calling this function does no harm for other
3253
# $host/$build combinations not listed above.
3255
# ARG is the path (on $build) that should be converted to
3256
# the proper representation for $host. The result is stored
3257
# in $func_to_host_path_result.
3258
func_to_host_path ()
3260
func_to_host_path_result="$1"
3261
if test -n "$1"; then
3264
lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3266
*mingw* ) # actually, msys
3267
# awkward: cmd appends spaces to result
3268
func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null |
3269
$SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
3272
func_to_host_path_result=`cygpath -w "$1" |
3273
$SED -e "$lt_sed_naive_backslashify"`
3276
# Unfortunately, winepath does not exit with a non-zero
3277
# error code, so we are forced to check the contents of
3278
# stdout. On the other hand, if the command is not
3279
# found, the shell will set an exit code of 127 and print
3280
# *an error message* to stdout. So we must check for both
3281
# error code of zero AND non-empty stdout, which explains
3282
# the odd construction:
3283
func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3284
if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3285
func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" |
3286
$SED -e "$lt_sed_naive_backslashify"`
3288
# Allow warning below.
3289
func_to_host_path_result=
3293
if test -z "$func_to_host_path_result" ; then
3294
func_error "Could not determine host path corresponding to"
3296
func_error "Continuing, but uninstalled executables may not work."
3298
func_to_host_path_result="$1"
3304
# end: func_to_host_path
3306
# func_to_host_pathlist arg
3308
# Convert pathlists to host format when used with build tools.
3309
# See func_to_host_path(), above. This function supports the
3310
# following $build/$host combinations (but does no harm for
3311
# combinations not listed here):
3313
# mingw (msys) mingw [e.g. native]
3317
# Path separators are also converted from $build format to
3318
# $host format. If ARG begins or ends with a path separator
3319
# character, it is preserved (but converted to $host format)
3322
# ARG is a pathlist (on $build) that should be converted to
3323
# the proper representation on $host. The result is stored
3324
# in $func_to_host_pathlist_result.
3325
func_to_host_pathlist ()
3327
func_to_host_pathlist_result="$1"
3328
if test -n "$1"; then
3331
lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3332
# Remove leading and trailing path separator characters from
3333
# ARG. msys behavior is inconsistent here, cygpath turns them
3334
# into '.;' and ';.', and winepath ignores them completely.
3335
func_stripname : : "$1"
3336
func_to_host_pathlist_tmp1=$func_stripname_result
3338
*mingw* ) # Actually, msys.
3339
# Awkward: cmd appends spaces to result.
3340
func_to_host_pathlist_result=`
3341
( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null |
3342
$SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
3345
func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" |
3346
$SED -e "$lt_sed_naive_backslashify"`
3349
# unfortunately, winepath doesn't convert pathlists
3350
func_to_host_pathlist_result=""
3351
func_to_host_pathlist_oldIFS=$IFS
3353
for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
3354
IFS=$func_to_host_pathlist_oldIFS
3355
if test -n "$func_to_host_pathlist_f" ; then
3356
func_to_host_path "$func_to_host_pathlist_f"
3357
if test -n "$func_to_host_path_result" ; then
3358
if test -z "$func_to_host_pathlist_result" ; then
3359
func_to_host_pathlist_result="$func_to_host_path_result"
3361
func_append func_to_host_pathlist_result ";$func_to_host_path_result"
3366
IFS=$func_to_host_pathlist_oldIFS
3369
if test -z "$func_to_host_pathlist_result"; then
3370
func_error "Could not determine the host path(s) corresponding to"
3372
func_error "Continuing, but uninstalled executables may not work."
3373
# Fallback. This may break if $1 contains DOS-style drive
3374
# specifications. The fix is not to complicate the expression
3375
# below, but for the user to provide a working wine installation
3376
# with winepath so that path translation in the cross-to-mingw
3377
# case works properly.
3378
lt_replace_pathsep_nix_to_dos="s|:|;|g"
3379
func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
3380
$SED -e "$lt_replace_pathsep_nix_to_dos"`
3382
# Now, add the leading and trailing path separators back
3384
:* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
3388
*: ) func_append func_to_host_pathlist_result ";"
3395
# end: func_to_host_pathlist
3397
4128
# func_emit_cwrapperexe_src
3398
4129
# emit the source code for a wrapper executable on stdout
3399
4130
# Must ONLY be called from within func_mode_link because