ltconfig 83 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797
  1. #! /bin/sh
  2. # ltconfig - Create a system-specific libtool.
  3. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
  4. # Free Software Foundation, Inc.
  5. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  6. #
  7. # This file is free software; you can redistribute it and/or modify it
  8. # under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. # General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20. #
  21. # As a special exception to the GNU General Public License, if you
  22. # distribute this file as part of a program that contains a
  23. # configuration script generated by Autoconf, you may include it under
  24. # the same distribution terms that you use for the rest of that program.
  25. # A lot of this script is taken from autoconf-2.10.
  26. # Check that we are running under the correct shell.
  27. SHELL=${CONFIG_SHELL-/bin/sh}
  28. echo=echo
  29. if test "X$1" = X--no-reexec; then
  30. # Discard the --no-reexec flag, and continue.
  31. shift
  32. elif test "X$1" = X--fallback-echo; then
  33. # Avoid inline document here, it may be left over
  34. :
  35. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  36. # Yippee, $echo works!
  37. :
  38. else
  39. # Restart under the correct shell.
  40. exec "$SHELL" "$0" --no-reexec ${1+"$@"}
  41. fi
  42. if test "X$1" = X--fallback-echo; then
  43. # used as fallback echo
  44. shift
  45. cat <<EOF
  46. $*
  47. EOF
  48. exit 0
  49. fi
  50. # Find the correct PATH separator. Usually this is `:', but
  51. # DJGPP uses `;' like DOS.
  52. if test "X${PATH_SEPARATOR+set}" != Xset; then
  53. UNAME=${UNAME-`uname 2>/dev/null`}
  54. case X$UNAME in
  55. *-DOS) PATH_SEPARATOR=';' ;;
  56. *) PATH_SEPARATOR=':' ;;
  57. esac
  58. fi
  59. # The HP-UX ksh and POSIX shell print the target directory to stdout
  60. # if CDPATH is set.
  61. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  62. if test "X${echo_test_string+set}" != Xset; then
  63. # find a string as large as possible, as long as the shell can cope with it
  64. for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
  65. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  66. if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  67. echo_test_string="`eval $cmd`" &&
  68. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
  69. break
  70. fi
  71. done
  72. fi
  73. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  74. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  75. test "X$echo_testing_string" = "X$echo_test_string"; then
  76. :
  77. else
  78. # The Solaris, AIX, and Digital Unix default echo programs unquote
  79. # backslashes. This makes it impossible to quote backslashes using
  80. # echo "$something" | sed 's/\\/\\\\/g'
  81. #
  82. # So, first we look for a working echo in the user's PATH.
  83. IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  84. for dir in $PATH /usr/ucb; do
  85. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  86. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  87. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  88. test "X$echo_testing_string" = "X$echo_test_string"; then
  89. echo="$dir/echo"
  90. break
  91. fi
  92. done
  93. IFS="$save_ifs"
  94. if test "X$echo" = Xecho; then
  95. # We didn't find a better echo, so look for alternatives.
  96. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  97. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  98. test "X$echo_testing_string" = "X$echo_test_string"; then
  99. # This shell has a builtin print -r that does the trick.
  100. echo='print -r'
  101. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  102. test "X$CONFIG_SHELL" != X/bin/ksh; then
  103. # If we have ksh, try running ltconfig again with it.
  104. ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
  105. export ORIGINAL_CONFIG_SHELL
  106. CONFIG_SHELL=/bin/ksh
  107. export CONFIG_SHELL
  108. exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
  109. else
  110. # Try using printf.
  111. echo='printf %s\n'
  112. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  113. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  114. test "X$echo_testing_string" = "X$echo_test_string"; then
  115. # Cool, printf works
  116. :
  117. elif echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
  118. test "X$echo_testing_string" = 'X\t' &&
  119. echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  120. test "X$echo_testing_string" = "X$echo_test_string"; then
  121. CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
  122. export CONFIG_SHELL
  123. SHELL="$CONFIG_SHELL"
  124. export SHELL
  125. echo="$CONFIG_SHELL $0 --fallback-echo"
  126. elif echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
  127. test "X$echo_testing_string" = 'X\t' &&
  128. echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  129. test "X$echo_testing_string" = "X$echo_test_string"; then
  130. echo="$CONFIG_SHELL $0 --fallback-echo"
  131. else
  132. # maybe with a smaller string...
  133. prev=:
  134. for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
  135. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
  136. break
  137. fi
  138. prev="$cmd"
  139. done
  140. if test "$prev" != 'sed 50q "$0"'; then
  141. echo_test_string=`eval $prev`
  142. export echo_test_string
  143. exec "${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}" "$0" ${1+"$@"}
  144. else
  145. # Oops. We lost completely, so just stick with echo.
  146. echo=echo
  147. fi
  148. fi
  149. fi
  150. fi
  151. fi
  152. # Sed substitution that helps us do robust quoting. It backslashifies
  153. # metacharacters that are still active within double-quoted strings.
  154. Xsed='sed -e s/^X//'
  155. sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
  156. # Same as above, but do not quote variable references.
  157. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
  158. # Sed substitution to delay expansion of an escaped shell variable in a
  159. # double_quote_subst'ed string.
  160. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  161. # The name of this program.
  162. progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
  163. # Constants:
  164. PROGRAM=ltconfig
  165. PACKAGE=libtool
  166. VERSION=1.4a
  167. TIMESTAMP=" (1.641.2.255 2001/05/22 10:39:30)"
  168. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  169. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  170. rm="rm -f"
  171. help="Try \`$progname --help' for more information."
  172. # Global variables:
  173. default_ofile=libtool
  174. can_build_shared=yes
  175. enable_shared=yes
  176. # All known linkers require a `.a' archive for static linking (except M$VC,
  177. # which needs '.lib').
  178. enable_static=yes
  179. enable_fast_install=yes
  180. enable_dlopen=unknown
  181. enable_win32_dll=no
  182. pic_mode=default
  183. ltmain=
  184. silent=
  185. srcdir=
  186. ac_config_guess=
  187. ac_config_sub=
  188. host=
  189. build=NONE
  190. nonopt=NONE
  191. ofile="$default_ofile"
  192. verify_host=yes
  193. tagname=
  194. with_gcc=no
  195. with_gnu_ld=no
  196. need_locks=yes
  197. ac_ext=c
  198. libext=a
  199. cache_file=
  200. max_cmd_len=
  201. ## Dependencies to place before and after the object being linked:
  202. predep_objects=
  203. postdep_objects=
  204. predeps=
  205. postdeps=
  206. compiler_lib_search_path=
  207. ## Link characteristics:
  208. allow_undefined_flag=
  209. no_undefined_flag=
  210. need_lib_prefix=unknown
  211. need_version=unknown
  212. # when you set need_version to no, make sure it does not cause -set_version
  213. # flags to be left without arguments
  214. archive_cmds=
  215. archive_expsym_cmds=
  216. old_archive_from_new_cmds=
  217. old_archive_from_expsyms_cmds=
  218. striplib=
  219. old_striplib=
  220. export_dynamic_flag_spec=
  221. whole_archive_flag_spec=
  222. thread_safe_flag_spec=
  223. hardcode_into_libs=no
  224. hardcode_libdir_flag_spec=
  225. hardcode_libdir_separator=
  226. hardcode_direct=no
  227. hardcode_minus_L=no
  228. hardcode_shlibpath_var=unsupported
  229. runpath_var=
  230. link_all_deplibs=unknown
  231. always_export_symbols=no
  232. export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
  233. # include_expsyms should be a list of space-separated symbols to be *always*
  234. # included in the symbol list
  235. include_expsyms=
  236. # exclude_expsyms can be an egrep regular expression of symbols to exclude
  237. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  238. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  239. # as well as any symbol that contains `d'.
  240. exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  241. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  242. # platforms (ab)use it in PIC code, but their linkers get confused if
  243. # the symbol is explicitly referenced. Since portable code cannot
  244. # rely on this symbol name, it's probably fine to never include it in
  245. # preloaded symbol tables.
  246. extract_expsyms_cmds=
  247. ## Tools:
  248. old_AR="$AR"
  249. old_AR_FLAGS="$AR_FLAGS"
  250. old_CC="$CC"
  251. old_CFLAGS="$CFLAGS"
  252. old_CPPFLAGS="$CPPFLAGS"
  253. old_LDFLAGS="$LDFLAGS"
  254. old_LIBS="$LIBS"
  255. old_MAGIC_CMD="$MAGIC_CMD"
  256. old_LD="$LD"
  257. old_LN_S="$LN_S"
  258. old_LTCC="$LTCC"
  259. old_NM="$NM"
  260. old_RANLIB="$RANLIB"
  261. old_STRIP="$STRIP"
  262. old_AS="$AS"
  263. old_DLLTOOL="$DLLTOOL"
  264. old_OBJDUMP="$OBJDUMP"
  265. old_OBJEXT="$OBJEXT"
  266. old_EXEEXT="$EXEEXT"
  267. old_reload_flag="$reload_flag"
  268. old_deplibs_check_method="$deplibs_check_method"
  269. old_file_magic_cmd="$file_magic_cmd"
  270. # Parse the command line options.
  271. args=
  272. prev=
  273. for option
  274. do
  275. case $option in
  276. -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  277. *) optarg= ;;
  278. esac
  279. # If the previous option needs an argument, assign it.
  280. if test -n "$prev"; then
  281. eval "$prev=\$option"
  282. prev=
  283. continue
  284. fi
  285. case $option in
  286. --help) cat <<EOM
  287. Usage: $progname [OPTION]... LTMAIN [HOST]
  288. Generate a system-specific libtool script.
  289. --build configure for building on BUILD [BUILD=HOST]
  290. --debug enable verbose shell tracing
  291. --disable-shared do not build shared libraries
  292. --disable-static do not build static libraries
  293. --disable-fast-install do not optimize for fast installation
  294. --enable-dlopen enable dlopen support
  295. --enable-win32-dll enable building dlls on win32 hosts
  296. --help display this help and exit
  297. --no-verify do not verify that HOST is a valid host type
  298. -o, --output=FILE specify the output file [default=$default_ofile]
  299. --quiet same as \`--silent'
  300. --silent do not print informational messages
  301. --srcdir=DIR find \`config.guess' in DIR
  302. --version output version information and exit
  303. --add-tag=TAG append an alternate configuration
  304. --with-gcc assume that the GNU C compiler will be used
  305. --with-gnu-ld assume that the C compiler uses the GNU linker
  306. --prefer-pic try to use only PIC objects
  307. --prefer-non-pic try to use only non-PIC objects
  308. --disable-lock disable file locking
  309. --cache-file=FILE configure cache file
  310. LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
  311. that provides basic libtool functionality.
  312. HOST is the canonical host system name [default=guessed].
  313. EOM
  314. exit 0
  315. ;;
  316. --build) prev=build ;;
  317. --build=*) build="$optarg" ;;
  318. --debug)
  319. echo "$progname: enabling shell trace mode"
  320. set -x
  321. ;;
  322. --disable-shared) enable_shared=no ;;
  323. --disable-static) enable_static=no ;;
  324. --disable-fast-install) enable_fast_install=no ;;
  325. --enable-dlopen) enable_dlopen=yes ;;
  326. --enable-win32-dll) enable_win32_dll=yes ;;
  327. --quiet | --silent) silent=yes ;;
  328. --srcdir) prev=srcdir ;;
  329. --srcdir=*) srcdir="$optarg" ;;
  330. --no-verify) verify_host=no ;;
  331. --output | -o) prev=ofile ;;
  332. --output=*) ofile="$optarg" ;;
  333. --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
  334. --add-tag) prev=tagname ;;
  335. --add-tag=*) tagname="$optarg" ;;
  336. --with-gcc) with_gcc=yes ;;
  337. --with-gnu-ld) with_gnu_ld=yes ;;
  338. --prefer-pic) pic_mode=yes ;;
  339. --prefer-non-pic) pic_mode=no ;;
  340. --disable-lock) need_locks=no ;;
  341. --cache-file=*) cache_file="$optarg" ;;
  342. -*)
  343. echo "$progname: unrecognized option \`$option'" 1>&2
  344. echo "$help" 1>&2
  345. exit 1
  346. ;;
  347. *)
  348. if test -z "$ltmain"; then
  349. ltmain="$option"
  350. elif test -z "$host"; then
  351. # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
  352. # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
  353. # echo "$progname: warning \`$option' is not a valid host type" 1>&2
  354. # fi
  355. host="$option"
  356. else
  357. echo "$progname: too many arguments" 1>&2
  358. echo "$help" 1>&2
  359. exit 1
  360. fi ;;
  361. esac
  362. done
  363. if test -z "$ltmain"; then
  364. echo "$progname: you must specify a LTMAIN file" 1>&2
  365. echo "$help" 1>&2
  366. exit 1
  367. fi
  368. if test ! -f "$ltmain"; then
  369. echo "$progname: \`$ltmain' does not exist" 1>&2
  370. echo "$help" 1>&2
  371. exit 1
  372. fi
  373. if test -n "$tagname"; then
  374. # Check whether tagname contains only valid characters
  375. case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in
  376. "") ;;
  377. *)
  378. echo "$progname: invalid tag name: $tagname" 1>&2
  379. exit 1
  380. ;;
  381. esac
  382. if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ofile" > /dev/null; then
  383. echo "$progname: tag name $tagname already exists" 1>&2
  384. exit 1
  385. fi
  386. if test ! -f "$ofile"; then
  387. echo "$progname: warning: output file \`$ofile' does not exist" 1>&2
  388. fi
  389. if test -z "$LTCC"; then
  390. eval "`$SHELL $ofile --config | grep '^LTCC='`"
  391. if test -z "$LTCC"; then
  392. echo "$progname: warning: output file \`$ofile' does not look like a libtool script" 1>&2
  393. else
  394. echo "$progname: warning: using \`LTCC=$LTCC', extracted from \`$ofile'" 1>&2
  395. fi
  396. fi
  397. fi
  398. # Quote any args containing shell metacharacters.
  399. ltconfig_args=
  400. for arg
  401. do
  402. case $arg in
  403. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  404. ltconfig_args="$ltconfig_args '$arg'" ;;
  405. *) ltconfig_args="$ltconfig_args $arg" ;;
  406. esac
  407. done
  408. # A relevant subset of AC_INIT.
  409. # File descriptor usage:
  410. # 0 standard input
  411. # 1 file creation
  412. # 2 errors and warnings
  413. # 3 some systems may open it to /dev/tty
  414. # 4 used on the Kubota Titan
  415. # 5 compiler messages saved in config.log
  416. # 6 checking for... messages and results
  417. if test "$silent" = yes; then
  418. exec 6>/dev/null
  419. else
  420. exec 6>&1
  421. fi
  422. exec 5>>./config.log
  423. # NLS nuisances.
  424. # Only set LANG and LC_ALL to C if already set.
  425. # These must not be set unconditionally because not all systems understand
  426. # e.g. LANG=C (notably SCO).
  427. if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
  428. if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
  429. if test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then
  430. echo "loading cache $cache_file within ltconfig"
  431. . $cache_file
  432. fi
  433. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  434. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  435. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  436. ac_n= ac_c='
  437. ' ac_t=' '
  438. else
  439. ac_n=-n ac_c= ac_t=
  440. fi
  441. else
  442. ac_n= ac_c='\c' ac_t=
  443. fi
  444. if test -z "$srcdir"; then
  445. # Assume the source directory is the same one as the path to LTMAIN.
  446. srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
  447. test "$srcdir" = "$ltmain" && srcdir=.
  448. fi
  449. trap "$rm conftest*; exit 1" 1 2 15
  450. if test "$verify_host" = yes; then
  451. # Check for config.guess and config.sub.
  452. ac_aux_dir=
  453. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  454. if test -f $ac_dir/config.guess; then
  455. ac_aux_dir=$ac_dir
  456. break
  457. fi
  458. done
  459. if test -z "$ac_aux_dir"; then
  460. echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
  461. echo "$help" 1>&2
  462. exit 1
  463. fi
  464. ac_config_guess=$ac_aux_dir/config.guess
  465. ac_config_sub=$ac_aux_dir/config.sub
  466. # Make sure we can run config.sub.
  467. if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
  468. else
  469. echo "$progname: cannot run $ac_config_sub" 1>&2
  470. echo "$help" 1>&2
  471. exit 1
  472. fi
  473. echo $ac_n "checking host system type""... $ac_c" 1>&6
  474. host_alias=$host
  475. case $host_alias in
  476. "")
  477. # Force config.guess to use the C compiler.
  478. # CC_FOR_BUILD overrides the CC variable in config.guess but I had
  479. # problems with it so do it this way for now.
  480. CC="$LTCC"
  481. if host_alias=`$SHELL $ac_config_guess`; then :
  482. else
  483. echo "$progname: cannot guess host type; you must specify one" 1>&2
  484. echo "$help" 1>&2
  485. exit 1
  486. fi
  487. # Restore the C compiler.
  488. CC="$old_CC"
  489. ;;
  490. esac
  491. host=`$SHELL $ac_config_sub $host_alias`
  492. echo "$ac_t$host" 1>&6
  493. # Make sure the host verified.
  494. test -z "$host" && exit 1
  495. # Check for the build system type
  496. echo $ac_n "checking build system type... $ac_c" 1>&6
  497. build_alias=$build
  498. case $build_alias in
  499. NONE)
  500. case $nonopt in
  501. NONE) build_alias=$host_alias ;;
  502. *) build_alias=$nonopt ;;
  503. esac ;;
  504. esac
  505. build=`$SHELL $ac_config_sub $build_alias`
  506. build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  507. build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  508. build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  509. echo "$ac_t""$build" 1>&6
  510. elif test -z "$host"; then
  511. echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
  512. echo "$help" 1>&2
  513. exit 1
  514. else
  515. host_alias=$host
  516. build_alias=$host_alias
  517. build=$host
  518. fi
  519. if test x"$host" != x"$build"; then
  520. ac_tool_prefix=${host_alias}-
  521. else
  522. ac_tool_prefix=
  523. fi
  524. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  525. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  526. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  527. # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  528. case $host_os in
  529. linux-gnu*) ;;
  530. linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  531. esac
  532. case $host_os in
  533. aix3*)
  534. # AIX sometimes has problems with the GCC collect2 program. For some
  535. # reason, if we set the COLLECT_NAMES environment variable, the problems
  536. # vanish in a puff of smoke.
  537. if test "X${COLLECT_NAMES+set}" != Xset; then
  538. COLLECT_NAMES=
  539. export COLLECT_NAMES
  540. fi
  541. ;;
  542. esac
  543. # Determine commands to create old-style static archives.
  544. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  545. old_postinstall_cmds='chmod 644 $oldlib'
  546. old_postuninstall_cmds=
  547. if test -n "$RANLIB"; then
  548. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  549. old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  550. fi
  551. # Source the script associated with the $tagname tag configuration.
  552. if test -n "$tagname"; then
  553. . $ltmain
  554. else
  555. # FIXME: We should use a variable here
  556. # Configure for a C compiler
  557. . $srcdir/ltcf-c.sh
  558. fi
  559. # Set sane defaults for various variables
  560. test -z "$AR" && AR=ar
  561. test -z "$AR_FLAGS" && AR_FLAGS=cru
  562. test -z "$AS" && AS=as
  563. test -z "$CC" && CC=cc
  564. test -z "$DLLTOOL" && DLLTOOL=dlltool
  565. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  566. test -z "$LD" && LD=ld
  567. test -z "$LN_S" && LN_S="ln -s"
  568. test -z "$NM" && NM=nm
  569. test -z "$OBJDUMP" && OBJDUMP=objdump
  570. test -z "$RANLIB" && RANLIB=:
  571. test -z "$STRIP" && STRIP=:
  572. test -z "$objext" && objext=o
  573. echo $ac_n "checking for objdir... $ac_c" 1>&6
  574. rm -f .libs 2>/dev/null
  575. mkdir .libs 2>/dev/null
  576. if test -d .libs; then
  577. objdir=.libs
  578. else
  579. # MS-DOS does not allow filenames that begin with a dot.
  580. objdir=_libs
  581. fi
  582. rmdir .libs 2>/dev/null
  583. echo "$ac_t$objdir" 1>&6
  584. # If no C compiler was specified, use CC.
  585. LTCC=${LTCC-"$CC"}
  586. # Allow CC to be a program name with arguments.
  587. set dummy $CC
  588. compiler="$2"
  589. # We assume here that the value for ac_cv_prog_cc_pic will not be cached
  590. # in isolation, and that seeing it set (from the cache) indicates that
  591. # the associated values are set (in the cache) correctly too.
  592. echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
  593. echo "$progname:678:checking for $compiler option to produce PIC" 1>&5
  594. if test -z "$ac_cv_prog_cc_pic"; then
  595. echo "$ac_t"none 1>&6
  596. else
  597. echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6
  598. # Check to make sure the pic_flag actually works.
  599. echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6
  600. echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
  601. if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \
  602. test "X${ac_cv_prog_cc_pic_works}" != X; then
  603. echo $ac_n "(cached) $ac_c" 1>&6
  604. else
  605. ac_cv_prog_cc_pic_works=yes
  606. $rm conftest*
  607. echo $lt_simple_compile_test_code > conftest.$ac_ext
  608. save_CFLAGS="$CFLAGS"
  609. CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
  610. if { (eval echo $progname:697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
  611. # Append any warnings to the config.log.
  612. cat conftest.err 1>&5
  613. case $host_os in
  614. hpux9* | hpux10* | hpux11*)
  615. # On HP-UX, both CC and GCC only warn that PIC is supported... then
  616. # they create non-PIC objects. So, if there were any warnings, we
  617. # assume that PIC is not supported.
  618. if test -s conftest.err; then
  619. ac_cv_prog_cc_pic_works=no
  620. ac_cv_prog_cc_can_build_shared=no
  621. ac_cv_prog_cc_pic=
  622. else
  623. ac_cv_prog_cc_pic_works=yes
  624. ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
  625. fi
  626. ;;
  627. *)
  628. ac_cv_prog_cc_pic_works=yes
  629. ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
  630. ;;
  631. esac
  632. else
  633. # Append any errors to the config.log.
  634. cat conftest.err 1>&5
  635. ac_cv_prog_cc_pic_works=no
  636. ac_cv_prog_cc_can_build_shared=no
  637. ac_cv_prog_cc_pic=
  638. fi
  639. CFLAGS="$save_CFLAGS"
  640. $rm conftest*
  641. fi
  642. # Belt *and* braces to stop my trousers falling down:
  643. if test "X$ac_cv_prog_cc_pic_works" = Xno; then
  644. ac_cv_prog_cc_pic=
  645. ac_cv_prog_cc_can_build_shared=no
  646. fi
  647. echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6
  648. fi
  649. # Check for any special shared library compilation flags.
  650. if test -n "$ac_cv_prog_cc_shlib"; then
  651. echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2
  652. if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev/null; then :
  653. else
  654. echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
  655. ac_cv_prog_cc_can_build_shared=no
  656. fi
  657. fi
  658. echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
  659. echo "$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
  660. if test "X${ac_cv_prog_cc_static_works+set}" = Xset && \
  661. test "X${ac_cv_prog_cc_static_works}" != X; then
  662. echo $ac_n "(cached) $ac_c" 1>&6
  663. else
  664. $rm conftest*
  665. echo $lt_simple_link_test_code > conftest.$ac_ext
  666. save_LDFLAGS="$LDFLAGS"
  667. LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static"
  668. if { (eval echo $progname:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  669. ac_cv_prog_cc_static_works=yes
  670. else
  671. ac_cv_prog_cc_static_works=no
  672. ac_cv_prog_cc_static=
  673. fi
  674. LDFLAGS="$save_LDFLAGS"
  675. $rm conftest*
  676. fi
  677. # Belt *and* braces to stop my trousers falling down:
  678. if test "X$ac_cv_prog_cc_static_works" = Xno; then
  679. ac_cv_prog_cc_static=
  680. fi
  681. echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6
  682. pic_flag="$ac_cv_prog_cc_pic"
  683. special_shlib_compile_flags="$ac_cv_prog_cc_shlib"
  684. wl="$ac_cv_prog_cc_wl"
  685. link_static_flag="$ac_cv_prog_cc_static"
  686. no_builtin_flag="$ac_cv_prog_cc_no_builtin"
  687. can_build_shared="$ac_cv_prog_cc_can_build_shared"
  688. # find the maximum length of command line arguments
  689. echo "$progname:780: finding the maximum length of command line arguments" 1>&5
  690. echo $ac_n "finding the maximum length of command line arguments... $ac_c" 1>&6
  691. if test "${lt_cv_sys_max_cmd_len+set}" = set; then
  692. echo $ac_n "(cached) $ac_c" 1>&6
  693. else
  694. i=0
  695. testring="ABCD"
  696. # If test is not a shell built-in, we'll probably end up computing a
  697. # maximum length that is only half of the actual maximum length, but
  698. # we can't tell.
  699. while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
  700. = "XX$testring" &&
  701. new_result=`expr "X$testring" : ".*" 2>&1` &&
  702. lt_cv_sys_max_cmd_len=$new_result &&
  703. test $i != 18 # 1 MB should be enough
  704. do
  705. i=`expr $i + 1`
  706. testring=$testring$testring
  707. done
  708. testring=
  709. # add a significant safety factor because C++ compilers can tack on massive amounts
  710. # of additional arguments before passing them to the linker. 1/4 should be good.
  711. len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  712. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
  713. fi
  714. echo "$progname:@lineno@: result: $lt_cv_sys_max_cmd_len" 1>&5
  715. echo "${ac_t}$lt_cv_sys_max_cmd_len" 1>&6
  716. if test -n $lt_cv_sys_max_cmd_len ; then
  717. max_cmd_len=$lt_cv_sys_max_cmd_len
  718. else
  719. max_cmd_len=none
  720. fi
  721. # Check to see if options -o and -c are simultaneously supported by compiler
  722. echo $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6
  723. if test "${lt_cv_compiler_c_o+set}" = set; then
  724. echo $ac_n "(cached) $ac_c" 1>&6
  725. else
  726. $rm -r conftest 2>/dev/null
  727. mkdir conftest
  728. cd conftest
  729. $rm conftest*
  730. echo $lt_simple_compile_test_code > conftest.$ac_ext
  731. mkdir out
  732. # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
  733. # that will create temporary files in the current directory regardless of
  734. # the output directory. Thus, making CWD read-only will cause this test
  735. # to fail, enabling locking or at least warning the user not to do parallel
  736. # builds.
  737. chmod -w .
  738. save_CFLAGS="$CFLAGS"
  739. CFLAGS="$CFLAGS -o out/conftest2.$objext"
  740. echo "$progname:833: checking if $compiler supports -c -o file.$objext" >&5
  741. if { (eval echo $progname:834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then
  742. # The compiler can only warn and ignore the option if not recognized
  743. # So say no if there are warnings
  744. if test -s out/conftest.err; then
  745. lt_cv_compiler_c_o=no
  746. else
  747. lt_cv_compiler_c_o=yes
  748. fi
  749. else
  750. # Append any errors to the config.log.
  751. cat out/conftest.err 1>&5
  752. lt_cv_compiler_c_o=no
  753. fi
  754. CFLAGS="$save_CFLAGS"
  755. chmod u+w .
  756. $rm conftest* out/*
  757. rmdir out
  758. cd ..
  759. rmdir conftest
  760. $rm -r conftest 2>/dev/null
  761. fi
  762. compiler_c_o=$lt_cv_compiler_c_o
  763. echo "${ac_t}$compiler_c_o" 1>&6
  764. # Check to see if we can do hard links to lock some files if needed
  765. hard_links="nottested"
  766. if test "$compiler_c_o" = no && test "$need_locks" != no; then
  767. # do not overwrite the value of need_locks provided by the user
  768. echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
  769. hard_links=yes
  770. $rm conftest*
  771. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  772. touch conftest.a
  773. ln conftest.a conftest.b 2>&5 || hard_links=no
  774. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  775. echo "$ac_t$hard_links" 1>&6
  776. $rm conftest*
  777. if test "$hard_links" = no; then
  778. echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
  779. need_locks=warn
  780. fi
  781. else
  782. need_locks=no
  783. fi
  784. if test "$with_gcc" = yes; then
  785. # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
  786. echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
  787. $rm conftest*
  788. echo $lt_simple_compile_test_code > conftest.$ac_ext
  789. save_CFLAGS="$CFLAGS"
  790. CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
  791. echo "$progname:887: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
  792. if { (eval echo $progname:888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
  793. # The compiler can only warn and ignore the option if not recognized
  794. # So say no if there are warnings
  795. if test -s conftest.err; then
  796. echo "$ac_t"no 1>&6
  797. compiler_rtti_exceptions=no
  798. else
  799. echo "$ac_t"yes 1>&6
  800. compiler_rtti_exceptions=yes
  801. fi
  802. else
  803. # Append any errors to the config.log.
  804. cat conftest.err 1>&5
  805. compiler_rtti_exceptions=no
  806. echo "$ac_t"no 1>&6
  807. fi
  808. CFLAGS="$save_CFLAGS"
  809. $rm conftest*
  810. if test "$compiler_rtti_exceptions" = "yes"; then
  811. no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
  812. else
  813. no_builtin_flag=' -fno-builtin'
  814. fi
  815. fi
  816. # See if the linker supports building shared libraries.
  817. echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
  818. echo "$ac_t$ld_shlibs" 1>&6
  819. test "$ld_shlibs" = no && can_build_shared=no
  820. # Check hardcoding attributes.
  821. echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
  822. hardcode_action=
  823. if test -n "$hardcode_libdir_flag_spec" || \
  824. test -n "$runpath_var"; then
  825. # We can hardcode non-existant directories.
  826. if test "$hardcode_direct" != no &&
  827. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  828. # have to relink, otherwise we might link with an installed library
  829. # when we should be linking with a yet-to-be-installed one
  830. ## test "$hardcode_shlibpath_var" != no &&
  831. test "$hardcode_minus_L" != no; then
  832. # Linking always hardcodes the temporary library directory.
  833. hardcode_action=relink
  834. else
  835. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  836. hardcode_action=immediate
  837. fi
  838. else
  839. # We cannot hardcode anything, or else we can only hardcode existing
  840. # directories.
  841. hardcode_action=unsupported
  842. fi
  843. echo "$ac_t$hardcode_action" 1>&6
  844. echo $ac_n "checking whether stripping libraries is possible... $ac_c" 1>&6
  845. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  846. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  847. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  848. echo "${ac_t}yes" 1>&6
  849. else
  850. echo "${ac_t}no" 1>&6
  851. fi
  852. case $reload_flag in
  853. "" | " "*) ;;
  854. *) reload_flag=" $reload_flag" ;;
  855. esac
  856. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  857. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  858. # PORTME Fill in your ld.so characteristics
  859. library_names_spec=
  860. libname_spec='lib$name'
  861. soname_spec=
  862. postinstall_cmds=
  863. postuninstall_cmds=
  864. finish_cmds=
  865. finish_eval=
  866. shlibpath_var=
  867. shlibpath_overrides_runpath=unknown
  868. version_type=none
  869. dynamic_linker="$host_os ld.so"
  870. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  871. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  872. echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
  873. case $host_os in
  874. aix3*)
  875. version_type=linux
  876. library_names_spec='${libname}${release}.so$versuffix $libname.a'
  877. shlibpath_var=LIBPATH
  878. # AIX 3 has no versioning support, so we append a major version to the name.
  879. soname_spec='${libname}${release}.so$major'
  880. ;;
  881. aix4* | aix5*)
  882. if test "$host_cpu" = ia64; then
  883. # AIX 5 supports IA64
  884. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  885. shlibpath_var=LD_LIBRARY_PATH
  886. else
  887. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  888. # soname into executable. Probably we can add versioning support to
  889. # collect2, so additional links can be useful in future.
  890. # We preserve .a as extension for shared libraries though AIX4.2
  891. # and later linker supports .so
  892. if test "$aix_use_runtimelinking" = yes; then
  893. # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
  894. # lib<name>.a to let people know that these are not typical AIX shared libraries.
  895. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  896. else
  897. # We preserve .a as extension for shared libraries though AIX4.2
  898. # and later when we are not doing run time linking.
  899. library_names_spec='${libname}${release}.a $libname.a'
  900. soname_spec='${libname}${release}.so$major.o'
  901. fi
  902. # If we're using GNU nm, then we don't want the "-C" option.
  903. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  904. if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
  905. export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
  906. else
  907. export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
  908. fi
  909. shlibpath_var=LIBPATH
  910. deplibs_check_method=pass_all
  911. case $host_os in
  912. aix4 | aix4.[01] | aix4.[01].*)
  913. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  914. echo ' yes '
  915. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  916. :
  917. else
  918. # With GCC up to 2.95.x, collect2 would create an import file
  919. # for dependence libraries. The import file would start with
  920. # the line `#! .'. This would cause the generated library to
  921. # depend on `.', always an invalid library. This was fixed in
  922. # development snapshots of GCC prior to 3.0.
  923. can_build_shared=no
  924. fi
  925. ;;
  926. esac
  927. fi
  928. ;;
  929. amigaos*)
  930. library_names_spec='$libname.ixlibrary $libname.a'
  931. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  932. 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'
  933. ;;
  934. beos*)
  935. library_names_spec='${libname}.so'
  936. dynamic_linker="$host_os ld.so"
  937. shlibpath_var=LIBRARY_PATH
  938. lt_cv_dlopen="load_add_on"
  939. lt_cv_dlopen_libs=
  940. lt_cv_dlopen_self=yes
  941. ;;
  942. bsdi4*)
  943. version_type=linux
  944. need_version=no
  945. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  946. soname_spec='${libname}${release}.so$major'
  947. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  948. shlibpath_var=LD_LIBRARY_PATH
  949. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  950. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  951. export_dynamic_flag_spec=-rdynamic
  952. # the default ld.so.conf also contains /usr/contrib/lib and
  953. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  954. # libtool to hard-code these into programs
  955. ;;
  956. cygwin* | mingw* | pw32*)
  957. version_type=windows
  958. need_version=no
  959. need_lib_prefix=no
  960. case $with_gcc,$host_os in
  961. yes,cygwin*)
  962. library_names_spec='$libname.dll.a'
  963. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
  964. postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i; echo \$dlname'\''`~
  965. dldir=$destdir/`dirname \$dlpath`~
  966. test -d \$dldir || mkdir -p \$dldir~
  967. $install_prog .libs/$dlname \$dldir/$dlname'
  968. postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
  969. dlpath=$dir/\$dldll; $rm \$dlpath'
  970. ;;
  971. yes,mingw*)
  972. library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
  973. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
  974. ;;
  975. yes,pw32*)
  976. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
  977. ;;
  978. *)
  979. library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
  980. ;;
  981. esac
  982. dynamic_linker='Win32 ld.exe'
  983. # FIXME: first we should search . and the directory the executable is in
  984. shlibpath_var=PATH
  985. lt_cv_dlopen="LoadLibrary"
  986. lt_cv_dlopen_libs=
  987. ;;
  988. darwin* | rhapsody*)
  989. dynamic_linker="$host_os dyld"
  990. version_type=darwin
  991. need_lib_prefix=no
  992. need_version=no
  993. library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`'
  994. soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`'
  995. shlibpath_overrides_runpath=yes
  996. shlibpath_var=DYLD_LIBRARY_PATH
  997. ;;
  998. freebsd1*)
  999. dynamic_linker=no
  1000. ;;
  1001. freebsd*)
  1002. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  1003. version_type=sunos
  1004. case $objformat in
  1005. elf*)
  1006. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1007. soname_spec='${libname}${release}.so$major'
  1008. need_version=no
  1009. need_lc=no
  1010. need_lib_prefix=no
  1011. ;;
  1012. *)
  1013. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1014. need_version=yes
  1015. ;;
  1016. esac
  1017. shlibpath_var=LD_LIBRARY_PATH
  1018. case $host_os in
  1019. freebsd2*)
  1020. shlibpath_overrides_runpath=yes
  1021. ;;
  1022. *)
  1023. shlibpath_overrides_runpath=no
  1024. hardcode_into_libs=yes
  1025. ;;
  1026. esac
  1027. ;;
  1028. gnu*)
  1029. version_type=linux
  1030. need_lib_prefix=no
  1031. need_version=no
  1032. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
  1033. soname_spec='${libname}${release}.so$major'
  1034. shlibpath_var=LD_LIBRARY_PATH
  1035. hardcode_into_libs=yes
  1036. ;;
  1037. hpux9* | hpux10* | hpux11*)
  1038. # Give a soname corresponding to the major version so that dld.sl refuses to
  1039. # link against other versions.
  1040. dynamic_linker="$host_os dld.sl"
  1041. version_type=sunos
  1042. need_lib_prefix=no
  1043. need_version=no
  1044. shlibpath_var=SHLIB_PATH
  1045. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  1046. library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
  1047. soname_spec='${libname}${release}.sl$major'
  1048. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  1049. postinstall_cmds='chmod 555 $lib'
  1050. ;;
  1051. irix5* | irix6*)
  1052. version_type=irix
  1053. need_lib_prefix=no
  1054. need_version=no
  1055. soname_spec='${libname}${release}.so$major'
  1056. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
  1057. case $host_os in
  1058. irix5*)
  1059. libsuff= shlibsuff=
  1060. ;;
  1061. *)
  1062. case $LD in # libtool.m4 will add one of these switches to LD
  1063. *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  1064. *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  1065. *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  1066. *) libsuff= shlibsuff= libmagic=never-match;;
  1067. esac
  1068. ;;
  1069. esac
  1070. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  1071. shlibpath_overrides_runpath=no
  1072. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  1073. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  1074. ;;
  1075. # No shared lib support for Linux oldld, aout, or coff.
  1076. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
  1077. dynamic_linker=no
  1078. ;;
  1079. # This must be Linux ELF.
  1080. linux-gnu*)
  1081. version_type=sunos
  1082. need_lib_prefix=no
  1083. need_version=no
  1084. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1085. soname_spec='${libname}${release}.so$major'
  1086. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  1087. shlibpath_var=LD_LIBRARY_PATH
  1088. shlibpath_overrides_runpath=no
  1089. # This implies no fast_install, which is unacceptable.
  1090. # Some rework will be needed to allow for fast_install
  1091. # before this can be enabled.
  1092. hardcode_into_libs=yes
  1093. # We used to test for /lib/ld.so.1 and disable shared libraries on
  1094. # powerpc, because MkLinux only supported shared libraries with the
  1095. # GNU dynamic linker. Since this was broken with cross compilers,
  1096. # most powerpc-linux boxes support dynamic linking these days and
  1097. # people can always --disable-shared, the test was removed, and we
  1098. # assume the GNU/Linux dynamic linker is in use.
  1099. dynamic_linker='GNU/Linux ld.so'
  1100. ;;
  1101. netbsd*)
  1102. need_lib_prefix=no
  1103. need_version=no
  1104. version_type=sunos
  1105. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1106. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  1107. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1108. dynamic_linker='NetBSD (a.out) ld.so'
  1109. else
  1110. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
  1111. soname_spec='${libname}${release}.so$major'
  1112. dynamic_linker='NetBSD ld.elf_so'
  1113. fi
  1114. shlibpath_var=LD_LIBRARY_PATH
  1115. shlibpath_overrides_runpath=yes
  1116. hardcode_into_libs=yes
  1117. sys_lib_dlsearch_path_spec="/usr/lib"
  1118. sys_lib_search_path_spec="/usr/lib"
  1119. ;;
  1120. newsos6)
  1121. version_type=linux
  1122. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1123. shlibpath_var=LD_LIBRARY_PATH
  1124. shlibpath_overrides_runpath=yes
  1125. ;;
  1126. openbsd*)
  1127. version_type=sunos
  1128. if test "$with_gnu_ld" = yes; then
  1129. need_lib_prefix=no
  1130. need_version=no
  1131. fi
  1132. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  1133. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1134. shlibpath_var=LD_LIBRARY_PATH
  1135. ;;
  1136. os2*)
  1137. libname_spec='$name'
  1138. need_lib_prefix=no
  1139. library_names_spec='$libname.dll $libname.a'
  1140. dynamic_linker='OS/2 ld.exe'
  1141. shlibpath_var=LIBPATH
  1142. ;;
  1143. osf3* | osf4* | osf5*)
  1144. version_type=osf
  1145. need_version=no
  1146. soname_spec='${libname}${release}.so'
  1147. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  1148. shlibpath_var=LD_LIBRARY_PATH
  1149. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  1150. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  1151. ;;
  1152. sco3.2v5*)
  1153. version_type=osf
  1154. soname_spec='${libname}${release}.so$major'
  1155. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1156. shlibpath_var=LD_LIBRARY_PATH
  1157. ;;
  1158. solaris*)
  1159. version_type=sunos
  1160. need_lib_prefix=no
  1161. need_version=no
  1162. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1163. soname_spec='${libname}${release}.so$major'
  1164. shlibpath_var=LD_LIBRARY_PATH
  1165. shlibpath_overrides_runpath=yes
  1166. hardcode_into_libs=yes
  1167. # ldd complains unless libraries are executable
  1168. postinstall_cmds='chmod +x $lib'
  1169. ;;
  1170. sunos4*)
  1171. version_type=sunos
  1172. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  1173. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  1174. shlibpath_var=LD_LIBRARY_PATH
  1175. shlibpath_overrides_runpath=yes
  1176. if test "$with_gnu_ld" = yes; then
  1177. need_lib_prefix=no
  1178. fi
  1179. need_version=yes
  1180. ;;
  1181. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1182. version_type=linux
  1183. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1184. soname_spec='${libname}${release}.so$major'
  1185. shlibpath_var=LD_LIBRARY_PATH
  1186. case $host_vendor in
  1187. motorola)
  1188. need_lib_prefix=no
  1189. need_version=no
  1190. shlibpath_overrides_runpath=no
  1191. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  1192. ;;
  1193. esac
  1194. ;;
  1195. uts4*)
  1196. version_type=linux
  1197. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1198. soname_spec='${libname}${release}.so$major'
  1199. shlibpath_var=LD_LIBRARY_PATH
  1200. ;;
  1201. dgux*)
  1202. version_type=linux
  1203. need_lib_prefix=no
  1204. need_version=no
  1205. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1206. soname_spec='${libname}${release}.so$major'
  1207. shlibpath_var=LD_LIBRARY_PATH
  1208. ;;
  1209. sysv4*MP*)
  1210. if test -d /usr/nec ;then
  1211. version_type=linux
  1212. library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
  1213. soname_spec='$libname.so.$major'
  1214. shlibpath_var=LD_LIBRARY_PATH
  1215. fi
  1216. ;;
  1217. *)
  1218. dynamic_linker=no
  1219. ;;
  1220. esac
  1221. echo "$ac_t$dynamic_linker" 1>&6
  1222. test "$dynamic_linker" = no && can_build_shared=no
  1223. # Check for command to grab the raw symbol name followed by C symbol from nm.
  1224. echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
  1225. # These are sane defaults that work on at least a few old systems.
  1226. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  1227. # Character class describing NM global symbol codes.
  1228. symcode='[BCDEGRST]'
  1229. # Regexp to match symbols that can be accessed directly from C.
  1230. sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
  1231. # Transform the above into a raw symbol and a C symbol.
  1232. symxfrm='\1 \2\3 \3'
  1233. # Transform an extracted symbol line into a proper C declaration
  1234. global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
  1235. # Define system-specific variables.
  1236. case $host_os in
  1237. aix*)
  1238. symcode='[BCDT]'
  1239. ;;
  1240. cygwin* | mingw* | pw32*)
  1241. symcode='[ABCDGISTW]'
  1242. ;;
  1243. hpux*) # Its linker distinguishes data from code symbols
  1244. global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  1245. ;;
  1246. irix*)
  1247. symcode='[BCDEGRST]'
  1248. ;;
  1249. solaris* | sysv5*)
  1250. symcode='[BDT]'
  1251. ;;
  1252. sysv4)
  1253. symcode='[DFNSTU]'
  1254. ;;
  1255. esac
  1256. # Handle CRLF in mingw tool chain
  1257. opt_cr=
  1258. case $host_os in
  1259. mingw*)
  1260. opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  1261. ;;
  1262. esac
  1263. # If we're using GNU nm, then use its standard symbol codes.
  1264. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
  1265. symcode='[ABCDGISTW]'
  1266. fi
  1267. # Try without a prefix undercore, then with it.
  1268. for ac_symprfx in "" "_"; do
  1269. # Write the raw and C identifiers.
  1270. global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
  1271. # Check to see that the pipe works correctly.
  1272. pipe_works=no
  1273. $rm conftest*
  1274. cat > conftest.$ac_ext <<EOF
  1275. #ifdef __cplusplus
  1276. extern "C" {
  1277. #endif
  1278. char nm_test_var;
  1279. void nm_test_func(){}
  1280. #ifdef __cplusplus
  1281. }
  1282. #endif
  1283. int main(){nm_test_var='a';nm_test_func();return(0);}
  1284. EOF
  1285. echo "$progname:1433: checking if global_symbol_pipe works" >&5
  1286. if { (eval echo $progname:1434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
  1287. # Now try to grab the symbols.
  1288. nlist=conftest.nm
  1289. if { echo "$progname:1437: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  1290. # Try sorting and uniquifying the output.
  1291. if sort "$nlist" | uniq > "$nlist"T; then
  1292. mv -f "$nlist"T "$nlist"
  1293. else
  1294. rm -f "$nlist"T
  1295. fi
  1296. # Make sure that we snagged all the symbols we need.
  1297. if egrep ' nm_test_var$' "$nlist" >/dev/null; then
  1298. if egrep ' nm_test_func$' "$nlist" >/dev/null; then
  1299. cat <<EOF > conftest.$ac_ext
  1300. #ifdef __cplusplus
  1301. extern "C" {
  1302. #endif
  1303. EOF
  1304. # Now generate the symbol file.
  1305. eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
  1306. cat <<EOF >> conftest.$ac_ext
  1307. #if defined (__STDC__) && __STDC__
  1308. # define lt_ptr_t void *
  1309. #else
  1310. # define lt_ptr_t char *
  1311. # define const
  1312. #endif
  1313. /* The mapping between symbol names and symbols. */
  1314. const struct {
  1315. const char *name;
  1316. lt_ptr_t address;
  1317. }
  1318. lt_preloaded_symbols[] =
  1319. {
  1320. EOF
  1321. sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
  1322. cat <<\EOF >> conftest.$ac_ext
  1323. {0, (lt_ptr_t) 0}
  1324. };
  1325. #ifdef __cplusplus
  1326. }
  1327. #endif
  1328. EOF
  1329. # Now try linking the two files.
  1330. mv conftest.$objext conftstm.$objext
  1331. save_LIBS="$LIBS"
  1332. save_CFLAGS="$CFLAGS"
  1333. LIBS="conftstm.$objext"
  1334. CFLAGS="$CFLAGS$no_builtin_flag"
  1335. if { (eval echo $progname:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1336. pipe_works=yes
  1337. else
  1338. echo "$progname: failed program was:" >&5
  1339. cat conftest.$ac_ext >&5
  1340. fi
  1341. LIBS="$save_LIBS"
  1342. else
  1343. echo "cannot find nm_test_func in $nlist" >&5
  1344. fi
  1345. else
  1346. echo "cannot find nm_test_var in $nlist" >&5
  1347. fi
  1348. else
  1349. echo "cannot run $global_symbol_pipe" >&5
  1350. fi
  1351. else
  1352. echo "$progname: failed program was:" >&5
  1353. cat conftest.$ac_ext >&5
  1354. fi
  1355. $rm conftest* conftst*
  1356. # Do not use the global_symbol_pipe unless it works.
  1357. if test "$pipe_works" = yes; then
  1358. break
  1359. else
  1360. global_symbol_pipe=
  1361. fi
  1362. done
  1363. if test "$pipe_works" = yes; then
  1364. echo "${ac_t}ok" 1>&6
  1365. else
  1366. echo "${ac_t}failed" 1>&6
  1367. fi
  1368. if test -z "$global_symbol_pipe"; then
  1369. global_symbol_to_cdecl=
  1370. fi
  1371. # Report the final consequences.
  1372. echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
  1373. # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
  1374. # configure.in, otherwise build static only libraries.
  1375. case $host_os in
  1376. cygwin* | mingw* | pw32* | os2*)
  1377. if test x$can_build_shared = xyes; then
  1378. test x$enable_win32_dll = xno && can_build_shared=no
  1379. echo "checking if package supports dlls... $can_build_shared" 1>&6
  1380. fi
  1381. ;;
  1382. esac
  1383. echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
  1384. test "$can_build_shared" = "no" && enable_shared=no
  1385. # On AIX, shared libraries and static libraries use the same namespace, and
  1386. # are all built from PIC.
  1387. case $host_os in
  1388. aix3*)
  1389. test "$enable_shared" = yes && enable_static=no
  1390. if test -n "$RANLIB"; then
  1391. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  1392. postinstall_cmds='$RANLIB $lib'
  1393. fi
  1394. ;;
  1395. aix4*)
  1396. test "$enable_shared" = yes && enable_static=no
  1397. ;;
  1398. esac
  1399. echo "$ac_t$enable_shared" 1>&6
  1400. # Make sure either enable_shared or enable_static is yes.
  1401. test "$enable_shared" = yes || enable_static=yes
  1402. echo "checking whether to build static libraries... $enable_static" 1>&6
  1403. if test "$hardcode_action" = relink; then
  1404. # Fast installation is not supported
  1405. enable_fast_install=no
  1406. elif test "$shlibpath_overrides_runpath" = yes ||
  1407. test "$enable_shared" = no; then
  1408. # Fast installation is not necessary
  1409. enable_fast_install=needless
  1410. fi
  1411. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  1412. if test "$with_gcc" = yes; then
  1413. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  1414. fi
  1415. # Check whether we must set pic_mode to default
  1416. test -z "$pic_flag" && pic_mode=default
  1417. if test "x$enable_dlopen" != xyes; then
  1418. enable_dlopen=unknown
  1419. enable_dlopen_self=unknown
  1420. enable_dlopen_self_static=unknown
  1421. else
  1422. if test "X${lt_cv_dlopen+set}" != Xset; then
  1423. lt_cv_dlopen=no lt_cv_dlopen_libs=
  1424. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  1425. echo "$progname:1593: checking for dlopen in -ldl" >&5
  1426. if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then
  1427. echo $ac_n "(cached) $ac_c" 1>&6
  1428. else
  1429. ac_save_LIBS="$LIBS"
  1430. LIBS="-ldl $LIBS"
  1431. cat > conftest.$ac_ext <<EOF
  1432. #line 1600 "ltconfig"
  1433. /* Override any gcc2 internal prototype to avoid an error. */
  1434. /* We use char because int might match the return type of a gcc2
  1435. builtin and then its argument prototype would still apply. */
  1436. #ifdef __cplusplus
  1437. extern "C"
  1438. #endif
  1439. char dlopen();
  1440. int main() {
  1441. dlopen()
  1442. ; return 0; }
  1443. EOF
  1444. if { (eval echo $progname:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1445. rm -rf conftest*
  1446. ac_cv_lib_dl_dlopen=yes
  1447. else
  1448. echo "$progname: failed program was:" >&5
  1449. cat conftest.$ac_ext >&5
  1450. rm -rf conftest*
  1451. ac_cv_lib_dl_dlopen=no
  1452. fi
  1453. rm -f conftest*
  1454. LIBS="$ac_save_LIBS"
  1455. fi
  1456. if test "X$ac_cv_lib_dl_dlopen" = Xyes; then
  1457. echo "$ac_t""yes" 1>&6
  1458. lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  1459. else
  1460. echo "$ac_t""no" 1>&6
  1461. echo $ac_n "checking for dlopen""... $ac_c" 1>&6
  1462. echo "$progname:1632: checking for dlopen" >&5
  1463. if test "X${ac_cv_func_dlopen+set}" = Xset; then
  1464. echo $ac_n "(cached) $ac_c" 1>&6
  1465. else
  1466. cat > conftest.$ac_ext <<EOF
  1467. #line 1637 "ltconfig"
  1468. /* System header to define __stub macros and hopefully few prototypes,
  1469. which can conflict with char dlopen(); below. */
  1470. #include <assert.h>
  1471. /* Override any gcc2 internal prototype to avoid an error. */
  1472. /* We use char because int might match the return type of a gcc2
  1473. builtin and then its argument prototype would still apply. */
  1474. #ifdef __cplusplus
  1475. extern "C"
  1476. #endif
  1477. char dlopen();
  1478. int main() {
  1479. /* The GNU C library defines this for functions which it implements
  1480. to always fail with ENOSYS. Some functions are actually named
  1481. something starting with __ and the normal name is an alias. */
  1482. #if defined (__stub_dlopen) || defined (__stub___dlopen)
  1483. choke me
  1484. #else
  1485. dlopen();
  1486. #endif
  1487. ; return 0; }
  1488. EOF
  1489. if { (eval echo $progname:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1490. rm -rf conftest*
  1491. ac_cv_func_dlopen=yes
  1492. else
  1493. echo "$progname: failed program was:" >&5
  1494. cat conftest.$ac_ext >&5
  1495. rm -rf conftest*
  1496. ac_cv_func_dlopen=no
  1497. fi
  1498. rm -f conftest*
  1499. fi
  1500. if test "X$ac_cv_func_dlopen" = Xyes; then
  1501. echo "$ac_t""yes" 1>&6
  1502. lt_cv_dlopen="dlopen"
  1503. else
  1504. echo "$ac_t""no" 1>&6
  1505. echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
  1506. echo "$progname:1679: checking for dlopen in -lsvld" >&5
  1507. if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
  1508. echo $ac_n "(cached) $ac_c" 1>&6
  1509. else
  1510. ac_save_LIBS="$LIBS"
  1511. LIBS="-lsvld $LIBS"
  1512. cat > conftest.$ac_ext <<EOF
  1513. #line 1686 "ltconfig"
  1514. /* Override any gcc2 internal prototype to avoid an error. */
  1515. /* We use char because int might match the return type of a gcc2
  1516. builtin and then its argument prototype would still apply. */
  1517. #ifdef __cplusplus
  1518. extern "C"
  1519. #endif
  1520. char dlopen();
  1521. int main() {
  1522. dlopen()
  1523. ; return 0; }
  1524. EOF
  1525. if { (eval echo $progname:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1526. rm -rf conftest*
  1527. ac_cv_lib_svld_dlopen=yes
  1528. else
  1529. echo "$progname: failed program was:" >&5
  1530. cat conftest.$ac_ext >&5
  1531. rm -rf conftest*
  1532. ac_cv_lib_svld_dlopen=no
  1533. fi
  1534. rm -f conftest*
  1535. LIBS="$ac_save_LIBS"
  1536. fi
  1537. if test "X$ac_cv_lib_svld_dlopen" = Xyes; then
  1538. echo "$ac_t""yes" 1>&6
  1539. lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
  1540. else
  1541. echo "$ac_t""no" 1>&6
  1542. echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
  1543. echo "$progname:1718: checking for dld_link in -ldld" >&5
  1544. if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then
  1545. echo $ac_n "(cached) $ac_c" 1>&6
  1546. else
  1547. ac_save_LIBS="$LIBS"
  1548. LIBS="-ldld $LIBS"
  1549. cat > conftest.$ac_ext <<EOF
  1550. #line 1725 "ltconfig"
  1551. /* Override any gcc2 internal prototype to avoid an error. */
  1552. /* We use char because int might match the return type of a gcc2
  1553. builtin and then its argument prototype would still apply. */
  1554. #ifdef __cplusplus
  1555. extern "C"
  1556. #endif
  1557. char dld_link();
  1558. int main() {
  1559. dld_link()
  1560. ; return 0; }
  1561. EOF
  1562. if { (eval echo $progname:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1563. rm -rf conftest*
  1564. ac_cv_lib_dld_dld_link=yes
  1565. else
  1566. echo "$progname: failed program was:" >&5
  1567. cat conftest.$ac_ext >&5
  1568. rm -rf conftest*
  1569. ac_cv_lib_dld_dld_link=no
  1570. fi
  1571. rm -f conftest*
  1572. LIBS="$ac_save_LIBS"
  1573. fi
  1574. if test "X$ac_cv_lib_dld_dld_link" = Xyes; then
  1575. echo "$ac_t""yes" 1>&6
  1576. lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
  1577. else
  1578. echo "$ac_t""no" 1>&6
  1579. echo $ac_n "checking for shl_load""... $ac_c" 1>&6
  1580. echo "$progname:1757: checking for shl_load" >&5
  1581. if test "X${ac_cv_func_shl_load+set}" = Xset; then
  1582. echo $ac_n "(cached) $ac_c" 1>&6
  1583. else
  1584. cat > conftest.$ac_ext <<EOF
  1585. #line 1762 "ltconfig"
  1586. /* System header to define __stub macros and hopefully few prototypes,
  1587. which can conflict with char shl_load(); below. */
  1588. #include <assert.h>
  1589. /* Override any gcc2 internal prototype to avoid an error. */
  1590. /* We use char because int might match the return type of a gcc2
  1591. builtin and then its argument prototype would still apply. */
  1592. #ifdef __cplusplus
  1593. extern "C"
  1594. #endif
  1595. char shl_load();
  1596. int main() {
  1597. /* The GNU C library defines this for functions which it implements
  1598. to always fail with ENOSYS. Some functions are actually named
  1599. something starting with __ and the normal name is an alias. */
  1600. #if defined (__stub_shl_load) || defined (__stub___shl_load)
  1601. choke me
  1602. #else
  1603. shl_load();
  1604. #endif
  1605. ; return 0; }
  1606. EOF
  1607. if { (eval echo $progname:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1608. rm -rf conftest*
  1609. ac_cv_func_shl_load=yes
  1610. else
  1611. echo "$progname: failed program was:" >&5
  1612. cat conftest.$ac_ext >&5
  1613. rm -rf conftest*
  1614. ac_cv_func_shl_load=no
  1615. fi
  1616. rm -f conftest*
  1617. fi
  1618. if test "X$ac_cv_func_shl_load" = Xyes; then
  1619. echo "$ac_t""yes" 1>&6
  1620. lt_cv_dlopen="shl_load"
  1621. else
  1622. echo "$ac_t""no" 1>&6
  1623. echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  1624. echo "$progname:1805: checking for shl_load in -ldld" >&5
  1625. if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then
  1626. echo $ac_n "(cached) $ac_c" 1>&6
  1627. else
  1628. ac_save_LIBS="$LIBS"
  1629. LIBS="-ldld $LIBS"
  1630. cat > conftest.$ac_ext <<EOF
  1631. #line 1812 "ltconfig"
  1632. #include "confdefs.h"
  1633. /* Override any gcc2 internal prototype to avoid an error. */
  1634. /* We use char because int might match the return type of a gcc2
  1635. builtin and then its argument prototype would still apply. */
  1636. #ifdef __cplusplus
  1637. extern "C"
  1638. #endif
  1639. char shl_load();
  1640. int main() {
  1641. shl_load()
  1642. ; return 0; }
  1643. EOF
  1644. if { (eval echo $progname:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1645. rm -rf conftest*
  1646. ac_cv_lib_dld_shl_load=yes
  1647. else
  1648. echo "$progname: failed program was:" >&5
  1649. cat conftest.$ac_ext >&5
  1650. rm -rf conftest*
  1651. ac_cv_lib_dld_shl_load=no
  1652. fi
  1653. rm -f conftest*
  1654. LIBS="$ac_save_LIBS"
  1655. fi
  1656. if test "X$ac_cv_lib_dld_shl_load" = Xyes; then
  1657. echo "$ac_t""yes" 1>&6
  1658. lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
  1659. else
  1660. echo "$ac_t""no" 1>&6
  1661. fi
  1662. fi
  1663. fi
  1664. fi
  1665. fi
  1666. fi
  1667. fi
  1668. if test "x$lt_cv_dlopen" != xno; then
  1669. enable_dlopen=yes
  1670. else
  1671. enable_dlopen=no
  1672. fi
  1673. case $lt_cv_dlopen in
  1674. dlopen)
  1675. for ac_hdr in dlfcn.h; do
  1676. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1677. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1678. echo "$progname:1873: checking for $ac_hdr" >&5
  1679. if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then
  1680. echo $ac_n "(cached) $ac_c" 1>&6
  1681. else
  1682. cat > conftest.$ac_ext <<EOF
  1683. #line 1878 "ltconfig"
  1684. #include <$ac_hdr>
  1685. int fnord = 0;
  1686. int main () { return(0); }
  1687. EOF
  1688. ac_try="$ac_compile >/dev/null 2>conftest.out"
  1689. { (eval echo $progname:1884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1690. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1691. if test -z "$ac_err"; then
  1692. rm -rf conftest*
  1693. eval "ac_cv_header_$ac_safe=yes"
  1694. else
  1695. echo "$ac_err" >&5
  1696. echo "$progname: failed program was:" >&5
  1697. cat conftest.$ac_ext >&5
  1698. rm -rf conftest*
  1699. eval "ac_cv_header_$ac_safe=no"
  1700. fi
  1701. rm -f conftest*
  1702. fi
  1703. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1704. echo "$ac_t""yes" 1>&6
  1705. else
  1706. echo "$ac_t""no" 1>&6
  1707. fi
  1708. done
  1709. if test "x$ac_cv_header_dlfcn_h" = xyes; then
  1710. CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1711. fi
  1712. eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1713. LIBS="$lt_cv_dlopen_libs $LIBS"
  1714. echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
  1715. echo "$progname:1912: checking whether a program can dlopen itself" >&5
  1716. if test "X${lt_cv_dlopen_self+set}" = Xset; then
  1717. echo $ac_n "(cached) $ac_c" 1>&6
  1718. else
  1719. if test "$cross_compiling" = yes; then
  1720. lt_cv_dlopen_self=cross
  1721. else
  1722. cat > conftest.$ac_ext <<EOF
  1723. #line 1920 "ltconfig"
  1724. #if HAVE_DLFCN_H
  1725. #include <dlfcn.h>
  1726. #endif
  1727. #include <stdio.h>
  1728. #ifdef RTLD_GLOBAL
  1729. # define LTDL_GLOBAL RTLD_GLOBAL
  1730. #else
  1731. # ifdef DL_GLOBAL
  1732. # define LTDL_GLOBAL DL_GLOBAL
  1733. # else
  1734. # define LTDL_GLOBAL 0
  1735. # endif
  1736. #endif
  1737. /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
  1738. find out it does not work in some platform. */
  1739. #ifndef LTDL_LAZY_OR_NOW
  1740. # ifdef RTLD_LAZY
  1741. # define LTDL_LAZY_OR_NOW RTLD_LAZY
  1742. # else
  1743. # ifdef DL_LAZY
  1744. # define LTDL_LAZY_OR_NOW DL_LAZY
  1745. # else
  1746. # ifdef RTLD_NOW
  1747. # define LTDL_LAZY_OR_NOW RTLD_NOW
  1748. # else
  1749. # ifdef DL_NOW
  1750. # define LTDL_LAZY_OR_NOW DL_NOW
  1751. # else
  1752. # define LTDL_LAZY_OR_NOW 0
  1753. # endif
  1754. # endif
  1755. # endif
  1756. # endif
  1757. #endif
  1758. void fnord() { int i=42; }
  1759. int main() {
  1760. void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
  1761. if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
  1762. if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
  1763. EOF
  1764. if { (eval echo $progname:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1765. then
  1766. lt_cv_dlopen_self=yes
  1767. else
  1768. echo "$progname: failed program was:" >&5
  1769. cat conftest.$ac_ext >&5
  1770. rm -fr conftest*
  1771. lt_cv_dlopen_self=no
  1772. fi
  1773. rm -fr conftest*
  1774. fi
  1775. fi
  1776. echo "$ac_t""$lt_cv_dlopen_self" 1>&6
  1777. if test "$lt_cv_dlopen_self" = yes; then
  1778. LDFLAGS="$LDFLAGS $link_static_flag"
  1779. echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
  1780. echo "$progname:1986: checking whether a statically linked program can dlopen itself" >&5
  1781. if test "X${lt_cv_dlopen_self_static+set}" = Xset; then
  1782. echo $ac_n "(cached) $ac_c" 1>&6
  1783. else
  1784. if test "$cross_compiling" = yes; then
  1785. lt_cv_dlopen_self_static=cross
  1786. else
  1787. cat > conftest.$ac_ext <<EOF
  1788. #line 1994 "ltconfig"
  1789. #if HAVE_DLFCN_H
  1790. #include <dlfcn.h>
  1791. #endif
  1792. #include <stdio.h>
  1793. #ifdef RTLD_GLOBAL
  1794. # define LTDL_GLOBAL RTLD_GLOBAL
  1795. #else
  1796. # ifdef DL_GLOBAL
  1797. # define LTDL_GLOBAL DL_GLOBAL
  1798. # else
  1799. # define LTDL_GLOBAL 0
  1800. # endif
  1801. #endif
  1802. /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
  1803. find out it does not work in some platform. */
  1804. #ifndef LTDL_LAZY_OR_NOW
  1805. # ifdef RTLD_LAZY
  1806. # define LTDL_LAZY_OR_NOW RTLD_LAZY
  1807. # else
  1808. # ifdef DL_LAZY
  1809. # define LTDL_LAZY_OR_NOW DL_LAZY
  1810. # else
  1811. # ifdef RTLD_NOW
  1812. # define LTDL_LAZY_OR_NOW RTLD_NOW
  1813. # else
  1814. # ifdef DL_NOW
  1815. # define LTDL_LAZY_OR_NOW DL_NOW
  1816. # else
  1817. # define LTDL_LAZY_OR_NOW 0
  1818. # endif
  1819. # endif
  1820. # endif
  1821. # endif
  1822. #endif
  1823. void fnord() { int i=42; }
  1824. int main() {
  1825. void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
  1826. if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
  1827. if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
  1828. EOF
  1829. if { (eval echo $progname:2041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1830. then
  1831. lt_cv_dlopen_self_static=yes
  1832. else
  1833. echo "$progname: failed program was:" >&5
  1834. cat conftest.$ac_ext >&5
  1835. rm -fr conftest*
  1836. lt_cv_dlopen_self_static=no
  1837. fi
  1838. rm -fr conftest*
  1839. fi
  1840. fi
  1841. echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
  1842. fi
  1843. ;;
  1844. esac
  1845. case $lt_cv_dlopen_self in
  1846. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1847. *) enable_dlopen_self=unknown ;;
  1848. esac
  1849. case $lt_cv_dlopen_self_static in
  1850. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1851. *) enable_dlopen_self_static=unknown ;;
  1852. esac
  1853. fi
  1854. # Copy echo and quote the copy, instead of the original, because it is
  1855. # used later.
  1856. ltecho="$echo"
  1857. if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
  1858. ltecho="$CONFIG_SHELL \$0 --fallback-echo"
  1859. fi
  1860. LTSHELL="$SHELL"
  1861. LTCONFIG_VERSION="$VERSION"
  1862. # Only quote variables if we're using ltmain.sh.
  1863. case $ltmain in
  1864. *.sh)
  1865. # Now quote all the things that may contain metacharacters.
  1866. for var in ltecho old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
  1867. old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \
  1868. old_LN_S old_NM old_RANLIB old_STRIP \
  1869. old_AS old_DLLTOOL old_OBJDUMP \
  1870. old_OBJEXT old_EXEEXT old_reload_flag \
  1871. old_deplibs_check_method old_file_magic_cmd \
  1872. AR AR_FLAGS CC LTCC LD LN_S NM LTSHELL LTCONFIG_VERSION \
  1873. reload_flag reload_cmds wl \
  1874. pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
  1875. thread_safe_flag_spec whole_archive_flag_spec libname_spec \
  1876. library_names_spec soname_spec \
  1877. RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
  1878. old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
  1879. postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
  1880. predep_objects postdep_objects predeps postdeps compiler_lib_search_path \
  1881. old_striplib striplib file_magic_cmd export_symbols_cmds \
  1882. deplibs_check_method allow_undefined_flag no_undefined_flag \
  1883. finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
  1884. hardcode_libdir_flag_spec hardcode_libdir_separator \
  1885. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  1886. compiler_c_o need_locks exclude_expsyms include_expsyms; do
  1887. case $var in
  1888. reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
  1889. old_postinstall_cmds | old_postuninstall_cmds | \
  1890. export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
  1891. extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
  1892. postinstall_cmds | postuninstall_cmds | \
  1893. finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  1894. # Double-quote double-evaled strings.
  1895. eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ### testsuite: skip nested quoting test
  1896. ;;
  1897. *)
  1898. eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test
  1899. ;;
  1900. esac
  1901. done
  1902. case $ltecho in
  1903. *'\$0 --fallback-echo"')
  1904. ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
  1905. ;;
  1906. esac
  1907. if test -z "$tagname"; then
  1908. trap "$rm \"$ofile\"; exit 1" 1 2 15
  1909. echo "creating $ofile"
  1910. $rm "$ofile"
  1911. cat <<EOF > "$ofile"
  1912. #! $SHELL
  1913. # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  1914. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  1915. # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
  1916. #
  1917. # Copyright (C) 1996-2000 Free Software Foundation, Inc.
  1918. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  1919. #
  1920. # This program is free software; you can redistribute it and/or modify
  1921. # it under the terms of the GNU General Public License as published by
  1922. # the Free Software Foundation; either version 2 of the License, or
  1923. # (at your option) any later version.
  1924. #
  1925. # This program is distributed in the hope that it will be useful, but
  1926. # WITHOUT ANY WARRANTY; without even the implied warranty of
  1927. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1928. # General Public License for more details.
  1929. #
  1930. # You should have received a copy of the GNU General Public License
  1931. # along with this program; if not, write to the Free Software
  1932. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  1933. #
  1934. # As a special exception to the GNU General Public License, if you
  1935. # distribute this file as part of a program that contains a
  1936. # configuration script generated by Autoconf, you may include it under
  1937. # the same distribution terms that you use for the rest of that program.
  1938. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  1939. Xsed="sed -e s/^X//"
  1940. # The HP-UX ksh and POSIX shell print the target directory to stdout
  1941. # if CDPATH is set.
  1942. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  1943. # The names of the tagged configurations supported by this script.
  1944. available_tags=
  1945. ### BEGIN LIBTOOL CONFIG
  1946. EOF
  1947. else
  1948. echo "appending configuration tag \"$tagname\" to $ofile"
  1949. echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
  1950. fi
  1951. cfgfile="$ofile"
  1952. ;;
  1953. *)
  1954. # Double-quote the variables that need it (for aesthetics).
  1955. for var in old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
  1956. old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \
  1957. old_LN_S old_NM old_RANLIB old_STRIP \
  1958. old_AS old_DLLTOOL old_OBJDUMP \
  1959. old_OBJEXT old_EXEEXT old_reload_flag \
  1960. old_deplibs_check_method old_file_magic_cmd; do
  1961. eval "$var=\\\"\$var\\\""
  1962. done
  1963. # Just create a config file.
  1964. cfgfile="$ofile.cfg"
  1965. if test -z "$tagname"; then
  1966. trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  1967. echo "creating $cfgfile"
  1968. $rm "$cfgfile"
  1969. cat <<EOF > "$cfgfile"
  1970. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
  1971. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  1972. ### BEGIN LIBTOOL CONFIG
  1973. EOF
  1974. else
  1975. echo "appending to $cfgfile"
  1976. echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
  1977. fi
  1978. ;;
  1979. esac
  1980. cat <<EOF >> "$cfgfile"
  1981. # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1982. #
  1983. # AR=$old_AR AR_FLAGS=$old_AR_FLAGS LTCC=$old_LTCC CC=$old_CC \\
  1984. # CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
  1985. # MAGIC_CMD=$old_MAGIC_CMD LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
  1986. # LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\
  1987. # AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\
  1988. # objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\
  1989. # deplibs_check_method=$old_deplibs_check_method \\
  1990. # file_magic_cmd=$old_file_magic_cmd \\
  1991. # $0$ltconfig_args
  1992. #
  1993. # Compiler and other test output produced by $progname, useful for
  1994. # debugging $progname, is in ./config.log if it exists.
  1995. # The version of $progname that generated this script.
  1996. LTCONFIG_VERSION=$LTCONFIG_VERSION
  1997. # Shell to use when invoking shell scripts.
  1998. SHELL=$LTSHELL
  1999. # Whether or not to build shared libraries.
  2000. build_libtool_libs=$enable_shared
  2001. # Whether or not to add -lc for building shared libraries.
  2002. build_libtool_need_lc=$need_lc
  2003. # Whether or not to build static libraries.
  2004. build_old_libs=$enable_static
  2005. # Whether or not to optimize for fast installation.
  2006. fast_install=$enable_fast_install
  2007. # The host system.
  2008. host_alias=$host_alias
  2009. host=$host
  2010. # An echo program that does not interpret backslashes.
  2011. echo=$ltecho
  2012. # The archiver.
  2013. AR=$AR
  2014. AR_FLAGS=$AR_FLAGS
  2015. # A C compiler.
  2016. LTCC=$LTCC
  2017. # A language-specific compiler.
  2018. CC=$CC
  2019. # Is the compiler the GNU C compiler?
  2020. with_gcc=$with_gcc
  2021. # The linker used to build libraries.
  2022. LD=$LD
  2023. # Whether we need hard or soft links.
  2024. LN_S=$LN_S
  2025. # A BSD-compatible nm program.
  2026. NM=$NM
  2027. # A symbol stripping program
  2028. STRIP=$STRIP
  2029. # Used to examine libraries when file_magic_cmd begins "file"
  2030. MAGIC_CMD=$MAGIC_CMD
  2031. # Used on cygwin: DLL creation program.
  2032. DLLTOOL="$DLLTOOL"
  2033. # Used on cygwin: object dumper.
  2034. OBJDUMP="$OBJDUMP"
  2035. # Used on cygwin: assembler.
  2036. AS="$AS"
  2037. # The name of the directory that contains temporary libtool files.
  2038. objdir=$objdir
  2039. # How to create reloadable object files.
  2040. reload_flag=$reload_flag
  2041. reload_cmds=$reload_cmds
  2042. # How to pass a linker flag through the compiler.
  2043. wl=$wl
  2044. # Object file suffix (normally "o").
  2045. objext="$objext"
  2046. # Old archive suffix (normally "a").
  2047. libext="$libext"
  2048. # Executable file suffix (normally "").
  2049. exeext="$exeext"
  2050. # Additional compiler flags for building library objects.
  2051. pic_flag=$pic_flag
  2052. pic_mode=$pic_mode
  2053. # What is the maximum length of a command?
  2054. max_cmd_len=$max_cmd_len
  2055. # Does compiler simultaneously support -c and -o options?
  2056. compiler_c_o=$compiler_c_o
  2057. # Must we lock files when doing compilation ?
  2058. need_locks=$need_locks
  2059. # Do we need the lib prefix for modules?
  2060. need_lib_prefix=$need_lib_prefix
  2061. # Do we need a version for libraries?
  2062. need_version=$need_version
  2063. # Whether dlopen is supported.
  2064. dlopen_support=$enable_dlopen
  2065. # Whether dlopen of programs is supported.
  2066. dlopen_self=$enable_dlopen_self
  2067. # Whether dlopen of statically linked programs is supported.
  2068. dlopen_self_static=$enable_dlopen_self_static
  2069. # Compiler flag to prevent dynamic linking.
  2070. link_static_flag=$link_static_flag
  2071. # Compiler flag to turn off builtin functions.
  2072. no_builtin_flag=$no_builtin_flag
  2073. # Compiler flag to allow reflexive dlopens.
  2074. export_dynamic_flag_spec=$export_dynamic_flag_spec
  2075. # Compiler flag to generate shared objects directly from archives.
  2076. whole_archive_flag_spec=$whole_archive_flag_spec
  2077. # Compiler flag to generate thread-safe objects.
  2078. thread_safe_flag_spec=$thread_safe_flag_spec
  2079. # Library versioning type.
  2080. version_type=$version_type
  2081. # Format of library name prefix.
  2082. libname_spec=$libname_spec
  2083. # List of archive names. First name is the real one, the rest are links.
  2084. # The last name is the one that the linker finds with -lNAME.
  2085. library_names_spec=$library_names_spec
  2086. # The coded name of the library, if different from the real name.
  2087. soname_spec=$soname_spec
  2088. # Commands used to build and install an old-style archive.
  2089. RANLIB=$RANLIB
  2090. old_archive_cmds=$old_archive_cmds
  2091. old_postinstall_cmds=$old_postinstall_cmds
  2092. old_postuninstall_cmds=$old_postuninstall_cmds
  2093. # Create an old-style archive from a shared archive.
  2094. old_archive_from_new_cmds=$old_archive_from_new_cmds
  2095. # Create a temporary old-style archive to link instead of a shared archive.
  2096. old_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds
  2097. # Commands used to build and install a shared archive.
  2098. archive_cmds=$archive_cmds
  2099. archive_expsym_cmds=$archive_expsym_cmds
  2100. postinstall_cmds=$postinstall_cmds
  2101. postuninstall_cmds=$postuninstall_cmds
  2102. # Commands to strip libraries.
  2103. old_striplib=$old_striplib
  2104. striplib=$striplib
  2105. # Dependencies to place before the objects being linked to create a
  2106. # shared library.
  2107. predep_objects=$predep_objects
  2108. # Dependencies to place after the objects being linked to create a
  2109. # shared library.
  2110. postdep_objects=$postdep_objects
  2111. # Dependencies to place before the objects being linked to create a
  2112. # shared library.
  2113. predeps=$predeps
  2114. # Dependencies to place after the objects being linked to create a
  2115. # shared library.
  2116. postdeps=$postdeps
  2117. # The library search path used internally by the compiler when linking
  2118. # a shared library.
  2119. compiler_lib_search_path=$compiler_lib_search_path
  2120. # Method to check whether dependent libraries are shared objects.
  2121. deplibs_check_method=$deplibs_check_method
  2122. # Command to use when deplibs_check_method == file_magic.
  2123. file_magic_cmd=$file_magic_cmd
  2124. # Flag that allows shared libraries with undefined symbols to be built.
  2125. allow_undefined_flag=$allow_undefined_flag
  2126. # Flag that forces no undefined symbols.
  2127. no_undefined_flag=$no_undefined_flag
  2128. # Commands used to finish a libtool library installation in a directory.
  2129. finish_cmds=$finish_cmds
  2130. # Same as above, but a single script fragment to be evaled but not shown.
  2131. finish_eval=$finish_eval
  2132. # Take the output of nm and produce a listing of raw symbols and C names.
  2133. global_symbol_pipe=$global_symbol_pipe
  2134. # Transform the output of nm in a proper C declaration
  2135. global_symbol_to_cdecl=$global_symbol_to_cdecl
  2136. # This is the shared library runtime path variable.
  2137. runpath_var=$runpath_var
  2138. # This is the shared library path variable.
  2139. shlibpath_var=$shlibpath_var
  2140. # Is shlibpath searched before the hard-coded library search path?
  2141. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  2142. # How to hardcode a shared library path into an executable.
  2143. hardcode_action=$hardcode_action
  2144. # Whether we should hardcode library paths into libraries.
  2145. hardcode_into_libs=$hardcode_into_libs
  2146. # Flag to hardcode \$libdir into a binary during linking.
  2147. # This must work even if \$libdir does not exist.
  2148. hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
  2149. # Whether we need a single -rpath flag with a separated argument.
  2150. hardcode_libdir_separator=$hardcode_libdir_separator
  2151. # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
  2152. # resulting binary.
  2153. hardcode_direct=$hardcode_direct
  2154. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  2155. # resulting binary.
  2156. hardcode_minus_L=$hardcode_minus_L
  2157. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  2158. # the resulting binary.
  2159. hardcode_shlibpath_var=$hardcode_shlibpath_var
  2160. # Variables whose values should be saved in libtool wrapper scripts and
  2161. # restored at relink time.
  2162. variables_saved_for_relink="$variables_saved_for_relink"
  2163. # Whether libtool must link a program against all its dependency libraries.
  2164. link_all_deplibs=$link_all_deplibs
  2165. # Compile-time system search path for libraries
  2166. sys_lib_search_path_spec=$sys_lib_search_path_spec
  2167. # Run-time system search path for libraries
  2168. sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
  2169. # Fix the shell variable \$srcfile for the compiler.
  2170. fix_srcfile_path="$fix_srcfile_path"
  2171. # Set to yes if exported symbols are required.
  2172. always_export_symbols=$always_export_symbols
  2173. # The commands to list exported symbols.
  2174. export_symbols_cmds=$export_symbols_cmds
  2175. # The commands to extract the exported symbol list from a shared archive.
  2176. extract_expsyms_cmds=$extract_expsyms_cmds
  2177. # Symbols that should not be listed in the preloaded symbols.
  2178. exclude_expsyms=$exclude_expsyms
  2179. # Symbols that must always be exported.
  2180. include_expsyms=$include_expsyms
  2181. EOF
  2182. if test -z "$tagname"; then
  2183. echo '### END LIBTOOL CONFIG' >> "$ofile"
  2184. else
  2185. echo "### END LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
  2186. fi
  2187. case $ltmain in
  2188. *.sh)
  2189. echo >> "$ofile"
  2190. if test -z "$tagname"; then
  2191. case $host_os in
  2192. aix3*)
  2193. cat <<\EOF >> "$ofile"
  2194. # AIX sometimes has problems with the GCC collect2 program. For some
  2195. # reason, if we set the COLLECT_NAMES environment variable, the problems
  2196. # vanish in a puff of smoke.
  2197. if test "X${COLLECT_NAMES+set}" != Xset; then
  2198. COLLECT_NAMES=
  2199. export COLLECT_NAMES
  2200. fi
  2201. EOF
  2202. ;;
  2203. esac
  2204. case $host in
  2205. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  2206. cat <<'EOF' >> "$ofile"
  2207. # This is a source program that is used to create dlls on Windows
  2208. # Don't remove nor modify the starting and closing comments
  2209. # /* ltdll.c starts here */
  2210. # #define WIN32_LEAN_AND_MEAN
  2211. # #include <windows.h>
  2212. # #undef WIN32_LEAN_AND_MEAN
  2213. # #include <stdio.h>
  2214. #
  2215. # #ifndef __CYGWIN__
  2216. # # ifdef __CYGWIN32__
  2217. # # define __CYGWIN__ __CYGWIN32__
  2218. # # endif
  2219. # #endif
  2220. #
  2221. # #ifdef __cplusplus
  2222. # extern "C" {
  2223. # #endif
  2224. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  2225. # #ifdef __cplusplus
  2226. # }
  2227. # #endif
  2228. #
  2229. # #ifdef __CYGWIN__
  2230. # #include <cygwin/cygwin_dll.h>
  2231. # DECLARE_CYGWIN_DLL( DllMain );
  2232. # #endif
  2233. # HINSTANCE __hDllInstance_base;
  2234. #
  2235. # BOOL APIENTRY
  2236. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  2237. # {
  2238. # __hDllInstance_base = hInst;
  2239. # return TRUE;
  2240. # }
  2241. # /* ltdll.c ends here */
  2242. # This is a source program that is used to create import libraries
  2243. # on Windows for dlls which lack them. Don't remove nor modify the
  2244. # starting and closing comments
  2245. # /* impgen.c starts here */
  2246. # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
  2247. #
  2248. # This file is part of GNU libtool.
  2249. #
  2250. # This program is free software; you can redistribute it and/or modify
  2251. # it under the terms of the GNU General Public License as published by
  2252. # the Free Software Foundation; either version 2 of the License, or
  2253. # (at your option) any later version.
  2254. #
  2255. # This program is distributed in the hope that it will be useful,
  2256. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  2257. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2258. # GNU General Public License for more details.
  2259. #
  2260. # You should have received a copy of the GNU General Public License
  2261. # along with this program; if not, write to the Free Software
  2262. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  2263. # */
  2264. #
  2265. # #include <stdio.h> /* for printf() */
  2266. # #include <unistd.h> /* for open(), lseek(), read() */
  2267. # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
  2268. # #include <string.h> /* for strdup() */
  2269. #
  2270. # /* O_BINARY isn't required (or even defined sometimes) under Unix */
  2271. # #ifndef O_BINARY
  2272. # #define O_BINARY 0
  2273. # #endif
  2274. #
  2275. # static unsigned int
  2276. # pe_get16 (fd, offset)
  2277. # int fd;
  2278. # int offset;
  2279. # {
  2280. # unsigned char b[2];
  2281. # lseek (fd, offset, SEEK_SET);
  2282. # read (fd, b, 2);
  2283. # return b[0] + (b[1]<<8);
  2284. # }
  2285. #
  2286. # static unsigned int
  2287. # pe_get32 (fd, offset)
  2288. # int fd;
  2289. # int offset;
  2290. # {
  2291. # unsigned char b[4];
  2292. # lseek (fd, offset, SEEK_SET);
  2293. # read (fd, b, 4);
  2294. # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
  2295. # }
  2296. #
  2297. # static unsigned int
  2298. # pe_as32 (ptr)
  2299. # void *ptr;
  2300. # {
  2301. # unsigned char *b = ptr;
  2302. # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
  2303. # }
  2304. #
  2305. # int
  2306. # main (argc, argv)
  2307. # int argc;
  2308. # char *argv[];
  2309. # {
  2310. # int dll;
  2311. # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
  2312. # unsigned long export_rva, export_size, nsections, secptr, expptr;
  2313. # unsigned long name_rvas, nexp;
  2314. # unsigned char *expdata, *erva;
  2315. # char *filename, *dll_name;
  2316. #
  2317. # filename = argv[1];
  2318. #
  2319. # dll = open(filename, O_RDONLY|O_BINARY);
  2320. # if (dll < 1)
  2321. # return 1;
  2322. #
  2323. # dll_name = filename;
  2324. #
  2325. # for (i=0; filename[i]; i++)
  2326. # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
  2327. # dll_name = filename + i +1;
  2328. #
  2329. # pe_header_offset = pe_get32 (dll, 0x3c);
  2330. # opthdr_ofs = pe_header_offset + 4 + 20;
  2331. # num_entries = pe_get32 (dll, opthdr_ofs + 92);
  2332. #
  2333. # if (num_entries < 1) /* no exports */
  2334. # return 1;
  2335. #
  2336. # export_rva = pe_get32 (dll, opthdr_ofs + 96);
  2337. # export_size = pe_get32 (dll, opthdr_ofs + 100);
  2338. # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
  2339. # secptr = (pe_header_offset + 4 + 20 +
  2340. # pe_get16 (dll, pe_header_offset + 4 + 16));
  2341. #
  2342. # expptr = 0;
  2343. # for (i = 0; i < nsections; i++)
  2344. # {
  2345. # char sname[8];
  2346. # unsigned long secptr1 = secptr + 40 * i;
  2347. # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
  2348. # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
  2349. # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
  2350. # lseek(dll, secptr1, SEEK_SET);
  2351. # read(dll, sname, 8);
  2352. # if (vaddr <= export_rva && vaddr+vsize > export_rva)
  2353. # {
  2354. # expptr = fptr + (export_rva - vaddr);
  2355. # if (export_rva + export_size > vaddr + vsize)
  2356. # export_size = vsize - (export_rva - vaddr);
  2357. # break;
  2358. # }
  2359. # }
  2360. #
  2361. # expdata = (unsigned char*)malloc(export_size);
  2362. # lseek (dll, expptr, SEEK_SET);
  2363. # read (dll, expdata, export_size);
  2364. # erva = expdata - export_rva;
  2365. #
  2366. # nexp = pe_as32 (expdata+24);
  2367. # name_rvas = pe_as32 (expdata+32);
  2368. #
  2369. # printf ("EXPORTS\n");
  2370. # for (i = 0; i<nexp; i++)
  2371. # {
  2372. # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
  2373. # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
  2374. # }
  2375. #
  2376. # return 0;
  2377. # }
  2378. # /* impgen.c ends here */
  2379. EOF
  2380. ;;
  2381. esac
  2382. # Append the ltmain.sh script.
  2383. sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
  2384. # We use sed instead of cat because bash on DJGPP gets confused if
  2385. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  2386. # text mode, it properly converts lines to CR/LF. This bash problem
  2387. # is reportedly fixed, but why not run on old versions too?
  2388. chmod +x "$ofile"
  2389. fi
  2390. ;;
  2391. *)
  2392. # Compile the libtool program.
  2393. echo "FIXME: would compile $ltmain"
  2394. ;;
  2395. esac
  2396. # Update the list of available tags.
  2397. if test -n "$tagname"; then
  2398. # Extract list of available tagged configurations in $ofile.
  2399. # Note that this assumes the entire list is on one line.
  2400. available_tags=`grep "^available_tags=" $ofile | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
  2401. # Append the new tag name to the list of available tags.
  2402. available_tags="$available_tags $tagname"
  2403. # Now substitute the updated of available tags.
  2404. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' ${ofile} > ${ofile}.new"; then
  2405. mv ${ofile}.new ${ofile}
  2406. chmod +x "$ofile"
  2407. else
  2408. rm -f ${ofile}.new
  2409. echo "$progname: unable to update list of available tagged configurations."
  2410. exit 1
  2411. fi
  2412. fi
  2413. # Don't cache tagged configuration!
  2414. test -n "$cache_file" && test -z "$tagname" || exit 0
  2415. # AC_CACHE_SAVE
  2416. trap '' 1 2 15
  2417. cat > confcache <<\EOF
  2418. # This file is a shell script that caches the results of configure
  2419. # tests run on this system so they can be shared between configure
  2420. # scripts and configure runs. It is not useful on other systems.
  2421. # If it contains results you don't want to keep, you may remove or edit it.
  2422. #
  2423. # By default, configure uses ./config.cache as the cache file,
  2424. # creating it if it does not exist already. You can give configure
  2425. # the --cache-file=FILE option to use a different cache file; that is
  2426. # what configure does when it calls configure scripts in
  2427. # subdirectories, so they share the cache.
  2428. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2429. # config.status only pays attention to the cache file if you give it the
  2430. # --recheck option to rerun configure.
  2431. #
  2432. EOF
  2433. # The following way of writing the cache mishandles newlines in values,
  2434. # but we know of no workaround that is simple, portable, and efficient.
  2435. # So, don't put newlines in cache variables' values.
  2436. # Ultrix sh set writes to stderr and can't be redirected directly,
  2437. # and sets the high bit in the cache file unless we assign to the vars.
  2438. (set) 2>&1 |
  2439. case `(ac_space=' '; set | grep ac_space) 2>&1` in
  2440. *ac_space=\ *)
  2441. # `set' does not quote correctly, so add quotes (double-quote substitution
  2442. # turns \\\\ into \\, and sed turns \\ into \).
  2443. sed -n \
  2444. -e "s/'/'\\\\''/g" \
  2445. -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2446. ;;
  2447. *)
  2448. # `set' quotes correctly as required by POSIX, so do not add quotes.
  2449. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2450. ;;
  2451. esac >> confcache
  2452. if cmp -s $cache_file confcache; then
  2453. :
  2454. else
  2455. if test -w $cache_file; then
  2456. echo "updating cache $cache_file"
  2457. cat confcache > $cache_file
  2458. else
  2459. echo "not updating unwritable cache $cache_file"
  2460. fi
  2461. fi
  2462. rm -f confcache
  2463. exit 0
  2464. # Local Variables:
  2465. # mode:shell-script
  2466. # sh-indentation:2
  2467. # End: