1014
# Shorthand for --mode=foo, only valid as the first argument
1017
shift; set dummy --mode clean ${1+"$@"}; shift
1019
compile|compil|compi|comp|com|co|c)
1020
shift; set dummy --mode compile ${1+"$@"}; shift
1022
execute|execut|execu|exec|exe|ex|e)
1023
shift; set dummy --mode execute ${1+"$@"}; shift
1025
finish|finis|fini|fin|fi|f)
1026
shift; set dummy --mode finish ${1+"$@"}; shift
1028
install|instal|insta|inst|ins|in|i)
1029
shift; set dummy --mode install ${1+"$@"}; shift
1032
shift; set dummy --mode link ${1+"$@"}; shift
1034
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
1035
shift; set dummy --mode uninstall ${1+"$@"}; shift
1045
opt_preserve_dup_deps=false
1057
# Parse options once, thoroughly. This comes as soon as possible in the
1058
# script to make things like `--version' happen as quickly as we can.
1060
# this just eases exit handling
1061
while test $# -gt 0; do
1065
--debug|-x) opt_debug='set -x'
1066
func_echo "enabling shell trace mode"
1069
--dry-run|--dryrun|-n)
1078
opt_dlopen="${opt_dlopen+$opt_dlopen
1082
--preserve-dup-deps)
1083
opt_preserve_dup_deps=:
1091
set dummy --mode finish ${1+"$@"}; shift
1098
opt_help=': help-all'
1101
test $# = 0 && func_missing_arg $opt && break
1105
# Valid mode arguments:
1106
clean|compile|execute|finish|install|link|relink|uninstall) ;;
1108
# Catch anything else as an error
1109
*) func_error "invalid argument for $opt"
1116
--no-silent|--no-quiet)
1118
func_append preserve_args " $opt"
1120
--no-warning|--no-warn)
1122
func_append preserve_args " $opt"
1126
func_append preserve_args " $opt"
1130
func_append preserve_args " $opt"
1135
func_append preserve_args " $opt"
1139
test $# = 0 && func_missing_arg $opt && break
1142
func_append preserve_args " $opt $optarg"
1143
func_enable_tag "$optarg"
1147
-\?|-h) func_usage ;;
1148
--help) func_help ;;
1149
--version) func_version ;;
1151
# Separate optargs to long options:
1153
func_split_long_opt "$opt"
1154
set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
1158
# Separate non-argument short options:
1160
func_split_short_opt "$opt"
1161
set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
1166
-*) func_fatal_help "unrecognized option \`$opt'" ;;
1167
*) set dummy "$opt" ${1+"$@"}; shift; break ;;
1173
# save first non-option argument
1174
if test "$#" -gt 0; then
1180
test "$opt_debug" = : || func_append preserve_args " --debug"
1183
*cygwin* | *mingw* | *pw32* | *cegcc*)
1184
# don't eliminate duplications in $postdeps and $predeps
1185
opt_duplicate_compiler_generated_deps=:
1188
opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
1193
# Sanity checks first:
1194
func_check_version_match
1196
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1197
func_fatal_configuration "not configured to build any kind of library"
1201
eval std_shrext=\"$shrext_cmds\"
1203
# Only execute mode is allowed to have -dlopen flags.
1204
if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
1205
func_error "unrecognized option \`-dlopen'"
1210
# Change the help message to a mode-specific one.
1211
generic_help="$help"
1212
help="Try \`$progname --help --mode=$opt_mode' for more information."
1216
# Bail if the options were screwed
1217
$exit_cmd $EXIT_FAILURE
1018
1223
## ----------- ##
1020
1225
## ----------- ##
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
1227
# func_lalib_p file
1051
1228
# True iff FILE is a libtool `.la' library or `.lo' object file.
1052
1229
# This function is only a basic sanity check; it will hardly flush out
1470
##################################################
1471
# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
1472
##################################################
1474
# func_convert_core_file_wine_to_w32 ARG
1475
# Helper function used by file name conversion functions when $build is *nix,
1476
# and $host is mingw, cygwin, or some other w32 environment. Relies on a
1477
# correctly configured wine environment available, with the winepath program
1478
# in $build's $PATH.
1480
# ARG is the $build file name to be converted to w32 format.
1481
# Result is available in $func_convert_core_file_wine_to_w32_result, and will
1482
# be empty on error (or when ARG is empty)
1483
func_convert_core_file_wine_to_w32 ()
1486
func_convert_core_file_wine_to_w32_result="$1"
1487
if test -n "$1"; then
1488
# Unfortunately, winepath does not exit with a non-zero error code, so we
1489
# are forced to check the contents of stdout. On the other hand, if the
1490
# command is not found, the shell will set an exit code of 127 and print
1491
# *an error message* to stdout. So we must check for both error code of
1492
# zero AND non-empty stdout, which explains the odd construction:
1493
func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
1494
if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
1495
func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
1496
$SED -e "$lt_sed_naive_backslashify"`
1498
func_convert_core_file_wine_to_w32_result=
1502
# end: func_convert_core_file_wine_to_w32
1505
# func_convert_core_path_wine_to_w32 ARG
1506
# Helper function used by path conversion functions when $build is *nix, and
1507
# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
1508
# configured wine environment available, with the winepath program in $build's
1509
# $PATH. Assumes ARG has no leading or trailing path separator characters.
1511
# ARG is path to be converted from $build format to win32.
1512
# Result is available in $func_convert_core_path_wine_to_w32_result.
1513
# Unconvertible file (directory) names in ARG are skipped; if no directory names
1514
# are convertible, then the result may be empty.
1515
func_convert_core_path_wine_to_w32 ()
1518
# unfortunately, winepath doesn't convert paths, only file names
1519
func_convert_core_path_wine_to_w32_result=""
1520
if test -n "$1"; then
1523
for func_convert_core_path_wine_to_w32_f in $1; do
1525
func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
1526
if test -n "$func_convert_core_file_wine_to_w32_result" ; then
1527
if test -z "$func_convert_core_path_wine_to_w32_result"; then
1528
func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
1530
func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
1537
# end: func_convert_core_path_wine_to_w32
1540
# func_cygpath ARGS...
1541
# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
1542
# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
1543
# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
1544
# (2), returns the Cygwin file name or path in func_cygpath_result (input
1545
# file name or path is assumed to be in w32 format, as previously converted
1546
# from $build's *nix or MSYS format). In case (3), returns the w32 file name
1547
# or path in func_cygpath_result (input file name or path is assumed to be in
1548
# Cygwin format). Returns an empty string on error.
1550
# ARGS are passed to cygpath, with the last one being the file name or path to
1553
# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
1554
# environment variable; do not put it in $PATH.
1558
if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
1559
func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
1560
if test "$?" -ne 0; then
1561
# on failure, ensure result is empty
1562
func_cygpath_result=
1565
func_cygpath_result=
1566
func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
1572
# func_convert_core_msys_to_w32 ARG
1573
# Convert file name or path ARG from MSYS format to w32 format. Return
1574
# result in func_convert_core_msys_to_w32_result.
1575
func_convert_core_msys_to_w32 ()
1578
# awkward: cmd appends spaces to result
1579
func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
1580
$SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
1582
#end: func_convert_core_msys_to_w32
1585
# func_convert_file_check ARG1 ARG2
1586
# Verify that ARG1 (a file name in $build format) was converted to $host
1587
# format in ARG2. Otherwise, emit an error message, but continue (resetting
1588
# func_to_host_file_result to ARG1).
1589
func_convert_file_check ()
1592
if test -z "$2" && test -n "$1" ; then
1593
func_error "Could not determine host file name corresponding to"
1595
func_error "Continuing, but uninstalled executables may not work."
1597
func_to_host_file_result="$1"
1600
# end func_convert_file_check
1603
# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
1604
# Verify that FROM_PATH (a path in $build format) was converted to $host
1605
# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
1606
# func_to_host_file_result to a simplistic fallback value (see below).
1607
func_convert_path_check ()
1610
if test -z "$4" && test -n "$3"; then
1611
func_error "Could not determine the host path corresponding to"
1613
func_error "Continuing, but uninstalled executables may not work."
1614
# Fallback. This is a deliberately simplistic "conversion" and
1615
# should not be "improved". See libtool.info.
1616
if test "x$1" != "x$2"; then
1617
lt_replace_pathsep_chars="s|$1|$2|g"
1618
func_to_host_path_result=`echo "$3" |
1619
$SED -e "$lt_replace_pathsep_chars"`
1621
func_to_host_path_result="$3"
1625
# end func_convert_path_check
1628
# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
1629
# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
1630
# and appending REPL if ORIG matches BACKPAT.
1631
func_convert_path_front_back_pathsep ()
1635
$1 ) func_to_host_path_result="$3$func_to_host_path_result"
1639
$2 ) func_append func_to_host_path_result "$3"
1643
# end func_convert_path_front_back_pathsep
1646
##################################################
1647
# $build to $host FILE NAME CONVERSION FUNCTIONS #
1648
##################################################
1649
# invoked via `$to_host_file_cmd ARG'
1651
# In each case, ARG is the path to be converted from $build to $host format.
1652
# Result will be available in $func_to_host_file_result.
1655
# func_to_host_file ARG
1656
# Converts the file name ARG from $build format to $host format. Return result
1657
# in func_to_host_file_result.
1658
func_to_host_file ()
1661
$to_host_file_cmd "$1"
1663
# end func_to_host_file
1666
# func_to_tool_file ARG LAZY
1667
# converts the file name ARG from $build format to toolchain format. Return
1668
# result in func_to_tool_file_result. If the conversion in use is listed
1669
# in (the comma separated) LAZY, no conversion takes place.
1670
func_to_tool_file ()
1674
*,"$to_tool_file_cmd",*)
1675
func_to_tool_file_result=$1
1678
$to_tool_file_cmd "$1"
1679
func_to_tool_file_result=$func_to_host_file_result
1683
# end func_to_tool_file
1686
# func_convert_file_noop ARG
1687
# Copy ARG to func_to_host_file_result.
1688
func_convert_file_noop ()
1690
func_to_host_file_result="$1"
1692
# end func_convert_file_noop
1695
# func_convert_file_msys_to_w32 ARG
1696
# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
1697
# conversion to w32 is not available inside the cwrapper. Returns result in
1698
# func_to_host_file_result.
1699
func_convert_file_msys_to_w32 ()
1702
func_to_host_file_result="$1"
1703
if test -n "$1"; then
1704
func_convert_core_msys_to_w32 "$1"
1705
func_to_host_file_result="$func_convert_core_msys_to_w32_result"
1707
func_convert_file_check "$1" "$func_to_host_file_result"
1709
# end func_convert_file_msys_to_w32
1712
# func_convert_file_cygwin_to_w32 ARG
1713
# Convert file name ARG from Cygwin to w32 format. Returns result in
1714
# func_to_host_file_result.
1715
func_convert_file_cygwin_to_w32 ()
1718
func_to_host_file_result="$1"
1719
if test -n "$1"; then
1720
# because $build is cygwin, we call "the" cygpath in $PATH; no need to use
1721
# LT_CYGPATH in this case.
1722
func_to_host_file_result=`cygpath -m "$1"`
1724
func_convert_file_check "$1" "$func_to_host_file_result"
1726
# end func_convert_file_cygwin_to_w32
1729
# func_convert_file_nix_to_w32 ARG
1730
# Convert file name ARG from *nix to w32 format. Requires a wine environment
1731
# and a working winepath. Returns result in func_to_host_file_result.
1732
func_convert_file_nix_to_w32 ()
1735
func_to_host_file_result="$1"
1736
if test -n "$1"; then
1737
func_convert_core_file_wine_to_w32 "$1"
1738
func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
1740
func_convert_file_check "$1" "$func_to_host_file_result"
1742
# end func_convert_file_nix_to_w32
1745
# func_convert_file_msys_to_cygwin ARG
1746
# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1747
# Returns result in func_to_host_file_result.
1748
func_convert_file_msys_to_cygwin ()
1751
func_to_host_file_result="$1"
1752
if test -n "$1"; then
1753
func_convert_core_msys_to_w32 "$1"
1754
func_cygpath -u "$func_convert_core_msys_to_w32_result"
1755
func_to_host_file_result="$func_cygpath_result"
1757
func_convert_file_check "$1" "$func_to_host_file_result"
1759
# end func_convert_file_msys_to_cygwin
1762
# func_convert_file_nix_to_cygwin ARG
1763
# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
1764
# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
1765
# in func_to_host_file_result.
1766
func_convert_file_nix_to_cygwin ()
1769
func_to_host_file_result="$1"
1770
if test -n "$1"; then
1771
# convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
1772
func_convert_core_file_wine_to_w32 "$1"
1773
func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
1774
func_to_host_file_result="$func_cygpath_result"
1776
func_convert_file_check "$1" "$func_to_host_file_result"
1778
# end func_convert_file_nix_to_cygwin
1781
#############################################
1782
# $build to $host PATH CONVERSION FUNCTIONS #
1783
#############################################
1784
# invoked via `$to_host_path_cmd ARG'
1786
# In each case, ARG is the path to be converted from $build to $host format.
1787
# The result will be available in $func_to_host_path_result.
1789
# Path separators are also converted from $build format to $host format. If
1790
# ARG begins or ends with a path separator character, it is preserved (but
1791
# converted to $host format) on output.
1793
# All path conversion functions are named using the following convention:
1794
# file name conversion function : func_convert_file_X_to_Y ()
1795
# path conversion function : func_convert_path_X_to_Y ()
1796
# where, for any given $build/$host combination the 'X_to_Y' value is the
1797
# same. If conversion functions are added for new $build/$host combinations,
1798
# the two new functions must follow this pattern, or func_init_to_host_path_cmd
1802
# func_init_to_host_path_cmd
1803
# Ensures that function "pointer" variable $to_host_path_cmd is set to the
1804
# appropriate value, based on the value of $to_host_file_cmd.
1806
func_init_to_host_path_cmd ()
1809
if test -z "$to_host_path_cmd"; then
1810
func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
1811
to_host_path_cmd="func_convert_path_${func_stripname_result}"
1816
# func_to_host_path ARG
1817
# Converts the path ARG from $build format to $host format. Return result
1818
# in func_to_host_path_result.
1819
func_to_host_path ()
1822
func_init_to_host_path_cmd
1823
$to_host_path_cmd "$1"
1825
# end func_to_host_path
1828
# func_convert_path_noop ARG
1829
# Copy ARG to func_to_host_path_result.
1830
func_convert_path_noop ()
1832
func_to_host_path_result="$1"
1834
# end func_convert_path_noop
1837
# func_convert_path_msys_to_w32 ARG
1838
# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
1839
# conversion to w32 is not available inside the cwrapper. Returns result in
1840
# func_to_host_path_result.
1841
func_convert_path_msys_to_w32 ()
1844
func_to_host_path_result="$1"
1845
if test -n "$1"; then
1846
# Remove leading and trailing path separator characters from ARG. MSYS
1847
# behavior is inconsistent here; cygpath turns them into '.;' and ';.';
1848
# and winepath ignores them completely.
1849
func_stripname : : "$1"
1850
func_to_host_path_tmp1=$func_stripname_result
1851
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1852
func_to_host_path_result="$func_convert_core_msys_to_w32_result"
1853
func_convert_path_check : ";" \
1854
"$func_to_host_path_tmp1" "$func_to_host_path_result"
1855
func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1858
# end func_convert_path_msys_to_w32
1861
# func_convert_path_cygwin_to_w32 ARG
1862
# Convert path ARG from Cygwin to w32 format. Returns result in
1863
# func_to_host_file_result.
1864
func_convert_path_cygwin_to_w32 ()
1867
func_to_host_path_result="$1"
1868
if test -n "$1"; then
1869
# See func_convert_path_msys_to_w32:
1870
func_stripname : : "$1"
1871
func_to_host_path_tmp1=$func_stripname_result
1872
func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
1873
func_convert_path_check : ";" \
1874
"$func_to_host_path_tmp1" "$func_to_host_path_result"
1875
func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1878
# end func_convert_path_cygwin_to_w32
1881
# func_convert_path_nix_to_w32 ARG
1882
# Convert path ARG from *nix to w32 format. Requires a wine environment and
1883
# a working winepath. Returns result in func_to_host_file_result.
1884
func_convert_path_nix_to_w32 ()
1887
func_to_host_path_result="$1"
1888
if test -n "$1"; then
1889
# See func_convert_path_msys_to_w32:
1890
func_stripname : : "$1"
1891
func_to_host_path_tmp1=$func_stripname_result
1892
func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1893
func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
1894
func_convert_path_check : ";" \
1895
"$func_to_host_path_tmp1" "$func_to_host_path_result"
1896
func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1899
# end func_convert_path_nix_to_w32
1902
# func_convert_path_msys_to_cygwin ARG
1903
# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1904
# Returns result in func_to_host_file_result.
1905
func_convert_path_msys_to_cygwin ()
1908
func_to_host_path_result="$1"
1909
if test -n "$1"; then
1910
# See func_convert_path_msys_to_w32:
1911
func_stripname : : "$1"
1912
func_to_host_path_tmp1=$func_stripname_result
1913
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1914
func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
1915
func_to_host_path_result="$func_cygpath_result"
1916
func_convert_path_check : : \
1917
"$func_to_host_path_tmp1" "$func_to_host_path_result"
1918
func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1921
# end func_convert_path_msys_to_cygwin
1924
# func_convert_path_nix_to_cygwin ARG
1925
# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
1926
# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
1927
# func_to_host_file_result.
1928
func_convert_path_nix_to_cygwin ()
1931
func_to_host_path_result="$1"
1932
if test -n "$1"; then
1933
# Remove leading and trailing path separator characters from
1934
# ARG. msys behavior is inconsistent here, cygpath turns them
1935
# into '.;' and ';.', and winepath ignores them completely.
1936
func_stripname : : "$1"
1937
func_to_host_path_tmp1=$func_stripname_result
1938
func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1939
func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
1940
func_to_host_path_result="$func_cygpath_result"
1941
func_convert_path_check : : \
1942
"$func_to_host_path_tmp1" "$func_to_host_path_result"
1943
func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1946
# end func_convert_path_nix_to_cygwin
1266
1949
# func_mode_compile arg...
1267
1950
func_mode_compile ()
1995
2714
# Exit here if they wanted silent mode.
1996
2715
$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 "----------------------------------------------------------------------"
2717
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2718
echo "----------------------------------------------------------------------"
2719
echo "Libraries have been installed in:"
2720
for libdir in $libdirs; do
2724
echo "If you ever happen to want to link against installed libraries"
2725
echo "in a given directory, LIBDIR, you must either use libtool, and"
2726
echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2727
echo "flag during linking and do at least one of the following:"
2728
if test -n "$shlibpath_var"; then
2729
echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2730
echo " during execution"
2732
if test -n "$runpath_var"; then
2733
echo " - add LIBDIR to the \`$runpath_var' environment variable"
2734
echo " during linking"
2736
if test -n "$hardcode_libdir_flag_spec"; then
2738
eval flag=\"$hardcode_libdir_flag_spec\"
2740
$ECHO " - use the \`$flag' linker flag"
2742
if test -n "$admincmds"; then
2743
$ECHO " - have your system administrator run these commands:$admincmds"
2745
if test -f /etc/ld.so.conf; then
2746
echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2750
echo "See any operating system documentation about shared libraries for"
2752
solaris2.[6789]|solaris2.1[0-9])
2753
echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2757
echo "more information, such as the ld(1) and ld.so(8) manual pages."
2760
echo "----------------------------------------------------------------------"
2041
2762
exit $EXIT_SUCCESS
2044
test "$mode" = finish && func_mode_finish ${1+"$@"}
2765
test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
2047
2768
# func_mode_install arg...
2817
3582
$ECHO "$win32_libid_type"
3585
# func_cygming_dll_for_implib ARG
3587
# Platform-specific function to extract the
3588
# name of the DLL associated with the specified
3589
# import library ARG.
3590
# Invoked by eval'ing the libtool variable
3591
# $sharedlib_from_linklib_cmd
3592
# Result is available in the variable
3593
# $sharedlib_from_linklib_result
3594
func_cygming_dll_for_implib ()
3597
sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
3600
# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
3602
# The is the core of a fallback implementation of a
3603
# platform-specific function to extract the name of the
3604
# DLL associated with the specified import library LIBNAME.
3606
# SECTION_NAME is either .idata$6 or .idata$7, depending
3607
# on the platform and compiler that created the implib.
3609
# Echos the name of the DLL associated with the
3610
# specified import library.
3611
func_cygming_dll_for_implib_fallback_core ()
3614
match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
3615
$OBJDUMP -s --section "$1" "$2" 2>/dev/null |
3616
$SED '/^Contents of section '"$match_literal"':/{
3617
# Place marker at beginning of archive member dllname section
3622
# These lines can sometimes be longer than 43 characters, but
3623
# are always uninteresting
3624
/:[ ]*file format pe[i]\{,1\}-/d
3625
/^In archive [^:]*:/d
3626
# Ensure marker is printed
3628
# Remove all lines with less than 43 characters
3630
# From remaining lines, remove first 43 characters
3633
# Join marker and all lines until next marker into a single line
3634
/^====MARK====/ b para
3643
# Remove trailing dots and whitespace
3647
# we now have a list, one entry per line, of the stringified
3648
# contents of the appropriate section of all members of the
3649
# archive which possess that section. Heuristic: eliminate
3650
# all those which have a first or second character that is
3651
# a '.' (that is, objdump's representation of an unprintable
3652
# character.) This should work for all archives with less than
3653
# 0x302f exports -- but will fail for DLLs whose name actually
3654
# begins with a literal '.' or a single character followed by
3657
# Of those that remain, print the first one.
3658
$SED -e '/^\./d;/^.\./d;q'
3661
# func_cygming_gnu_implib_p ARG
3662
# This predicate returns with zero status (TRUE) if
3663
# ARG is a GNU/binutils-style import library. Returns
3664
# with nonzero status (FALSE) otherwise.
3665
func_cygming_gnu_implib_p ()
3668
func_to_tool_file "$1" func_convert_file_msys_to_w32
3669
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)$'`
3670
test -n "$func_cygming_gnu_implib_tmp"
3673
# func_cygming_ms_implib_p ARG
3674
# This predicate returns with zero status (TRUE) if
3675
# ARG is an MS-style import library. Returns
3676
# with nonzero status (FALSE) otherwise.
3677
func_cygming_ms_implib_p ()
3680
func_to_tool_file "$1" func_convert_file_msys_to_w32
3681
func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3682
test -n "$func_cygming_ms_implib_tmp"
3685
# func_cygming_dll_for_implib_fallback ARG
3686
# Platform-specific function to extract the
3687
# name of the DLL associated with the specified
3688
# import library ARG.
3690
# This fallback implementation is for use when $DLLTOOL
3691
# does not support the --identify-strict option.
3692
# Invoked by eval'ing the libtool variable
3693
# $sharedlib_from_linklib_cmd
3694
# Result is available in the variable
3695
# $sharedlib_from_linklib_result
3696
func_cygming_dll_for_implib_fallback ()
3699
if func_cygming_gnu_implib_p "$1" ; then
3700
# binutils import library
3701
sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3702
elif func_cygming_ms_implib_p "$1" ; then
3703
# ms-generated import library
3704
sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
3707
sharedlib_from_linklib_result=""
2822
3712
# 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
4134
# func_emit_cwrapperexe_src
3398
4135
# emit the source code for a wrapper executable on stdout
3399
4136
# Must ONLY be called from within func_mode_link because