2007-12-09 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Sat, 8 Dec 2007 23:52:22 +0000 (23:52 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Sat, 8 Dec 2007 23:52:22 +0000 (23:52 +0000)
* packages/packages.current: Update claws-mail.
* src/Makefile.am (gpg4win_pkg_claws_mail_configure): Enable
libetpan.
* src/inst-sections.nsi: Include libetpan install scripts.
* patches/claws-mail-3.1.0cvs70/01-w32-logo.patch,
patches/claws-mail-3.1.0cvs70/02-w32-icon.patch,
patches/claws-mail-3.1.0cvs70/03-smime-plugin.patch,
patches/claws-mail-3.1.0cvs70/99-auto.patch: New files.
* Makefile.am (EXTRA_DIST): Add claws-mail 3.1.0cvs70 patches.

ChangeLog
Makefile.am
packages/packages.current
patches/claws-mail-3.1.0cvs70/01-w32-logo.patch [new file with mode: 0755]
patches/claws-mail-3.1.0cvs70/02-w32-icon.patch [new file with mode: 0755]
patches/claws-mail-3.1.0cvs70/03-smime-plugin.patch [new file with mode: 0755]
patches/claws-mail-3.1.0cvs70/99-auto.patch [new file with mode: 0755]
src/Makefile.am
src/inst-sections.nsi

index 7c94dbd..2345b4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-12-09  Marcus Brinkmann  <marcus@g10code.de>
+
+       * packages/packages.current: Update claws-mail.
+       * src/Makefile.am (gpg4win_pkg_claws_mail_configure): Enable
+       libetpan.
+       * src/inst-sections.nsi: Include libetpan install scripts.
+       * patches/claws-mail-3.1.0cvs70/01-w32-logo.patch,
+       patches/claws-mail-3.1.0cvs70/02-w32-icon.patch,
+       patches/claws-mail-3.1.0cvs70/03-smime-plugin.patch,
+       patches/claws-mail-3.1.0cvs70/99-auto.patch: New files.
+       * Makefile.am (EXTRA_DIST): Add claws-mail 3.1.0cvs70 patches.
+
 2007-12-07  Marcus Brinkmann  <marcus@g10code.de>
 
        * src/inst-sections.nsi: Install manuals in subdirectories for
index 944e993..dd189e4 100644 (file)
@@ -53,6 +53,10 @@ EXTRA_DIST = autogen.sh README.SVN \
        patches/claws-mail-3.0.2/03-smime-plugin.patch \
        patches/claws-mail-3.0.2/04-gettimeofday.patch \
        patches/claws-mail-3.0.2/99-auto.patch \
+       patches/claws-mail-3.1.0cvs70/01-w32-logo.patch \
+       patches/claws-mail-3.1.0cvs70/02-w32-icon.patch \
+       patches/claws-mail-3.1.0cvs70/03-smime-plugin.patch \
+       patches/claws-mail-3.1.0cvs70/99-auto.patch \
        patches/gpgol-0.9.91/01-gpgme.patch
 
 copy-news:
index f820cf9..d0f82cf 100644 (file)
@@ -86,9 +86,11 @@ server ftp://ftp.g10code.com/mirrors/claws
 #chk   3b15730065ca1e0c318592b39b02c2d0497e6ebc
 #file  claws-mail-2.10.0.tar.bz2
 #chk   0ee38ec2dd0c37941b0bcc4af7ab441ec432c63c
+#file  claws-mail-3.0.2.tar.bz2
+#chk   a607aca53a349f3a0a8d8f7a51f4754705e12350
 
-file  claws-mail-3.0.2.tar.bz2
-chk   a607aca53a349f3a0a8d8f7a51f4754705e12350
+file  claws-mail-3.1.0cvs70.tar.bz2
+chk   94abcee174c8405fa4cbfe67294377928b55c6f6
 
 #
 # Pthreads for Windows.
diff --git a/patches/claws-mail-3.1.0cvs70/01-w32-logo.patch b/patches/claws-mail-3.1.0cvs70/01-w32-logo.patch
new file mode 100755 (executable)
index 0000000..c694756
--- /dev/null
@@ -0,0 +1,346 @@
+#! /bin/sh
+(cd src && uudecode < $0)
+exit $?
+
+Need to put logo in uuencoded format here, as diff can not represent
+binary files.
+
+begin 644 w32-logo.ico
+M```!``,`$!````$`(`!H!```-@```"`@```!`"``J!```)X$```P,````0`@
+M`*@E``!&%0``*````!`````@`````0`@````````!```````````````````
+M`````````````````````````````````````````!<````@````(````"``
+M```@````(````"`````@````'0`````````````````````````)&AH:7@``
+M`"914E)BZ^WO_^7FZ?_>W^/_U]G=_]#2U__*R]#_P\3*_Z*BJ.H`````````
+M````````````````&O+S]/_=WN'_R\W/_ZFKKO^BI*3_O+V__]?9VO_=W^'_
+MWN#C_]C9W?^UMKKJ``````````````````````("`C?\_O[_]OCX_^3FY__9
+MVMW_SL_3_\+$R?^PLK?_DI.7__/U]O_L[O#_RLK,Z@``````````````````
+M``-@8&!\_/[^__S^_O_GZ.C_J:JJ_]_AX__5U]G_T-+6_[R]P__\_O[_:77+
+M_\[4V.H````````````````````2V-?2_NGKZ_^7EY?_S\_/_\3$Q/]_?W__
+MZ>OM_[_!P_^%AHC_T=/3_[G#[O_:WM_J````````````````%Q$(/\&]LO^*
+MBXO_?[#)_X:<IO]<@I;_8)BS_WEZ>_^!F:/_9H*,_UAQ<O^[GEO^````"0``
+M`````````````'-8*+3&H%'_@J*M_Q02#?]B0R+_N;2I_RQ41_\WA&O_^?O[
+M_S(\+/]#453_S[)L_P```",```````````````!V2Q7Q:#4`_RU@1_\@:E/_
+M+#8E_VQ)(O^-BES_)Y]Z_Z"0:O\I7$O_-IQ]_]&V<O\A'!),````````````
+M````5RT`Y&<T`/]]H*__."0-_S"7>/\D.BK_3DDT_S2B@?]!/S+_,J6#_].Y
+M??_2N';_!@8$-P```````````````#,>"'F)8CO_?Y"8_QF'9O\C037_.J:&
+M_R1N5_\?FW3_*IY[_]?`B/_9OX'_W<F:_P````X````````````````````<
+MJX]S_ZR0=/^/<$__:$XD_UY1,O\:=%C_%9=P_Q,9%/_BU*[_Z=NX_\VYB.\`
+M```!`````````````````````CTE#8_%L9[_Q;&>_\>THO^FEXG_=FUE_R\M
+M*_^3BWW_V\Z[_^O?P_\````3```````````````````````````````#1#`6
+M?=O0Q?_=TL?_WM3*_]K1Q__AU\W_X=C._^38O_X5$@P@````````````````
+M``````````````````````````$#`0`6@G-.G.+0I_[NX\?_T\&6]658.F,`
+M```$````````````````````````````````````````````````````````
+M``````````````````````````````````````````````````#\`0``\`$`
+M`.`!``#@`0``X`$``,`!``#``P``P`$``,`!``#``0``P`,``,`#``#@`P``
+M\`<``/@?``#__P``*````"````!``````0`@````````$```````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M```#````%P```"`````@````(````"`````@````(````"`````@````(```
+M`"`````@````(````"`````@````(````!T````1````````````````````
+M```````````````````````````$````#````!D````1````!@````E/3U!A
+MO\'"ZN7GZ?_CY>?_WN#C_]S>X?_8V=W_UM?;_]'2U__.T-7_RLS1_\C)S__#
+MQ<O_P<+)_[R^Q/^ZO,+_FYRBZAP<'6@`````````````````````````````
+M``````````````````D````>&AH:7@,#`T0````F````'%%24F+&R,GJZ^WO
+M_^KK[?_EYNG_X^7G_][?X__<WN'_U]G=_]77V__0TM?_S]#5_\K+T/_(R<[_
+MP\3*_\'#R/^BHJCJ(2$B:```````````````````````````````````````
+M````````$P```#CK[>__Y.7G_\K+S?ZSM+;T@H*$SY>8F?;"Q,3_V-G9_^?I
+MZO_K[>[_[.[P_^KL[O_FY^K_Y.7H_]_AX__=W^'_V-K=_];8W/_1T]?_S]'5
+M_ZZPM>HJ*BMH``````````````````````````````````````````$````:
+M`P,#0O+S]/_L[O#_W=[A_]K<WO_+S<__OL##_JFKKO^9FIS_HJ2D_ZFJJO^\
+MO;__TM/5_]?9VO_0TM/_W=_A_^/EZ/_>X./_W=[A_]C9W?_6V-O_M;:ZZB\O
+M,&@``````````````````````````````````````````P```"M=7EZ&_/[^
+M__K\_/_M[N__YNCI_][@X?_;W-__T]77_]#1U?_'R<[_Q,7+_ZVNL_^:FZ#_
+MCH^1_XZ/D?^KK:W_Q,;'_^WO\/_K[.[_YNCJ_^3FZ/_#Q,?J.#@X:```````
+M```````````````````````````````````%`@("-XR-C:/\_O[__/[^__;X
+M^/_M[_#_Y.;G_^#BY/_9VMW_U=?:_\[/T__*R]#_PL3)_[[`Q?^PLK?_I*:L
+M_Y*3E_^`@8/_\_7V__'S]/_L[O#_Z^WN_\K*S.H\/#QH````````````````
+M`````````````````````0````M`0$!GS<[.W?S^_O_\_O[__/[^__O]_?_P
+M\O+_ZNSL_]W?X/_=WN#_VMS>_]?8V__/T-3_R\W1_\?(S?_&Q\S_OL#&_Z&B
+MIO_\_O[__/[^_[_%W_^ZP>;_TM36ZD5&1F@`````````````````````````
+M```````````#````$&!@8'S@XN+W_/[^__S^_O_\_O[__/[^_^?HZ/_=W=[_
+MJ:JJ_\G+S/_?X>/_W-[@_]77V?_4UMG_T-+6_\W/U/^\O</_K*VP__S^_O_\
+M_O[_:77+_VIST/_.U-CJ2DI*:```````````````````````````````````
+M``H````=KZREZOS^_O_\_O[_\?/S_YJ;F_^,C(S_MK:V_^;FYO^YN;G_JZNK
+M_Z"@H?^XNKO_Z>OM_^7FZ/^KK:__GZ"B_XF+C?^7F)C_]??W__S^_O]_B=[_
+M;';:_]+8VNI145%H````````````````````````````````````$@```"O8
+MU]+^_/[^_^GKZ_^?GY__EY>7_[R\O/_/S\__S,S,_\3$Q/_BXN+_?W]__Z:H
+MJ/_IZ^W_W=_@_[_!P__(R<O_A8:(_Z*BHO_1T]/_^/KZ_[G#[O^KMNW_VM[?
+MZE565F<```````````````````````````````0````G3T$BC^3EY?_,S<W_
+MHJ*B_Y66EO^`H*[_?*.T_X>GM?^RO\7_38"8_VB0I?^*N]+_@)RI_[2UMO_;
+MW=[_<Y>H_V"+G_]RH+;_:HV9_VU?.O^8@DK_I8Q/]VM;,Z,````6````"0``
+M````````````````````````````"!<1"#^!:3:^P;VR_\7$P_^*BXO_;X")
+M_W^PR?]KAI/_AIRF_V1\B/]<@I;_L;>[_V"8L_^HS=[_>7I[_[2UM?^!F:/_
+MKKO"_V:"C/^IT.+_6'%R_Y!\2O^[GEO^F(!*TP````D````"````````````
+M```````````````````17$DDC+^;3_O.JUK_F6\M_VR!@O^QT^/_/C8I_U%&
+M._^DH)O_Q<7$_]/3T__7U]?_*R@H_R@V0?\?,C;_465?__S^_O_[_?W_>&E#
+M_TE64?^BQ]G_=8)T_\NM9__)JV3_````%P````0`````````````````````
+M`````````!5S6"BTR*-3_\:@4?][2Q'_@J*M_[W=Z_\4$@W_)3<K_V)#(O^7
+M?%;_N;2I_[^_O?\L5$?_(EQ*_S>$:_]*@G'_^?O[_^[P\/\R/"S_)$P__T-1
+M5/]F;U;_S[)L_\VO:/\````C````!0``````````````````````````````
+M&F8["^BRB4#_?DX3_V<S`/\M4U+_)$%%_R510O\A2SW_,S4?_V5%'?_&I&#_
+MW+QS_SQ=1_\E:%/_)YAU_S^*<_^EHIS_AX-X_QU/0?\@74G_-95W_V.+:__1
+MM7#_T+%L_PP+!T(````(```````````````````````````````<=DL5\:R$
+M//]H-0#_9#,`_RU@1_\RB6W_(&I3_R1<2?\L-B7_4"\._VQ)(O^,;#S_C8I<
+M_R%50O\GGWK_0)A^_Z"0:O^1@U[_*5Q+_R-Q6?\VG'W_;Y!L_]&V<O_0LV[_
+M(1P23`````D``````````````````````````````!IE.0?M9S4`_V@T`/]E
+M,P#_9X:3_T,W*?\Z:E+_,(YP_R%Z7?\E95'_4347_U4Y&O^">U/_+E=$_R:6
+M<_],M97_CX%<_T1-._\E?V/_+))R_Y"19__+LW?_TK=U_]&U<?\6$PY&````
+M"```````````````````````````````&%<M`.1F-`'_9S0`_V4S`/]]H*__
+M/R0(_S@D#?\M0"W_,)=X_R-[8/\D.BK_*C<I_TY)-/\T5T3_-**!_T:GB?]!
+M/S+_'%`]_S*E@_]`GX'_T[E]_]>]??_2N';_T;5Q_P8&!#<````'````````
+M```````````````````````/1"<*I7Y4*?YN/0S_9C0`_\[L^O]CB)S_(UI)
+M_R)*._\I+A__,71=_SF$;?\J=V#_)$M`_QQ'.O\NFWK_/YI__R%]8?\TAVW_
+MD9ER_]*Z@__9OX+_UKU^_]:^@O_7P(;_````%P````,`````````````````
+M``````````````LS'@AY>E,J](EB._]V2!K_?Y"8_V1YBO\9AV;_&7Y@_R-!
+M-?\G2S[_.J:&_R*(:?\D;E?_(%9%_Q^;=/\[FW[_*IY[_S.%;/_7P(C_W,2)
+M_]F_@?_8OH'_W<F:_];`BOT````.`````@``````````````````````````
+M`````P<#`#!-+@ZJI(9G_Z2&9_^<>EC_?F$]_U!H1O]&;U+_/H!F_SR#:O\J
+M<%O_+&=5_S*4=?\DB6O_'XAH_QIS5_\5*A__6U1!_]2^BO_@RYC_YM:O_^;6
+ML/_=R9S\GXQ@N`````,````````````````````````````````````!````
+M'"L7`G"KCW/_K)!T_ZR0=/^KCG+_CW!/_WM>-_]H3B3_:54L_UY1,O\S,R;_
+M&G18_QRH??\5EW#_#X!=_Q,9%/^3B'#_XM2N_^C8M?_IV[C_Z-BV_\VYB.]L
+M7CUT`````0`````````````````````````````````````````&````&752
+M+^:QEW[_O*:1_[VFD?^]II'_O:>2_\"JEO^]J)3_/38P_Q\<&?\_.C;_!Q00
+M_P`+"/\``@'_H9F'_\B^I__2PZ__R[NI_^S@P__HVKG_+R0540````L`````
+M``````````````````````````````````````````(````,/24-CXEH1_+%
+ML9[_Q;&>_\6QGO_%L9[_Q[2B_\:SHO^FEXG_3$4__W9M9?\.#0S_+RTK_P<&
+M!O^3BWW_W="\_]O.N__.O[#_Z]_#_\NVC_<````3`````@``````````````
+M```````````````````````````````````````````-!@,`+8UQ4NG#KYK_
+MU<BZ_]7(NO_5R;O_ULF\_]'%N/^[L*7_M:RA_XB!>O_8S,'_T,6Z_]3(O?_:
+MS\3_VL[#_]7'M?]N6#JB)!D.-0``````````````````````````````````
+M``````````````````````````````````,````-1#`6?9V"6N+;T,7_W=+'
+M_]W2Q__=T\C_WM3*_][4R?_:T<?_U,O!_^'7S?_AU\[_X=C._^3;T?_DV+_^
+MP*Z$Z!42#"`````'````````````````````````````````````````````
+M```````````````````````````````````%````#T@S%WZ&;DR_Y-6X_NKA
+MT/_PZ^3_]?'I__7QZ__X].S_]O+H__/KW?_3Q*'MKIYVQ!`."B0````)````
+M````````````````````````````````````````````````````````````
+M``````````````````````````$````#`P$`%B`6"#6"<TZ<K)EMS>+0I_[J
+MW+O_[N/'_^O?P/_3P9;UMZ5[UV58.F,_-R(T````!`````$`````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````@````,````$
+M`````P````$`````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````#_______```_\P``/^```#_````_P```/\```#_````_P```/X
+M```#^````_````/P```'\```#^````?@```'X```!^````?@```'X```!_``
+M``?P```/\```#_````_X```?_```'_X``#__``!__\`!___``___________
+M_R@````P````8`````$`(````````"0`````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````````````````````````````````````P``
+M``P````7````(````"`````@````(````"`````@````(````"`````@````
+M(````"`````@````(````"`````@````(````"`````@````(````"`````@
+M````(````"`````=````$0``````````````````````````````````````
+M```````````````````````````````````!`````P````0````$`````@``
+M``$````!````!0```!,L+"Q'<'%QJH6&AK^"@X2_@(&"OWU^@+][>WV_>7I[
+MOW9W>;]T=':_<7)TOV]P<;]L;7"_:VMMOVAI:[]E9FB_8V1GOV)B9;]>7V*_
+M7%Q@OUI:7;]76%N_5598OU)35[]$1$BK"@H*1@````$`````````````````
+M``````````````````````````````````````````````$````$````#```
+M`!<````9````$0````H````&````"0```!=/3U!AO\'"ZNCIZ__EY^G_X^7G
+M_^'CY?_>X./_W-[A_]K<W__8V=W_UM?;_]/5V?_1TM?_SM#5_\S.T__*S-'_
+MR,G/_\;'S?_#Q<O_P<+)_[_`Q_^\OL3_NKS"_[BZP/^;G*+J'!P=:`````(`
+M````````````````````````````````````````````````````````````
+M``(````)````'@```$`:&AI>`P,#1````#8````F````'````"!14E)BQLC)
+MZN[P\?_K[>__ZNOM_^?IZ__EYNG_X^7G_^#BY?_>W^/_W-[A_]K;W__7V=W_
+MU=?;_]/5V?_0TM?_S]#5_\S.TO_*R]#_R,G._\7'S/_#Q,K_P</(_[[`QO^B
+MHJCJ(2$B:`````(`````````````````````````````````````````````
+M``````````````````,````-````+3$Q,7G"P\7^J*FK[82%ALA@8&"71D9'
+M=R8F)V0^/CY^N;N[[>GKZ__N[_#_[O#Q_^[P\?_M[O#_ZNSN_^GJ[/_FZ.K_
+MY.7H_^+DYO_?X>3_W=[B_]O=X/_8VM[_UMC<_]36VO_2T]C_S]'6_\W/U/_+
+MS-+_R<K0_\?(SO^HJJ[J)B8G:`````(`````````````````````````````
+M``````````````````````````````````4````3````.&IJ:J3K[>__Y.7G
+M_]S>X/_*R\W^L[2V])Z?HMN"@H3/EYB9]JVNK__"Q,3_V-G9_^#AXO_GZ>K_
+MZ^WN_^WO\/_L[O#_ZNSN_^CJ[/_FY^K_Y.7H_^'CYO_?X>/_W=_A_]O<X/_8
+MVMW_UMC<_]35V?_1T]?_S]'5_\W/T_^NL+7J*BHK:`````(`````````````
+M`````````````````````````````````````````````0````@````:`P,#
+M0I^@H,KR\_3_[.[P_^/EY__=WN'_VMS>_];8V__+S<__OL##_KR]P?^IJZ[_
+MF9J<_Y67F/^BI*3_J:JJ_ZFKK/^\O;__TM/5_][?X/_7V=K_T-+3_\W.T/_=
+MW^'_X^7H_^'CYO_>X./_W=[A_]K<W__8V=W_UMC;_]35V?^UMKKJ+R\P:```
+M``(`````````````````````````````````````````````````````````
+M`@````L````A+2TM9=#1T>+X^OK_]??X_^_Q\O_DYN?_X.+D_]W>X/_8VMS_
+MUM?:_]+4U__.S]+_RLS0_\;(S/^KK;'_D9*6_XR-C_^9FIO_IJBI_Z*DI/^C
+MI*7_N+FZ_\?)RO_3U=;_XN3F_^GJ[/_FZ.O_Y.;I_^+DY__@X>7_W=_B_]S=
+MX/^\OL'J,S,T:`````(`````````````````````````````````````````
+M`````````````````P````X````K75Y>AN7EY>[\_O[_^OS\__?Y^?_M[N__
+MYNCI_^+DYO_>X.'_V]S?_]?9V__3U=?_T-'5_\S.TO_'R<[_Q,7+_\'"Q_^M
+MKK/_FIN@_Y25F/^.CY'_CH^1_Y&2D_^KK:W_Q,;'_^#AX__M[_#_Z^SN_^GJ
+M[?_FZ.K_Y.;H_^+DYO_#Q,?J.#@X:`````(`````````````````````````
+M````````````````````````````````!0```!,"`@(WC(V-H^[O[_K\_O[_
+M_/[^__O]_?_V^/C_[>_P_^CJ[/_DYN?_X.+D_]W>X?_9VMW_U=?:_]+4V/_.
+MS]/_RLO0_\;(S/_"Q,G_OL#%_[R]PO^PLK?_I*:L_Z&CJ?^2DY?_@(&#_\W.
+MS__S]?;_\?/T_^_Q\O_L[O#_Z^WN_^CJ[/_*RLSJ/#P\:`````(`````````
+M```````````````````````````````````````````!````"````!@>'AY0
+MM+6UPOCZ^O_\_O[__/[^__S^_O_\_O[_]_GY_^_Q\O_J[.W_Y^GJ_^/EY__>
+MX.+_W-W@_]G:W?_4UMG_T=/6_\W/T__)R\[_Q<?,_\+#R/^^O\7_O+W"_[F[
+MP?^XNL#_EYB<_]/4U?_Z_/S_^?O[__?Y^O_T]O;_\O3U__#R\__0TM/J04)"
+M:`````(````````````````````````````````````````````````````!
+M````"P```!]`0$!GS<[.W?S^_O_\_O[__/[^__S^_O_\_O[_^_W]__;X^/_P
+M\O+_ZNSL_^+DY?_=W^#_W=[@_]W?X?_:W-[_U]C;_]/5V/_/T-3_R\W1_\C*
+MSO_'R,W_QL?,_\/%RO^^P,;_H:*F_]_@X?_\_O[__/[^__O]_?^_Q=__NL'F
+M_\C1[/_2U-;J149&:`````(`````````````````````````````````````
+M```````````````#````$````"A@8&!\X.+B]_S^_O_\_O[__/[^__S^_O_\
+M_O[__/[^__K\_/_GZ.C_W=W>_[Z_P/^IJJK_R<O,_]O<WO_?X>/_W-[@_]G:
+MW/_5U]G_U-;9_]/5V?_0TM;_S<_4_\K+T/^\O</_K*VP_^[P\/_\_O[__/[^
+M__/U]?]I=<O_:G/0_V)PWO_.U-CJ2DI*:`````(`````````````````````
+M``````````````````````````$````%````%@```#>&A8*U]??W__S^_O_\
+M_O[__/[^__K\_/_M[^__W-W=_\/$Q/^[O+S_M[>W_]O;V__"PL+_B(F)_Y:6
+MEO^ZN[S_U]G:_^+DYO_CY.?_X.+D_]O=X?_.T-/_Q,;)_[V_PO^LK;#_K[&R
+M__?Y^?_\_O[__/[^__G[^_^2F<__P\/4_W-^W?_0U]KJ3DY.:`````(`````
+M``````````````````````````````````````````(````*````'0```$RO
+MK*7J_/[^__S^_O_\_O[_\?/S_\C)R?^:FYO_C(R,_YB8F/^VMK;_YN;F_^[N
+M[O^YN;G_JZNK_X2$A?^@H*'_N+J[_]S>W__IZ^W_Y>;H_\W.T?^KK:__GZ"B
+M_YF;G?^)BXW_EYB8_]/5U?_U]_?__/[^__S^_O]_B=[_;';:_TA8U/_2V-KJ
+M45%1:`````(```````````````````````````````````````````````4`
+M```2````*R`;#H#8U]+^_/[^__S^_O_IZ^O_GY^?_X&!@?^7EY?_O+R\_]/3
+MT__/S\__S,S,_^/CX__$Q,3_XN+B_ZZNKO]_?W__IJBH_[N]O?_IZ^W_W=_@
+M_[BZN_^_P</_R,G+_[[`P_^%AHC_HJ*B_[6WM__1T]/_^/KZ__S^_O^YP^[_
+MJ[;M_["[ZO_:WM_J55969P````(`````````````````````````````````
+M`````````@````H````:%!$)47YO3=[R]/3_\?/S_]?9V?^2DY/_E965_ZRL
+MK/_"Q<;_VN#C_]OAY/_DY^C_^/CX__KZ^O^(G*7_8I*H_VR=M?]H@H[_<'9Y
+M_Z*CH__)RLO_ZNSM_^SM[__1UMG_O,;-_["]Q/]T?'[_<')G_W)M7_]^=F;_
+MF)%\_Z>=A_^>EX7TCHZ+QI.4E+*&AX><-S<W.P````$`````````````````
+M````````````````````````!````!`````G3T$BCZ68>/CDY>7_S,W-_\'!
+MP?^BHJ+_E9:6_WV*D/^`H*[_?*.T_W^EN/^'I[7_LK_%_^3DY/]-@)C_:)"E
+M_VN<LO^*N]+_@)RI_VYU>?^TM;;_V]W>_\+(R_]SEZC_8(N?_VB7K/]RH+;_
+M:HV9_UEN:_]M7SK_F()*_ZZ35/^EC$_W:ULSHP@&`R\````6````"0``````
+M````````````````````````````````````````"````!<7$0@_@6DVOK.A
+M<O[!O;+_Q<3#_\+"PO^*BXO_;X")_X^SP_]_L,G_:X:3_X24G/^&G*;_9'R(
+M_[&TMO]<@I;_L;>[_WR)CO]@F+/_J,W>_WZ=K?]Y>GO_M+6U_VZ$CO^!F:/_
+MKKO"_Y&=H_]F@HS_J=#B_X^ZT/]8<7+_D'Q*_[R?7?^[GEO^F(!*TSLR'$<`
+M```)`````@``````````````````````````````````````````````#```
+M`!T^,!5IIXA%Z,NJ6O_)J%K_NIM6_Y9^5?]E;FG_G+W+_YK(WO]?<'G_BXJ*
+M_Y:6EO_-S<W_V=G9_]S<W/^LK['_X>'A_[:UM?]&5V#_:I^W_\WM_/]!7&O_
+MA(6%_^#BXO_\_O[_^?O[_YN:EO]];TO_:(*&_]7K]/]UI;S_=7ED_[ZC8?_#
+MIV'_N9U;]V%2+WP````.`````@``````````````````````````````````
+M````````````$0```"-<222,OYM/^]*P7O_.JUK_F6\M_W)*%?]L@8+_L=/C
+M_XB]U?\^-BG_448[_VMB6O^DH)O_Q<7$_\[.SO_3T]/_U]?7_X.$@_\K*"C_
+M*#9!_V%VB/\?,C;_465?_\7(Q__\_O[_^_W]_Y2-??]X:4/_2591_YZUP?^B
+MQ]G_=8)T_\"E9?_+K6?_R:MD_X-P0:X````7````!```````````````````
+M````````````````````````````%0```"ES6"BTR*-3_]>T8/_&H%'_>TL1
+M_WU4&_^"HJW_O=WK_WRUT/\4$@W_)3<K_R<I%_]B0R+_EWQ6_[BIBO^YM*G_
+MO[^]_V=Y<_\L5$?_(EQ*_R%C4?\WA&O_2H)Q_Y*8EO_Y^_O_[O#P_Y6);O\R
+M/"S_)$P__RQ!/_]#453_9F]6_\6J:/_/LFS_S:]H_Z:-4]4````C````!0``
+M````````````````````````````````````````````&````#%S3QS5Q9]0
+M_]BU8?^NA#S_:#4!_U\Q`/]VDZ'_GKW._T!C=_\5'1C_'$(V_R)'//]!+Q/_
+MFGM"_]*R:/_=O7+_TK9S_WY[6_\E44+_(6A2_R5Y7O\UB&__/H%M_X68DO_`
+MP<'_OKVZ_V1<1O\:23K_'DT^_R-Z7_\WJ(3_8(]M_[VG:O_0LV[_S[!J_[RA
+M7_`````Q````!P``````````````````````````````````````````````
+M&@```#AF.POHLHE`_\RG5O]^3A/_9S,`_T@H!/\M4U+_)$%%_QHX,?\E44+_
+M(4L]_Q]00/\S-1__944=_XEI-O_&I&#_W+QS_\RR;_\\74?_)6A3_QJ%9/\G
+MF'7_/XIS_VEY:_^EHIS_AX-X_V%:0_\=3T'_(%U)_QYW6_\UE7?_8XMK_\"J
+M;?_1M7#_T+%L_\BK9_L,"P="````"```````````````````````````````
+M````````````````'````#]V2Q7QK(0\_X=9'/]H-0#_9#,`_THG`O\M8$?_
+M,HEM_R>"9?\@:E/_)%Q)_R5I5/\L-B7_4"\._U@W$_]L22+_C&P\_\^R;O^-
+MBES_(55"_QQ[7O\GGWK_0)A^_W=_7O^@D&K_D8->_VYD1O\I7$O_(W%9_R"-
+M;/\VG'W_;Y!L_\6M;__1MG+_T+-N_\VP:OXA'!),````"0``````````````
+M````````````````````````````````'````#]Y3ACR<4`)_V<T`/]G-`#_
+M8S(`_TXG`/]#.BC_-UI._SJ*</\PF7G_*8)F_RIX8?\?6TG_)C<G_T8T&?]9
+M.1G_6SL;_WQ=-/^ADV'_,5A$_R-S6_\DCV[_1*:(_VV#8?^>C&+_?W-2_SI`
+M-_\A;%3_)8%D_S:B@?]&?V?_E)-E_].W=__2MW3_T;1P_\^R;?XH(A91````
+M"0``````````````````````````````````````````````&@```#QE.0?M
+M9S4`_V<T`/]H-`#_93,`_T<O%/]GAI/_0S<I_S@L$O\Z:E+_,(YP_R2/;?\A
+M>EW_)651_RP^,/]1-1?_53D:_UY!(O^">U/_+E=$_R%L5/\FEG/_3+65_VF"
+M8O^/@5S_1$T[_Q--._\E?V/_+))R_SJ7>?^0D6?_R[-W_]6Y>O_2MW7_T;5Q
+M_\RO;/T6$PY&````"```````````````````````````````````````````
+M````&````#97+0#D9C0!_V<T`/]G-`#_93,`_U]F7_]]H*__/R0(_T@D`/\X
+M)`W_+4`M_S2$:O\PEWC_(WM@_RIE4O\D.BK_*C<I_RHD%_].233_-%=$_R=D
+M4O\THH'_1J>)_SI.//]!/S+_'%`]_QMR5_\RI8/_0)^!_WR+9__3N7W_U[U]
+M_]6Z>O_2N';_T;5Q_\2I9_8&!@0W````!P``````````````````````````
+M````````````````````%0```"Y3+@G,<T06_VLY!_]G-`#_8C(`_X20C_^@
+MQ-/_14E&_QX;$O\6,2G_(B@;_S$J%O\_CG'_/9R`_S"<>_\E=5[_(6-._QU'
+M-O\-$A#_'3@L_Q1F3/\XF'K_.HAP_QU`,_\A8D[_)75<_T&QC_].FW[_E99M
+M_]6\@O_9OX+_U[U^_]6Z>__2N'?_TK=V_[.;8>$````F````!0``````````
+M````````````````````````````````````#P```"5$)PJE?E0I_G]5*_]N
+M/0S_9C0`_UM62/_.[/K_8XB<_RD].O\C6DG_(DH[_RDH&?\I+A__,71=_T2I
+MBO\YA&W_*G=@_R%T6_\D2T#_'$<Z_Q=M4_\NFWK_/YI__REV7?\A?6'_-(=M
+M_TB<@?^1F7+_TKJ#_]O"AO_9OX+_UKU^_]6[?/_6OH+_U\"&_YV)6L`````7
+M`````P``````````````````````````````````````````````"P```!PS
+M'@AY>E,J])!M2/^)8CO_=D@:_UTU"O]_D)C_9'F*_R911O\9AV;_&7Y@_QI<
+M2/\C037_)TL^_SB";/\ZIH;_(HAI_R2':?\D;E?_(%9%_QAN4_\?FW3_.YM^
+M_R^#:/\JGGO_,X5L_W%^7__7P(C_W,2)_]O!A?_9OX'_V+Z!_]K$C/_=R9K_
+MUL"*_7QL2)(````.`````@``````````````````````````````````````
+M````````!P```!8>#P%19D,?U99T4/^<?%K_FGE6_XQF/_]A.A/_/TDR_SV7
+M=O\WJH7_+:-__S&@??\LBFW_*&Q6_RAA3_\D9E+_*(!D_Q^0;O\FCV[_&WE<
+M_QI^7_\;E7#_*X)G_RES7/\N:%/_BHEH_ZR9;/_9P8?_W,.(_]O"B/_=QY+_
+MX<ZA_^+1I__@S:+_OJEYY%Q1-%8````&`````0``````````````````````
+M`````````````````````````P````\'`P`P32X.JI!N2_JDAF?_I(9G_Z2&
+M9_^<>EC_?F$]_UI-+/]0:$;_1F]2_SMW6O\^@&;_/(-J_SI]9O\J<%O_+&=5
+M_R1S6_\RE'7_)(EK_R"$9?\?B&C_&G-7_Q)3/O\5*A__6U1!_TY'-?_4OHK_
+MX,N8_^/0I/_FUJ__YM:P_^35KO_=R9S\GXQ@N#$J'"D````#````````````
+M`````````````````````````````````````````0````D````<*Q<"<'M7
+M,^JKCW/_K)!T_ZR0=/^LD'3_JXYR_Z6&:/^/<$__>UXW_VM/)O]H3B3_:54L
+M_V=8,O]>43+_,S,F_PP9%/\:=%C_'*A]_QB5;_\5EW#_#X!=_P(U)?\3&13_
+MDXAP_[6HB?_BU*[_Z-BU_^G;N/_IV[C_Z-BV_^;7M/_-N8CO;%X]=`````T`
+M```!````````````````````````````````````````````````````````
+M``0````0````,$8F"*J??V#^M)N#_[2<A/^UG(3_M9R$_[:<A/^VG(3_MIV%
+M_[6<@_^LD'3_G7Y@_WYA1?\O(Q?_!`,"_P8%!/\((!C_$(%>_P^)9/\+8T?_
+M!2\C_P,%`_\P+2?_=G!A_\K`IO_8R;'_S+JF_^77NO_IW+W_Z=V\_^+0J?^#
+M:T2X!P8&)0````0`````````````````````````````````````````````
+M``````````````````$````&````&1()`$]U4B_FL9=^_[RFD?^\II'_O::1
+M_[VFD?^]II'_O:>2_[^HE/_`JI;_O:B4_XI\;?\]-C#_'QP9_S\Z-/\_.C;_
+M!Q00_P,>%?\`"PC_``(!_QD8%?^AF8?_R+ZG_^;:P/_2PZ__R[NI_^78OO_L
+MX,/_Z-JY_[RE>NPO)!51````"P````$`````````````````````````````
+M```````````````````````````````````````"````#````!\])0V/B6A'
+M\KRED/_%L9[_Q;&>_\6QGO_%L9[_Q;&>_\:RH/_'M*+_QK.B_[NJFO^FEXG_
+M3$4__W!F7O]V;67_#@T,_Q`0$/\O+2O_!P8&_Q44$O^3BWW_W="\_][1O?_;
+MSKO_SK^P_]_3OO_KW\/_R[:/]W!=/Y,````3`````@``````````````````
+M````````````````````````````````````````````````````````````
+M!`````T#`0`H.2`&B8=H2.O$L9[_S;VL_\Z^K?_.OJW_SKVM_\Z^K?_/P*__
+MT,&P_]'"LO^WJIS_8EM5_W-K8_^9D(7_+BPJ_XR&@?^MI)K_9F!:_W9O9_^:
+MD8?_R;VQ_]3'N__6R+O_T\:Y_\R]KO^\IX?U<5P\H!`+!R0````$````````
+M````````````````````````````````````````````````````````````
+M``````````````````````0````-!@,`+3TD"8V-<5+IPZ^:_]3'N/_5R+K_
+MU<BZ_]7(NO_5R;O_ULF\_]?*O?_1Q;C_N["E_ZF@EO^UK*'_B(%Z_]'(O?_8
+MS,'_T,6Z_[RQJ/_4R+W_VL_$_]K/Q/_:SL/_U<>U_[.??O-N6#JB)!D.-0``
+M``4`````````````````````````````````````````````````````````
+M``````````````````````````````````````$````#````#00"`"1$,!9]
+MG8):XLNWGO_;T,7_W=+'_]W2Q__=TL?_W=/(_][3R?_>U,K_WM3)_]O1Q__:
+MT<?_U,O!_]_6S/_AU\W_X=?._^'7SO_AV,[_Y-O1_^KBUO_DV+_^P*Z$Z'1E
+M1(H5$@P@````!P````$`````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````P````D````:(!@*3G=?,ZN^J(7OV\VY_>3;S__EW=;_Y=[6_^7>UO_F
+MX-C_Z.'9_^CAVO_HXMK_Z>/<_^OFWO_JX]S_ZN3;_^[GW__QZ][_[N7/_MK*
+MI_*>BEVY0CHE4````!$````#````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````$````%````#P,!`"I(,Q=^AFY,O\&OB^?D
+MU;C^ZN'0_^WGWO_PZ^3_]?'I__7QZO_U\>O_^/3L__GU[?_V\NC_\^O=_^[C
+MR?_3Q*'MKIYVQ'UM2($0#@HD````"0````$`````````````````````````
+M````````````````````````````````````````````````````````````
+M```````````````````````````````````````````````!`````P````@#
+M`0`6(!8(-51'*5Z"<TZ<K)EMS<RXBN_BT*?^ZMR[_^[AQ?_NX\?_Z]_`_^?7
+ML?[3P9;UMZ5[UY*#7ZAE6#IC/S<B-`````\````$`````0``````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````$````#````!0````H````3````(````#,G(!%23D$C:V!1
+M+'ED5#![5TDI;S,K&%<#`@$S````'P```!`````'`````P````$`````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``$````"`````P````0````$`````P````(````!````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````#_______\``/______
+M_P``___````/``#__X````\``/_C@```#P``_\`````/``#_P`````\``/^`
+M````#P``_X`````/``#_@`````\``/^`````#P``_P`````/``#_``````\`
+M`/\`````#P``_@`````/``#^``````\``/X`````#P``_``````/``#\````
+M``\``/@`````'P``^``````_``#X`````#\``/``````'P``\``````?``#P
+M`````!\``/``````'P``\``````?``#P`````!\``/``````'P``\``````?
+M``#P`````!\``/@`````'P``^``````_``#X`````#\``/P`````/P``_```
+M``!_``#\`````'\``/X`````_P``_P````#_``#_@````?\``/_````#_P``
+M_^````?_``#_\```#_\``/_\```__P``__X``/__``#__\`#__\``/______
++_P``________````
+`
+end
diff --git a/patches/claws-mail-3.1.0cvs70/02-w32-icon.patch b/patches/claws-mail-3.1.0cvs70/02-w32-icon.patch
new file mode 100755 (executable)
index 0000000..eea4acf
--- /dev/null
@@ -0,0 +1,66 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+For the logo, see actually 01-w32-logo.patch.
+
+2007-07-02  Marcus Brinkmann <mb@g10code.com>
+
+       * w32-resource.rc: New file.
+       * w32-logo.ico: New file.
+       * src/Makefile.am: Define rules to compile resource files.
+       (claws_mail_LDFLAGS): Add $(claws_mail_res_ldflag).
+       (claws_mail_DEPENDENCIES): Add $(claws_mail_deps).
+       (EXTRA_DIST): Add w32-logo.ico and w32-resource.rc.
+
+diff -rupN claws-mail-3.0.0-rc2-after-01/src/Makefile.am claws-mail-3.0.0-rc2/src/Makefile.am
+--- claws-mail-3.0.0-rc2-after-01/src/Makefile.am      2007-08-10 12:58:31.000000000 +0200
++++ claws-mail-3.0.0-rc2/src/Makefile.am       2007-08-10 16:31:35.000000000 +0200
+@@ -14,6 +14,21 @@ install-exec-hook:
+       @rm -f $(DESTDIR)$(bindir)/sylpheed-claws
+       @ln -s claws-mail $(DESTDIR)$(bindir)/sylpheed-claws
++if PLATFORM_WIN32
++LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
++     `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
++     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
++
++%.o : %.rc
++      $(LTRCCOMPILE) -i $< -o $@
++
++claws_mail_res_ldflag = -Wl,w32-resource.o
++claws_mail_deps = w32-resource.o
++else
++claws_mail_res_ldflag =
++claws_mail_deps =
++endif
++
+ claws_mail_SOURCES = \
+       account.c \
+       action.c \
+@@ -305,6 +320,7 @@ BUILT_SOURCES = \
+       quote_fmt_parse.h
+ EXTRA_DIST = \
++      w32-logo.ico w32-resource.rc \
+       pixmaps/addr_one.xpm \
+       pixmaps/addr_two.xpm \
+       pixmaps/address_book.xpm \
+@@ -464,7 +480,11 @@ arch_ldflags :=
+ endif
+ claws_mail_LDFLAGS = \
+-      $(arch_ldflags) -export-dynamic
++      $(arch_ldflags) -export-dynamic $(claws_mail_res_ldflag)
++
++claws_mail_DEPENDENCIES = $(claws_mail_deps) \
++      $(etpan_library) \
++      gtk/libclawsgtk.la
+ claws_mail_LDADD = \
+       $(etpan_library) \
+diff -rupN claws-mail-3.0.0-rc2-after-01/src/w32-resource.rc claws-mail-3.0.0-rc2/src/w32-resource.rc
+--- claws-mail-3.0.0-rc2-after-01/src/w32-resource.rc  1970-01-01 01:00:00.000000000 +0100
++++ claws-mail-3.0.0-rc2/src/w32-resource.rc   2007-08-10 16:31:35.000000000 +0200
+@@ -0,0 +1 @@
++1 ICON "w32-logo.ico"
diff --git a/patches/claws-mail-3.1.0cvs70/03-smime-plugin.patch b/patches/claws-mail-3.1.0cvs70/03-smime-plugin.patch
new file mode 100755 (executable)
index 0000000..9fb3bfb
--- /dev/null
@@ -0,0 +1,1238 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+2007-06-30  Marcus Brinkmann  <marcus@g10code.de>
+
+       * Add the S/MIME 0.7.1 plugin from claws-mail-extra-plugins-2.10.0
+       straight to the source.  This makes building it so much simpler.
+
+2007-08-14  Marcus Brinkmann  <marcus@g10code.de>
+
+       * We need to bump the license string to "GPL3+" to make it load.
+
+diff -rupN claws-mail-3.0.0-rc2-after-02/configure.ac claws-mail-3.0.0-rc2/configure.ac
+--- claws-mail-3.0.0-rc2-after-02/configure.ac 2007-08-10 12:59:16.000000000 +0200
++++ claws-mail-3.0.0-rc2/configure.ac  2007-08-10 16:34:59.000000000 +0200
+@@ -907,6 +907,7 @@ src/plugins/clamav/Makefile
+ src/plugins/pgpcore/Makefile
+ src/plugins/pgpmime/Makefile
+ src/plugins/pgpinline/Makefile
++src/plugins/smime/Makefile
+ doc/Makefile
+ doc/man/Makefile
+ tools/Makefile
+diff -rupN claws-mail-3.0.0-rc2-after-02/src/plugins/Makefile.am claws-mail-3.0.0-rc2/src/plugins/Makefile.am
+--- claws-mail-3.0.0-rc2-after-02/src/plugins/Makefile.am      2007-08-10 12:58:34.000000000 +0200
++++ claws-mail-3.0.0-rc2/src/plugins/Makefile.am       2007-08-10 16:34:59.000000000 +0200
+@@ -40,4 +40,5 @@ SUBDIRS = $(demo_dir) \
+       $(clamav_dir) \
+       $(pgpcore_dir) \
+       $(pgpmime_dir) \
+-      $(pgpinline_dir)
++      $(pgpinline_dir) \
++      smime
+diff -rupN claws-mail-3.0.0-rc2-after-02/src/plugins/smime/claws.def claws-mail-3.0.0-rc2/src/plugins/smime/claws.def
+--- claws-mail-3.0.0-rc2-after-02/src/plugins/smime/claws.def  1970-01-01 01:00:00.000000000 +0100
++++ claws-mail-3.0.0-rc2/src/plugins/smime/claws.def   2007-08-10 16:34:59.000000000 +0200
+@@ -0,0 +1,28 @@
++LIBRARY CLAWS-MAIL.EXE
++EXPORTS
++alertpanel_error
++canonicalize_file_replace
++canonicalize_str
++check_plugin_version
++debug_print_real
++debug_srcname
++file_read_stream_to_str
++file_read_to_str
++generate_mime_boundary
++get_mime_tmp_dir
++get_tmp_file
++my_tmpfile
++privacy_register_system
++privacy_set_error
++privacy_unregister_system
++procmime_decode_content
++procmime_encode_content
++procmime_get_part
++procmime_mimeinfo_free_all
++procmime_mimeinfo_get_parameter
++procmime_mimeinfo_new
++procmime_mimeinfo_parent
++procmime_scan_file
++procmime_write_mime_header
++procmime_write_mimeinfo
++str_write_to_file
+diff -rupN claws-mail-3.0.0-rc2-after-02/src/plugins/smime/Makefile.am claws-mail-3.0.0-rc2/src/plugins/smime/Makefile.am
+--- claws-mail-3.0.0-rc2-after-02/src/plugins/smime/Makefile.am        1970-01-01 01:00:00.000000000 +0100
++++ claws-mail-3.0.0-rc2/src/plugins/smime/Makefile.am 2007-08-10 16:34:59.000000000 +0200
+@@ -0,0 +1,82 @@
++EXTRA_DIST = version.rc plugin.def claws.def mypgpcore.def smime.deps
++
++if OS_WIN32
++
++LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
++     `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
++     sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
++
++%.lo : %.rc
++      $(LTRCCOMPILE) -i $< -o $@
++
++plugin_res = version.lo
++plugin_res_ldflag = -Wl,.libs/version.o
++
++export_symbols = -export-symbols $(srcdir)/plugin.def
++
++plugin_deps = libclaws.a libmypgpcore.a $(plugin_res) plugin.def
++
++libclaws.a: claws.def
++      $(DLLTOOL) --output-lib $@ --def $<
++
++libmypgpcore.a: mypgpcore.def
++      $(DLLTOOL) --output-lib $@ --def $<
++
++plugin_ldadd = -L . -lclaws -lmypgpcore
++
++else
++plugin_res =
++plugin_res_ldflag =
++export_symbols =
++plugin_deps =
++plugin_ldadd =
++endif
++
++if PLATFORM_WIN32
++no_undefined = -no-undefined
++else
++no_undefined =
++endif
++
++if CYGWIN
++cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
++else
++cygwin_export_lib =
++endif
++
++plugindir = $(pkglibdir)/plugins
++plugin_DATA = smime.deps
++
++plugin_LTLIBRARIES = smime.la
++
++smime_la_SOURCES = \
++      plugin.c \
++      smime.c
++
++pluginincludedir = $(pkgincludedir)/plugins/smime
++plugininclude_HEADERS = \
++      smime.h
++
++smime_la_LDFLAGS = \
++      $(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
++      -avoid-version -module 
++smime_la_DEPENDENCIES = $(plugin_deps)
++smime_la_LIBADD = $(cygwin_export_lib) $(plugin_ldadd) $(pgpcore_lib) \
++        $(GTK_LIBS) \
++      $(GPGME_LIBS)
++
++INCLUDES = \
++      -I$(top_srcdir)/src \
++      -I$(top_srcdir)/src/common \
++      -I$(top_builddir)/src/common \
++      -I$(top_srcdir)/src/gtk
++
++AM_CPPFLAGS = \
++      $(GLIB_CFLAGS) \
++      $(GTK_CFLAGS) \
++      $(GPGME_CFLAGS) \
++      -Wno-deprecated-declarations
++
++clean-local:
++      rm -f libclaws.a
++      rm -f libmypgpcore.a
+diff -rupN claws-mail-3.0.0-rc2-after-02/src/plugins/smime/mypgpcore.def claws-mail-3.0.0-rc2/src/plugins/smime/mypgpcore.def
+--- claws-mail-3.0.0-rc2-after-02/src/plugins/smime/mypgpcore.def      1970-01-01 01:00:00.000000000 +0100
++++ claws-mail-3.0.0-rc2/src/plugins/smime/mypgpcore.def       2007-08-10 16:34:59.000000000 +0200
+@@ -0,0 +1,16 @@
++LIBRARY PGPCORE.DLL
++EXPORTS
++prefs_gpg_add_skip_encryption_warning
++prefs_gpg_enable_agent
++prefs_gpg_get_config
++prefs_gpg_remove_skip_encryption_warning 
++prefs_gpg_should_skip_encryption_warning
++sgpgme_data_from_mimeinfo
++sgpgme_data_release_and_get_mem
++sgpgme_decrypt_verify
++sgpgme_get_encrypt_data
++sgpgme_setup_signers
++sgpgme_sigstat_gpgme_to_privacy
++sgpgme_sigstat_info_full
++sgpgme_sigstat_info_short
++sgpgme_verify_signature
+diff -rupN claws-mail-3.0.0-rc2-after-02/src/plugins/smime/plugin.c claws-mail-3.0.0-rc2/src/plugins/smime/plugin.c
+--- claws-mail-3.0.0-rc2-after-02/src/plugins/smime/plugin.c   1970-01-01 01:00:00.000000000 +0100
++++ claws-mail-3.0.0-rc2/src/plugins/smime/plugin.c    2007-08-10 16:34:59.000000000 +0200
+@@ -0,0 +1,90 @@
++/*
++ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
++ * Copyright (C) 1999-2007 Colin Leroy <colin@colino.net> and 
++ * the Claws Mail team
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#  include "config.h"
++#endif
++
++#include <stddef.h>
++#include <glib.h>
++#include <glib/gi18n.h>
++
++#include "version.h"
++#include "common/claws.h"
++#include "smime.h"
++#include "plugin.h"
++
++gint plugin_init(gchar **error)
++{
++      if (!check_plugin_version(MAKE_NUMERIC_VERSION(2,9,2,72),
++                              VERSION_NUMERIC, _("S/MIME"), error))
++              return -1;
++
++      smime_init();
++
++      return 0;       
++}
++
++gboolean plugin_done(void)
++{
++      smime_done();
++      return TRUE;
++}
++
++const gchar *plugin_name(void)
++{
++      return _("S/MIME");
++}
++
++const gchar *plugin_desc(void)
++{
++      return _("This plugin handles S/MIME signed and/or encrypted "
++               "mails. You can decrypt mails, verify signatures or "
++                 "sign and encrypt your own mails.\n"
++               "\n"
++               "It can be selected as the Default Privacy System in "
++               "/Configuration/[Account Preferences]/Privacy and when "
++               "composing a message from /Options/Privacy System\n"
++               "\n"
++               "This plugin uses the GPGME library as a wrapper for GnuPG.\n"
++               "This plugin also needs gpgsm, gnupg-agent and dirmngr "
++               "installed and configured.\n"
++               "\n"
++               "Information about how to get S/MIME certificates working "
++               "with GPGSM can be found at:\n"
++               "http://www.claws-mail.org/faq/index.php/S/MIME_howto\n"
++               "\n"
++               "GPGME is copyright 2001 by Werner Koch <dd9jn@gnu.org>");
++}
++
++const gchar *plugin_type(void)
++{
++      return "GTK2";
++}
++
++const gchar *plugin_licence(void)
++{
++      return "GPL3+";
++}
++
++const gchar *plugin_version(void)
++{
++      return VERSION;
++}
+diff -rupN claws-mail-3.0.0-rc2-after-02/src/plugins/smime/plugin.def claws-mail-3.0.0-rc2/src/plugins/smime/plugin.def
+--- claws-mail-3.0.0-rc2-after-02/src/plugins/smime/plugin.def 1970-01-01 01:00:00.000000000 +0100
++++ claws-mail-3.0.0-rc2/src/plugins/smime/plugin.def  2007-08-10 16:34:59.000000000 +0200
+@@ -0,0 +1,9 @@
++EXPORTS
++        plugin_desc
++        plugin_done
++        plugin_init
++        plugin_licence
++        plugin_name
++        plugin_type
++      plugin_provides
++        plugin_version
+diff -rupN claws-mail-3.0.0-rc2-after-02/src/plugins/smime/smime.c claws-mail-3.0.0-rc2/src/plugins/smime/smime.c
+--- claws-mail-3.0.0-rc2-after-02/src/plugins/smime/smime.c    1970-01-01 01:00:00.000000000 +0100
++++ claws-mail-3.0.0-rc2/src/plugins/smime/smime.c     2007-08-10 16:34:59.000000000 +0200
+@@ -0,0 +1,879 @@
++/* 
++ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
++ * Copyright (C) 1999-2007 Colin Leroy <colin@colino.net> and 
++ * the Claws Mail team
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#  include "config.h"
++#endif
++
++#ifdef USE_GPGME
++
++#include "defs.h"
++#include <glib.h>
++#include <gpgme.h>
++#include <ctype.h>
++#include <glib/gi18n.h>
++
++#include "utils.h"
++#include "privacy.h"
++#include "procmime.h"
++
++#include "smime.h"
++#include <plugins/pgpcore/sgpgme.h>
++#include <plugins/pgpcore/prefs_gpg.h>
++#include <plugins/pgpcore/passphrase.h>
++
++#include "alertpanel.h"
++#include "prefs_common.h"
++#include "procmime.h"
++#include "plugin.h"
++
++typedef struct _PrivacyDataPGP PrivacyDataPGP;
++
++struct _PrivacyDataPGP
++{
++      PrivacyData     data;
++      
++      gboolean        done_sigtest;
++      gboolean        is_signed;
++      gpgme_verify_result_t   sigstatus;
++      gpgme_ctx_t     ctx;
++};
++
++static PrivacySystem smime_system;
++
++static gint smime_check_signature(MimeInfo *mimeinfo);
++
++static PrivacyDataPGP *smime_new_privacydata()
++{
++      PrivacyDataPGP *data;
++
++      data = g_new0(PrivacyDataPGP, 1);
++      data->data.system = &smime_system;
++      data->done_sigtest = FALSE;
++      data->is_signed = FALSE;
++      data->sigstatus = NULL;
++      gpgme_new(&data->ctx);
++      
++      return data;
++}
++
++static void smime_free_privacydata(PrivacyData *_data)
++{
++      PrivacyDataPGP *data = (PrivacyDataPGP *) _data;
++      gpgme_release(data->ctx);
++      g_free(data);
++}
++
++static gboolean smime_is_signed(MimeInfo *mimeinfo)
++{
++      MimeInfo *parent;
++      MimeInfo *signature;
++      const gchar *protocol, *tmpstr;
++      PrivacyDataPGP *data = NULL;
++      
++      g_return_val_if_fail(mimeinfo != NULL, FALSE);
++      if (mimeinfo->privacy != NULL) {
++              data = (PrivacyDataPGP *) mimeinfo->privacy;
++              if (data->done_sigtest)
++                      return data->is_signed;
++      }
++      
++      if (!g_ascii_strcasecmp(mimeinfo->subtype, "pkcs7-mime") ||
++          !g_ascii_strcasecmp(mimeinfo->subtype, "x-pkcs7-mime")) {
++              tmpstr = procmime_mimeinfo_get_parameter(mimeinfo, "smime-type");
++              if (tmpstr && !g_ascii_strcasecmp(tmpstr, "signed-data")) {
++                      if (data == NULL) {
++                              data = smime_new_privacydata();
++                              mimeinfo->privacy = (PrivacyData *) data;
++                      }
++
++                      data->done_sigtest = TRUE;
++                      data->is_signed = TRUE;
++                      smime_check_signature(mimeinfo);
++                      return TRUE;
++              }
++      }
++
++      /* check parent */
++      parent = procmime_mimeinfo_parent(mimeinfo);
++      if (parent == NULL)
++              return FALSE;
++      
++      if ((parent->type != MIMETYPE_MULTIPART) ||
++          g_ascii_strcasecmp(parent->subtype, "signed"))
++              return FALSE;
++      protocol = procmime_mimeinfo_get_parameter(parent, "protocol");
++      if ((protocol == NULL) || 
++          (g_ascii_strcasecmp(protocol, "application/pkcs7-signature") &&
++           g_ascii_strcasecmp(protocol, "application/x-pkcs7-signature")))
++              return FALSE;
++
++      /* check if mimeinfo is the first child */
++      if (parent->node->children->data != mimeinfo)
++              return FALSE;
++
++
++      /* check signature */
++      signature = parent->node->children->next != NULL ? 
++          (MimeInfo *) parent->node->children->next->data : NULL;
++      if (signature == NULL)
++              return FALSE;
++      if ((signature->type != MIMETYPE_APPLICATION) ||
++          (g_ascii_strcasecmp(signature->subtype, "pkcs7-signature") &&
++           g_ascii_strcasecmp(signature->subtype, "x-pkcs7-signature")))
++              return FALSE;
++
++is_signed:
++      if (data == NULL) {
++              data = smime_new_privacydata();
++              mimeinfo->privacy = (PrivacyData *) data;
++      }
++      
++      data->done_sigtest = TRUE;
++      data->is_signed = TRUE;
++
++      return TRUE;
++}
++
++static gchar *get_canonical_content(FILE *fp, const gchar *boundary)
++{
++      gchar *ret;
++      GString *textbuffer;
++      guint boundary_len = 0;
++      gchar buf[BUFFSIZE];
++
++      if (boundary) {
++              boundary_len = strlen(boundary);
++              while (fgets(buf, sizeof(buf), fp) != NULL)
++                      if (IS_BOUNDARY(buf, boundary, boundary_len))
++                              break;
++      }
++      
++      textbuffer = g_string_new("");
++      while (fgets(buf, sizeof(buf), fp) != NULL) {
++              gchar *buf2;
++
++              if (boundary && IS_BOUNDARY(buf, boundary, boundary_len))
++                      break;
++              
++              buf2 = canonicalize_str(buf);
++              g_string_append(textbuffer, buf2);
++              g_free(buf2);
++      }
++      g_string_truncate(textbuffer, textbuffer->len - 2);
++              
++      ret = textbuffer->str;
++      g_string_free(textbuffer, FALSE);
++
++      return ret;
++}
++
++static gint smime_check_signature(MimeInfo *mimeinfo)
++{
++      PrivacyDataPGP *data;
++      MimeInfo *parent, *signature;
++      FILE *fp;
++      gchar *boundary;
++      gchar *textstr;
++      const gchar *tmpstr;
++      gpgme_data_t sigdata = NULL, textdata = NULL;
++      gpgme_error_t err;
++      g_return_val_if_fail(mimeinfo != NULL, -1);
++      g_return_val_if_fail(mimeinfo->privacy != NULL, -1);
++      data = (PrivacyDataPGP *) mimeinfo->privacy;
++      gpgme_new(&data->ctx);
++      EncodingType oldenc = ENC_BINARY;
++      
++      debug_print("Checking S/MIME signature\n");
++
++      err = gpgme_set_protocol(data->ctx, GPGME_PROTOCOL_CMS);
++
++      if (err) {
++              debug_print ("gpgme_set_protocol failed: %s\n",
++                   gpgme_strerror (err));
++      }
++      parent = procmime_mimeinfo_parent(mimeinfo);
++
++      fp = g_fopen(parent->data.filename, "rb");
++      g_return_val_if_fail(fp != NULL, SIGNATURE_INVALID);
++      
++      boundary = g_hash_table_lookup(parent->typeparameters, "boundary");
++      if (!boundary) {
++              gchar *tmpfile = get_tmp_file();
++              debug_print("no boundary\n");
++              if (tmpfile) {
++                      if (mimeinfo->encoding_type != ENC_BASE64) {
++                              procmime_encode_content(mimeinfo, ENC_BASE64);
++                      }
++                      oldenc = mimeinfo->encoding_type;
++                      if (mimeinfo->encoding_type == ENC_BASE64)
++                              mimeinfo->encoding_type = ENC_BINARY;
++                      if (procmime_get_part(tmpfile, mimeinfo) == 0) {
++                              textstr = file_read_to_str(tmpfile);
++                      } else {
++                              textstr = NULL;
++                      }
++                      if (mimeinfo->encoding_type != oldenc)
++                              mimeinfo->encoding_type = oldenc;
++              }
++              g_free(tmpfile);
++      } else {
++              textstr = get_canonical_content(fp, boundary);
++      }
++      err = gpgme_data_new_from_mem(&textdata, textstr, strlen(textstr), 0);
++      
++      if (err) {
++              debug_print ("gpgme_data_new_from_mem failed: %s\n",
++                   gpgme_strerror (err));
++      }
++
++      if (!g_ascii_strcasecmp(mimeinfo->subtype, "pkcs7-mime") ||
++          !g_ascii_strcasecmp(mimeinfo->subtype, "x-pkcs7-mime")) {
++              tmpstr = procmime_mimeinfo_get_parameter(mimeinfo, "smime-type");
++              if (tmpstr && !g_ascii_strcasecmp(tmpstr, "signed-data")) {
++                      gpgme_data_t cipher, plain;
++                      int len;
++                      if (oldenc == ENC_BASE64)
++                              gpgme_data_set_encoding (textdata, GPGME_DATA_ENCODING_BASE64);
++                      gpgme_data_new(&cipher);
++                      data->sigstatus =
++                              sgpgme_verify_signature (data->ctx, textdata, NULL, cipher);
++                      gpgme_data_release(textdata);
++                      g_free(textstr);
++                      gpgme_data_rewind(cipher);
++                      textstr = sgpgme_data_release_and_get_mem(cipher, &len);
++                      fclose(fp);
++                      if (textstr && len > 0)
++                              textstr[len-1]='\0';
++
++                      if (textstr && len) {
++                              gchar *tmp_file = get_tmp_file();
++                              MimeInfo *newinfo = NULL, *decinfo = NULL, *parentinfo = NULL;
++                              gint childnumber = 0;
++                                                              
++                              str_write_to_file(textstr, tmp_file);
++                              newinfo = procmime_scan_file(tmp_file);
++                              decinfo = g_node_first_child(newinfo->node) != NULL ?
++                                      g_node_first_child(newinfo->node)->data : NULL;
++                              g_node_unlink(decinfo->node);
++                              procmime_mimeinfo_free_all(newinfo);
++                              decinfo->tmp = TRUE;
++                              parentinfo = procmime_mimeinfo_parent(mimeinfo);
++                              childnumber = g_node_child_index(parentinfo->node, mimeinfo);
++                              if (parentinfo->type == MIMETYPE_MESSAGE && 
++                                  !strcmp(parentinfo->subtype, "rfc822")) {
++                                      procmime_decode_content(parentinfo);
++                                      procmime_encode_content(parentinfo, ENC_BASE64);
++                                      procmime_encode_content(parentinfo, ENC_8BIT);
++                                      if (parentinfo->content == MIMECONTENT_MEM) {
++                                              gint newlen = 
++                                                      (gint)(strstr(parentinfo->data.mem, "\n\n") - parentinfo->data.mem);
++                                              if (newlen > 0)
++                                                      parentinfo->length = newlen;
++                                      }
++                              }
++                              g_node_prepend(parentinfo->node, decinfo->node);
++                              return 0;
++                      } else {
++                              return -1;
++                      }
++              }
++      }
++
++      signature = (MimeInfo *) mimeinfo->node->next->data;
++      sigdata = sgpgme_data_from_mimeinfo(signature);
++
++      err = 0;
++      if (signature->encoding_type == ENC_BASE64) {
++              err = gpgme_data_set_encoding (sigdata, GPGME_DATA_ENCODING_BASE64);
++      }
++      
++      if (err) {
++              debug_print ("gpgme_data_set_encoding failed: %s\n",
++                      gpgme_strerror (err));
++      }
++
++      data->sigstatus =
++              sgpgme_verify_signature (data->ctx, sigdata, textdata, NULL);
++
++      gpgme_data_release(sigdata);
++      gpgme_data_release(textdata);
++      g_free(textstr);
++      fclose(fp);
++      
++      return 0;
++}
++
++static SignatureStatus smime_get_sig_status(MimeInfo *mimeinfo)
++{
++      PrivacyDataPGP *data = (PrivacyDataPGP *) mimeinfo->privacy;
++      
++      g_return_val_if_fail(data != NULL, SIGNATURE_INVALID);
++
++      if (data->sigstatus == NULL && 
++          prefs_gpg_get_config()->auto_check_signatures)
++              smime_check_signature(mimeinfo);
++      
++      return sgpgme_sigstat_gpgme_to_privacy(data->ctx, data->sigstatus);
++}
++
++static gchar *smime_get_sig_info_short(MimeInfo *mimeinfo)
++{
++      PrivacyDataPGP *data = (PrivacyDataPGP *) mimeinfo->privacy;
++      
++      g_return_val_if_fail(data != NULL, g_strdup("Error"));
++
++      if (data->sigstatus == NULL && 
++          prefs_gpg_get_config()->auto_check_signatures)
++              smime_check_signature(mimeinfo);
++      
++      return sgpgme_sigstat_info_short(data->ctx, data->sigstatus);
++}
++
++static gchar *smime_get_sig_info_full(MimeInfo *mimeinfo)
++{
++      PrivacyDataPGP *data = (PrivacyDataPGP *) mimeinfo->privacy;
++      
++      g_return_val_if_fail(data != NULL, g_strdup("Error"));
++
++      if (data->sigstatus == NULL && 
++          prefs_gpg_get_config()->auto_check_signatures)
++              smime_check_signature(mimeinfo);
++      
++      return sgpgme_sigstat_info_full(data->ctx, data->sigstatus);
++}
++
++static gboolean smime_is_encrypted(MimeInfo *mimeinfo)
++{
++      MimeInfo *tmpinfo;
++      const gchar *tmpstr;
++      
++      if (mimeinfo->type != MIMETYPE_APPLICATION)
++              return FALSE;
++      if (!g_ascii_strcasecmp(mimeinfo->subtype, "pkcs7-mime")) {
++              tmpstr = procmime_mimeinfo_get_parameter(mimeinfo, "smime-type");
++              if (tmpstr && g_ascii_strcasecmp(tmpstr, "enveloped-data"))
++                      return FALSE;
++              else 
++                      return TRUE;
++
++      } else if (!g_ascii_strcasecmp(mimeinfo->subtype, "x-pkcs7-mime")) {
++              tmpstr = procmime_mimeinfo_get_parameter(mimeinfo, "smime-type");
++              if (tmpstr && g_ascii_strcasecmp(tmpstr, "enveloped-data"))
++                      return FALSE;
++              else 
++                      return TRUE;
++      }
++      return FALSE;
++}
++
++static MimeInfo *smime_decrypt(MimeInfo *mimeinfo)
++{
++      MimeInfo *encinfo, *decinfo, *parseinfo;
++      gpgme_data_t cipher = NULL, plain = NULL;
++      static gint id = 0;
++      FILE *dstfp;
++      gchar *fname;
++      gpgme_verify_result_t sigstat = NULL;
++      PrivacyDataPGP *data = NULL;
++      gpgme_ctx_t ctx;
++      gpgme_error_t err;
++      gchar *chars;
++      size_t len;
++
++      g_return_val_if_fail(smime_is_encrypted(mimeinfo), NULL);
++      
++      if ((err = gpgme_new(&ctx)) != GPG_ERR_NO_ERROR) {
++              privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
++              return NULL;
++      }
++
++      err = gpgme_set_protocol(ctx, GPGME_PROTOCOL_CMS);
++      if (err) {
++              debug_print ("gpgme_set_protocol failed: %s\n",
++                   gpgme_strerror (err));
++              privacy_set_error(_("Couldn't set GPG protocol, %s"), gpgme_strerror(err));
++              gpgme_release(ctx);
++              return NULL;
++      }
++      gpgme_set_armor(ctx, TRUE);
++
++      encinfo = mimeinfo;
++
++      cipher = sgpgme_data_from_mimeinfo(encinfo);
++      gpgme_data_set_encoding(cipher, GPGME_DATA_ENCODING_BASE64);
++      plain = sgpgme_decrypt_verify(cipher, &sigstat, ctx);
++
++      gpgme_data_release(cipher);
++      if (plain == NULL) {
++              debug_print("plain is null!\n");
++              gpgme_release(ctx);
++              return NULL;
++      }
++
++      fname = g_strdup_printf("%s%cplaintext.%08x",
++              get_mime_tmp_dir(), G_DIR_SEPARATOR, ++id);
++
++      if ((dstfp = g_fopen(fname, "wb")) == NULL) {
++              FILE_OP_ERROR(fname, "fopen");
++              g_free(fname);
++              gpgme_data_release(plain);
++              gpgme_release(ctx);
++              debug_print("can't open!\n");
++              privacy_set_error(_("Couldn't open temporary file"));
++              return NULL;
++      }
++
++      fprintf(dstfp, "MIME-Version: 1.0\n");
++
++      chars = sgpgme_data_release_and_get_mem(plain, &len);
++
++      if (len > 0) {
++              fwrite(chars, len, 1, dstfp);
++      }
++      fclose(dstfp);
++      g_free(chars);
++
++      parseinfo = procmime_scan_file(fname);
++      g_free(fname);
++      if (parseinfo == NULL) {
++              privacy_set_error(_("Couldn't parse decrypted file."));
++              gpgme_release(ctx);
++              return NULL;
++      }
++      decinfo = g_node_first_child(parseinfo->node) != NULL ?
++              g_node_first_child(parseinfo->node)->data : NULL;
++      if (decinfo == NULL) {
++              privacy_set_error(_("Couldn't parse decrypted file parts."));
++              gpgme_release(ctx);
++              return NULL;
++      }
++
++      g_node_unlink(decinfo->node);
++      procmime_mimeinfo_free_all(parseinfo);
++
++      decinfo->tmp = TRUE;
++
++      if (sigstat != NULL && sigstat->signatures != NULL) {
++              if (decinfo->privacy != NULL) {
++                      data = (PrivacyDataPGP *) decinfo->privacy;
++              } else {
++                      data = smime_new_privacydata();
++                      decinfo->privacy = (PrivacyData *) data;        
++              }
++              data->done_sigtest = TRUE;
++              data->is_signed = TRUE;
++              data->sigstatus = sigstat;
++              if (data->ctx)
++                      gpgme_release(data->ctx);
++              data->ctx = ctx;
++      } else
++              gpgme_release(ctx);
++      
++      
++      
++      return decinfo;
++}
++
++gboolean smime_sign(MimeInfo *mimeinfo, PrefsAccount *account)
++{
++      MimeInfo *msgcontent, *sigmultipart, *newinfo;
++      gchar *textstr, *micalg;
++      FILE *fp;
++      gchar *boundary = NULL;
++      gchar *sigcontent;
++      gpgme_ctx_t ctx;
++      gpgme_data_t gpgtext, gpgsig;
++      gpgme_error_t err;
++      size_t len;
++      struct passphrase_cb_info_s info;
++      gpgme_sign_result_t result = NULL;
++      gchar *test_msg;
++      gchar *real_content = NULL;
++      
++      fp = my_tmpfile();
++      if (fp == NULL) {
++              perror("my_tmpfile");
++              return FALSE;
++      }
++      procmime_write_mimeinfo(mimeinfo, fp);
++      rewind(fp);
++
++      /* read temporary file into memory */
++      test_msg = file_read_stream_to_str(fp);
++      fclose(fp);
++      
++      memset (&info, 0, sizeof info);
++
++      /* remove content node from message */
++      msgcontent = (MimeInfo *) mimeinfo->node->children->data;
++      g_node_unlink(msgcontent->node);
++
++      /* create temporary multipart for content */
++      sigmultipart = procmime_mimeinfo_new();
++      sigmultipart->type = MIMETYPE_MULTIPART;
++      sigmultipart->subtype = g_strdup("signed");
++      
++      do {
++              if (boundary)
++                      g_free(boundary);
++              boundary = generate_mime_boundary("Sig");
++      } while (strstr(test_msg, boundary) != NULL);
++      
++      g_free(test_msg);
++
++      g_hash_table_insert(sigmultipart->typeparameters, g_strdup("boundary"),
++                            g_strdup(boundary));
++      g_hash_table_insert(sigmultipart->typeparameters, g_strdup("protocol"),
++                            g_strdup("application/pkcs7-signature"));
++      g_node_append(sigmultipart->node, msgcontent->node);
++      g_node_append(mimeinfo->node, sigmultipart->node);
++
++      /* write message content to temporary file */
++      fp = my_tmpfile();
++      if (fp == NULL) {
++              perror("my_tmpfile");
++              return FALSE;
++      }
++      procmime_write_mimeinfo(sigmultipart, fp);
++      rewind(fp);
++
++      /* read temporary file into memory */
++      textstr = get_canonical_content(fp, boundary);
++
++      g_free(boundary);
++
++      fclose(fp);
++
++      gpgme_data_new_from_mem(&gpgtext, textstr, strlen(textstr), 0);
++      gpgme_data_new(&gpgsig);
++      gpgme_new(&ctx);
++      gpgme_set_armor(ctx, TRUE);
++      gpgme_signers_clear (ctx);
++
++      err = gpgme_set_protocol(ctx, GPGME_PROTOCOL_CMS);
++
++      if (err) {
++              debug_print ("gpgme_set_protocol failed: %s\n",
++                   gpgme_strerror (err));
++              gpgme_data_release(gpgtext);
++              gpgme_release(ctx);
++              return FALSE;
++      }
++
++      if (!sgpgme_setup_signers(ctx, account)) {
++              debug_print("setup_signers failed\n");
++              gpgme_data_release(gpgtext);
++              gpgme_release(ctx);
++              return FALSE;
++      }
++
++      info.c = ctx;
++      prefs_gpg_enable_agent(TRUE);
++      gpgme_set_passphrase_cb (ctx, NULL, &info);
++      
++      err = gpgme_op_sign(ctx, gpgtext, gpgsig, GPGME_SIG_MODE_DETACH);
++      if (err != GPG_ERR_NO_ERROR) {
++              alertpanel_error("S/MIME : Cannot sign, %s (%d)", gpg_strerror(err), gpg_err_code(err));
++              gpgme_data_release(gpgtext);
++              gpgme_release(ctx);
++              return FALSE;
++      }
++      result = gpgme_op_sign_result(ctx);
++      if (result && result->signatures) {
++          if (gpgme_get_protocol(ctx) == GPGME_PROTOCOL_OpenPGP) {
++              micalg = g_strdup_printf("PGP-%s", gpgme_hash_algo_name(
++                          result->signatures->hash_algo));
++          } else {
++              micalg = g_strdup(gpgme_hash_algo_name(
++                          result->signatures->hash_algo));
++          }
++      } else {
++          /* can't get result (maybe no signing key?) */
++          debug_print("gpgme_op_sign_result error\n");
++          return FALSE;
++      }
++
++      gpgme_release(ctx);
++      sigcontent = sgpgme_data_release_and_get_mem(gpgsig, &len);
++      gpgme_data_release(gpgtext);
++      g_free(textstr);
++
++      if (!sigcontent) {
++              gpgme_release(ctx);
++              return FALSE;
++      }
++      real_content = sigcontent+strlen("-----BEGIN SIGNED MESSAGE-----\n");
++      if (!strstr(real_content, "-----END SIGNED MESSAGE-----")) {
++              debug_print("missing end\n");
++              gpgme_release(ctx);
++              return FALSE;
++      }
++      *strstr(real_content, "-----END SIGNED MESSAGE-----") = '\0';
++      /* add signature */
++      g_hash_table_insert(sigmultipart->typeparameters, g_strdup("micalg"),
++                            micalg);
++
++      newinfo = procmime_mimeinfo_new();
++      newinfo->type = MIMETYPE_APPLICATION;
++      newinfo->subtype = g_strdup("pkcs7-signature");
++      g_hash_table_insert(newinfo->typeparameters, g_strdup("name"),
++                           g_strdup("smime.p7s"));
++      newinfo->content = MIMECONTENT_MEM;
++      newinfo->disposition = DISPOSITIONTYPE_ATTACHMENT;
++      g_hash_table_insert(newinfo->dispositionparameters, g_strdup("filename"),
++                          g_strdup("smime.p7s"));
++      newinfo->data.mem = g_malloc(len + 1);
++      g_memmove(newinfo->data.mem, real_content, len);
++      newinfo->data.mem[len] = '\0';
++      newinfo->encoding_type = ENC_BASE64;
++      g_node_append(sigmultipart->node, newinfo->node);
++
++      g_free(sigcontent);
++
++      return TRUE;
++}
++gchar *smime_get_encrypt_data(GSList *recp_names)
++{
++      return sgpgme_get_encrypt_data(recp_names, GPGME_PROTOCOL_CMS);
++}
++
++static const gchar *smime_get_encrypt_warning(void)
++{
++      if (prefs_gpg_should_skip_encryption_warning(smime_system.id))
++              return NULL;
++      else
++              return _("Please note that email headers, like Subject, "
++                       "are not encrypted by the S/MIME system.");
++}
++
++static void smime_inhibit_encrypt_warning(gboolean inhibit)
++{
++      if (inhibit)
++              prefs_gpg_add_skip_encryption_warning(smime_system.id);
++      else
++              prefs_gpg_remove_skip_encryption_warning(smime_system.id);
++}
++
++static gchar *fp_read_noconv(FILE *fp)
++{
++      GByteArray *array;
++      guchar buf[BUFSIZ];
++      gint n_read;
++      gchar *result = NULL;
++
++      if (!fp)
++              return NULL;
++      array = g_byte_array_new();
++
++      while ((n_read = fread(buf, sizeof(gchar), sizeof(buf), fp)) > 0) {
++              if (n_read < sizeof(buf) && ferror(fp))
++                      break;
++              g_byte_array_append(array, buf, n_read);
++      }
++
++      if (ferror(fp)) {
++              FILE_OP_ERROR("file stream", "fread");
++              g_byte_array_free(array, TRUE);
++              return NULL;
++      }
++
++      buf[0] = '\0';
++      g_byte_array_append(array, buf, 1);
++      result = (gchar *)array->data;
++      g_byte_array_free(array, FALSE);
++      
++      return result;
++}
++
++gboolean smime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
++{
++      MimeInfo *msgcontent, *encmultipart;
++      FILE *fp;
++      gchar *enccontent;
++      size_t len;
++      gchar *textstr = NULL;
++      gpgme_data_t gpgtext = NULL, gpgenc = NULL;
++      gpgme_ctx_t ctx = NULL;
++      gpgme_key_t *kset = NULL;
++      gchar **fprs = g_strsplit(encrypt_data, " ", -1);
++      gint i = 0;
++      gpgme_error_t err;
++      gchar *tmpfile = NULL;
++
++      while (fprs[i] && strlen(fprs[i])) {
++              i++;
++      }
++      
++      gpgme_new(&ctx);
++
++      err = gpgme_set_protocol(ctx, GPGME_PROTOCOL_CMS);
++
++      if (err) {
++              debug_print ("gpgme_set_protocol failed: %s\n",
++                   gpgme_strerror (err));
++              return FALSE;   
++      }
++
++      kset = g_malloc(sizeof(gpgme_key_t)*(i+1));
++      memset(kset, 0, sizeof(gpgme_key_t)*(i+1));
++      i = 0;
++
++      while (fprs[i] && strlen(fprs[i])) {
++              gpgme_key_t key;
++              gpgme_error_t err;
++              err = gpgme_get_key(ctx, fprs[i], &key, 0);
++              if (err) {
++                      debug_print("can't add key '%s'[%d] (%s)\n", fprs[i],i, gpgme_strerror(err));
++                      break;
++              }
++              debug_print("found %s at %d\n", fprs[i], i);
++              kset[i] = key;
++              i++;
++      }
++      
++      debug_print("Encrypting message content\n");
++
++      /* remove content node from message */
++      msgcontent = (MimeInfo *) mimeinfo->node->children->data;
++      g_node_unlink(msgcontent->node);
++
++
++      /* create temporary multipart for content */
++      encmultipart = procmime_mimeinfo_new();
++      encmultipart->type = MIMETYPE_APPLICATION;
++      encmultipart->subtype = g_strdup("x-pkcs7-mime");
++      g_hash_table_insert(encmultipart->typeparameters, g_strdup("name"),
++                            g_strdup("smime.p7m"));
++      
++      encmultipart->disposition = DISPOSITIONTYPE_ATTACHMENT;
++      g_hash_table_insert(encmultipart->dispositionparameters, g_strdup("filename"),
++                            g_strdup("smime.p7m"));
++
++      g_node_append(encmultipart->node, msgcontent->node);
++
++      /* write message content to temporary file */
++      tmpfile = get_tmp_file();
++      fp = fopen(tmpfile, "wb");
++      if (fp == NULL) {
++              perror("get_tmp_file");
++              return FALSE;
++      }
++      procmime_decode_content(msgcontent);
++      procmime_write_mime_header(msgcontent, fp);
++      procmime_write_mimeinfo(msgcontent, fp);
++      fclose(fp);
++      canonicalize_file_replace(tmpfile);
++      fp = fopen(tmpfile, "rb");
++      if (fp == NULL) {
++              perror("get_tmp_file");
++              return FALSE;
++      }
++      g_free(tmpfile);
++
++      /* read temporary file into memory */
++      textstr = fp_read_noconv(fp);
++
++      fclose(fp);
++
++      /* encrypt data */
++      gpgme_data_new_from_mem(&gpgtext, textstr, strlen(textstr), 0);
++      gpgme_data_new(&gpgenc);
++      gpgme_data_rewind(gpgtext);
++      
++      gpgme_data_set_encoding(gpgenc, GPGME_DATA_ENCODING_BASE64);
++      gpgme_op_encrypt(ctx, kset, GPGME_ENCRYPT_ALWAYS_TRUST, gpgtext, gpgenc);
++
++      gpgme_release(ctx);
++      enccontent = sgpgme_data_release_and_get_mem(gpgenc, &len);
++
++      if (!enccontent) {
++              g_warning("no enccontent\n");
++              return FALSE;
++      }
++
++      tmpfile = get_tmp_file();
++      fp = fopen(tmpfile, "wb");
++      if (fp) {
++              fwrite(enccontent, 1, len, fp);
++              fclose(fp);
++      } else {
++              perror("get_tmp_file");
++              return FALSE;
++      }
++      gpgme_data_release(gpgtext);
++      g_free(textstr);
++
++      /* create encrypted multipart */
++      procmime_mimeinfo_free_all(msgcontent);
++      g_node_append(mimeinfo->node, encmultipart->node);
++
++      encmultipart->content = MIMECONTENT_FILE;
++      encmultipart->data.filename = tmpfile;
++      procmime_encode_content(encmultipart, ENC_BASE64);
++
++      g_free(enccontent);
++
++      return TRUE;
++}
++
++static PrivacySystem smime_system = {
++      "smime",                        /* id */
++      "S-MIME",                       /* name */
++
++      smime_free_privacydata, /* free_privacydata */
++
++      smime_is_signed,                /* is_signed(MimeInfo *) */
++      smime_check_signature,  /* check_signature(MimeInfo *) */
++      smime_get_sig_status,           /* get_sig_status(MimeInfo *) */
++      smime_get_sig_info_short,       /* get_sig_info_short(MimeInfo *) */
++      smime_get_sig_info_full,        /* get_sig_info_full(MimeInfo *) */
++
++      smime_is_encrypted,             /* is_encrypted(MimeInfo *) */
++      smime_decrypt,                  /* decrypt(MimeInfo *) */
++
++      TRUE,
++      smime_sign,
++
++      TRUE,
++      smime_get_encrypt_data,
++      smime_encrypt,
++      smime_get_encrypt_warning,
++      smime_inhibit_encrypt_warning,
++};
++
++void smime_init()
++{
++      privacy_register_system(&smime_system);
++}
++
++void smime_done()
++{
++      privacy_unregister_system(&smime_system);
++}
++
++struct PluginFeature *plugin_provides(void)
++{
++      static struct PluginFeature features[] = 
++              { {PLUGIN_PRIVACY, N_("S/MIME")},
++                {PLUGIN_NOTHING, NULL}};
++      return features;
++}
++#endif /* USE_GPGME */
+diff -rupN claws-mail-3.0.0-rc2-after-02/src/plugins/smime/smime.deps claws-mail-3.0.0-rc2/src/plugins/smime/smime.deps
+--- claws-mail-3.0.0-rc2-after-02/src/plugins/smime/smime.deps 1970-01-01 01:00:00.000000000 +0100
++++ claws-mail-3.0.0-rc2/src/plugins/smime/smime.deps  2007-08-10 16:34:59.000000000 +0200
+@@ -0,0 +1 @@
++pgpcore
+diff -rupN claws-mail-3.0.0-rc2-after-02/src/plugins/smime/smime.h claws-mail-3.0.0-rc2/src/plugins/smime/smime.h
+--- claws-mail-3.0.0-rc2-after-02/src/plugins/smime/smime.h    1970-01-01 01:00:00.000000000 +0100
++++ claws-mail-3.0.0-rc2/src/plugins/smime/smime.h     2007-08-10 16:34:59.000000000 +0200
+@@ -0,0 +1,27 @@
++/*
++ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
++ * Copyright (C) 1999-2007 Colin Leroy <colin@colino.net> and 
++ * the Claws Mail team
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifndef PGPMIME_H
++#define PGPMIME_H 1
++
++void smime_init(void);
++void smime_done(void);
++
++#endif /* PGPMIME_H */
+diff -rupN claws-mail-3.0.0-rc2-after-02/src/plugins/smime/version.rc claws-mail-3.0.0-rc2/src/plugins/smime/version.rc
+--- claws-mail-3.0.0-rc2-after-02/src/plugins/smime/version.rc 1970-01-01 01:00:00.000000000 +0100
++++ claws-mail-3.0.0-rc2/src/plugins/smime/version.rc  2007-08-10 16:34:59.000000000 +0200
+@@ -0,0 +1,36 @@
++1 VERSIONINFO
++ FILEVERSION 0, 0, 0, 0
++ PRODUCTVERSION 0, 0, 0, 0
++ FILEFLAGSMASK 0x3fL
++#ifdef _DEBUG
++ FILEFLAGS 0x1L
++#else
++ FILEFLAGS 0x0L
++#endif
++ FILEOS 0x40004L
++ FILETYPE 0x2L
++ FILESUBTYPE 0x0L
++BEGIN
++    BLOCK "StringFileInfo"
++    BEGIN
++        BLOCK "000004b0"
++        BEGIN
++            VALUE "FileDescription", "smime Plugin\0"
++            VALUE "FileVersion", "0.0.0.0\0"
++            VALUE "ProductVersion", "0.0.0.0 Win32\0"
++            VALUE "LegalCopyright", "GPL / \81© 1999-2007 Colin Leroy <colin@colino.net>\0"
++            VALUE "CompanyName", "GNU / Free Software Foundation\0"
++            VALUE "ProductName", "Claws Mail\0"
++//            VALUE "Comments", "\0"
++//            VALUE "InternalName", "\0"
++//            VALUE "LegalTrademarks", "\0"
++//            VALUE "OriginalFilename", "\0"
++//            VALUE "PrivateBuild", "\0"
++//            VALUE "SpecialBuild", "\0"
++        END
++    END
++    BLOCK "VarFileInfo"
++    BEGIN
++        VALUE "Translation", 0x0, 1200
++    END
++END
diff --git a/patches/claws-mail-3.1.0cvs70/99-auto.patch b/patches/claws-mail-3.1.0cvs70/99-auto.patch
new file mode 100755 (executable)
index 0000000..63dcbe7
--- /dev/null
@@ -0,0 +1,30900 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+2007-06-08  Marcus Brinkmann  <marcus@g10code.de>
+
+       * Regenerate all autotool files with
+
+$ aclocal -I m4   && libtoolize --force --copy   && autoheader   && automake --add-missing --foreign --copy   && autoconf
+
+       but removing autom4te.cache before creating the diff.
+
+diff -rupN claws-mail-3.1.0cvs70-orig/aclocal.m4 claws-mail-3.1.0cvs70/aclocal.m4
+--- claws-mail-3.1.0cvs70-orig/aclocal.m4      2007-12-08 17:07:02.000000000 +0100
++++ claws-mail-3.1.0cvs70/aclocal.m4   2007-12-08 22:54:22.000000000 +0100
+@@ -1,7 +1,7 @@
+-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
++# generated automatically by aclocal 1.10 -*- Autoconf -*-
+ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+-# 2005  Free Software Foundation, Inc.
++# 2005, 2006  Free Software Foundation, Inc.
+ # This file is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -11,8 +11,13 @@
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+-# gettext.m4 serial 37 (gettext-0.14.4)
+-dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
++m4_if(m4_PACKAGE_VERSION, [2.61],,
++[m4_fatal([this file was generated for autoconf 2.61.
++You have another version of autoconf.  If you want to use that,
++you should regenerate the build system entirely.], [63])])
++
++# gettext.m4 serial 59 (gettext-0.16.1)
++dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+ dnl with or without modifications, as long as this notice is preserved.
+@@ -28,7 +33,7 @@ dnl They are *not* in the public domain.
+ dnl Authors:
+ dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+-dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
++dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+ dnl Macro to add for using GNU gettext.
+@@ -76,8 +81,13 @@ AC_DEFUN([AM_GNU_GETTEXT],
+   ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+     [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+ ])])])])
+-  define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
++  define([gt_included_intl],
++    ifelse([$1], [external],
++      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
++      [yes]))
+   define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
++  gt_NEEDS_INIT
++  AM_GNU_GETTEXT_NEED([$2])
+   AC_REQUIRE([AM_PO_SUBDIRS])dnl
+   ifelse(gt_included_intl, yes, [
+@@ -91,7 +101,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
+   dnl Sometimes libintl requires libiconv, so first search for libiconv.
+   dnl Ideally we would do this search only after the
+   dnl      if test "$USE_NLS" = "yes"; then
+-  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
++  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+   dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+   dnl the configure script would need to contain the same shell code
+   dnl again, outside any 'if'. There are two solutions:
+@@ -107,7 +117,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
+   gt_INTL_MACOSX
+   dnl Set USE_NLS.
+-  AM_NLS
++  AC_REQUIRE([AM_NLS])
+   ifelse(gt_included_intl, yes, [
+     BUILD_INCLUDED_LIBINTL=no
+@@ -117,6 +127,15 @@ AC_DEFUN([AM_GNU_GETTEXT],
+   LTLIBINTL=
+   POSUB=
++  dnl Add a version number to the cache macros.
++  case " $gt_needs " in
++    *" need-formatstring-macros "*) gt_api_version=3 ;;
++    *" need-ngettext "*) gt_api_version=2 ;;
++    *) gt_api_version=1 ;;
++  esac
++  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
++  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
++
+   dnl If we use NLS figure out what method
+   if test "$USE_NLS" = "yes"; then
+     gt_use_preinstalled_gnugettext=no
+@@ -135,28 +154,35 @@ AC_DEFUN([AM_GNU_GETTEXT],
+         dnl to use.  If GNU gettext is available we use this.  Else we have
+         dnl to fall back to GNU NLS library.
+-        dnl Add a version number to the cache macros.
+-        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
+-        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
+-        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
+-
+-        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+-         [AC_TRY_LINK([#include <libintl.h>
+-]ifelse([$2], [need-formatstring-macros],
+-[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
++        if test $gt_api_version -ge 3; then
++          gt_revision_test_code='
++#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+ #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+ #endif
+ changequote(,)dnl
+ typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+ changequote([,])dnl
+-], [])[extern int _nl_msg_cat_cntr;
++'
++        else
++          gt_revision_test_code=
++        fi
++        if test $gt_api_version -ge 2; then
++          gt_expression_test_code=' + * ngettext ("", "", 0)'
++        else
++          gt_expression_test_code=
++        fi
++
++        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
++         [AC_TRY_LINK([#include <libintl.h>
++$gt_revision_test_code
++extern int _nl_msg_cat_cntr;
+ extern int *_nl_domain_bindings;],
+             [bindtextdomain ("", "");
+-return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
+-            gt_cv_func_gnugettext_libc=yes,
+-            gt_cv_func_gnugettext_libc=no)])
++return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
++            [eval "$gt_func_gnugettext_libc=yes"],
++            [eval "$gt_func_gnugettext_libc=no"])])
+-        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
++        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+           dnl Sometimes libintl requires libiconv, so first search for libiconv.
+           ifelse(gt_included_intl, yes, , [
+             AM_ICONV_LINK
+@@ -167,52 +193,40 @@ return * gettext ("")]ifelse([$2], [need
+           dnl even if libiconv doesn't exist.
+           AC_LIB_LINKFLAGS_BODY([intl])
+           AC_CACHE_CHECK([for GNU gettext in libintl],
+-            gt_cv_func_gnugettext_libintl,
++            [$gt_func_gnugettext_libintl],
+            [gt_save_CPPFLAGS="$CPPFLAGS"
+             CPPFLAGS="$CPPFLAGS $INCINTL"
+             gt_save_LIBS="$LIBS"
+             LIBS="$LIBS $LIBINTL"
+             dnl Now see whether libintl exists and does not depend on libiconv.
+             AC_TRY_LINK([#include <libintl.h>
+-]ifelse([$2], [need-formatstring-macros],
+-[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+-#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+-#endif
+-changequote(,)dnl
+-typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+-changequote([,])dnl
+-], [])[extern int _nl_msg_cat_cntr;
++$gt_revision_test_code
++extern int _nl_msg_cat_cntr;
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ const char *_nl_expand_alias (const char *);],
+               [bindtextdomain ("", "");
+-return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+-              gt_cv_func_gnugettext_libintl=yes,
+-              gt_cv_func_gnugettext_libintl=no)
++return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
++              [eval "$gt_func_gnugettext_libintl=yes"],
++              [eval "$gt_func_gnugettext_libintl=no"])
+             dnl Now see whether libintl exists and depends on libiconv.
+-            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
++            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+               LIBS="$LIBS $LIBICONV"
+               AC_TRY_LINK([#include <libintl.h>
+-]ifelse([$2], [need-formatstring-macros],
+-[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+-#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+-#endif
+-changequote(,)dnl
+-typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+-changequote([,])dnl
+-], [])[extern int _nl_msg_cat_cntr;
++$gt_revision_test_code
++extern int _nl_msg_cat_cntr;
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ const char *_nl_expand_alias (const char *);],
+                 [bindtextdomain ("", "");
+-return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
++return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+                [LIBINTL="$LIBINTL $LIBICONV"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+-                gt_cv_func_gnugettext_libintl=yes
++                eval "$gt_func_gnugettext_libintl=yes"
+                ])
+             fi
+             CPPFLAGS="$gt_save_CPPFLAGS"
+@@ -223,8 +237,8 @@ return * gettext ("")]ifelse([$2], [need
+         dnl use it.  But if this macro is used in GNU gettext, and GNU
+         dnl gettext is already preinstalled in libintl, we update this
+         dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+-        if test "$gt_cv_func_gnugettext_libc" = "yes" \
+-           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
++        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
++           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+                 && test "$PACKAGE" != gettext-runtime \
+                 && test "$PACKAGE" != gettext-tools; }; then
+           gt_use_preinstalled_gnugettext=yes
+@@ -247,8 +261,8 @@ return * gettext ("")]ifelse([$2], [need
+         dnl Mark actions used to generate GNU NLS library.
+         BUILD_INCLUDED_LIBINTL=yes
+         USE_INCLUDED_LIBINTL=yes
+-        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
+-        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
++        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
++        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+       fi
+@@ -284,7 +298,7 @@ return * gettext ("")]ifelse([$2], [need
+   if test "$USE_NLS" = "yes"; then
+     AC_MSG_CHECKING([where the gettext function comes from])
+     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+-      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
++      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+         gt_source="external libintl"
+       else
+         gt_source="libc"
+@@ -298,7 +312,7 @@ return * gettext ("")]ifelse([$2], [need
+   if test "$USE_NLS" = "yes"; then
+     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+-      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
++      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+         AC_MSG_CHECKING([how to link with libintl])
+         AC_MSG_RESULT([$LIBINTL])
+         AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+@@ -366,134 +380,6 @@ return * gettext ("")]ifelse([$2], [need
+ ])
+-dnl Checks for all prerequisites of the intl subdirectory,
+-dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+-dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+-AC_DEFUN([AM_INTL_SUBDIR],
+-[
+-  AC_REQUIRE([AC_PROG_INSTALL])dnl
+-  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+-  AC_REQUIRE([AC_PROG_CC])dnl
+-  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+-  AC_REQUIRE([gt_GLIBC2])dnl
+-  AC_REQUIRE([AC_PROG_RANLIB])dnl
+-  AC_REQUIRE([AC_ISC_POSIX])dnl
+-  AC_REQUIRE([AC_HEADER_STDC])dnl
+-  AC_REQUIRE([AC_C_CONST])dnl
+-  AC_REQUIRE([bh_C_SIGNED])dnl
+-  AC_REQUIRE([AC_C_INLINE])dnl
+-  AC_REQUIRE([AC_TYPE_OFF_T])dnl
+-  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+-  AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
+-  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
+-  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
+-  AC_REQUIRE([gt_TYPE_WINT_T])dnl
+-  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+-  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+-  AC_REQUIRE([gt_TYPE_INTMAX_T])
+-  AC_REQUIRE([gt_PRINTF_POSIX])
+-  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+-  AC_REQUIRE([AC_FUNC_MMAP])dnl
+-  AC_REQUIRE([gl_GLIBC21])dnl
+-  AC_REQUIRE([gt_INTDIV0])dnl
+-  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
+-  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
+-  AC_REQUIRE([gt_INTTYPES_PRI])dnl
+-  AC_REQUIRE([gl_XSIZE])dnl
+-  AC_REQUIRE([gt_INTL_MACOSX])dnl
+-
+-  AC_CHECK_TYPE([ptrdiff_t], ,
+-    [AC_DEFINE([ptrdiff_t], [long],
+-       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+-    ])
+-  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+-stdlib.h string.h unistd.h sys/param.h])
+-  AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
+-mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
+-strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
+-__fsetlocking])
+-
+-  dnl Use the _snprintf function only if it is declared (because on NetBSD it
+-  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+-  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
+-  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
+-
+-  dnl Use the *_unlocked functions only if they are declared.
+-  dnl (because some of them were defined without being declared in Solaris
+-  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+-  dnl on Solaris 2.5.1 to run on Solaris 2.6).
+-  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+-  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
+-  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
+-  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
+-
+-  case $gt_cv_func_printf_posix in
+-    *yes) HAVE_POSIX_PRINTF=1 ;;
+-    *) HAVE_POSIX_PRINTF=0 ;;
+-  esac
+-  AC_SUBST([HAVE_POSIX_PRINTF])
+-  if test "$ac_cv_func_asprintf" = yes; then
+-    HAVE_ASPRINTF=1
+-  else
+-    HAVE_ASPRINTF=0
+-  fi
+-  AC_SUBST([HAVE_ASPRINTF])
+-  if test "$ac_cv_func_snprintf" = yes; then
+-    HAVE_SNPRINTF=1
+-  else
+-    HAVE_SNPRINTF=0
+-  fi
+-  AC_SUBST([HAVE_SNPRINTF])
+-  if test "$ac_cv_func_wprintf" = yes; then
+-    HAVE_WPRINTF=1
+-  else
+-    HAVE_WPRINTF=0
+-  fi
+-  AC_SUBST([HAVE_WPRINTF])
+-
+-  AM_ICONV
+-  AM_LANGINFO_CODESET
+-  if test $ac_cv_header_locale_h = yes; then
+-    gt_LC_MESSAGES
+-  fi
+-
+-  if test -n "$INTL_MACOSX_LIBS"; then
+-    CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+-  fi
+-
+-  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+-  dnl because plural.y uses bison specific features. It requires at least
+-  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+-  dnl compile.
+-  dnl bison is only needed for the maintainer (who touches plural.y). But in
+-  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+-  dnl the rule in general Makefile. Now, some people carelessly touch the
+-  dnl files or have a broken "make" program, hence the plural.c rule will
+-  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+-  dnl present or too old.
+-  AC_CHECK_PROGS([INTLBISON], [bison])
+-  if test -z "$INTLBISON"; then
+-    ac_verc_fail=yes
+-  else
+-    dnl Found it, now check the version.
+-    AC_MSG_CHECKING([version of bison])
+-changequote(<<,>>)dnl
+-    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+-    case $ac_prog_version in
+-      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+-      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+-changequote([,])dnl
+-         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+-      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+-    esac
+-    AC_MSG_RESULT([$ac_prog_version])
+-  fi
+-  if test $ac_verc_fail = yes; then
+-    INTLBISON=:
+-  fi
+-])
+-
+-
+ dnl Checks for special options needed on MacOS X.
+ dnl Defines INTL_MACOSX_LIBS.
+ AC_DEFUN([gt_INTL_MACOSX],
+@@ -501,15 +387,12 @@ AC_DEFUN([gt_INTL_MACOSX],
+   dnl Check for API introduced in MacOS X 10.2.
+   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+     gt_cv_func_CFPreferencesCopyAppValue,
+-    [gt_save_CPPFLAGS="$CPPFLAGS"
+-     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+-     gt_save_LIBS="$LIBS"
+-     LIBS="$LIBS -framework CoreFoundation"
+-     AC_TRY_LINK([#include <CFPreferences.h>],
++    [gt_save_LIBS="$LIBS"
++     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
++     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
+        [CFPreferencesCopyAppValue(NULL, NULL)],
+        [gt_cv_func_CFPreferencesCopyAppValue=yes],
+        [gt_cv_func_CFPreferencesCopyAppValue=no])
+-     CPPFLAGS="$gt_save_CPPFLAGS"
+      LIBS="$gt_save_LIBS"])
+   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
+@@ -517,14 +400,11 @@ AC_DEFUN([gt_INTL_MACOSX],
+   fi
+   dnl Check for API introduced in MacOS X 10.3.
+   AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
+-    [gt_save_CPPFLAGS="$CPPFLAGS"
+-     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+-     gt_save_LIBS="$LIBS"
+-     LIBS="$LIBS -framework CoreFoundation"
+-     AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
++    [gt_save_LIBS="$LIBS"
++     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
++     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+        [gt_cv_func_CFLocaleCopyCurrent=yes],
+        [gt_cv_func_CFLocaleCopyCurrent=no])
+-     CPPFLAGS="$gt_save_CPPFLAGS"
+      LIBS="$gt_save_LIBS"])
+   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
+@@ -538,23 +418,18 @@ AC_DEFUN([gt_INTL_MACOSX],
+ ])
+-dnl gt_CHECK_DECL(FUNC, INCLUDES)
+-dnl Check whether a function is declared.
+-AC_DEFUN([gt_CHECK_DECL],
++dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
++m4_define([gt_NEEDS_INIT],
+ [
+-  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
+-    [AC_TRY_COMPILE([$2], [
+-#ifndef $1
+-  char *p = (char *) $1;
+-#endif
+-], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
+-  if test $ac_cv_have_decl_$1 = yes; then
+-    gt_value=1
+-  else
+-    gt_value=0
+-  fi
+-  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
+-    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
++  m4_divert_text([DEFAULTS], [gt_needs=])
++  m4_define([gt_NEEDS_INIT], [])
++])
++
++
++dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
++AC_DEFUN([AM_GNU_GETTEXT_NEED],
++[
++  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+ ])
+@@ -774,8 +649,8 @@ test -z "$LD" && AC_MSG_ERROR([no accept
+ AC_LIB_PROG_LD_GNU
+ ])
+-# lib-link.m4 serial 6 (gettext-0.14.3)
+-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
++# lib-link.m4 serial 9 (gettext-0.16)
++dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+ dnl with or without modifications, as long as this notice is preserved.
+@@ -902,6 +777,7 @@ dnl the libraries corresponding to expli
+ dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+ [
++  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+   dnl By default, look in $includedir and $libdir.
+@@ -924,7 +800,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+         ])
+       else
+         additional_includedir="$withval/include"
+-        additional_libdir="$withval/lib"
++        additional_libdir="$withval/$acl_libdirstem"
+       fi
+     fi
+ ])
+@@ -973,9 +849,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+           found_so=
+           found_a=
+           if test $use_additional = yes; then
+-            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
++            if test -n "$shlibext" \
++               && { test -f "$additional_libdir/lib$name.$shlibext" \
++                    || { test "$shlibext" = dll \
++                         && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
+               found_dir="$additional_libdir"
+-              found_so="$additional_libdir/lib$name.$shlibext"
++              if test -f "$additional_libdir/lib$name.$shlibext"; then
++                found_so="$additional_libdir/lib$name.$shlibext"
++              else
++                found_so="$additional_libdir/lib$name.dll.a"
++              fi
+               if test -f "$additional_libdir/lib$name.la"; then
+                 found_la="$additional_libdir/lib$name.la"
+               fi
+@@ -995,9 +878,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+               case "$x" in
+                 -L*)
+                   dir=`echo "X$x" | sed -e 's/^X-L//'`
+-                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
++                  if test -n "$shlibext" \
++                     && { test -f "$dir/lib$name.$shlibext" \
++                          || { test "$shlibext" = dll \
++                               && test -f "$dir/lib$name.dll.a"; }; }; then
+                     found_dir="$dir"
+-                    found_so="$dir/lib$name.$shlibext"
++                    if test -f "$dir/lib$name.$shlibext"; then
++                      found_so="$dir/lib$name.$shlibext"
++                    else
++                      found_so="$dir/lib$name.dll.a"
++                    fi
+                     if test -f "$dir/lib$name.la"; then
+                       found_la="$dir/lib$name.la"
+                     fi
+@@ -1024,7 +914,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+               dnl Linking with a shared library. We attempt to hardcode its
+               dnl directory into the executable's runpath, unless it's the
+               dnl standard /usr/lib.
+-              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
++              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+                 dnl No hardcoding is needed.
+                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+               else
+@@ -1110,8 +1000,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+             dnl Assume the include files are nearby.
+             additional_includedir=
+             case "$found_dir" in
+-              */lib | */lib/)
+-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
++              */$acl_libdirstem | */$acl_libdirstem/)
++                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                 additional_includedir="$basedir/include"
+                 ;;
+             esac
+@@ -1172,9 +1062,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+                     dnl   3. if it's already present in $LDFLAGS or the already
+                     dnl      constructed $LIBNAME,
+                     dnl   4. if it doesn't exist as a directory.
+-                    if test "X$additional_libdir" != "X/usr/lib"; then
++                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+                       haveit=
+-                      if test "X$additional_libdir" = "X/usr/local/lib"; then
++                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+                         if test -n "$GCC"; then
+                           case $host_os in
+                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+@@ -1328,7 +1218,83 @@ AC_DEFUN([AC_LIB_APPENDTOVAR],
+   done
+ ])
+-# lib-prefix.m4 serial 4 (gettext-0.14.2)
++dnl For those cases where a variable contains several -L and -l options
++dnl referring to unknown libraries and directories, this macro determines the
++dnl necessary additional linker options for the runtime path.
++dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
++dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
++dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
++dnl otherwise linking without libtool is assumed.
++AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
++[
++  AC_REQUIRE([AC_LIB_RPATH])
++  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
++  $1=
++  if test "$enable_rpath" != no; then
++    if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
++      dnl Use an explicit option to hardcode directories into the resulting
++      dnl binary.
++      rpathdirs=
++      next=
++      for opt in $2; do
++        if test -n "$next"; then
++          dir="$next"
++          dnl No need to hardcode the standard /usr/lib.
++          if test "X$dir" != "X/usr/$acl_libdirstem"; then
++            rpathdirs="$rpathdirs $dir"
++          fi
++          next=
++        else
++          case $opt in
++            -L) next=yes ;;
++            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
++                 dnl No need to hardcode the standard /usr/lib.
++                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
++                   rpathdirs="$rpathdirs $dir"
++                 fi
++                 next= ;;
++            *) next= ;;
++          esac
++        fi
++      done
++      if test "X$rpathdirs" != "X"; then
++        if test -n ""$3""; then
++          dnl libtool is used for linking. Use -R options.
++          for dir in $rpathdirs; do
++            $1="${$1}${$1:+ }-R$dir"
++          done
++        else
++          dnl The linker is used for linking directly.
++          if test -n "$hardcode_libdir_separator"; then
++            dnl Weird platform: only the last -rpath option counts, the user
++            dnl must pass all path elements in one option.
++            alldirs=
++            for dir in $rpathdirs; do
++              alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
++            done
++            acl_save_libdir="$libdir"
++            libdir="$alldirs"
++            eval flag=\"$hardcode_libdir_flag_spec\"
++            libdir="$acl_save_libdir"
++            $1="$flag"
++          else
++            dnl The -rpath options are cumulative.
++            for dir in $rpathdirs; do
++              acl_save_libdir="$libdir"
++              libdir="$dir"
++              eval flag=\"$hardcode_libdir_flag_spec\"
++              libdir="$acl_save_libdir"
++              $1="${$1}${$1:+ }$flag"
++            done
++          fi
++        fi
++      fi
++    fi
++  fi
++  AC_SUBST([$1])
++])
++
++# lib-prefix.m4 serial 5 (gettext-0.15)
+ dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -1354,6 +1320,7 @@ AC_DEFUN([AC_LIB_PREFIX],
+   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+   AC_REQUIRE([AC_PROG_CC])
+   AC_REQUIRE([AC_CANONICAL_HOST])
++  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+   dnl By default, look in $includedir and $libdir.
+   use_additional=yes
+@@ -1375,7 +1342,7 @@ AC_DEFUN([AC_LIB_PREFIX],
+         ])
+       else
+         additional_includedir="$withval/include"
+-        additional_libdir="$withval/lib"
++        additional_libdir="$withval/$acl_libdirstem"
+       fi
+     fi
+ ])
+@@ -1417,7 +1384,7 @@ AC_DEFUN([AC_LIB_PREFIX],
+     dnl   2. if it's already present in $LDFLAGS,
+     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+     dnl   4. if it doesn't exist as a directory.
+-    if test "X$additional_libdir" != "X/usr/lib"; then
++    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+       haveit=
+       for x in $LDFLAGS; do
+         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+@@ -1427,7 +1394,7 @@ AC_DEFUN([AC_LIB_PREFIX],
+         fi
+       done
+       if test -z "$haveit"; then
+-        if test "X$additional_libdir" = "X/usr/local/lib"; then
++        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+           if test -n "$GCC"; then
+             case $host_os in
+               linux*) haveit=yes;;
+@@ -1482,9 +1449,40 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+   prefix="$acl_save_prefix"
+ ])
++dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
++dnl the basename of the libdir, either "lib" or "lib64".
++AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
++[
++  dnl There is no formal standard regarding lib and lib64. The current
++  dnl practice is that on a system supporting 32-bit and 64-bit instruction
++  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
++  dnl libraries go under $prefix/lib. We determine the compiler's default
++  dnl mode by looking at the compiler's library search path. If at least
++  dnl of its elements ends in /lib64 or points to a directory whose absolute
++  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
++  dnl default, namely "lib".
++  acl_libdirstem=lib
++  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
++  if test -n "$searchpath"; then
++    acl_save_IFS="${IFS=      }"; IFS=":"
++    for searchdir in $searchpath; do
++      if test -d "$searchdir"; then
++        case "$searchdir" in
++          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
++          *) searchdir=`cd "$searchdir" && pwd`
++             case "$searchdir" in
++               */lib64 ) acl_libdirstem=lib64 ;;
++             esac ;;
++        esac
++      fi
++    done
++    IFS="$acl_save_IFS"
++  fi
++])
++
+ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+-# serial 48 Debian 1.5.22-2 AC_PROG_LIBTOOL
++# serial 51 Debian 1.5.24-1ubuntu1 AC_PROG_LIBTOOL
+ # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+@@ -1647,7 +1645,7 @@ test -z "$STRIP" && STRIP=:
+ test -z "$ac_objext" && ac_objext=o
+ # Determine commands to create old-style static archives.
+-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
++old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+ old_postinstall_cmds='chmod 644 $oldlib'
+ old_postuninstall_cmds=
+@@ -1734,8 +1732,9 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -
+ # Check for compiler boilerplate output or warnings with
+ # the simple compiler test code.
+ AC_DEFUN([_LT_COMPILER_BOILERPLATE],
+-[ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
++ac_outfile=conftest.$ac_objext
++echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+ eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+ _lt_compiler_boilerplate=`cat conftest.err`
+ $rm conftest*
+@@ -1747,8 +1746,9 @@ $rm conftest*
+ # Check for linker boilerplate output or warnings with
+ # the simple link test code.
+ AC_DEFUN([_LT_LINKER_BOILERPLATE],
+-[ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_link_test_code" >conftest.$ac_ext
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
++ac_outfile=conftest.$ac_objext
++echo "$lt_simple_link_test_code" >conftest.$ac_ext
+ eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+ _lt_linker_boilerplate=`cat conftest.err`
+ $rm conftest*
+@@ -1764,12 +1764,20 @@ $rm conftest*
+ # If we don't find anything, use the default library path according
+ # to the aix ld manual.
+ AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+-}'`
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
++AC_LINK_IFELSE(AC_LANG_PROGRAM,[
++lt_aix_libpath_sed='
++    /Import File Strings/,/^$/ {
++      /^0/ {
++          s/^0  *\(.*\)$/\1/
++          p
++      }
++    }'
++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+-}'`; fi],[])
++if test -z "$aix_libpath"; then
++  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++fi],[])
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ ])# _LT_AC_SYS_LIBPATH_AIX
+@@ -2000,13 +2008,17 @@ ia64-*-hpux*)
+   rm -rf conftest*
+   ;;
+-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
++x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
++s390*-*linux*|sparc*-*linux*)
+   # Find out which ABI we are using.
+   echo 'int i;' > conftest.$ac_ext
+   if AC_TRY_EVAL(ac_compile); then
+     case `/usr/bin/file conftest.o` in
+     *32-bit*)
+       case $host in
++        x86_64-*kfreebsd*-gnu)
++          LD="${LD-ld} -m elf_i386_fbsd"
++          ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_i386"
+           ;;
+@@ -2023,6 +2035,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*li
+       ;;
+     *64-bit*)
+       case $host in
++        x86_64-*kfreebsd*-gnu)
++          LD="${LD-ld} -m elf_x86_64_fbsd"
++          ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_x86_64"
+           ;;
+@@ -2094,7 +2109,7 @@ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+ AC_CACHE_CHECK([$1], [$2],
+   [$2=no
+   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="$3"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+@@ -2135,11 +2150,12 @@ fi
+ # ------------------------------------------------------------
+ # Check whether the given compiler option works
+ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+-[AC_CACHE_CHECK([$1], [$2],
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
++AC_CACHE_CHECK([$1], [$2],
+   [$2=no
+    save_LDFLAGS="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $3"
+-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
++   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+      # The linker can only warn and ignore the option if not recognized
+      # So say no if there are warnings
+@@ -2253,24 +2269,27 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d
+     fi
+     ;;
+   *)
+-    # If test is not a shell built-in, we'll probably end up computing a
+-    # maximum length that is only half of the actual maximum length, but
+-    # we can't tell.
+-    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+-    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
++    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
++    if test -n "$lt_cv_sys_max_cmd_len"; then
++      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
++      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
++    else
++      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
++      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+              = "XX$teststring") >/dev/null 2>&1 &&
+-          new_result=`expr "X$teststring" : ".*" 2>&1` &&
+-          lt_cv_sys_max_cmd_len=$new_result &&
+-          test $i != 17 # 1/2 MB should be enough
+-    do
+-      i=`expr $i + 1`
+-      teststring=$teststring$teststring
+-    done
+-    teststring=
+-    # Add a significant safety factor because C++ compilers can tack on massive
+-    # amounts of additional arguments before passing them to the linker.
+-    # It appears as though 1/2 is a usable value.
+-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
++            new_result=`expr "X$teststring" : ".*" 2>&1` &&
++            lt_cv_sys_max_cmd_len=$new_result &&
++            test $i != 17 # 1/2 MB should be enough
++      do
++        i=`expr $i + 1`
++        teststring=$teststring$teststring
++      done
++      teststring=
++      # Add a significant safety factor because C++ compilers can tack on massive
++      # amounts of additional arguments before passing them to the linker.
++      # It appears as though 1/2 is a usable value.
++      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
++    fi
+     ;;
+   esac
+ ])
+@@ -2497,7 +2516,8 @@ fi
+ # ---------------------------------
+ # Check to see if options -c and -o are simultaneously supported by compiler
+ AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
++AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+@@ -2505,7 +2525,7 @@ AC_CACHE_CHECK([if $compiler supports -c
+    mkdir conftest
+    cd conftest
+    mkdir out
+-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="-o out/conftest2.$ac_objext"
+    # Insert the option either (1) after the last *FLAGS variable, or
+@@ -2645,6 +2665,7 @@ else
+    darwin*)
+        if test -n "$STRIP" ; then
+          striplib="$STRIP -x"
++         old_striplib="$STRIP -S"
+          AC_MSG_RESULT([yes])
+        else
+   AC_MSG_RESULT([no])
+@@ -2662,7 +2683,8 @@ fi
+ # -----------------------------
+ # PORTME Fill in your ld.so characteristics
+ AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+-[AC_MSG_CHECKING([dynamic linker characteristics])
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
++AC_MSG_CHECKING([dynamic linker characteristics])
+ library_names_spec=
+ libname_spec='lib$name'
+ soname_spec=
+@@ -2676,20 +2698,58 @@ shlibpath_overrides_runpath=unknown
+ version_type=none
+ dynamic_linker="$host_os ld.so"
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
++m4_if($1,[],[
+ if test "$GCC" = yes; then
+-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
++  case $host_os in
++    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
++    *) lt_awk_arg="/^libraries:/" ;;
++  esac
++  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
++  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
+     # if the path contains ";" then we assume it to be the separator
+     # otherwise default to the standard path separator (i.e. ":") - it is
+     # assumed that no part of a normal pathname contains ";" but that should
+     # okay in the real world where ";" in dirpaths is itself problematic.
+-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
++    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+   else
+-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
++    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+   fi
++  # Ok, now we have the path, separated by spaces, we can step through it
++  # and add multilib dir if necessary.
++  lt_tmp_lt_search_path_spec=
++  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
++  for lt_sys_path in $lt_search_path_spec; do
++    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
++      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
++    else
++      test -d "$lt_sys_path" && \
++      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
++    fi
++  done
++  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
++BEGIN {RS=" "; FS="/|\n";} {
++  lt_foo="";
++  lt_count=0;
++  for (lt_i = NF; lt_i > 0; lt_i--) {
++    if ($lt_i != "" && $lt_i != ".") {
++      if ($lt_i == "..") {
++        lt_count++;
++      } else {
++        if (lt_count == 0) {
++          lt_foo="/" $lt_i lt_foo;
++        } else {
++          lt_count--;
++        }
++      }
++    }
++  }
++  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
++  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
++}'`
++  sys_lib_search_path_spec=`echo $lt_search_path_spec`
+ else
+   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+-fi
++fi])
+ need_lib_prefix=unknown
+ hardcode_into_libs=no
+@@ -2846,12 +2906,8 @@ darwin* | rhapsody*)
+   shlibpath_overrides_runpath=yes
+   shlibpath_var=DYLD_LIBRARY_PATH
+   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+-  if test "$GCC" = yes; then
+-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+-  else
+-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+-  fi
++  m4_if([$1], [],[
++  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
+   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+   ;;
+@@ -2868,18 +2924,6 @@ freebsd1*)
+   dynamic_linker=no
+   ;;
+-kfreebsd*-gnu)
+-  version_type=linux
+-  need_lib_prefix=no
+-  need_version=no
+-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+-  soname_spec='${libname}${release}${shared_ext}$major'
+-  shlibpath_var=LD_LIBRARY_PATH
+-  shlibpath_overrides_runpath=no
+-  hardcode_into_libs=yes
+-  dynamic_linker='GNU ld.so'
+-  ;;
+-
+ freebsd* | dragonfly*)
+   # DragonFly does not have aout.  When/if they implement a new
+   # versioning mechanism, adjust this.
+@@ -2917,7 +2961,7 @@ freebsd* | dragonfly*)
+     shlibpath_overrides_runpath=no
+     hardcode_into_libs=yes
+     ;;
+-  freebsd*) # from 4.6 on
++  *) # from 4.6 on, and DragonFly
+     shlibpath_overrides_runpath=yes
+     hardcode_into_libs=yes
+     ;;
+@@ -2980,7 +3024,7 @@ hpux9* | hpux10* | hpux11*)
+   postinstall_cmds='chmod 555 $lib'
+   ;;
+-interix3*)
++interix[[3-9]]*)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+@@ -3035,7 +3079,7 @@ linux*oldld* | linux*aout* | linux*coff*
+   ;;
+ # This must be Linux ELF.
+-linux*)
++linux* | k*bsd*-gnu)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+@@ -3051,7 +3095,7 @@ linux*)
+   # Append ld.so.conf contents to the search path
+   if test -f /etc/ld.so.conf; then
+-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,  ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
++    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[        ]*hwcap[        ]/d;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+   fi
+@@ -3076,18 +3120,6 @@ netbsdelf*-gnu)
+   dynamic_linker='NetBSD ld.elf_so'
+   ;;
+-knetbsd*-gnu)
+-  version_type=linux
+-  need_lib_prefix=no
+-  need_version=no
+-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+-  soname_spec='${libname}${release}${shared_ext}$major'
+-  shlibpath_var=LD_LIBRARY_PATH
+-  shlibpath_overrides_runpath=no
+-  hardcode_into_libs=yes
+-  dynamic_linker='GNU ld.so'
+-  ;;
+-
+ netbsd*)
+   version_type=sunos
+   need_lib_prefix=no
+@@ -3169,6 +3201,10 @@ osf3* | osf4* | osf5*)
+   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+   ;;
++rdos*)
++  dynamic_linker=no
++  ;;
++
+ solaris*)
+   version_type=linux
+   need_lib_prefix=no
+@@ -3274,7 +3310,8 @@ fi
+ # _LT_AC_TAGCONFIG
+ # ----------------
+ AC_DEFUN([_LT_AC_TAGCONFIG],
+-[AC_ARG_WITH([tags],
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
++AC_ARG_WITH([tags],
+     [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+         [include additional configurations @<:@automatic@:>@])],
+     [tagnames="$withval"])
+@@ -3535,7 +3572,7 @@ m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC
+ # AC_PATH_TOOL_PREFIX
+ # -------------------
+-# find a file program which can recognise shared library
++# find a file program which can recognize shared library
+ AC_DEFUN([AC_PATH_TOOL_PREFIX],
+ [AC_REQUIRE([AC_PROG_EGREP])dnl
+ AC_MSG_CHECKING([for $1])
+@@ -3598,7 +3635,7 @@ fi
+ # AC_PATH_MAGIC
+ # -------------
+-# find a file program which can recognise a shared library
++# find a file program which can recognize a shared library
+ AC_DEFUN([AC_PATH_MAGIC],
+ [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+ if test -z "$lt_cv_path_MAGIC_CMD"; then
+@@ -3745,7 +3782,7 @@ esac
+ # how to check for library dependencies
+ #  -- PORTME fill in with the dynamic library characteristics
+ AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+-[AC_CACHE_CHECK([how to recognise dependent libraries],
++[AC_CACHE_CHECK([how to recognize dependent libraries],
+ lt_cv_deplibs_check_method,
+ [lt_cv_file_magic_cmd='$MAGIC_CMD'
+ lt_cv_file_magic_test_file=
+@@ -3784,16 +3821,22 @@ cygwin*)
+ mingw* | pw32*)
+   # Base MSYS/MinGW do not provide the 'file' command needed by
+-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+-  lt_cv_file_magic_cmd='$OBJDUMP -f'
++  # func_win32_libid shell function, so use a weaker test based on 'objdump',
++  # unless we find 'file', for example because we are cross-compiling.
++  if ( file / ) >/dev/null 2>&1; then
++    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
++    lt_cv_file_magic_cmd='func_win32_libid'
++  else
++    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
++    lt_cv_file_magic_cmd='$OBJDUMP -f'
++  fi
+   ;;
+ darwin* | rhapsody*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+-freebsd* | kfreebsd*-gnu | dragonfly*)
++freebsd* | dragonfly*)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     case $host_cpu in
+     i*86 )
+@@ -3831,7 +3874,7 @@ hpux10.20* | hpux11*)
+   esac
+   ;;
+-interix3*)
++interix[[3-9]]*)
+   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+   ;;
+@@ -3847,11 +3890,11 @@ irix5* | irix6* | nonstopux*)
+   ;;
+ # This must be Linux ELF.
+-linux*)
++linux* | k*bsd*-gnu)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+-netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
++netbsd* | netbsdelf*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+   else
+@@ -3881,6 +3924,10 @@ osf3* | osf4* | osf5*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
++rdos*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
+ solaris*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+@@ -3933,7 +3980,7 @@ AC_DEFUN([AC_PROG_NM],
+   lt_cv_path_NM="$NM"
+ else
+   lt_nm_to_check="${ac_tool_prefix}nm"
+-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
++  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+     lt_nm_to_check="$lt_nm_to_check nm"
+   fi
+   for lt_tmp_nm in $lt_nm_to_check; do
+@@ -4149,10 +4196,10 @@ objext=o
+ _LT_AC_TAGVAR(objext, $1)=$objext
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;\n"
++lt_simple_compile_test_code="int some_variable = 0;"
+ # Code to be used in simple link tests
+-lt_simple_link_test_code='int main(){return(0);}\n'
++lt_simple_link_test_code='int main(){return(0);}'
+ _LT_AC_SYS_COMPILER
+@@ -4254,10 +4301,10 @@ objext=o
+ _LT_AC_TAGVAR(objext, $1)=$objext
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;\n"
++lt_simple_compile_test_code="int some_variable = 0;"
+ # Code to be used in simple link tests
+-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
++lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_AC_SYS_COMPILER
+@@ -4403,7 +4450,7 @@ case $host_os in
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+       then
+         # We have reworked collect2
+-        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
++        :
+       else
+         # We have old collect2
+         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+@@ -4562,10 +4609,10 @@ case $host_os in
+       case $cc_basename in
+         xlc*)
+          output_verbose_link_cmd='echo'
+-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
++          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+           _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
++          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           ;;
+        *)
+@@ -4599,7 +4646,7 @@ case $host_os in
+   freebsd-elf*)
+     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+     ;;
+-  freebsd* | kfreebsd*-gnu | dragonfly*)
++  freebsd* | dragonfly*)
+     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+     # conventions
+     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+@@ -4648,9 +4695,7 @@ case $host_os in
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+       case $host_cpu in
+-      hppa*64*|ia64*)
+-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+-        ;;
++      hppa*64*|ia64*) ;;
+       *)
+       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+         ;;
+@@ -4718,7 +4763,7 @@ case $host_os in
+       ;;
+     esac
+     ;;
+-  interix3*)
++  interix[[3-9]]*)
+     _LT_AC_TAGVAR(hardcode_direct, $1)=no
+     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+@@ -4758,7 +4803,7 @@ case $host_os in
+     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+     ;;
+-  linux*)
++  linux* | k*bsd*-gnu)
+     case $cc_basename in
+       KCC*)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+@@ -4838,6 +4883,29 @@ case $host_os in
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
++      *)
++      case `$CC -V 2>&1 | sed 5q` in
++      *Sun\ C*)
++        # Sun C++ 5.9
++        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
++        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
++        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
++
++        # Not sure whether something based on
++        # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
++        # would be better.
++        output_verbose_link_cmd='echo'
++
++        # Archives containing C++ object files must be created using
++        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
++        # necessary to make sure instantiated templates are included
++        # in the archive.
++        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
++        ;;
++      esac
++      ;;
+     esac
+     ;;
+   lynxos*)
+@@ -4860,7 +4928,7 @@ case $host_os in
+       ;;
+     esac
+     ;;
+-  netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
++  netbsd* | netbsdelf*-gnu)
+     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+       wlarc=
+@@ -4876,16 +4944,20 @@ case $host_os in
+     _LT_AC_TAGVAR(ld_shlibs, $1)=no
+     ;;
+   openbsd*)
+-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+-    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++    if test -f /usr/libexec/ld.so; then
++      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
++      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
++      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++      fi
++      output_verbose_link_cmd='echo'
++    else
++      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+     fi
+-    output_verbose_link_cmd='echo'
+     ;;
+   osf3*)
+     case $cc_basename in
+@@ -5047,15 +5119,10 @@ case $host_os in
+       case $host_os in
+         solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+         *)
+-          # The C++ compiler is used as linker so we must use $wl
+-          # flag to pass the commands to the underlying system
+-          # linker. We must also pass each convience library through
+-          # to the system linker between allextract/defaultextract.
+-          # The C++ compiler will combine linker options so we
+-          # cannot just pass the convience library names through
+-          # without $wl.
++          # The compiler driver will combine and reorder linker options,
++          # but understands `-z linker_flag'.
+           # Supported since Solaris 2.6 (maybe 2.5.1?)
+-          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
++          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+           ;;
+       esac
+       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+@@ -5102,6 +5169,12 @@ case $host_os in
+         fi
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
++        case $host_os in
++        solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
++        *)
++          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
++          ;;
++        esac
+       fi
+       ;;
+     esac
+@@ -5345,7 +5418,7 @@ $rm -f confest.$objext
+ # PORTME: override above test on systems where it is broken
+ ifelse([$1],[CXX],
+ [case $host_os in
+-interix3*)
++interix[[3-9]]*)
+   # Interix 3.5 installs completely hosed .la files for C++, so rather than
+   # hack all around it, let's just trust "g++" to DTRT.
+   _LT_AC_TAGVAR(predep_objects,$1)=
+@@ -5353,13 +5426,46 @@ interix3*)
+   _LT_AC_TAGVAR(postdeps,$1)=
+   ;;
++linux*)
++  case `$CC -V 2>&1 | sed 5q` in
++  *Sun\ C*)
++    # Sun C++ 5.9
++    #
++    # The more standards-conforming stlport4 library is
++    # incompatible with the Cstd library. Avoid specifying
++    # it if it's in CXXFLAGS. Ignore libCrun as
++    # -library=stlport4 depends on it.
++    case " $CXX $CXXFLAGS " in
++    *" -library=stlport4 "*)
++      solaris_use_stlport4=yes
++      ;;
++    esac
++    if test "$solaris_use_stlport4" != yes; then
++      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
++    fi
++    ;;
++  esac
++  ;;
++
+ solaris*)
+   case $cc_basename in
+   CC*)
++    # The more standards-conforming stlport4 library is
++    # incompatible with the Cstd library. Avoid specifying
++    # it if it's in CXXFLAGS. Ignore libCrun as
++    # -library=stlport4 depends on it.
++    case " $CXX $CXXFLAGS " in
++    *" -library=stlport4 "*)
++      solaris_use_stlport4=yes
++      ;;
++    esac
++
+     # Adding this requires a known-good setup of shared libraries for
+     # Sun compiler versions before 5.6, else PIC objects from an old
+     # archive will be linked into the output, leading to subtle bugs.
+-    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
++    if test "$solaris_use_stlport4" != yes; then
++      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
++    fi
+     ;;
+   esac
+   ;;
+@@ -5408,10 +5514,17 @@ objext=o
+ _LT_AC_TAGVAR(objext, $1)=$objext
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
++lt_simple_compile_test_code="\
++      subroutine t
++      return
++      end
++"
+ # Code to be used in simple link tests
+-lt_simple_link_test_code="      program t\n      end\n"
++lt_simple_link_test_code="\
++      program t
++      end
++"
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_AC_SYS_COMPILER
+@@ -5490,10 +5603,10 @@ objext=o
+ _LT_AC_TAGVAR(objext, $1)=$objext
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="class foo {}\n"
++lt_simple_compile_test_code="class foo {}"
+ # Code to be used in simple link tests
+-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
++lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_AC_SYS_COMPILER
+@@ -5546,7 +5659,7 @@ objext=o
+ _LT_AC_TAGVAR(objext, $1)=$objext
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
++lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="$lt_simple_compile_test_code"
+@@ -5635,6 +5748,7 @@ if test -f "$ltmain"; then
+     _LT_AC_TAGVAR(module_cmds, $1) \
+     _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
++    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
+     _LT_AC_TAGVAR(exclude_expsyms, $1) \
+     _LT_AC_TAGVAR(include_expsyms, $1); do
+@@ -5681,7 +5795,7 @@ ifelse([$1], [],
+ # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+ #
+-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ # Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Libtool:
+@@ -6006,7 +6120,7 @@ sys_lib_search_path_spec=$lt_sys_lib_sea
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+ # Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
++fix_srcfile_path=$lt_fix_srcfile_path
+ # Set to yes if exported symbols are required.
+ always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+@@ -6089,6 +6203,7 @@ fi
+ # ---------------------------------
+ AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+ [AC_REQUIRE([AC_CANONICAL_HOST])
++AC_REQUIRE([LT_AC_PROG_SED])
+ AC_REQUIRE([AC_PROG_NM])
+ AC_REQUIRE([AC_OBJEXT])
+ # Check for command to grab the raw symbol name followed by C symbol from nm.
+@@ -6125,7 +6240,7 @@ hpux*) # Its linker distinguishes data f
+   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+   ;;
+-linux*)
++linux* | k*bsd*-gnu)
+   if test "$host_cpu" = ia64; then
+     symcode='[[ABCDGIRSTW]]'
+     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+@@ -6315,12 +6430,14 @@ AC_MSG_CHECKING([for $compiler option to
+       # like `-m68040'.
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+       ;;
+-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
+-    mingw* | os2* | pw32*)
++    mingw* | cygwin* | os2* | pw32*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
++      # Although the cygwin gcc ignores -fPIC, still need this for old-style
++      # (--disable-auto-import) libraries
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+       ;;
+     darwin* | rhapsody*)
+@@ -6332,7 +6449,7 @@ AC_MSG_CHECKING([for $compiler option to
+       # DJGPP does not support shared libraries at all
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+       ;;
+-    interix3*)
++    interix[[3-9]]*)
+       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+@@ -6398,7 +6515,7 @@ AC_MSG_CHECKING([for $compiler option to
+           ;;
+       esac
+       ;;
+-      freebsd* | kfreebsd*-gnu | dragonfly*)
++      freebsd* | dragonfly*)
+       # FreeBSD uses GNU C++
+       ;;
+       hpux9* | hpux10* | hpux11*)
+@@ -6441,7 +6558,7 @@ AC_MSG_CHECKING([for $compiler option to
+           ;;
+       esac
+       ;;
+-      linux*)
++      linux* | k*bsd*-gnu)
+       case $cc_basename in
+         KCC*)
+           # KAI C++ Compiler
+@@ -6468,6 +6585,14 @@ AC_MSG_CHECKING([for $compiler option to
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           ;;
+         *)
++          case `$CC -V 2>&1 | sed 5q` in
++          *Sun\ C*)
++            # Sun C++ 5.9
++            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
++            ;;
++          esac
+           ;;
+       esac
+       ;;
+@@ -6484,7 +6609,7 @@ AC_MSG_CHECKING([for $compiler option to
+           ;;
+       esac
+       ;;
+-      netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
++      netbsd* | netbsdelf*-gnu)
+       ;;
+       osf3* | osf4* | osf5*)
+       case $cc_basename in
+@@ -6588,13 +6713,15 @@ AC_MSG_CHECKING([for $compiler option to
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+       ;;
+-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
+-    mingw* | pw32* | os2*)
++    mingw* | cygwin* | pw32* | os2*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
++      # Although the cygwin gcc ignores -fPIC, still need this for old-style
++      # (--disable-auto-import) libraries
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+       ;;
+@@ -6604,7 +6731,7 @@ AC_MSG_CHECKING([for $compiler option to
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+       ;;
+-    interix3*)
++    interix[[3-9]]*)
+       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+@@ -6662,7 +6789,7 @@ AC_MSG_CHECKING([for $compiler option to
+        esac
+        ;;
+-    mingw* | pw32* | os2*)
++    mingw* | cygwin* | pw32* | os2*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+@@ -6695,7 +6822,7 @@ AC_MSG_CHECKING([for $compiler option to
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       ;;
+-    linux*)
++    linux* | k*bsd*-gnu)
+       case $cc_basename in
+       icc* | ecc*)
+       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+@@ -6714,6 +6841,22 @@ AC_MSG_CHECKING([for $compiler option to
+         # All Alpha code is PIC.
+         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+         ;;
++      *)
++        case `$CC -V 2>&1 | sed 5q` in
++      *Sun\ C*)
++        # Sun C 5.9
++        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
++        ;;
++      *Sun\ F*)
++        # Sun Fortran 8.3 passes all unrecognized flags to the linker
++        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
++        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
++        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
++        ;;
++      esac
++      ;;
+       esac
+       ;;
+@@ -6723,6 +6866,10 @@ AC_MSG_CHECKING([for $compiler option to
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+       ;;
++    rdos*)
++      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
++      ;;
++
+     solaris*)
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+@@ -6817,7 +6964,8 @@ AC_LIBTOOL_LINKER_OPTION([if $compiler s
+ # ------------------------------------
+ # See if the linker supports building shared libraries.
+ AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
++AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ ifelse([$1],[CXX],[
+   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+   case $host_os in
+@@ -6834,12 +6982,9 @@ ifelse([$1],[CXX],[
+     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+   ;;
+   cygwin* | mingw*)
+-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
++    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+   ;;
+-  kfreebsd*-gnu)
+-    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
+-  ;;
+-  linux*)
++  linux* | k*bsd*-gnu)
+     _LT_AC_TAGVAR(link_all_deplibs, $1)=no
+   ;;
+   *)
+@@ -6979,7 +7124,7 @@ EOF
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+       _LT_AC_TAGVAR(always_export_symbols, $1)=no
+       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
++      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+@@ -6997,7 +7142,7 @@ EOF
+       fi
+       ;;
+-    interix3*)
++    interix[[3-9]]*)
+       _LT_AC_TAGVAR(hardcode_direct, $1)=no
+       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+@@ -7012,7 +7157,7 @@ EOF
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       ;;
+-    linux*)
++    gnu* | linux* | k*bsd*-gnu)
+       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       tmp_addflag=
+       case $cc_basename,$host_cpu in
+@@ -7030,13 +7175,22 @@ EOF
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       esac
+-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      case `$CC -V 2>&1 | sed 5q` in
++      *Sun\ C*)                       # Sun C 5.9
++        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
++        tmp_sharedflag='-G' ;;
++      *Sun\ F*)                       # Sun Fortran 8.3
++        tmp_sharedflag='-G' ;;
++      *)
++        tmp_sharedflag='-shared' ;;
++      esac
++      _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       if test $supports_anon_versioning = yes; then
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+   $echo "local: *; };" >> $output_objdir/$libname.ver~
+-        $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
++        $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+       fi
+       _LT_AC_TAGVAR(link_all_deplibs, $1)=no
+       else
+@@ -7044,7 +7198,7 @@ EOF
+       fi
+       ;;
+-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
++    netbsd* | netbsdelf*-gnu)
+       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+@@ -7077,7 +7231,7 @@ EOF
+     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+       case `$LD -v 2>&1` in
+-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
++        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       cat <<_LT_EOF 1>&2
+@@ -7196,7 +7350,7 @@ _LT_EOF
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
+-        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
++        :
+         else
+         # We have old collect2
+         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+@@ -7289,7 +7443,7 @@ _LT_EOF
+       # The linker will automatically build a .lib file if we build a DLL.
+       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+       # FIXME: Should let the user specify the lib program.
+-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
++      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+       _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+       ;;
+@@ -7331,10 +7485,10 @@ _LT_EOF
+       case $cc_basename in
+         xlc*)
+          output_verbose_link_cmd='echo'
+-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
++         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
++         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           ;;
+        *)
+@@ -7380,15 +7534,6 @@ _LT_EOF
+       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
+-      
+-    # GNU/kFreeBSD uses gcc -shared to do shared libraries.
+-    kfreebsd*-gnu)
+-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+-      _LT_AC_TAGVAR(link_all_deplibs, $1)=no
+-      ;;
+     hpux9*)
+       if test "$GCC" = yes; then
+@@ -7485,7 +7630,7 @@ _LT_EOF
+       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+       ;;
+-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
++    netbsd* | netbsdelf*-gnu)
+       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+       else
+@@ -7505,24 +7650,28 @@ _LT_EOF
+       ;;
+     openbsd*)
+-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++      if test -f /usr/libexec/ld.so; then
++      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
++      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
++      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++      else
++        case $host_os in
++         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
++           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++           ;;
++         *)
++           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
++           ;;
++        esac
++        fi
+       else
+-       case $host_os in
+-       openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+-         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+-         ;;
+-       *)
+-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+-         ;;
+-       esac
++      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+@@ -7581,17 +7730,16 @@ _LT_EOF
+       case $host_os in
+       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+       *)
+-      # The compiler driver will combine linker options so we
+-      # cannot just pass the convience library names through
+-      # without $wl, iff we do not link with $LD.
+-      # Luckily, gcc supports the same syntax we need for Sun Studio.
++      # The compiler driver will combine and reorder linker options,
++      # but understands `-z linker_flag'.  GCC discards it without `$wl',
++      # but is careful enough not to reorder.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+-      case $wlarc in
+-      '')
+-        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+-      *)
+-        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+-      esac ;;
++      if test "$GCC" = yes; then
++        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
++      else
++        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
++      fi
++      ;;
+       esac
+       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+       ;;
+@@ -7648,7 +7796,7 @@ _LT_EOF
+       fi
+       ;;
+-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
++    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+@@ -7723,7 +7871,7 @@ x|xyes)
+       # to ld, don't add -lc before -lgcc.
+       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+       $rm conftest*
+-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+         soname=conftest
+@@ -7826,6 +7974,30 @@ AC_DEFUN([LT_AC_PROG_RC],
+ [AC_CHECK_TOOL(RC, windres, no)
+ ])
++
++# Cheap backport of AS_EXECUTABLE_P and required macros
++# from Autoconf 2.59; we should not use $as_executable_p directly.
++
++# _AS_TEST_PREPARE
++# ----------------
++m4_ifndef([_AS_TEST_PREPARE],
++[m4_defun([_AS_TEST_PREPARE],
++[if test -x / >/dev/null 2>&1; then
++  as_executable_p='test -x'
++else
++  as_executable_p='test -f'
++fi
++])])# _AS_TEST_PREPARE
++
++# AS_EXECUTABLE_P
++# ---------------
++# Check whether a file is executable.
++m4_ifndef([AS_EXECUTABLE_P],
++[m4_defun([AS_EXECUTABLE_P],
++[AS_REQUIRE([_AS_TEST_PREPARE])dnl
++$as_executable_p $1[]dnl
++])])# AS_EXECUTABLE_P
++
+ # NOTE: This macro has been submitted for inclusion into   #
+ #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+ #  a released version of Autoconf we should remove this    #
+@@ -7846,12 +8018,13 @@ do
+   test -z "$as_dir" && as_dir=.
+   for lt_ac_prog in sed gsed; do
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
++      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
+         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+       fi
+     done
+   done
+ done
++IFS=$as_save_IFS
+ lt_ac_max=0
+ lt_ac_count=0
+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris
+@@ -7884,11 +8057,12 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xp
+ done
+ ])
+ SED=$lt_cv_path_SED
++AC_SUBST([SED])
+ AC_MSG_RESULT([$SED])
+ ])
+-# nls.m4 serial 2 (gettext-0.14.3)
+-dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
++# nls.m4 serial 3 (gettext-0.15)
++dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+ dnl with or without modifications, as long as this notice is preserved.
+@@ -7919,26 +8093,6 @@ AC_DEFUN([AM_NLS],
+   AC_SUBST(USE_NLS)
+ ])
+-AC_DEFUN([AM_MKINSTALLDIRS],
+-[
+-  dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
+-  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
+-  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+-  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+-  dnl Try to locate it.
+-  MKINSTALLDIRS=
+-  if test -n "$ac_aux_dir"; then
+-    case "$ac_aux_dir" in
+-      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+-      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+-    esac
+-  fi
+-  if test -z "$MKINSTALLDIRS"; then
+-    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+-  fi
+-  AC_SUBST(MKINSTALLDIRS)
+-])
+-
+ # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+ # 
+ # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+@@ -8077,7 +8231,8 @@ installed software in a non-standard pre
+ _PKG_TEXT
+ ])],
+-              [$4])
++              [AC_MSG_RESULT([no])
++                $4])
+ elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+ [The pkg-config script could not be found or is too old.  Make sure it
+@@ -8086,7 +8241,7 @@ path to pkg-config.
+ _PKG_TEXT
+-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
++To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+               [$4])
+ else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+@@ -8096,8 +8251,8 @@ else
+ fi[]dnl
+ ])# PKG_CHECK_MODULES
+-# po.m4 serial 7 (gettext-0.14.3)
+-dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
++# po.m4 serial 13 (gettext-0.15)
++dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+ dnl with or without modifications, as long as this notice is preserved.
+@@ -8122,7 +8277,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
+ [
+   AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+   AC_REQUIRE([AC_PROG_INSTALL])dnl
+-  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
++  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+   AC_REQUIRE([AM_NLS])dnl
+   dnl Perform the following tests also if --disable-nls has been given,
+@@ -8137,6 +8292,22 @@ AC_DEFUN([AM_PO_SUBDIRS],
+     :)
+   AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
++  dnl Test whether it is GNU msgfmt >= 0.15.
++changequote(,)dnl
++  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
++    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
++    *) MSGFMT_015=$MSGFMT ;;
++  esac
++changequote([,])dnl
++  AC_SUBST([MSGFMT_015])
++changequote(,)dnl
++  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
++    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
++    *) GMSGFMT_015=$GMSGFMT ;;
++  esac
++changequote([,])dnl
++  AC_SUBST([GMSGFMT_015])
++
+   dnl Search for GNU xgettext 0.12 or newer in the PATH.
+   dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+   dnl The second test excludes FreeBSD xgettext.
+@@ -8147,44 +8318,26 @@ AC_DEFUN([AM_PO_SUBDIRS],
+   dnl Remove leftover from FreeBSD xgettext call.
+   rm -f messages.po
++  dnl Test whether it is GNU xgettext >= 0.15.
++changequote(,)dnl
++  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
++    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
++    *) XGETTEXT_015=$XGETTEXT ;;
++  esac
++changequote([,])dnl
++  AC_SUBST([XGETTEXT_015])
++
+   dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+   AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+     [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+-  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+-  dnl Test whether we really found GNU msgfmt.
+-  if test "$GMSGFMT" != ":"; then
+-    dnl If it is no GNU msgfmt we define it as : so that the
+-    dnl Makefiles still can work.
+-    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+-       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+-      : ;
+-    else
+-      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+-      AC_MSG_RESULT(
+-        [found $GMSGFMT program is not GNU msgfmt; ignore it])
+-      GMSGFMT=":"
+-    fi
+-  fi
++  dnl Installation directories.
++  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
++  dnl have to define it here, so that it can be used in po/Makefile.
++  test -n "$localedir" || localedir='${datadir}/locale'
++  AC_SUBST([localedir])
+-  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+-  dnl Test whether we really found GNU xgettext.
+-  if test "$XGETTEXT" != ":"; then
+-    dnl If it is no GNU xgettext we define it as : so that the
+-    dnl Makefiles still can work.
+-    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+-       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+-      : ;
+-    else
+-      AC_MSG_RESULT(
+-        [found xgettext program is not GNU xgettext; ignore it])
+-      XGETTEXT=":"
+-    fi
+-    dnl Remove leftover from FreeBSD xgettext call.
+-    rm -f messages.po
+-  fi
+-
+-  AC_OUTPUT_COMMANDS([
++  AC_CONFIG_COMMANDS([po-directories], [[
+     for ac_file in $CONFIG_FILES; do
+       # Support "outfile[:infile[:infile...]]"
+       case "$ac_file" in
+@@ -8221,11 +8374,12 @@ AC_DEFUN([AM_PO_SUBDIRS],
+               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+             fi
+             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+-            # Hide the ALL_LINGUAS assigment from automake.
++            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+           else
+             # The set of available languages was given in configure.in.
++            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+           fi
+           # Compute POFILES
+@@ -8295,10 +8449,10 @@ AC_DEFUN([AM_PO_SUBDIRS],
+         fi
+         ;;
+       esac
+-    done],
++    done]],
+    [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+-    # from automake.
++    # from automake < 1.5.
+     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+     # Capture the value of LINGUAS because we need it to compute CATALOGS.
+     LINGUAS="${LINGUAS-%UNSET%}"
+@@ -8384,7 +8538,7 @@ x
+ changequote([,])dnl
+   # Set POTFILES to the value of the Makefile variable POTFILES.
+-  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
++  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+   POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+   # Compute POTFILES_DEPS as
+   #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+@@ -8403,10 +8557,10 @@ changequote([,])dnl
+     POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+   else
+     # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+-    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
++    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+     ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+   fi
+-  # Hide the ALL_LINGUAS assigment from automake.
++  # Hide the ALL_LINGUAS assigment from automake < 1.5.
+   eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+   # Compute POFILES
+   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+@@ -8619,7 +8773,7 @@ fi
+ AC_SUBST($1)dnl
+ ])
+-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
++# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
+ #
+ # This file is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+@@ -8629,14 +8783,29 @@ AC_SUBST($1)dnl
+ # ----------------------------
+ # Automake X.Y traces this macro to ensure aclocal.m4 has been
+ # generated from the m4 files accompanying Automake X.Y.
+-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
++# (This private macro should not be called outside this file.)
++AC_DEFUN([AM_AUTOMAKE_VERSION],
++[am__api_version='1.10'
++dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
++dnl require some minimum version.  Point them to the right macro.
++m4_if([$1], [1.10], [],
++      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
++])
++
++# _AM_AUTOCONF_VERSION(VERSION)
++# -----------------------------
++# aclocal traces this macro to find the Autoconf version.
++# This is a private macro too.  Using m4_define simplifies
++# the logic in aclocal, which can simply ignore this definition.
++m4_define([_AM_AUTOCONF_VERSION], [])
+ # AM_SET_CURRENT_AUTOMAKE_VERSION
+ # -------------------------------
+-# Call AM_AUTOMAKE_VERSION so it can be traced.
++# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+ # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+ AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+-       [AM_AUTOMAKE_VERSION([1.9.6])])
++[AM_AUTOMAKE_VERSION([1.10])dnl
++_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
+ # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+@@ -8693,14 +8862,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
+ # AM_CONDITIONAL                                            -*- Autoconf -*-
+-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
++# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+ # Free Software Foundation, Inc.
+ #
+ # This file is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+-# serial 7
++# serial 8
+ # AM_CONDITIONAL(NAME, SHELL-CONDITION)
+ # -------------------------------------
+@@ -8709,8 +8878,10 @@ AC_DEFUN([AM_CONDITIONAL],
+ [AC_PREREQ(2.52)dnl
+  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+-AC_SUBST([$1_TRUE])
+-AC_SUBST([$1_FALSE])
++AC_SUBST([$1_TRUE])dnl
++AC_SUBST([$1_FALSE])dnl
++_AM_SUBST_NOTMAKE([$1_TRUE])dnl
++_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+ if $2; then
+   $1_TRUE=
+   $1_FALSE='#'
+@@ -8724,15 +8895,14 @@ AC_CONFIG_COMMANDS_PRE(
+ Usually this means the macro was only invoked conditionally.]])
+ fi])])
+-
+-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ # Free Software Foundation, Inc.
+ #
+ # This file is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+-# serial 8
++# serial 9
+ # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+ # written in clear, in which case automake, when reading aclocal.m4,
+@@ -8760,6 +8930,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
+ ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
++       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                    [depcc="$$1"   am_compiler_list=])
+@@ -8825,6 +8996,7 @@ AC_CACHE_CHECK([dependency style of $dep
+        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+          >/dev/null 2>conftest.err &&
++       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+@@ -8877,7 +9049,8 @@ if test "x$enable_dependency_tracking" !
+   AMDEPBACKSLASH='\'
+ fi
+ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+-AC_SUBST([AMDEPBACKSLASH])
++AC_SUBST([AMDEPBACKSLASH])dnl
++_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+ ])
+ # Generate code to set up dependency tracking.              -*- Autoconf -*-
+@@ -8902,8 +9075,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS
+   # some people rename them; so instead we look at the file content.
+   # Grep'ing the first line is not enough: some people post-process
+   # each Makefile.in and add a new line on top of each file to say so.
+-  # So let's grep whole file.
+-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
++  # Grep'ing the whole file is not good either: AIX grep has a line
++  # limit of 2048, but all sed's we know have understand at least 4000.
++  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+     dirpart=`AS_DIRNAME("$mf")`
+   else
+     continue
+@@ -8950,8 +9124,8 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS]
+ # Do all the work for Automake.                             -*- Autoconf -*-
+-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+-# Free Software Foundation, Inc.
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
++# 2005, 2006 Free Software Foundation, Inc.
+ #
+ # This file is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+@@ -8974,16 +9148,20 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS]
+ # arguments mandatory, and then we can depend on a new Autoconf
+ # release and drop the old call support.
+ AC_DEFUN([AM_INIT_AUTOMAKE],
+-[AC_PREREQ([2.58])dnl
++[AC_PREREQ([2.60])dnl
+ dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+ dnl the ones we care about.
+ m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+ AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+-# test to see if srcdir already configured
+-if test "`cd $srcdir && pwd`" != "`pwd`" &&
+-   test -f $srcdir/config.status; then
+-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
++if test "`cd $srcdir && pwd`" != "`pwd`"; then
++  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
++  # is not polluted with repeated "-I."
++  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
++  # test to see if srcdir already configured
++  if test -f $srcdir/config.status; then
++    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
++  fi
+ fi
+ # test whether we have cygpath
+@@ -9003,6 +9181,9 @@ m4_ifval([$2],
+  AC_SUBST([PACKAGE], [$1])dnl
+  AC_SUBST([VERSION], [$2])],
+ [_AM_SET_OPTIONS([$1])dnl
++dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
++m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
++  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+@@ -9038,6 +9219,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                   [_AM_DEPENDENCIES(CXX)],
+                   [define([AC_PROG_CXX],
+                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
++AC_PROVIDE_IFELSE([AC_PROG_OBJC],
++                  [_AM_DEPENDENCIES(OBJC)],
++                  [define([AC_PROG_OBJC],
++                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+ ])
+ ])
+@@ -9073,7 +9258,7 @@ echo "timestamp for $1" >`AS_DIRNAME([$1
+ # Define $install_sh.
+ AC_DEFUN([AM_PROG_INSTALL_SH],
+ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+-install_sh=${install_sh-"$am_aux_dir/install-sh"}
++install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+ AC_SUBST(install_sh)])
+ # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+@@ -9201,14 +9386,14 @@ rm -f confinc confmf
+ # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
++# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+ # Free Software Foundation, Inc.
+ #
+ # This file is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+-# serial 4
++# serial 5
+ # AM_MISSING_PROG(NAME, PROGRAM)
+ # ------------------------------
+@@ -9224,6 +9409,7 @@ AC_SUBST($1)])
+ # If it does, set am_missing_run to use it, otherwise, to nothing.
+ AC_DEFUN([AM_MISSING_HAS_RUN],
+ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
++AC_REQUIRE_AUX_FILE([missing])dnl
+ test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+ # Use eval to expand $SHELL
+ if eval "$MISSING --run true"; then
+@@ -9234,7 +9420,7 @@ else
+ fi
+ ])
+-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
++# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+ #
+ # This file is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+@@ -9242,60 +9428,23 @@ fi
+ # AM_PROG_MKDIR_P
+ # ---------------
+-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+-#
+-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+-# created by `make install' are always world readable, even if the
+-# installer happens to have an overly restrictive umask (e.g. 077).
+-# This was a mistake.  There are at least two reasons why we must not
+-# use `-m 0755':
+-#   - it causes special bits like SGID to be ignored,
+-#   - it may be too restrictive (some setups expect 775 directories).
+-#
+-# Do not use -m 0755 and let people choose whatever they expect by
+-# setting umask.
+-#
+-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+-# Some implementations (such as Solaris 8's) are not thread-safe: if a
+-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+-# concurrently, both version can detect that a/ is missing, but only
+-# one can create it and the other will error out.  Consequently we
+-# restrict ourselves to GNU make (using the --version option ensures
+-# this.)
++# Check for `mkdir -p'.
+ AC_DEFUN([AM_PROG_MKDIR_P],
+-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+-  # We used to keeping the `.' as first argument, in order to
+-  # allow $(mkdir_p) to be used without argument.  As in
+-  #   $(mkdir_p) $(somedir)
+-  # where $(somedir) is conditionally defined.  However this is wrong
+-  # for two reasons:
+-  #  1. if the package is installed by a user who cannot write `.'
+-  #     make install will fail,
+-  #  2. the above comment should most certainly read
+-  #     $(mkdir_p) $(DESTDIR)$(somedir)
+-  #     so it does not work when $(somedir) is undefined and
+-  #     $(DESTDIR) is not.
+-  #  To support the latter case, we have to write
+-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+-  #  so the `.' trick is pointless.
+-  mkdir_p='mkdir -p --'
+-else
+-  # On NextStep and OpenStep, the `mkdir' command does not
+-  # recognize any option.  It will interpret all options as
+-  # directories to create, and then abort because `.' already
+-  # exists.
+-  for d in ./-p ./--version;
+-  do
+-    test -d $d && rmdir $d
+-  done
+-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+-  if test -f "$ac_aux_dir/mkinstalldirs"; then
+-    mkdir_p='$(mkinstalldirs)'
+-  else
+-    mkdir_p='$(install_sh) -d'
+-  fi
+-fi
+-AC_SUBST([mkdir_p])])
++[AC_PREREQ([2.60])dnl
++AC_REQUIRE([AC_PROG_MKDIR_P])dnl
++dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
++dnl while keeping a definition of mkdir_p for backward compatibility.
++dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
++dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
++dnl Makefile.ins that do not define MKDIR_P, so we do our own
++dnl adjustment using top_builddir (which is defined more often than
++dnl MKDIR_P).
++AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
++case $mkdir_p in
++  [[\\/$]]* | ?:[[\\/]]*) ;;
++  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
++esac
++])
+ # Helper functions for option handling.                     -*- Autoconf -*-
+@@ -9407,9 +9556,21 @@ dnl Don't test for $cross_compiling = ye
+ if test "$cross_compiling" != no; then
+   AC_CHECK_TOOL([STRIP], [strip], :)
+ fi
+-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
++INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+ AC_SUBST([INSTALL_STRIP_PROGRAM])])
++# Copyright (C) 2006  Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# _AM_SUBST_NOTMAKE(VARIABLE)
++# ---------------------------
++# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
++# This macro is traced by Automake.
++AC_DEFUN([_AM_SUBST_NOTMAKE])
++
+ # Check how to create a tarball.                            -*- Autoconf -*-
+ # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+@@ -9512,4 +9673,5 @@ m4_include([m4/check-type.m4])
+ m4_include([m4/gnupg-check-typedef.m4])
+ m4_include([m4/gnupg.m4])
+ m4_include([m4/gpgme.m4])
++m4_include([m4/isc-posix.m4])
+ m4_include([m4/spamassassin.m4])
+diff -rupN claws-mail-3.1.0cvs70-orig/config/config.guess claws-mail-3.1.0cvs70/config/config.guess
+--- claws-mail-3.1.0cvs70-orig/config/config.guess     2005-10-25 08:14:37.000000000 +0200
++++ claws-mail-3.1.0cvs70/config/config.guess  2007-04-27 20:13:54.000000000 +0200
+@@ -1,9 +1,10 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+ #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
++#   Inc.
+-timestamp='2005-08-03'
++timestamp='2007-03-06'
+ # This file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by
+@@ -106,7 +107,7 @@ set_cc_for_build='
+ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+ : ${TMPDIR=/tmp} ;
+- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+@@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
++          sh5el) machine=sh5le-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+@@ -206,8 +208,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+     *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
++    *:SolidBSD:*:*)
++      echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
++      exit ;;
+     macppc:MirBSD:*:*)
+-      echo powerppc-unknown-mirbsd${UNAME_RELEASE}
++      echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+     *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+@@ -764,12 +769,19 @@ EOF
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+     *:FreeBSD:*:*)
+-      echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
++      case ${UNAME_MACHINE} in
++          pc98)
++              echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++          amd64)
++              echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++          *)
++              echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++      esac
+       exit ;;
+     i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit ;;
+-    i*:MINGW*:*)
++    *:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit ;;
+     i*:windows32*:*)
+@@ -779,9 +791,15 @@ EOF
+     i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit ;;
+-    x86:Interix*:[34]*)
+-      echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+-      exit ;;
++    *:Interix*:[3456]*)
++      case ${UNAME_MACHINE} in
++          x86) 
++              echo i586-pc-interix${UNAME_RELEASE}
++              exit ;;
++          EM64T | authenticamd)
++              echo x86_64-unknown-interix${UNAME_RELEASE}
++              exit ;;
++      esac ;;
+     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit ;;
+@@ -817,6 +835,9 @@ EOF
+     arm*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
++    avr32*:Linux:*:*)
++      echo ${UNAME_MACHINE}-unknown-linux-gnu
++      exit ;;
+     cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit ;;
+@@ -851,7 +872,11 @@ EOF
+       #endif
+       #endif
+ EOF
+-      eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
++      eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++          /^CPU/{
++              s: ::g
++              p
++          }'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+     mips64:Linux:*:*)
+@@ -870,7 +895,11 @@ EOF
+       #endif
+       #endif
+ EOF
+-      eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
++      eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++          /^CPU/{
++              s: ::g
++              p
++          }'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+     or32:Linux:*:*)
+@@ -919,9 +948,15 @@ EOF
+     sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
++    vax:Linux:*:*)
++      echo ${UNAME_MACHINE}-dec-linux-gnu
++      exit ;;
+     x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit ;;
++    xtensa:Linux:*:*)
++      echo xtensa-unknown-linux-gnu
++      exit ;;
+     i*86:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us. cd to the root directory to prevent
+@@ -964,7 +999,7 @@ EOF
+       LIBC=gnulibc1
+       # endif
+       #else
+-      #ifdef __INTEL_COMPILER
++      #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+       LIBC=gnu
+       #else
+       LIBC=gnuaout
+@@ -974,7 +1009,11 @@ EOF
+       LIBC=dietlibc
+       #endif
+ EOF
+-      eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
++      eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++          /^LIBC/{
++              s: ::g
++              p
++          }'`"
+       test x"${LIBC}" != x && {
+               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+               exit
+@@ -1176,6 +1215,15 @@ EOF
+     SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit ;;
++    SX-7:SUPER-UX:*:*)
++      echo sx7-nec-superux${UNAME_RELEASE}
++      exit ;;
++    SX-8:SUPER-UX:*:*)
++      echo sx8-nec-superux${UNAME_RELEASE}
++      exit ;;
++    SX-8R:SUPER-UX:*:*)
++      echo sx8r-nec-superux${UNAME_RELEASE}
++      exit ;;
+     Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+@@ -1185,7 +1233,6 @@ EOF
+     *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+-          *86) UNAME_PROCESSOR=i686 ;;
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+@@ -1264,6 +1311,9 @@ EOF
+     i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
++    i*86:rdos:*:*)
++      echo ${UNAME_MACHINE}-pc-rdos
++      exit ;;
+ esac
+ #echo '(No uname command or uname output not recognized.)' 1>&2
+diff -rupN claws-mail-3.1.0cvs70-orig/config/config.sub claws-mail-3.1.0cvs70/config/config.sub
+--- claws-mail-3.1.0cvs70-orig/config/config.sub       2005-10-25 08:14:37.000000000 +0200
++++ claws-mail-3.1.0cvs70/config/config.sub    2007-04-27 20:13:54.000000000 +0200
+@@ -1,9 +1,10 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+ #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
++#   Inc.
+-timestamp='2005-07-08'
++timestamp='2007-01-18'
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -119,8 +120,9 @@ esac
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+-  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
++  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
++  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
++  storm-chaos* | os2-emx* | rtmk-nova*)
+     os=-$maybe_os
+     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+     ;;
+@@ -171,6 +173,10 @@ case $os in
+       -hiux*)
+               os=-hiuxwe2
+               ;;
++      -sco6)
++              os=-sco5v6
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
+       -sco5)
+               os=-sco3.2v5
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+@@ -187,6 +193,10 @@ case $os in
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
++      -sco5v6*)
++              # Don't forget version if it is 3.2v4 or newer.
++              basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++              ;;
+       -sco*)
+               os=-sco3.2v2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+@@ -231,15 +241,16 @@ case $basic_machine in
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
+-      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
++      | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+       | bfin \
+       | c4x | clipper \
+       | d10v | d30v | dlx | dsp16xx \
+-      | fr30 | frv \
++      | fido | fr30 | frv \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | ip2k | iq2000 \
+-      | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
++      | m32c | m32r | m32rle | m68000 | m68k | m88k \
++      | maxq | mb | microblaze | mcore | mep \
+       | mips | mipsbe | mipseb | mipsel | mipsle \
+       | mips16 \
+       | mips64 | mips64el \
+@@ -257,28 +268,27 @@ case $basic_machine in
+       | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipstx39 | mipstx39el \
+       | mn10200 | mn10300 \
+-      | ms1 \
++      | mt \
+       | msp430 \
++      | nios | nios2 \
+       | ns16k | ns32k \
+       | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+-      | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
++      | score \
++      | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh64 | sh64le \
+-      | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+-      | sparcv8 | sparcv9 | sparcv9b \
+-      | strongarm \
++      | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
++      | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
++      | spu | strongarm \
+       | tahoe | thumb | tic4x | tic80 | tron \
+       | v850 | v850e \
+       | we32k \
+-      | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
++      | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | z8k)
+               basic_machine=$basic_machine-unknown
+               ;;
+-      m32c)
+-              basic_machine=$basic_machine-unknown
+-              ;;
+       m6811 | m68hc11 | m6812 | m68hc12)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+@@ -286,6 +296,9 @@ case $basic_machine in
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+               ;;
++      ms1)
++              basic_machine=mt-unknown
++              ;;
+       # We use `pc' rather than `unknown'
+       # because (1) that's what they normally are, and
+@@ -305,18 +318,18 @@ case $basic_machine in
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+-      | avr-* \
++      | avr-* | avr32-* \
+       | bfin-* | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | clipper-* | craynv-* | cydra-* \
+       | d10v-* | d30v-* | dlx-* \
+       | elxsi-* \
+-      | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
++      | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | ip2k-* | iq2000-* \
+-      | m32r-* | m32rle-* \
++      | m32c-* | m32r-* | m32rle-* \
+       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+@@ -336,31 +349,30 @@ case $basic_machine in
+       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+-      | ms1-* \
++      | mt-* \
+       | msp430-* \
++      | nios-* | nios2-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* \
+-      | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
++      | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+-      | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
++      | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+-      | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
++      | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+       | tahoe-* | thumb-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tron-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+-      | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
++      | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa-* \
+       | ymp-* \
+       | z8k-*)
+               ;;
+-      m32c-*)
+-              ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       386bsd)
+@@ -696,6 +708,9 @@ case $basic_machine in
+               basic_machine=i386-pc
+               os=-msdos
+               ;;
++      ms1-*)
++              basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
++              ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+@@ -803,6 +818,12 @@ case $basic_machine in
+       pc532 | pc532-*)
+               basic_machine=ns32k-pc532
+               ;;
++      pc98)
++              basic_machine=i386-pc
++              ;;
++      pc98-*)
++              basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
+       pentium | p5 | k5 | k6 | nexgen | viac3)
+               basic_machine=i586-pc
+               ;;
+@@ -859,6 +880,10 @@ case $basic_machine in
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
++      rdos)
++              basic_machine=i386-pc
++              os=-rdos
++              ;;
+       rom68k)
+               basic_machine=m68k-rom68k
+               os=-coff
+@@ -885,6 +910,10 @@ case $basic_machine in
+       sb1el)
+               basic_machine=mipsisa64sb1el-unknown
+               ;;
++      sde)
++              basic_machine=mipsisa32-sde
++              os=-elf
++              ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+@@ -896,6 +925,9 @@ case $basic_machine in
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
++      sh5el)
++              basic_machine=sh5le-unknown
++              ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+@@ -1101,7 +1133,7 @@ case $basic_machine in
+       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+               basic_machine=sh-unknown
+               ;;
+-      sparc | sparcv8 | sparcv9 | sparcv9b)
++      sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+               basic_machine=sparc-sun
+               ;;
+       cydra)
+@@ -1174,21 +1206,23 @@ case $os in
+             | -aos* \
+             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+-            | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
++            | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
++            | -openbsd* | -solidbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* \
+             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+-            | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
++            | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
++            | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+-            | -skyos* | -haiku*)
++            | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -qnx*)
+@@ -1340,6 +1374,12 @@ else
+ # system, and we'll never get to this point.
+ case $basic_machine in
++        score-*)
++              os=-elf
++              ;;
++        spu-*)
++              os=-elf
++              ;;
+       *-acorn)
+               os=-riscix1.2
+               ;;
+@@ -1349,9 +1389,9 @@ case $basic_machine in
+       arm*-semi)
+               os=-aout
+               ;;
+-    c4x-* | tic4x-*)
+-        os=-coff
+-        ;;
++        c4x-* | tic4x-*)
++              os=-coff
++              ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=-tops20
+@@ -1377,6 +1417,9 @@ case $basic_machine in
+       m68*-cisco)
+               os=-aout
+               ;;
++        mep-*)
++              os=-elf
++              ;;
+       mips*-cisco)
+               os=-elf
+               ;;
+diff -rupN claws-mail-3.1.0cvs70-orig/config/ltmain.sh claws-mail-3.1.0cvs70/config/ltmain.sh
+--- claws-mail-3.1.0cvs70-orig/config/ltmain.sh        2006-01-10 16:23:52.000000000 +0100
++++ claws-mail-3.1.0cvs70/config/ltmain.sh     2007-08-14 19:43:36.000000000 +0200
+@@ -1,8 +1,8 @@
+ # ltmain.sh - Provide generalized library-building support services.
+ # NOTE: Changing this file will not affect anything until you rerun configure.
+ #
+-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
+-# Free Software Foundation, Inc.
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
++# 2007  Free Software Foundation, Inc.
+ # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+ #
+ # This program is free software; you can redistribute it and/or modify
+@@ -43,14 +43,22 @@ EXIT_FAILURE=1
+ PROGRAM=ltmain.sh
+ PACKAGE=libtool
+-VERSION="1.5.22 Debian 1.5.22-2"
+-TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
++VERSION="1.5.24 Debian 1.5.24-1ubuntu1"
++TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
+-# See if we are running on zsh, and set the options which allow our
+-# commands through without removal of \ escapes.
+-if test -n "${ZSH_VERSION+set}" ; then
++# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++  emulate sh
++  NULLCMD=:
++  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++  # is contrary to our usage.  Disable this feature.
++  alias -g '${1+"$@"}'='"$@"'
+   setopt NO_GLOB_SUBST
++else
++  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
+ # Check that we have a working $echo.
+ if test "X$1" = X--no-reexec; then
+@@ -105,12 +113,14 @@ esac
+ # These must not be set unconditionally because not all systems understand
+ # e.g. LANG=C (notably SCO).
+ # We save the old values to restore during execute mode.
+-if test "${LC_ALL+set}" = set; then
+-  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+-fi
+-if test "${LANG+set}" = set; then
+-  save_LANG="$LANG"; LANG=C; export LANG
+-fi
++for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
++do
++  eval "if test \"\${$lt_var+set}\" = set; then
++        save_$lt_var=\$$lt_var
++        $lt_var=C
++        export $lt_var
++      fi"
++done
+ # Make sure IFS has a sensible default
+ lt_nl='
+@@ -136,6 +146,8 @@ duplicate_deps=no
+ preserve_args=
+ lo2o="s/\\.lo\$/.${objext}/"
+ o2lo="s/\\.${objext}\$/.lo/"
++extracted_archives=
++extracted_serial=0
+ #####################################
+ # Shell function definitions:
+@@ -196,7 +208,13 @@ func_win32_libid ()
+     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+       $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+       win32_nmres=`eval $NM -f posix -A $1 | \
+-      $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
++      $SED -n -e '1,100{
++              / I /{
++                      s,.*,import,
++                      p
++                      q
++                      }
++              }'`
+       case $win32_nmres in
+       import*)  win32_libid_type="x86 archive import";;
+       *)        win32_libid_type="x86 archive static";;
+@@ -327,7 +345,17 @@ func_extract_archives ()
+       *) my_xabs=`pwd`"/$my_xlib" ;;
+       esac
+       my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+-      my_xdir="$my_gentop/$my_xlib"
++      my_xlib_u=$my_xlib
++      while :; do
++        case " $extracted_archives " in
++      *" $my_xlib_u "*)
++        extracted_serial=`expr $extracted_serial + 1`
++        my_xlib_u=lt$extracted_serial-$my_xlib ;;
++      *) break ;;
++      esac
++      done
++      extracted_archives="$extracted_archives $my_xlib_u"
++      my_xdir="$my_gentop/$my_xlib_u"
+       $show "${rm}r $my_xdir"
+       $run ${rm}r "$my_xdir"
+@@ -454,11 +482,12 @@ do
+     ;;
+   --version)
+-    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+-    $echo
+-    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
+-    $echo "This is free software; see the source for copying conditions.  There is NO"
+-    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
++    echo "\
++$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
++
++Copyright (C) 2007  Free Software Foundation, Inc.
++This is free software; see the source for copying conditions.  There is NO
++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+     exit $?
+     ;;
+@@ -755,9 +784,10 @@ if test -z "$show_help"; then
+     *.class) xform=class ;;
+     *.cpp) xform=cpp ;;
+     *.cxx) xform=cxx ;;
+-    *.f90) xform=f90 ;;
++    *.[fF][09]?) xform=[fF][09]. ;;
+     *.for) xform=for ;;
+     *.java) xform=java ;;
++    *.obj) xform=obj ;;
+     esac
+     libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+@@ -1138,8 +1168,9 @@ EOF
+     for arg
+     do
+       case $arg in
+-      -all-static | -static)
+-      if test "X$arg" = "X-all-static"; then
++      -all-static | -static | -static-libtool-libs)
++      case $arg in
++      -all-static)
+         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+           $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+         fi
+@@ -1147,12 +1178,20 @@ EOF
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=yes
+-      else
++        ;;
++      -static)
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=built
+-      fi
++        ;;
++      -static-libtool-libs)
++        if test -z "$pic_flag" && test -n "$link_static_flag"; then
++          dlopen_self=$dlopen_self_static
++        fi
++        prefer_static_libs=yes
++        ;;
++      esac
+       build_libtool_libs=no
+       build_old_libs=yes
+       break
+@@ -1600,7 +1639,7 @@ EOF
+       continue
+       ;;
+-     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
++     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+       compiler_flags="$compiler_flags $arg"
+       compile_command="$compile_command $arg"
+       finalize_command="$finalize_command $arg"
+@@ -1620,10 +1659,11 @@ EOF
+       # -m* pass through architecture-specific compiler args for GCC
+       # -m*, -t[45]*, -txscale* pass through architecture-specific
+       # compiler args for GCC
+-      # -pg pass through profiling flag for GCC
++      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
++      # -F/path gives path to uninstalled frameworks, gcc on darwin
+       # @file GCC response files
+-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+-      -t[45]*|-txscale*|@*)
++      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
++      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+@@ -1651,9 +1691,9 @@ EOF
+       -no-install)
+       case $host in
+-      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
++      *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
+         # The PATH hackery in wrapper scripts is required on Windows
+-        # in order for the loader to find any dlls it needs.
++        # and Darwin in order for the loader to find any dlls it needs.
+         $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+         $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+         fast_install=no
+@@ -1712,7 +1752,7 @@ EOF
+       continue
+       ;;
+-      -static)
++      -static | -static-libtool-libs)
+       # The effects of -static are defined in a previous loop.
+       # We used to do the same as -all-static on platforms that
+       # didn't have a PIC flag, but the assumption that the effects
+@@ -2097,7 +2137,7 @@ EOF
+       lib=
+       found=no
+       case $deplib in
+-      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
++      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+         if test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
+@@ -2493,7 +2533,9 @@ EOF
+       if test "$linkmode,$pass" = "prog,link"; then
+         if test -n "$library_names" &&
+-           { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
++           { { test "$prefer_static_libs" = no ||
++               test "$prefer_static_libs,$installed" = "built,yes"; } ||
++             test -z "$old_library"; }; then
+           # We need to hardcode the library path
+           if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+             # Make sure the rpath contains only unique directories.
+@@ -3189,7 +3231,7 @@ EOF
+         # which has an extra 1 added just for fun
+         #
+         case $version_type in
+-        darwin|linux|osf|windows)
++        darwin|linux|osf|windows|none)
+           current=`expr $number_major + $number_minor`
+           age="$number_minor"
+           revision="$number_revision"
+@@ -3200,9 +3242,10 @@ EOF
+           age="0"
+           ;;
+         irix|nonstopux)
+-          current=`expr $number_major + $number_minor - 1`
++          current=`expr $number_major + $number_minor`
+           age="$number_minor"
+           revision="$number_minor"
++          lt_irix_increment=no
+           ;;
+         *)
+           $echo "$modename: unknown library version type \`$version_type'" 1>&2
+@@ -3266,7 +3309,8 @@ EOF
+         versuffix="$major.$age.$revision"
+         # Darwin ld doesn't like 0 for these options...
+         minor_current=`expr $current + 1`
+-        verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
++        xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
++        verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+         ;;
+       freebsd-aout)
+@@ -3280,8 +3324,11 @@ EOF
+         ;;
+       irix | nonstopux)
+-        major=`expr $current - $age + 1`
+-
++        if test "X$lt_irix_increment" = "Xno"; then
++          major=`expr $current - $age`
++        else
++          major=`expr $current - $age + 1`
++        fi
+         case $version_type in
+           nonstopux) verstring_prefix=nonstopux ;;
+           *)         verstring_prefix=sgi ;;
+@@ -3418,11 +3465,11 @@ EOF
+       fi
+       # Eliminate all temporary directories.
+-      for path in $notinst_path; do
+-      lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+-      deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+-      dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+-      done
++      #for path in $notinst_path; do
++      #       lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
++      #       deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
++      #       dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
++      #done
+       if test -n "$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+@@ -3523,13 +3570,12 @@ EOF
+         int main() { return 0; }
+ EOF
+         $rm conftest
+-        $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
+-        if test "$?" -eq 0 ; then
++        if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+           ldd_output=`ldd conftest`
+           for i in $deplibs; do
+             name=`expr $i : '-l\(.*\)'`
+             # If $name is empty we are operating on a -L argument.
+-              if test "$name" != "" && test "$name" -ne "0"; then
++              if test "$name" != "" && test "$name" != "0"; then
+               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                 case " $predeps $postdeps " in
+                 *" $i "*)
+@@ -3568,9 +3614,7 @@ EOF
+             # If $name is empty we are operating on a -L argument.
+               if test "$name" != "" && test "$name" != "0"; then
+               $rm conftest
+-              $LTCC $LTCFLAGS -o conftest conftest.c $i
+-              # Did it work?
+-              if test "$?" -eq 0 ; then
++              if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+                 ldd_output=`ldd conftest`
+                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                   case " $predeps $postdeps " in
+@@ -3602,7 +3646,7 @@ EOF
+                 droppeddeps=yes
+                 $echo
+                 $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+-                $echo "***  make it link in!  You will probably need to install it or some"
++                $echo "*** make it link in!  You will probably need to install it or some"
+                 $echo "*** library that it depends on before this library will be fully"
+                 $echo "*** functional.  Installing it before continuing would be even better."
+               fi
+@@ -3888,7 +3932,10 @@ EOF
+            test -n "$hardcode_libdirs"; then
+           libdir="$hardcode_libdirs"
+           if test -n "$hardcode_libdir_flag_spec_ld"; then
+-            eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
++            case $archive_cmds in
++            *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
++            *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
++            esac
+           else
+             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+           fi
+@@ -4247,12 +4294,14 @@ EOF
+       reload_conv_objs=
+       gentop=
+       # reload_cmds runs $LD directly, so let us get rid of
+-      # -Wl from whole_archive_flag_spec
++      # -Wl from whole_archive_flag_spec and hope we can get by with
++      # turning comma into space..
+       wl=
+       if test -n "$convenience"; then
+       if test -n "$whole_archive_flag_spec"; then
+-        eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
++        eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
++        reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+       else
+         gentop="$output_objdir/${obj}x"
+         generated="$generated $gentop"
+@@ -4700,16 +4749,16 @@ static const void *lt_preloaded_setup() 
+           case $host in
+           *cygwin* | *mingw* )
+             if test -f "$output_objdir/${outputname}.def" ; then
+-              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+-              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
++              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
++              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+             else
+-              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+-              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
++              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
++              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              fi
+             ;;
+           * )
+-            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+-            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
++            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
++            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+             ;;
+           esac
+         ;;
+@@ -4724,13 +4773,13 @@ static const void *lt_preloaded_setup() 
+       # really was required.
+       # Nullify the symbol file.
+-      compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+-      finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
++      compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
++      finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+       fi
+       if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+       # Replace the output file specification.
+-      compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
++      compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
+       link_command="$compile_command$compile_rpath"
+       # We have no uninstalled library dependencies, so finalize right now.
+@@ -4817,7 +4866,7 @@ static const void *lt_preloaded_setup() 
+       if test "$fast_install" != no; then
+         link_command="$finalize_var$compile_command$finalize_rpath"
+         if test "$fast_install" = yes; then
+-          relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
++          relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
+         else
+           # fast_install is set to needless
+           relink_command=
+@@ -4854,7 +4903,7 @@ static const void *lt_preloaded_setup() 
+         fi
+       done
+       relink_command="(cd `pwd`; $relink_command)"
+-      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
++      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+       fi
+       # Quote $echo for shipping.
+@@ -5261,6 +5310,20 @@ EOF
+ Xsed='${SED} -e 1s/^X//'
+ sed_quote_subst='$sed_quote_subst'
++# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
++if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
++  emulate sh
++  NULLCMD=:
++  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
++  # is contrary to our usage.  Disable this feature.
++  alias -g '\${1+\"\$@\"}'='\"\$@\"'
++  setopt NO_GLOB_SUBST
++else
++  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
+ # The HP-UX ksh and POSIX shell print the target directory to stdout
+ # if CDPATH is set.
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+@@ -5403,7 +5466,7 @@ else
+         ;;
+       esac
+       $echo >> $output "\
+-      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
++      \$echo \"\$0: cannot exec \$program \$*\"
+       exit $EXIT_FAILURE
+     fi
+   else
+@@ -5589,7 +5652,7 @@ fi\
+       done
+       # Quote the link command for shipping.
+       relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+-      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
++      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+       if test "$hardcode_automatic" = yes ; then
+       relink_command=
+       fi
+@@ -5934,9 +5997,9 @@ relink_command=\"$relink_command\""
+         if test -n "$inst_prefix_dir"; then
+           # Stick the inst_prefix_dir data into the link command.
+-          relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
++          relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
+         else
+-          relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
++          relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
+         fi
+         $echo "$modename: warning: relinking \`$file'" 1>&2
+@@ -6145,7 +6208,7 @@ relink_command=\"$relink_command\""
+             file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+             outputname="$tmpdir/$file"
+             # Replace the output file specification.
+-            relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
++            relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
+             $show "$relink_command"
+             if $run eval "$relink_command"; then :
+@@ -6356,8 +6419,10 @@ relink_command=\"$relink_command\""
+       if test -f "$dir/$objdir/$dlname"; then
+         dir="$dir/$objdir"
+       else
+-        $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+-        exit $EXIT_FAILURE
++        if test ! -f "$dir/$dlname"; then
++          $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
++          exit $EXIT_FAILURE
++        fi
+       fi
+       ;;
+@@ -6421,12 +6486,12 @@ relink_command=\"$relink_command\""
+       fi
+       # Restore saved environment variables
+-      if test "${save_LC_ALL+set}" = set; then
+-      LC_ALL="$save_LC_ALL"; export LC_ALL
+-      fi
+-      if test "${save_LANG+set}" = set; then
+-      LANG="$save_LANG"; export LANG
+-      fi
++      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
++      do
++      eval "if test \"\${save_$lt_var+set}\" = set; then
++              $lt_var=\$save_$lt_var; export $lt_var
++            fi"
++      done
+       # Now prepare to actually exec the command.
+       exec_cmd="\$cmd$args"
+@@ -6783,9 +6848,9 @@ The following components of LINK-COMMAND
+   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+   -export-symbols SYMFILE
+-                  try to export only the symbols listed in SYMFILE
++                    try to export only the symbols listed in SYMFILE
+   -export-symbols-regex REGEX
+-                  try to export only the symbols matching REGEX
++                    try to export only the symbols matching REGEX
+   -LLIBDIR          search LIBDIR for required installed libraries
+   -lNAME            OUTPUT-FILE requires the installed library libNAME
+   -module           build a library that can dlopened
+@@ -6799,9 +6864,11 @@ The following components of LINK-COMMAND
+   -release RELEASE  specify package release information
+   -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+   -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+-  -static           do not do any dynamic linking of libtool libraries
++  -static           do not do any dynamic linking of uninstalled libtool libraries
++  -static-libtool-libs
++                    do not do any dynamic linking of libtool libraries
+   -version-info CURRENT[:REVISION[:AGE]]
+-                  specify library version info [each variable defaults to 0]
++                    specify library version info [each variable defaults to 0]
+ All other options (arguments beginning with \`-') are ignored.
+diff -rupN claws-mail-3.1.0cvs70-orig/config/Makefile.in claws-mail-3.1.0cvs70/config/Makefile.in
+--- claws-mail-3.1.0cvs70-orig/config/Makefile.in      2007-12-08 17:07:20.000000000 +0100
++++ claws-mail-3.1.0cvs70/config/Makefile.in   2007-12-08 22:54:34.000000000 +0100
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005  Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -13,15 +13,11 @@
+ # PARTICULAR PURPOSE.
+ @SET_MAKE@
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = ..
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -45,7 +41,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/a
+       $(top_srcdir)/m4/aspell.m4 $(top_srcdir)/m4/check-type.m4 \
+       $(top_srcdir)/m4/gnupg-check-typedef.m4 \
+       $(top_srcdir)/m4/gnupg.m4 $(top_srcdir)/m4/gpgme.m4 \
+-      $(top_srcdir)/m4/spamassassin.m4 $(top_srcdir)/configure.ac
++      $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/spamassassin.m4 \
++      $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+@@ -56,8 +53,6 @@ DIST_SOURCES =
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+ ALLOCA = @ALLOCA@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AS = @AS@
+@@ -69,41 +64,11 @@ AUTOCONF = @AUTOCONF@
+ AUTOHEADER = @AUTOHEADER@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+-BUILD_BOGOFILTER_PLUGIN_FALSE = @BUILD_BOGOFILTER_PLUGIN_FALSE@
+-BUILD_BOGOFILTER_PLUGIN_TRUE = @BUILD_BOGOFILTER_PLUGIN_TRUE@
+-BUILD_CLAMAV_PLUGIN_FALSE = @BUILD_CLAMAV_PLUGIN_FALSE@
+-BUILD_CLAMAV_PLUGIN_TRUE = @BUILD_CLAMAV_PLUGIN_TRUE@
+-BUILD_DEMO_PLUGIN_FALSE = @BUILD_DEMO_PLUGIN_FALSE@
+-BUILD_DEMO_PLUGIN_TRUE = @BUILD_DEMO_PLUGIN_TRUE@
+-BUILD_DILLO_VIEWER_PLUGIN_FALSE = @BUILD_DILLO_VIEWER_PLUGIN_FALSE@
+-BUILD_DILLO_VIEWER_PLUGIN_TRUE = @BUILD_DILLO_VIEWER_PLUGIN_TRUE@
+-BUILD_MANUAL_FALSE = @BUILD_MANUAL_FALSE@
+-BUILD_MANUAL_TRUE = @BUILD_MANUAL_TRUE@
+-BUILD_PGPCORE_PLUGIN_FALSE = @BUILD_PGPCORE_PLUGIN_FALSE@
+-BUILD_PGPCORE_PLUGIN_TRUE = @BUILD_PGPCORE_PLUGIN_TRUE@
+-BUILD_PGPINLINE_PLUGIN_FALSE = @BUILD_PGPINLINE_PLUGIN_FALSE@
+-BUILD_PGPINLINE_PLUGIN_TRUE = @BUILD_PGPINLINE_PLUGIN_TRUE@
+-BUILD_PGPMIME_PLUGIN_FALSE = @BUILD_PGPMIME_PLUGIN_FALSE@
+-BUILD_PGPMIME_PLUGIN_TRUE = @BUILD_PGPMIME_PLUGIN_TRUE@
+-BUILD_SPAMASSASSIN_PLUGIN_FALSE = @BUILD_SPAMASSASSIN_PLUGIN_FALSE@
+-BUILD_SPAMASSASSIN_PLUGIN_TRUE = @BUILD_SPAMASSASSIN_PLUGIN_TRUE@
+-BUILD_TRAYICON_PLUGIN_FALSE = @BUILD_TRAYICON_PLUGIN_FALSE@
+-BUILD_TRAYICON_PLUGIN_TRUE = @BUILD_TRAYICON_PLUGIN_TRUE@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+ CLAMAV_CFLAGS = @CLAMAV_CFLAGS@
+ CLAMAV_LIBS = @CLAMAV_LIBS@
+-CLAWS_GNOME2_FALSE = @CLAWS_GNOME2_FALSE@
+-CLAWS_GNOME2_TRUE = @CLAWS_GNOME2_TRUE@
+-CLAWS_GNOMEPRINT_FALSE = @CLAWS_GNOMEPRINT_FALSE@
+-CLAWS_GNOMEPRINT_TRUE = @CLAWS_GNOMEPRINT_TRUE@
+-CLAWS_GNOME_FALSE = @CLAWS_GNOME_FALSE@
+-CLAWS_GNOME_TRUE = @CLAWS_GNOME_TRUE@
+-CLAWS_LIBETPAN_FALSE = @CLAWS_LIBETPAN_FALSE@
+-CLAWS_LIBETPAN_TRUE = @CLAWS_LIBETPAN_TRUE@
+-CLAWS_VALGRIND_FALSE = @CLAWS_VALGRIND_FALSE@
+-CLAWS_VALGRIND_TRUE = @CLAWS_VALGRIND_TRUE@
+ COMPFACE_LIBS = @COMPFACE_LIBS@
+ CONIC_CFLAGS = @CONIC_CFLAGS@
+ CONIC_LIBS = @CONIC_LIBS@
+@@ -115,8 +80,6 @@ CXXCPP = @CXXCPP@
+ CXXDEPMODE = @CXXDEPMODE@
+ CXXFLAGS = @CXXFLAGS@
+ CYGPATH_W = @CYGPATH_W@
+-CYGWIN_FALSE = @CYGWIN_FALSE@
+-CYGWIN_TRUE = @CYGWIN_TRUE@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
+ DLLTOOL = @DLLTOOL@
+@@ -134,6 +97,7 @@ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+ GLIB_LIBS = @GLIB_LIBS@
+ GMSGFMT = @GMSGFMT@
++GMSGFMT_015 = @GMSGFMT_015@
+ GNOME2_CFLAGS = @GNOME2_CFLAGS@
+ GNOME2_LIBS = @GNOME2_LIBS@
+ GNOMEPRINT_CFLAGS = @GNOMEPRINT_CFLAGS@
+@@ -148,6 +112,7 @@ GTK210_CFLAGS = @GTK210_CFLAGS@
+ GTK210_LIBS = @GTK210_LIBS@
+ GTK_CFLAGS = @GTK_CFLAGS@
+ GTK_LIBS = @GTK_LIBS@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -179,21 +144,18 @@ LT_REVISION = @LT_REVISION@
+ MAEMO_CFLAGS = @MAEMO_CFLAGS@
+ MAEMO_LIBS = @MAEMO_LIBS@
+ MAINT = @MAINT@
+-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+ MAJOR_VERSION = @MAJOR_VERSION@
+ MAKEINFO = @MAKEINFO@
+ MICRO_VERSION = @MICRO_VERSION@
+ MINOR_VERSION = @MINOR_VERSION@
+-MKINSTALLDIRS = @MKINSTALLDIRS@
++MKDIR_P = @MKDIR_P@
+ MSGFMT = @MSGFMT@
++MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
+ OBJDUMP = @OBJDUMP@
+ OBJEXT = @OBJEXT@
+ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+ OPENSSL_LIBS = @OPENSSL_LIBS@
+-OS_WIN32_FALSE = @OS_WIN32_FALSE@
+-OS_WIN32_TRUE = @OS_WIN32_TRUE@
+ PACKAGE = @PACKAGE@
+ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+ PACKAGE_NAME = @PACKAGE_NAME@
+@@ -203,12 +165,11 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
+ PASSCRYPT_KEY = @PASSCRYPT_KEY@
+ PATH_SEPARATOR = @PATH_SEPARATOR@
+ PKG_CONFIG = @PKG_CONFIG@
+-PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@
+-PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@
+ POSUB = @POSUB@
+ PTHREAD_LIBS = @PTHREAD_LIBS@
+ RANLIB = @RANLIB@
+ RC = @RC@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ SM_LIBS = @SM_LIBS@
+@@ -220,16 +181,17 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+ VALGRIND_LIBS = @VALGRIND_LIBS@
+ VERSION = @VERSION@
+ XGETTEXT = @XGETTEXT@
++XGETTEXT_015 = @XGETTEXT_015@
+ YACC = @YACC@
+ YFLAGS = @YFLAGS@
++abs_builddir = @abs_builddir@
++abs_srcdir = @abs_srcdir@
++abs_top_builddir = @abs_top_builddir@
++abs_top_srcdir = @abs_top_srcdir@
+ ac_ct_CC = @ac_ct_CC@
+ ac_ct_CXX = @ac_ct_CXX@
+ ac_ct_F77 = @ac_ct_F77@
+ ac_cv_enable_crash_dialog = @ac_cv_enable_crash_dialog@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -241,6 +203,7 @@ build_alias = @build_alias@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+@@ -271,12 +234,15 @@ program_transform_name = @program_transf
+ psdir = @psdir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target = @target@
+ target_alias = @target_alias@
+ target_cpu = @target_cpu@
+ target_os = @target_os@
+ target_vendor = @target_vendor@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ all: all-am
+ .SUFFIXES:
+@@ -315,10 +281,6 @@ mostlyclean-libtool:
+ clean-libtool:
+       -rm -rf .libs _libs
+-
+-distclean-libtool:
+-      -rm -f libtool
+-uninstall-info-am:
+ tags: TAGS
+ TAGS:
+@@ -327,22 +289,21 @@ CTAGS:
+ distdir: $(DISTFILES)
+-      @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+-      topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+-      list='$(DISTFILES)'; for file in $$list; do \
+-        case $$file in \
+-          $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+-          $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+-        esac; \
++      @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
++      topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
++      list='$(DISTFILES)'; \
++        dist_files=`for file in $$list; do echo $$file; done | \
++        sed -e "s|^$$srcdirstrip/||;t" \
++            -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
++      case $$dist_files in \
++        */*) $(MKDIR_P) `echo "$$dist_files" | \
++                         sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
++                         sort -u` ;; \
++      esac; \
++      for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+-        dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+-        if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+-          dir="/$$dir"; \
+-          $(mkdir_p) "$(distdir)$$dir"; \
+-        else \
+-          dir=''; \
+-        fi; \
+         if test -d $$d/$$file; then \
++          dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+@@ -387,7 +348,7 @@ clean-am: clean-generic clean-libtool mo
+ distclean: distclean-am
+       -rm -f Makefile
+-distclean-am: clean-am distclean-generic distclean-libtool
++distclean-am: clean-am distclean-generic
+ dvi: dvi-am
+@@ -401,12 +362,20 @@ info-am:
+ install-data-am:
++install-dvi: install-dvi-am
++
+ install-exec-am:
++install-html: install-html-am
++
+ install-info: install-info-am
+ install-man:
++install-pdf: install-pdf-am
++
++install-ps: install-ps-am
++
+ installcheck-am:
+ maintainer-clean: maintainer-clean-am
+@@ -425,17 +394,20 @@ ps: ps-am
+ ps-am:
+-uninstall-am: uninstall-info-am
++uninstall-am:
++
++.MAKE: install-am install-strip
+ .PHONY: all all-am check check-am clean clean-generic clean-libtool \
+       distclean distclean-generic distclean-libtool distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+-      install-data install-data-am install-exec install-exec-am \
+-      install-info install-info-am install-man install-strip \
++      install-data install-data-am install-dvi install-dvi-am \
++      install-exec install-exec-am install-html install-html-am \
++      install-info install-info-am install-man install-pdf \
++      install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+-      mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+-      uninstall-info-am
++      mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+diff -rupN claws-mail-3.1.0cvs70-orig/configure claws-mail-3.1.0cvs70/configure
+--- claws-mail-3.1.0cvs70-orig/configure       2007-12-08 17:07:22.000000000 +0100
++++ claws-mail-3.1.0cvs70/configure    2007-12-08 22:54:36.000000000 +0100
+@@ -1,6 +1,6 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.60.
++# Generated by GNU Autoconf 2.61.
+ #
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+ # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+@@ -10,7 +10,8 @@
+ ## M4sh Initialization.  ##
+ ## --------------------- ##
+-# Be Bourne compatible
++# Be more Bourne compatible
++DUALCASE=1; export DUALCASE # for MKS sh
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+   emulate sh
+   NULLCMD=:
+@@ -19,10 +20,13 @@ if test -n "${ZSH_VERSION+set}" && (emul
+   alias -g '${1+"$@"}'='"$@"'
+   setopt NO_GLOB_SUBST
+ else
+-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++  case `(set -o) 2>/dev/null` in
++  *posix*) set -o posix ;;
++esac
++
+ fi
+-BIN_SH=xpg4; export BIN_SH # for Tru64
+-DUALCASE=1; export DUALCASE # for MKS sh
++
++
+ # PATH needs CR
+@@ -215,7 +219,7 @@ test \$exitcode = 0) || { (exit 1); exit
+ else
+   as_candidate_shells=
+     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
++for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+@@ -233,7 +237,6 @@ IFS=$as_save_IFS
+        # Try only shells that exist, to save several forks.
+        if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+               { ("$as_shell") 2> /dev/null <<\_ASEOF
+-# Be Bourne compatible
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+   emulate sh
+   NULLCMD=:
+@@ -242,10 +245,12 @@ if test -n "${ZSH_VERSION+set}" && (emul
+   alias -g '${1+"$@"}'='"$@"'
+   setopt NO_GLOB_SUBST
+ else
+-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++  case `(set -o) 2>/dev/null` in
++  *posix*) set -o posix ;;
++esac
++
+ fi
+-BIN_SH=xpg4; export BIN_SH # for Tru64
+-DUALCASE=1; export DUALCASE # for MKS sh
++
+ :
+ _ASEOF
+@@ -253,7 +258,6 @@ _ASEOF
+   CONFIG_SHELL=$as_shell
+              as_have_required=yes
+              if { "$as_shell" 2> /dev/null <<\_ASEOF
+-# Be Bourne compatible
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+   emulate sh
+   NULLCMD=:
+@@ -262,10 +266,12 @@ if test -n "${ZSH_VERSION+set}" && (emul
+   alias -g '${1+"$@"}'='"$@"'
+   setopt NO_GLOB_SUBST
+ else
+-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++  case `(set -o) 2>/dev/null` in
++  *posix*) set -o posix ;;
++esac
++
+ fi
+-BIN_SH=xpg4; export BIN_SH # for Tru64
+-DUALCASE=1; export DUALCASE # for MKS sh
++
+ :
+ (as_func_return () {
+@@ -512,19 +518,28 @@ else
+   as_mkdir_p=false
+ fi
+-# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
+-# systems may use methods other than mode bits to determine executability.
+-cat >conf$$.file <<_ASEOF
+-#! /bin/sh
+-exit 0
+-_ASEOF
+-chmod +x conf$$.file
+-if test -x conf$$.file >/dev/null 2>&1; then
+-  as_executable_p="test -x"
++if test -x / >/dev/null 2>&1; then
++  as_test_x='test -x'
+ else
+-  as_executable_p=:
++  if ls -dL / >/dev/null 2>&1; then
++    as_ls_L_option=L
++  else
++    as_ls_L_option=
++  fi
++  as_test_x='
++    eval sh -c '\''
++      if test -d "$1"; then
++        test -d "$1/.";
++      else
++      case $1 in
++        -*)set "./$1";;
++      esac;
++      case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
++      ???[sx]*):;;*)false;;esac;fi
++    '\'' sh
++  '
+ fi
+-rm -f conf$$.file
++as_executable_p=$as_test_x
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+@@ -721,39 +736,40 @@ ac_unique_file="src/main.c"
+ # Factoring default headers for most tests.
+ ac_includes_default="\
+ #include <stdio.h>
+-#if HAVE_SYS_TYPES_H
++#ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+-#if HAVE_SYS_STAT_H
++#ifdef HAVE_SYS_STAT_H
+ # include <sys/stat.h>
+ #endif
+-#if STDC_HEADERS
++#ifdef STDC_HEADERS
+ # include <stdlib.h>
+ # include <stddef.h>
+ #else
+-# if HAVE_STDLIB_H
++# ifdef HAVE_STDLIB_H
+ #  include <stdlib.h>
+ # endif
+ #endif
+-#if HAVE_STRING_H
+-# if !STDC_HEADERS && HAVE_MEMORY_H
++#ifdef HAVE_STRING_H
++# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+ #  include <memory.h>
+ # endif
+ # include <string.h>
+ #endif
+-#if HAVE_STRINGS_H
++#ifdef HAVE_STRINGS_H
+ # include <strings.h>
+ #endif
+-#if HAVE_INTTYPES_H
++#ifdef HAVE_INTTYPES_H
+ # include <inttypes.h>
+ #endif
+-#if HAVE_STDINT_H
++#ifdef HAVE_STDINT_H
+ # include <stdint.h>
+ #endif
+-#if HAVE_UNISTD_H
++#ifdef HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif"
++gt_needs=
+ ac_subst_vars='SHELL
+ PATH_SEPARATOR
+ PACKAGE_NAME
+@@ -806,6 +822,7 @@ target_os
+ INSTALL_PROGRAM
+ INSTALL_SCRIPT
+ INSTALL_DATA
++am__isrc
+ CYGPATH_W
+ PACKAGE
+ VERSION
+@@ -863,11 +880,12 @@ am__fastdepCC_FALSE
+ LN_S
+ CPP
+ LEX
+-LEXLIB
+ LEX_OUTPUT_ROOT
++LEXLIB
+ YACC
+ YFLAGS
+ RC
++SED
+ GREP
+ EGREP
+ ECHO
+@@ -896,11 +914,13 @@ CYGWIN_FALSE
+ LIBICONV
+ LTLIBICONV
+ GETTEXT_PACKAGE
+-MKINSTALLDIRS
+ USE_NLS
+ MSGFMT
+ GMSGFMT
++MSGFMT_015
++GMSGFMT_015
+ XGETTEXT
++XGETTEXT_015
+ MSGMERGE
+ INTL_MACOSX_LIBS
+ INTLLIBS
+@@ -988,6 +1008,7 @@ GNOME2_LIBS
+ CC
+ CFLAGS
+ LDFLAGS
++LIBS
+ CPPFLAGS
+ CPP
+ YACC
+@@ -1123,10 +1144,10 @@ do
+   -disable-* | --disable-*)
+     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+    { (exit 1); exit 1; }; }
+-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
++    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+     eval enable_$ac_feature=no ;;
+   -docdir | --docdir | --docdi | --doc | --do)
+@@ -1142,10 +1163,10 @@ do
+   -enable-* | --enable-*)
+     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+    { (exit 1); exit 1; }; }
+-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
++    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+     eval enable_$ac_feature=\$ac_optarg ;;
+   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+@@ -1339,19 +1360,19 @@ do
+   -with-* | --with-*)
+     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+       { echo "$as_me: error: invalid package name: $ac_package" >&2
+    { (exit 1); exit 1; }; }
+-    ac_package=`echo $ac_package| sed 's/-/_/g'`
++    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+     eval with_$ac_package=\$ac_optarg ;;
+   -without-* | --without-*)
+     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+       { echo "$as_me: error: invalid package name: $ac_package" >&2
+    { (exit 1); exit 1; }; }
+-    ac_package=`echo $ac_package | sed 's/-/_/g'`
++    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+     eval with_$ac_package=no ;;
+   --x)
+@@ -1666,6 +1687,7 @@ Some influential environment variables:
+   CFLAGS      C compiler flags
+   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+               nonstandard directory <lib dir>
++  LIBS        libraries to pass to the linker, e.g. -l<library>
+   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+               you have headers in a nonstandard directory <include dir>
+   CPP         C preprocessor
+@@ -1776,7 +1798,7 @@ test -n "$ac_init_help" && exit $ac_stat
+ if $ac_init_version; then
+   cat <<\_ACEOF
+ configure
+-generated by GNU Autoconf 2.60
++generated by GNU Autoconf 2.61
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+@@ -1790,7 +1812,7 @@ This file contains any messages produced
+ running configure, to aid debugging if configure makes a mistake.
+ It was created by $as_me, which was
+-generated by GNU Autoconf 2.60.  Invocation command line was
++generated by GNU Autoconf 2.61.  Invocation command line was
+   $ $0 $@
+@@ -2062,6 +2084,7 @@ echo "$as_me: creating cache $cache_file
+   >$cache_file
+ fi
++gt_needs="$gt_needs "
+ # Check that the precious variables saved in the cache have kept the same
+ # value.
+ ac_cache_corrupted=false
+@@ -2310,7 +2333,8 @@ test -n "$target_alias" &&
+     NONENONEs,x,x, &&
+   program_prefix=${target_alias}-
+-am__api_version="1.9"
++am__api_version='1.10'
++
+ # Find a good install program.  We prefer a C program (faster),
+ # so one script is as good as another.  But avoid the broken or
+ # incompatible versions:
+@@ -2347,7 +2371,7 @@ case $as_dir/ in
+     # by default.
+     for ac_prog in ginstall scoinst install; do
+       for ac_exec_ext in '' $ac_executable_extensions; do
+-      if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
++      if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+         if test $ac_prog = install &&
+           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+@@ -2462,38 +2486,53 @@ else
+ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+ fi
+-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+-  # We used to keeping the `.' as first argument, in order to
+-  # allow $(mkdir_p) to be used without argument.  As in
+-  #   $(mkdir_p) $(somedir)
+-  # where $(somedir) is conditionally defined.  However this is wrong
+-  # for two reasons:
+-  #  1. if the package is installed by a user who cannot write `.'
+-  #     make install will fail,
+-  #  2. the above comment should most certainly read
+-  #     $(mkdir_p) $(DESTDIR)$(somedir)
+-  #     so it does not work when $(somedir) is undefined and
+-  #     $(DESTDIR) is not.
+-  #  To support the latter case, we have to write
+-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+-  #  so the `.' trick is pointless.
+-  mkdir_p='mkdir -p --'
+-else
+-  # On NextStep and OpenStep, the `mkdir' command does not
+-  # recognize any option.  It will interpret all options as
+-  # directories to create, and then abort because `.' already
+-  # exists.
+-  for d in ./-p ./--version;
+-  do
+-    test -d $d && rmdir $d
+-  done
+-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+-  if test -f "$ac_aux_dir/mkinstalldirs"; then
+-    mkdir_p='$(mkinstalldirs)'
++{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
++echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
++if test -z "$MKDIR_P"; then
++  if test "${ac_cv_path_mkdir+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++  for ac_prog in mkdir gmkdir; do
++       for ac_exec_ext in '' $ac_executable_extensions; do
++         { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
++         case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
++           'mkdir (GNU coreutils) '* | \
++           'mkdir (coreutils) '* | \
++           'mkdir (fileutils) '4.1*)
++             ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
++             break 3;;
++         esac
++       done
++       done
++done
++IFS=$as_save_IFS
++
++fi
++
++  if test "${ac_cv_path_mkdir+set}" = set; then
++    MKDIR_P="$ac_cv_path_mkdir -p"
+   else
+-    mkdir_p='$(install_sh) -d'
++    # As a last resort, use the slow shell script.  Don't cache a
++    # value for MKDIR_P within a source directory, because that will
++    # break other packages using the cache if that directory is
++    # removed, or if the value is a relative name.
++    test -d ./--version && rmdir ./--version
++    MKDIR_P="$ac_install_sh -d"
+   fi
+ fi
++{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
++echo "${ECHO_T}$MKDIR_P" >&6; }
++
++mkdir_p="$MKDIR_P"
++case $mkdir_p in
++  [\\/$]* | ?:[\\/]*) ;;
++  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
++esac
+ for ac_prog in gawk mawk nawk awk
+ do
+@@ -2513,7 +2552,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_AWK="$ac_prog"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -2576,12 +2615,16 @@ else
+ fi
+ rmdir .tst 2>/dev/null
+-# test to see if srcdir already configured
+-if test "`cd $srcdir && pwd`" != "`pwd`" &&
+-   test -f $srcdir/config.status; then
+-  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
++if test "`cd $srcdir && pwd`" != "`pwd`"; then
++  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
++  # is not polluted with repeated "-I."
++  am__isrc=' -I$(srcdir)'
++  # test to see if srcdir already configured
++  if test -f $srcdir/config.status; then
++    { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+ echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+    { (exit 1); exit 1; }; }
++  fi
+ fi
+ # test whether we have cygpath
+@@ -2615,7 +2658,7 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_ru
+ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+-install_sh=${install_sh-"$am_aux_dir/install-sh"}
++install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+ # Installed binaries are usually stripped using `strip' when the user
+ # run `make install-strip'.  However `strip' might not be the right
+@@ -2639,7 +2682,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -2679,7 +2722,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_STRIP="strip"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -2719,7 +2762,7 @@ else
+ fi
+ fi
+-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
++INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+ # We need awk for the "check" target.  The system "awk" is bad on
+ # some platforms.
+@@ -2758,7 +2801,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GNOME_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -2791,9 +2834,7 @@ if test "$GNOME_CONFIG" != no; then
+       fi
+ fi
+-
+-
+-if test -n "$gnomedatadir"; then
++ if test -n "$gnomedatadir"; then
+   CLAWS_GNOME_TRUE=
+   CLAWS_GNOME_FALSE='#'
+ else
+@@ -2820,7 +2861,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -2871,7 +2912,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -2914,7 +2955,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3028,7 +3069,9 @@ fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GNOME2_PKG_ERRORS" >&5
+-      ac_enable_gnome2=no
++      { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++                ac_enable_gnome2=no
+ elif test $pkg_failed = untried; then
+       ac_enable_gnome2=no
+ else
+@@ -3038,9 +3081,7 @@ else
+ echo "${ECHO_T}yes" >&6; }
+       ac_enable_gnome2=yes
+ fi
+-
+-
+-if test x"$ac_enable_gnome2" = x"yes"; then
++ if test x"$ac_enable_gnome2" = x"yes"; then
+   CLAWS_GNOME2_TRUE=
+   CLAWS_GNOME2_FALSE='#'
+ else
+@@ -3072,9 +3113,7 @@ fi
+   { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+ echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
+-
+-
+-if test $USE_MAINTAINER_MODE = yes; then
++   if test $USE_MAINTAINER_MODE = yes; then
+   MAINTAINER_MODE_TRUE=
+   MAINTAINER_MODE_FALSE='#'
+ else
+@@ -3108,7 +3147,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_CC="${ac_tool_prefix}gcc"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3148,7 +3187,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_CC="gcc"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3205,7 +3244,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_CC="${ac_tool_prefix}cc"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3246,7 +3285,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+        continue
+@@ -3304,7 +3343,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3348,7 +3387,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_CC="$ac_prog"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -3489,7 +3528,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+ # in a Makefile.  We should not override ac_cv_exeext if it was cached,
+ # so that the user can short-circuit this test for compilers unknown to
+ # Autoconf.
+-for ac_file in $ac_files
++for ac_file in $ac_files ''
+ do
+   test -f "$ac_file" || continue
+   case $ac_file in
+@@ -3517,6 +3556,12 @@ done
+ test "$ac_cv_exeext" = no && ac_cv_exeext=
+ else
++  ac_file=''
++fi
++
++{ echo "$as_me:$LINENO: result: $ac_file" >&5
++echo "${ECHO_T}$ac_file" >&6; }
++if test -z "$ac_file"; then
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+@@ -3528,8 +3573,6 @@ See \`config.log' for more details." >&2
+ fi
+ ac_exeext=$ac_cv_exeext
+-{ echo "$as_me:$LINENO: result: $ac_file" >&5
+-echo "${ECHO_T}$ac_file" >&6; }
+ # Check that the compiler produces executables we can run.  If not, either
+ # the compiler is broken, or we cross compile.
+@@ -3707,27 +3750,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   ac_compiler_gnu=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -3782,27 +3808,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   ac_cv_prog_cc_g=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -3837,27 +3846,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   :
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -3893,27 +3885,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   ac_cv_prog_cc_g=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -4029,27 +4004,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   ac_cv_prog_cc_c89=$ac_arg
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -4138,9 +4096,7 @@ if test "x$enable_dependency_tracking" !
+   am_depcomp="$ac_aux_dir/depcomp"
+   AMDEPBACKSLASH='\'
+ fi
+-
+-
+-if test "x$enable_dependency_tracking" != xno; then
++ if test "x$enable_dependency_tracking" != xno; then
+   AMDEP_TRUE=
+   AMDEP_FALSE='#'
+ else
+@@ -4150,7 +4106,6 @@ fi
+-
+ depcc="$CC"   am_compiler_list=
+ { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+@@ -4218,6 +4173,7 @@ else
+        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+          >/dev/null 2>conftest.err &&
++       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+@@ -4247,9 +4203,7 @@ fi
+ echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+ CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+-
+-
+-if
++ if
+   test "x$enable_dependency_tracking" != xno \
+   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+   am__fastdepCC_TRUE=
+@@ -4261,12 +4215,14 @@ fi
+-{ echo "$as_me:$LINENO: checking for library containing strerror" >&5
+-echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; }
+-if test "${ac_cv_search_strerror+set}" = set; then
++
++        { echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
++echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6; }
++if test "${ac_cv_lib_cposix_strerror+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  ac_func_search_save_LIBS=$LIBS
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcposix  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+@@ -4289,14 +4245,7 @@ return strerror ();
+   return 0;
+ }
+ _ACEOF
+-for ac_lib in '' cposix; do
+-  if test -z "$ac_lib"; then
+-    ac_res="none required"
+-  else
+-    ac_res=-l$ac_lib
+-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+-  fi
+-  rm -f conftest.$ac_objext conftest$ac_exeext
++rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (ac_try="$ac_link"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+@@ -4309,56 +4258,30 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_search_strerror=$ac_res
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
++  ac_cv_lib_cposix_strerror=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+-
++      ac_cv_lib_cposix_strerror=no
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext
+-  if test "${ac_cv_search_strerror+set}" = set; then
+-  break
+-fi
+-done
+-if test "${ac_cv_search_strerror+set}" = set; then
+-  :
+-else
+-  ac_cv_search_strerror=no
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++      conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-rm conftest.$ac_ext
+-LIBS=$ac_func_search_save_LIBS
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
++echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6; }
++if test $ac_cv_lib_cposix_strerror = yes; then
++  LIBS="$LIBS -lcposix"
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+-echo "${ECHO_T}$ac_cv_search_strerror" >&6; }
+-ac_res=$ac_cv_search_strerror
+-if test "$ac_res" != no; then
+-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+-fi
++
+ # Find a good install program.  We prefer a C program (faster),
+ # so one script is as good as another.  But avoid the broken or
+@@ -4396,7 +4319,7 @@ case $as_dir/ in
+     # by default.
+     for ac_prog in ginstall scoinst install; do
+       for ac_exec_ext in '' $ac_executable_extensions; do
+-      if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
++      if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+         if test $ac_prog = install &&
+           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+@@ -4533,17 +4456,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null; then
+-  if test -s conftest.err; then
+-    ac_cpp_err=$ac_c_preproc_warn_flag
+-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+-  else
+-    ac_cpp_err=
+-  fi
+-else
+-  ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++  (exit $ac_status); } >/dev/null && {
++       test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       }; then
+   :
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -4577,17 +4493,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null; then
+-  if test -s conftest.err; then
+-    ac_cpp_err=$ac_c_preproc_warn_flag
+-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+-  else
+-    ac_cpp_err=
+-  fi
+-else
+-  ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++  (exit $ac_status); } >/dev/null && {
++       test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       }; then
+   # Broken: success on invalid input.
+ continue
+ else
+@@ -4652,17 +4561,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null; then
+-  if test -s conftest.err; then
+-    ac_cpp_err=$ac_c_preproc_warn_flag
+-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+-  else
+-    ac_cpp_err=
+-  fi
+-else
+-  ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++  (exit $ac_status); } >/dev/null && {
++       test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       }; then
+   :
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -4696,17 +4598,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null; then
+-  if test -s conftest.err; then
+-    ac_cpp_err=$ac_c_preproc_warn_flag
+-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+-  else
+-    ac_cpp_err=
+-  fi
+-else
+-  ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++  (exit $ac_status); } >/dev/null && {
++       test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       }; then
+   # Broken: success on invalid input.
+ continue
+ else
+@@ -4757,7 +4652,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_LEX="$ac_prog"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -4782,116 +4677,69 @@ fi
+ done
+ test -n "$LEX" || LEX=":"
+-if test -z "$LEXLIB"
+-then
+-  { echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
+-echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lfl  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
++if test "x$LEX" != "x:"; then
++  cat >conftest.l <<_ACEOF
++%%
++a { ECHO; }
++b { REJECT; }
++c { yymore (); }
++d { yyless (1); }
++e { yyless (input () != 0); }
++f { unput (yytext[0]); }
++. { BEGIN INITIAL; }
++%%
++#ifdef YYTEXT_POINTER
++extern char *yytext;
+ #endif
+-char yywrap ();
+ int
+-main ()
++main (void)
+ {
+-return yywrap ();
+-  ;
+-  return 0;
++  return ! yylex () + ! yywrap ();
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
++{ (ac_try="$LEX conftest.l"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
+ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
++  (eval "$LEX conftest.l") 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_lib_fl_yywrap=yes
++  (exit $ac_status); }
++{ echo "$as_me:$LINENO: checking lex output file root" >&5
++echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; }
++if test "${ac_cv_prog_lex_root+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-      ac_cv_lib_fl_yywrap=no
++if test -f lex.yy.c; then
++  ac_cv_prog_lex_root=lex.yy
++elif test -f lexyy.c; then
++  ac_cv_prog_lex_root=lexyy
++else
++  { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
++echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
++   { (exit 1); exit 1; }; }
+ fi
+-
+-rm -f core conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
+-echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6; }
+-if test $ac_cv_lib_fl_yywrap = yes; then
+-  LEXLIB="-lfl"
+-else
+-  { echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
+-echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_l_yywrap+set}" = set; then
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
++echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; }
++LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
++
++if test -z "${LEXLIB+set}"; then
++  { echo "$as_me:$LINENO: checking lex library" >&5
++echo $ECHO_N "checking lex library... $ECHO_C" >&6; }
++if test "${ac_cv_lib_lex+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ll  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char yywrap ();
+-int
+-main ()
+-{
+-return yywrap ();
+-  ;
+-  return 0;
+-}
++    ac_save_LIBS=$LIBS
++    ac_cv_lib_lex='none needed'
++    for ac_lib in '' -lfl -ll; do
++      LIBS="$ac_lib $ac_save_LIBS"
++      cat >conftest.$ac_ext <<_ACEOF
++`cat $LEX_OUTPUT_ROOT.c`
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (ac_try="$ac_link"
+@@ -4906,85 +4754,31 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_lib_l_yywrap=yes
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
++  ac_cv_lib_lex=$ac_lib
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+-      ac_cv_lib_l_yywrap=no
++
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
+-echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6; }
+-if test $ac_cv_lib_l_yywrap = yes; then
+-  LEXLIB="-ll"
+-fi
++      test "$ac_cv_lib_lex" != 'none needed' && break
++    done
++    LIBS=$ac_save_LIBS
+ fi
+-
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5
++echo "${ECHO_T}$ac_cv_lib_lex" >&6; }
++  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
+ fi
+-if test "x$LEX" != "x:"; then
+-  { echo "$as_me:$LINENO: checking lex output file root" >&5
+-echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; }
+-if test "${ac_cv_prog_lex_root+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  # The minimal lex program is just a single line: %%.  But some broken lexes
+-# (Solaris, I think it was) want two %% lines, so accommodate them.
+-cat >conftest.l <<_ACEOF
+-%%
+-%%
+-_ACEOF
+-{ (ac_try="$LEX conftest.l"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$LEX conftest.l") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }
+-if test -f lex.yy.c; then
+-  ac_cv_prog_lex_root=lex.yy
+-elif test -f lexyy.c; then
+-  ac_cv_prog_lex_root=lexyy
+-else
+-  { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+-echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+-echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; }
+-rm -f conftest.l
+-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+ { echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+ echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; }
+@@ -4992,13 +4786,13 @@ if test "${ac_cv_prog_lex_yytext_pointer
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   # POSIX says lex can declare yytext either as a pointer or an array; the
+-# default is implementation-dependent. Figure out which it is, since
++# default is implementation-dependent.  Figure out which it is, since
+ # not all implementations provide the %pointer and %array declarations.
+ ac_cv_prog_lex_yytext_pointer=no
+-echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ ac_save_LIBS=$LIBS
+-LIBS="$LIBS $LEXLIB"
++LIBS="$LEXLIB $ac_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
++#define YYTEXT_POINTER 1
+ `cat $LEX_OUTPUT_ROOT.c`
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+@@ -5014,27 +4808,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
+   ac_cv_prog_lex_yytext_pointer=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -5043,10 +4821,9 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_save_LIBS
+-rm -f "${LEX_OUTPUT_ROOT}.c"
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+@@ -5058,6 +4835,7 @@ cat >>confdefs.h <<\_ACEOF
+ _ACEOF
+ fi
++rm -f conftest.l $LEX_OUTPUT_ROOT.c
+ fi
+ if test "$LEX" = :; then
+@@ -5081,7 +4859,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_YACC="$ac_prog"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -5107,6 +4885,25 @@ done
+ test -n "$YACC" || YACC="yacc"
++                  acl_libdirstem=lib
++  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
++  if test -n "$searchpath"; then
++    acl_save_IFS="${IFS=      }"; IFS=":"
++    for searchdir in $searchpath; do
++      if test -d "$searchdir"; then
++        case "$searchdir" in
++          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
++          *) searchdir=`cd "$searchdir" && pwd`
++             case "$searchdir" in
++               */lib64 ) acl_libdirstem=lib64 ;;
++             esac ;;
++        esac
++      fi
++    done
++    IFS="$acl_save_IFS"
++  fi
++
++
+       if test "X$prefix" = "XNONE"; then
+     acl_final_prefix="$ac_default_prefix"
+   else
+@@ -5127,6 +4924,7 @@ test -n "$YACC" || YACC="yacc"
++
+     use_additional=yes
+   acl_save_prefix="$prefix"
+@@ -5162,7 +4960,7 @@ if test "${with_lib_prefix+set}" = set; 
+       else
+         additional_includedir="$withval/include"
+-        additional_libdir="$withval/lib"
++        additional_libdir="$withval/$acl_libdirstem"
+       fi
+     fi
+@@ -5201,7 +4999,7 @@ fi
+         fi
+       fi
+     fi
+-                            if test "X$additional_libdir" != "X/usr/lib"; then
++                            if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+       haveit=
+       for x in $LDFLAGS; do
+@@ -5219,7 +5017,7 @@ fi
+         fi
+       done
+       if test -z "$haveit"; then
+-        if test "X$additional_libdir" = "X/usr/local/lib"; then
++        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+           if test -n "$GCC"; then
+             case $host_os in
+               linux*) haveit=yes;;
+@@ -5254,7 +5052,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_RC="${ac_tool_prefix}windres"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -5294,7 +5092,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_RC="windres"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -5424,12 +5222,13 @@ do
+   test -z "$as_dir" && as_dir=.
+   for lt_ac_prog in sed gsed; do
+     for ac_exec_ext in '' $ac_executable_extensions; do
+-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
++      if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then
+         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+       fi
+     done
+   done
+ done
++IFS=$as_save_IFS
+ lt_ac_max=0
+ lt_ac_count=0
+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris
+@@ -5464,6 +5263,7 @@ done
+ fi
+ SED=$lt_cv_path_SED
++
+ { echo "$as_me:$LINENO: result: $SED" >&5
+ echo "${ECHO_T}$SED" >&6; }
+@@ -5488,7 +5288,7 @@ do
+   for ac_prog in grep ggrep; do
+   for ac_exec_ext in '' $ac_executable_extensions; do
+     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+-    { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
++    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+     # Check for GNU ac_path_GREP and select it if it is found.
+   # Check for GNU $ac_path_GREP
+ case `"$ac_path_GREP" --version 2>&1` in
+@@ -5570,7 +5370,7 @@ do
+   for ac_prog in egrep; do
+   for ac_exec_ext in '' $ac_executable_extensions; do
+     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+-    { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
++    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+     # Check for GNU ac_path_EGREP and select it if it is found.
+   # Check for GNU $ac_path_EGREP
+ case `"$ac_path_EGREP" --version 2>&1` in
+@@ -5814,8 +5614,8 @@ fi
+ echo "${ECHO_T}$lt_cv_path_NM" >&6; }
+ NM="$lt_cv_path_NM"
+-{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
+-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; }
++{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
++echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
+ if test "${lt_cv_deplibs_check_method+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5856,16 +5656,22 @@ cygwin*)
+ mingw* | pw32*)
+   # Base MSYS/MinGW do not provide the 'file' command needed by
+-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+-  lt_cv_file_magic_cmd='$OBJDUMP -f'
++  # func_win32_libid shell function, so use a weaker test based on 'objdump',
++  # unless we find 'file', for example because we are cross-compiling.
++  if ( file / ) >/dev/null 2>&1; then
++    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
++    lt_cv_file_magic_cmd='func_win32_libid'
++  else
++    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
++    lt_cv_file_magic_cmd='$OBJDUMP -f'
++  fi
+   ;;
+ darwin* | rhapsody*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+-freebsd* | kfreebsd*-gnu | dragonfly*)
++freebsd* | dragonfly*)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     case $host_cpu in
+     i*86 )
+@@ -5903,7 +5709,7 @@ hpux10.20* | hpux11*)
+   esac
+   ;;
+-interix3*)
++interix[3-9]*)
+   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+   ;;
+@@ -5919,11 +5725,11 @@ irix5* | irix6* | nonstopux*)
+   ;;
+ # This must be Linux ELF.
+-linux*)
++linux* | k*bsd*-gnu)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+-netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
++netbsd* | netbsdelf*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+   else
+@@ -5953,6 +5759,10 @@ osf3* | osf4* | osf5*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
++rdos*)
++  lt_cv_deplibs_check_method=pass_all
++  ;;
++
+ solaris*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+@@ -6039,7 +5849,7 @@ ia64-*-hpux*)
+   ;;
+ *-*-irix6*)
+   # Find out which ABI we are using.
+-  echo '#line 6042 "configure"' > conftest.$ac_ext
++  echo '#line 5852 "configure"' > conftest.$ac_ext
+   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+@@ -6074,7 +5884,8 @@ ia64-*-hpux*)
+   rm -rf conftest*
+   ;;
+-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
++x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
++s390*-*linux*|sparc*-*linux*)
+   # Find out which ABI we are using.
+   echo 'int i;' > conftest.$ac_ext
+   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+@@ -6085,6 +5896,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*li
+     case `/usr/bin/file conftest.o` in
+     *32-bit*)
+       case $host in
++        x86_64-*kfreebsd*-gnu)
++          LD="${LD-ld} -m elf_i386_fbsd"
++          ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_i386"
+           ;;
+@@ -6101,6 +5915,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*li
+       ;;
+     *64-bit*)
+       case $host in
++        x86_64-*kfreebsd*-gnu)
++          LD="${LD-ld} -m elf_x86_64_fbsd"
++          ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_x86_64"
+           ;;
+@@ -6163,27 +5980,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
+   lt_cv_cc_needs_belf=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -6192,7 +5993,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+       lt_cv_cc_needs_belf=no
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+      ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+@@ -6246,7 +6047,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -6286,7 +6087,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -6342,7 +6143,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_AS="${ac_tool_prefix}as"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -6382,7 +6183,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_AS="as"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -6438,7 +6239,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -6478,7 +6279,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_OBJDUMP="objdump"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -6562,27 +6363,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   ac_cv_header_stdc=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -6758,27 +6542,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   eval "$as_ac_Header=yes"
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -6841,27 +6608,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   ac_header_compiler=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -6897,17 +6647,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null; then
+-  if test -s conftest.err; then
+-    ac_cpp_err=$ac_c_preproc_warn_flag
+-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+-  else
+-    ac_cpp_err=
+-  fi
+-else
+-  ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++  (exit $ac_status); } >/dev/null && {
++       test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       }; then
+   ac_header_preproc=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -6994,7 +6737,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -7038,7 +6781,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_CXX="$ac_prog"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -7151,27 +6894,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_cxx_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   ac_compiler_gnu=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -7226,27 +6952,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_cxx_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   ac_cv_prog_cxx_g=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -7281,27 +6990,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_cxx_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   :
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -7337,27 +7029,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_cxx_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   ac_cv_prog_cxx_g=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -7465,6 +7140,7 @@ else
+        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+          >/dev/null 2>conftest.err &&
++       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+@@ -7494,9 +7170,7 @@ fi
+ echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+ CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+-
+-
+-if
++ if
+   test "x$enable_dependency_tracking" != xno \
+   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+   am__fastdepCXX_TRUE=
+@@ -7560,17 +7234,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null; then
+-  if test -s conftest.err; then
+-    ac_cpp_err=$ac_cxx_preproc_warn_flag
+-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+-  else
+-    ac_cpp_err=
+-  fi
+-else
+-  ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++  (exit $ac_status); } >/dev/null && {
++       test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
++       test ! -s conftest.err
++       }; then
+   :
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -7604,17 +7271,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null; then
+-  if test -s conftest.err; then
+-    ac_cpp_err=$ac_cxx_preproc_warn_flag
+-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+-  else
+-    ac_cpp_err=
+-  fi
+-else
+-  ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++  (exit $ac_status); } >/dev/null && {
++       test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
++       test ! -s conftest.err
++       }; then
+   # Broken: success on invalid input.
+ continue
+ else
+@@ -7679,17 +7339,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null; then
+-  if test -s conftest.err; then
+-    ac_cpp_err=$ac_cxx_preproc_warn_flag
+-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+-  else
+-    ac_cpp_err=
+-  fi
+-else
+-  ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++  (exit $ac_status); } >/dev/null && {
++       test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
++       test ! -s conftest.err
++       }; then
+   :
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -7723,17 +7376,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null; then
+-  if test -s conftest.err; then
+-    ac_cpp_err=$ac_cxx_preproc_warn_flag
+-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+-  else
+-    ac_cpp_err=
+-  fi
+-else
+-  ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++  (exit $ac_status); } >/dev/null && {
++       test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
++       test ! -s conftest.err
++       }; then
+   # Broken: success on invalid input.
+ continue
+ else
+@@ -7774,7 +7420,7 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac
+ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+ if test -n "$ac_tool_prefix"; then
+-  for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn
++  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+   do
+     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+ set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+@@ -7792,7 +7438,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -7818,7 +7464,7 @@ fi
+ fi
+ if test -z "$F77"; then
+   ac_ct_F77=$F77
+-  for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn
++  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+ do
+   # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+@@ -7836,7 +7482,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_F77="$ac_prog"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -7943,27 +7589,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_f77_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   ac_compiler_gnu=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -8006,27 +7635,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest.$ac_objext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_f77_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then
+   ac_cv_prog_f77_g=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -8153,24 +7765,27 @@ else
+     fi
+     ;;
+   *)
+-    # If test is not a shell built-in, we'll probably end up computing a
+-    # maximum length that is only half of the actual maximum length, but
+-    # we can't tell.
+-    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+-    while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
++    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
++    if test -n "$lt_cv_sys_max_cmd_len"; then
++      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
++      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
++    else
++      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
++      while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+              = "XX$teststring") >/dev/null 2>&1 &&
+-          new_result=`expr "X$teststring" : ".*" 2>&1` &&
+-          lt_cv_sys_max_cmd_len=$new_result &&
+-          test $i != 17 # 1/2 MB should be enough
+-    do
+-      i=`expr $i + 1`
+-      teststring=$teststring$teststring
+-    done
+-    teststring=
+-    # Add a significant safety factor because C++ compilers can tack on massive
+-    # amounts of additional arguments before passing them to the linker.
+-    # It appears as though 1/2 is a usable value.
+-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
++            new_result=`expr "X$teststring" : ".*" 2>&1` &&
++            lt_cv_sys_max_cmd_len=$new_result &&
++            test $i != 17 # 1/2 MB should be enough
++      do
++        i=`expr $i + 1`
++        teststring=$teststring$teststring
++      done
++      teststring=
++      # Add a significant safety factor because C++ compilers can tack on massive
++      # amounts of additional arguments before passing them to the linker.
++      # It appears as though 1/2 is a usable value.
++      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
++    fi
+     ;;
+   esac
+@@ -8187,6 +7802,7 @@ fi
++
+ # Check for command to grab the raw symbol name followed by C symbol from nm.
+ { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+ echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
+@@ -8224,7 +7840,7 @@ hpux*) # Its linker distinguishes data f
+   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+   ;;
+-linux*)
++linux* | k*bsd*-gnu)
+   if test "$host_cpu" = ia64; then
+     symcode='[ABCDGIRSTW]'
+     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+@@ -8481,7 +8097,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_AR="${ac_tool_prefix}ar"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -8521,7 +8137,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_AR="ar"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -8577,7 +8193,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -8617,7 +8233,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_RANLIB="ranlib"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -8673,7 +8289,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -8713,7 +8329,7 @@ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_STRIP="strip"
+     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+@@ -8775,7 +8391,7 @@ test -z "$STRIP" && STRIP=:
+ test -z "$ac_objext" && ac_objext=o
+ # Determine commands to create old-style static archives.
+-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
++old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+ old_postinstall_cmds='chmod 644 $oldlib'
+ old_postuninstall_cmds=
+@@ -8975,10 +8591,10 @@ objext=o
+ objext=$objext
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;\n"
++lt_simple_compile_test_code="int some_variable = 0;"
+ # Code to be used in simple link tests
+-lt_simple_link_test_code='int main(){return(0);}\n'
++lt_simple_link_test_code='int main(){return(0);}'
+ # If no C compiler was specified, use CC.
+@@ -8993,13 +8609,13 @@ compiler=$CC
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
++echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+ eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+ _lt_compiler_boilerplate=`cat conftest.err`
+ $rm conftest*
+ ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_link_test_code" >conftest.$ac_ext
++echo "$lt_simple_link_test_code" >conftest.$ac_ext
+ eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+ _lt_linker_boilerplate=`cat conftest.err`
+ $rm conftest*
+@@ -9019,7 +8635,7 @@ if test "${lt_cv_prog_compiler_rtti_exce
+ else
+   lt_cv_prog_compiler_rtti_exceptions=no
+   ac_outfile=conftest.$ac_objext
+-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="-fno-rtti -fno-exceptions"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+@@ -9030,11 +8646,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:9033: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:8649: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+-   echo "$as_me:9037: \$? = $ac_status" >&5
++   echo "$as_me:8653: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+@@ -9085,13 +8701,15 @@ echo $ECHO_N "checking for $compiler opt
+       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+       ;;
+-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
+-    mingw* | pw32* | os2*)
++    mingw* | cygwin* | pw32* | os2*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
++      # Although the cygwin gcc ignores -fPIC, still need this for old-style
++      # (--disable-auto-import) libraries
+       lt_prog_compiler_pic='-DDLL_EXPORT'
+       ;;
+@@ -9101,7 +8719,7 @@ echo $ECHO_N "checking for $compiler opt
+       lt_prog_compiler_pic='-fno-common'
+       ;;
+-    interix3*)
++    interix[3-9]*)
+       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+@@ -9159,7 +8777,7 @@ echo $ECHO_N "checking for $compiler opt
+        esac
+        ;;
+-    mingw* | pw32* | os2*)
++    mingw* | cygwin* | pw32* | os2*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       lt_prog_compiler_pic='-DDLL_EXPORT'
+@@ -9192,7 +8810,7 @@ echo $ECHO_N "checking for $compiler opt
+       lt_prog_compiler_static='-Bstatic'
+       ;;
+-    linux*)
++    linux* | k*bsd*-gnu)
+       case $cc_basename in
+       icc* | ecc*)
+       lt_prog_compiler_wl='-Wl,'
+@@ -9211,6 +8829,22 @@ echo $ECHO_N "checking for $compiler opt
+         # All Alpha code is PIC.
+         lt_prog_compiler_static='-non_shared'
+         ;;
++      *)
++        case `$CC -V 2>&1 | sed 5q` in
++      *Sun\ C*)
++        # Sun C 5.9
++        lt_prog_compiler_pic='-KPIC'
++        lt_prog_compiler_static='-Bstatic'
++        lt_prog_compiler_wl='-Wl,'
++        ;;
++      *Sun\ F*)
++        # Sun Fortran 8.3 passes all unrecognized flags to the linker
++        lt_prog_compiler_pic='-KPIC'
++        lt_prog_compiler_static='-Bstatic'
++        lt_prog_compiler_wl=''
++        ;;
++      esac
++      ;;
+       esac
+       ;;
+@@ -9220,6 +8854,10 @@ echo $ECHO_N "checking for $compiler opt
+       lt_prog_compiler_static='-non_shared'
+       ;;
++    rdos*)
++      lt_prog_compiler_static='-non_shared'
++      ;;
++
+     solaris*)
+       lt_prog_compiler_pic='-KPIC'
+       lt_prog_compiler_static='-Bstatic'
+@@ -9287,7 +8925,7 @@ if test "${lt_prog_compiler_pic_works+se
+ else
+   lt_prog_compiler_pic_works=no
+   ac_outfile=conftest.$ac_objext
+-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+@@ -9298,11 +8936,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:9301: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:8939: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+-   echo "$as_me:9305: \$? = $ac_status" >&5
++   echo "$as_me:8943: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+@@ -9351,7 +8989,7 @@ else
+   lt_prog_compiler_static_works=no
+    save_LDFLAGS="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
++   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+      # The linker can only warn and ignore the option if not recognized
+      # So say no if there are warnings
+@@ -9391,7 +9029,7 @@ else
+    mkdir conftest
+    cd conftest
+    mkdir out
+-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="-o out/conftest2.$ac_objext"
+    # Insert the option either (1) after the last *FLAGS variable, or
+@@ -9402,11 +9040,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:9405: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:9043: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+-   echo "$as_me:9409: \$? = $ac_status" >&5
++   echo "$as_me:9047: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s out/conftest2.$ac_objext
+    then
+      # The compiler can only warn and ignore the option if not recognized
+@@ -9598,7 +9236,7 @@ EOF
+       allow_undefined_flag=unsupported
+       always_export_symbols=no
+       enable_shared_with_static_runtimes=yes
+-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
++      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+@@ -9616,7 +9254,7 @@ EOF
+       fi
+       ;;
+-    interix3*)
++    interix[3-9]*)
+       hardcode_direct=no
+       hardcode_shlibpath_var=no
+       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+@@ -9631,7 +9269,7 @@ EOF
+       archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       ;;
+-    linux*)
++    gnu* | linux* | k*bsd*-gnu)
+       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       tmp_addflag=
+       case $cc_basename,$host_cpu in
+@@ -9649,13 +9287,22 @@ EOF
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       esac
+-      archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++      case `$CC -V 2>&1 | sed 5q` in
++      *Sun\ C*)                       # Sun C 5.9
++        whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
++        tmp_sharedflag='-G' ;;
++      *Sun\ F*)                       # Sun Fortran 8.3
++        tmp_sharedflag='-G' ;;
++      *)
++        tmp_sharedflag='-shared' ;;
++      esac
++      archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       if test $supports_anon_versioning = yes; then
+         archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+   $echo "local: *; };" >> $output_objdir/$libname.ver~
+-        $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
++        $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+       fi
+       link_all_deplibs=no
+       else
+@@ -9663,7 +9310,7 @@ EOF
+       fi
+       ;;
+-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
++    netbsd* | netbsdelf*-gnu)
+       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+@@ -9815,7 +9462,7 @@ _LT_EOF
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
+-        hardcode_direct=yes
++        :
+         else
+         # We have old collect2
+         hardcode_direct=unsupported
+@@ -9883,33 +9530,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+-}'`
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
++
++lt_aix_libpath_sed='
++    /Import File Strings/,/^$/ {
++      /^0/ {
++          s/^0  *\(.*\)$/\1/
++          p
++      }
++    }'
++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+-}'`; fi
++if test -z "$aix_libpath"; then
++  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++fi
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+@@ -9917,7 +9555,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9958,33 +9596,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+-}'`
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
++
++lt_aix_libpath_sed='
++    /Import File Strings/,/^$/ {
++      /^0/ {
++          s/^0  *\(.*\)$/\1/
++          p
++      }
++    }'
++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+-}'`; fi
++if test -z "$aix_libpath"; then
++  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++fi
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+@@ -9992,7 +9621,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10038,7 +9667,7 @@ if test -z "$aix_libpath"; then aix_libp
+       # The linker will automatically build a .lib file if we build a DLL.
+       old_archive_From_new_cmds='true'
+       # FIXME: Should let the user specify the lib program.
+-      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
++      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+       fix_srcfile_path='`cygpath -w "$srcfile"`'
+       enable_shared_with_static_runtimes=yes
+       ;;
+@@ -10080,10 +9709,10 @@ if test -z "$aix_libpath"; then aix_libp
+       case $cc_basename in
+         xlc*)
+          output_verbose_link_cmd='echo'
+-         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
++         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+-         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
++         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           ;;
+        *)
+@@ -10130,15 +9759,6 @@ if test -z "$aix_libpath"; then aix_libp
+       hardcode_shlibpath_var=no
+       ;;
+-    # GNU/kFreeBSD uses gcc -shared to do shared libraries.
+-    kfreebsd*-gnu)
+-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+-      hardcode_libdir_flag_spec='-R$libdir'
+-      hardcode_direct=yes
+-      hardcode_shlibpath_var=no
+-      link_all_deplibs=no
+-      ;;
+-
+     hpux9*)
+       if test "$GCC" = yes; then
+       archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+@@ -10234,7 +9854,7 @@ if test -z "$aix_libpath"; then aix_libp
+       link_all_deplibs=yes
+       ;;
+-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
++    netbsd* | netbsdelf*-gnu)
+       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+       else
+@@ -10254,24 +9874,28 @@ if test -z "$aix_libpath"; then aix_libp
+       ;;
+     openbsd*)
+-      hardcode_direct=yes
+-      hardcode_shlibpath_var=no
+-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+-      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+-      archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+-      export_dynamic_flag_spec='${wl}-E'
++      if test -f /usr/libexec/ld.so; then
++      hardcode_direct=yes
++      hardcode_shlibpath_var=no
++      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++        archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
++        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++        export_dynamic_flag_spec='${wl}-E'
++      else
++        case $host_os in
++         openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
++           archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
++           hardcode_libdir_flag_spec='-R$libdir'
++           ;;
++         *)
++           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
++           hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
++           ;;
++        esac
++        fi
+       else
+-       case $host_os in
+-       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+-         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+-         hardcode_libdir_flag_spec='-R$libdir'
+-         ;;
+-       *)
+-         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+-         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+-         ;;
+-       esac
++      ld_shlibs=no
+       fi
+       ;;
+@@ -10330,17 +9954,16 @@ if test -z "$aix_libpath"; then aix_libp
+       case $host_os in
+       solaris2.[0-5] | solaris2.[0-5].*) ;;
+       *)
+-      # The compiler driver will combine linker options so we
+-      # cannot just pass the convience library names through
+-      # without $wl, iff we do not link with $LD.
+-      # Luckily, gcc supports the same syntax we need for Sun Studio.
++      # The compiler driver will combine and reorder linker options,
++      # but understands `-z linker_flag'.  GCC discards it without `$wl',
++      # but is careful enough not to reorder.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+-      case $wlarc in
+-      '')
+-        whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+-      *)
+-        whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+-      esac ;;
++      if test "$GCC" = yes; then
++        whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
++      else
++        whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
++      fi
++      ;;
+       esac
+       link_all_deplibs=yes
+       ;;
+@@ -10397,7 +10020,7 @@ if test -z "$aix_libpath"; then aix_libp
+       fi
+       ;;
+-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
++    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+       no_undefined_flag='${wl}-z,text'
+       archive_cmds_need_lc=no
+       hardcode_shlibpath_var=no
+@@ -10474,7 +10097,7 @@ x|xyes)
+       { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+       $rm conftest*
+-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+       if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+@@ -10532,17 +10155,55 @@ shlibpath_overrides_runpath=unknown
+ version_type=none
+ dynamic_linker="$host_os ld.so"
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
++
+ if test "$GCC" = yes; then
+-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
++  case $host_os in
++    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
++    *) lt_awk_arg="/^libraries:/" ;;
++  esac
++  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
++  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
+     # if the path contains ";" then we assume it to be the separator
+     # otherwise default to the standard path separator (i.e. ":") - it is
+     # assumed that no part of a normal pathname contains ";" but that should
+     # okay in the real world where ";" in dirpaths is itself problematic.
+-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
++    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+   else
+-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
++    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+   fi
++  # Ok, now we have the path, separated by spaces, we can step through it
++  # and add multilib dir if necessary.
++  lt_tmp_lt_search_path_spec=
++  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
++  for lt_sys_path in $lt_search_path_spec; do
++    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
++      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
++    else
++      test -d "$lt_sys_path" && \
++      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
++    fi
++  done
++  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
++BEGIN {RS=" "; FS="/|\n";} {
++  lt_foo="";
++  lt_count=0;
++  for (lt_i = NF; lt_i > 0; lt_i--) {
++    if ($lt_i != "" && $lt_i != ".") {
++      if ($lt_i == "..") {
++        lt_count++;
++      } else {
++        if (lt_count == 0) {
++          lt_foo="/" $lt_i lt_foo;
++        } else {
++          lt_count--;
++        }
++      }
++    }
++  }
++  if (lt_foo != "") { lt_freq[lt_foo]++; }
++  if (lt_freq[lt_foo] == 1) { print lt_foo; }
++}'`
++  sys_lib_search_path_spec=`echo $lt_search_path_spec`
+ else
+   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ fi
+@@ -10702,12 +10363,8 @@ darwin* | rhapsody*)
+   shlibpath_overrides_runpath=yes
+   shlibpath_var=DYLD_LIBRARY_PATH
+   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+-  if test "$GCC" = yes; then
+-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+-  else
+-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+-  fi
++
++  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+   ;;
+@@ -10724,18 +10381,6 @@ freebsd1*)
+   dynamic_linker=no
+   ;;
+-kfreebsd*-gnu)
+-  version_type=linux
+-  need_lib_prefix=no
+-  need_version=no
+-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+-  soname_spec='${libname}${release}${shared_ext}$major'
+-  shlibpath_var=LD_LIBRARY_PATH
+-  shlibpath_overrides_runpath=no
+-  hardcode_into_libs=yes
+-  dynamic_linker='GNU ld.so'
+-  ;;
+-
+ freebsd* | dragonfly*)
+   # DragonFly does not have aout.  When/if they implement a new
+   # versioning mechanism, adjust this.
+@@ -10773,7 +10418,7 @@ freebsd* | dragonfly*)
+     shlibpath_overrides_runpath=no
+     hardcode_into_libs=yes
+     ;;
+-  freebsd*) # from 4.6 on
++  *) # from 4.6 on, and DragonFly
+     shlibpath_overrides_runpath=yes
+     hardcode_into_libs=yes
+     ;;
+@@ -10836,7 +10481,7 @@ hpux9* | hpux10* | hpux11*)
+   postinstall_cmds='chmod 555 $lib'
+   ;;
+-interix3*)
++interix[3-9]*)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+@@ -10891,7 +10536,7 @@ linux*oldld* | linux*aout* | linux*coff*
+   ;;
+ # This must be Linux ELF.
+-linux*)
++linux* | k*bsd*-gnu)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+@@ -10907,7 +10552,7 @@ linux*)
+   # Append ld.so.conf contents to the search path
+   if test -f /etc/ld.so.conf; then
+-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
++    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[    ]*hwcap[        ]/d;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+   fi
+@@ -10932,18 +10577,6 @@ netbsdelf*-gnu)
+   dynamic_linker='NetBSD ld.elf_so'
+   ;;
+-knetbsd*-gnu)
+-  version_type=linux
+-  need_lib_prefix=no
+-  need_version=no
+-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+-  soname_spec='${libname}${release}${shared_ext}$major'
+-  shlibpath_var=LD_LIBRARY_PATH
+-  shlibpath_overrides_runpath=no
+-  hardcode_into_libs=yes
+-  dynamic_linker='GNU ld.so'
+-  ;;
+-
+ netbsd*)
+   version_type=sunos
+   need_lib_prefix=no
+@@ -11025,6 +10658,10 @@ osf3* | osf4* | osf5*)
+   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+   ;;
++rdos*)
++  dynamic_linker=no
++  ;;
++
+ solaris*)
+   version_type=linux
+   need_lib_prefix=no
+@@ -11178,6 +10815,7 @@ else
+    darwin*)
+        if test -n "$STRIP" ; then
+          striplib="$STRIP -x"
++         old_striplib="$STRIP -S"
+          { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+        else
+@@ -11261,27 +10899,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_dl_dlopen=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -11290,7 +10912,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_lib_dl_dlopen=no
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+@@ -11372,27 +10994,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
+   ac_cv_func_shl_load=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -11401,7 +11007,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_func_shl_load=no
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+@@ -11451,27 +11057,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_dld_shl_load=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -11480,7 +11070,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_lib_dld_shl_load=no
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+@@ -11552,27 +11142,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
+   ac_cv_func_dlopen=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -11581,7 +11155,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_func_dlopen=no
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ fi
+ { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+@@ -11631,27 +11205,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_dl_dlopen=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -11660,7 +11218,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_lib_dl_dlopen=no
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+@@ -11711,27 +11269,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_svld_dlopen=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -11740,7 +11282,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_lib_svld_dlopen=no
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+@@ -11791,27 +11333,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++  (exit $ac_status); } && {
++       test -z "$ac_c_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
+   ac_cv_lib_dld_dld_link=yes
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -11820,7 +11346,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_lib_dld_dld_link=no
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+@@ -11876,7 +11402,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<EOF
+-#line 11879 "configure"
++#line 11405 "configure"
+ #include "confdefs.h"
+ #if HAVE_DLFCN_H
+@@ -11976,7 +11502,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<EOF
+-#line 11979 "configure"
++#line 11505 "configure"
+ #include "confdefs.h"
+ #if HAVE_DLFCN_H
+@@ -12174,6 +11700,7 @@ if test -f "$ltmain"; then
+     module_cmds \
+     module_expsym_cmds \
+     lt_cv_prog_compiler_c_o \
++    fix_srcfile_path \
+     exclude_expsyms \
+     include_expsyms; do
+@@ -12218,7 +11745,7 @@ echo "$as_me: creating $ofile" >&6;}
+ # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+ #
+-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ # Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Libtool:
+@@ -12542,7 +12069,7 @@ sys_lib_search_path_spec=$lt_sys_lib_sea
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+ # Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path="$fix_srcfile_path"
++fix_srcfile_path=$lt_fix_srcfile_path
+ # Set to yes if exported symbols are required.
+ always_export_symbols=$always_export_symbols
+@@ -12711,10 +12238,10 @@ objext=o
+ objext_CXX=$objext
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;\n"
++lt_simple_compile_test_code="int some_variable = 0;"
+ # Code to be used in simple link tests
+-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
++lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+@@ -12730,13 +12257,13 @@ compiler=$CC
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
++echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+ eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+ _lt_compiler_boilerplate=`cat conftest.err`
+ $rm conftest*
+ ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_link_test_code" >conftest.$ac_ext
++echo "$lt_simple_link_test_code" >conftest.$ac_ext
+ eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+ _lt_linker_boilerplate=`cat conftest.err`
+ $rm conftest*
+@@ -12995,7 +12522,7 @@ case $host_os in
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+       then
+         # We have reworked collect2
+-        hardcode_direct_CXX=yes
++        :
+       else
+         # We have old collect2
+         hardcode_direct_CXX=unsupported
+@@ -13063,33 +12590,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+-}'`
++  (exit $ac_status); } && {
++       test -z "$ac_cxx_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
++
++lt_aix_libpath_sed='
++    /Import File Strings/,/^$/ {
++      /^0/ {
++          s/^0  *\(.*\)$/\1/
++          p
++      }
++    }'
++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+-}'`; fi
++if test -z "$aix_libpath"; then
++  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++fi
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+@@ -13097,7 +12615,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13139,33 +12657,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+-}'`
++  (exit $ac_status); } && {
++       test -z "$ac_cxx_werror_flag" ||
++       test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
++
++lt_aix_libpath_sed='
++    /Import File Strings/,/^$/ {
++      /^0/ {
++          s/^0  *\(.*\)$/\1/
++          p
++      }
++    }'
++aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+-}'`; fi
++if test -z "$aix_libpath"; then
++  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++fi
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+@@ -13173,7 +12682,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+-rm -f core conftest.err conftest.$ac_objext \
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
+ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13284,10 +12793,10 @@ if test -z "$aix_libpath"; then aix_libp
+       case $cc_basename in
+         xlc*)
+          output_verbose_link_cmd='echo'
+-          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
++          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+           module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+-          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
++          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+           ;;
+        *)
+@@ -13321,7 +12830,7 @@ if test -z "$aix_libpath"; then aix_libp
+   freebsd-elf*)
+     archive_cmds_need_lc_CXX=no
+     ;;
+-  freebsd* | kfreebsd*-gnu | dragonfly*)
++  freebsd* | dragonfly*)
+     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+     # conventions
+     ld_shlibs_CXX=yes
+@@ -13370,9 +12879,7 @@ if test -z "$aix_libpath"; then aix_libp
+       hardcode_libdir_separator_CXX=:
+       case $host_cpu in
+-      hppa*64*|ia64*)
+-      hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
+-        ;;
++      hppa*64*|ia64*) ;;
+       *)
+       export_dynamic_flag_spec_CXX='${wl}-E'
+         ;;
+@@ -13440,7 +12947,7 @@ if test -z "$aix_libpath"; then aix_libp
+       ;;
+     esac
+     ;;
+-  interix3*)
++  interix[3-9]*)
+     hardcode_direct_CXX=no
+     hardcode_shlibpath_var_CXX=no
+     hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+@@ -13480,7 +12987,7 @@ if test -z "$aix_libpath"; then aix_libp
+     hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+     hardcode_libdir_separator_CXX=:
+     ;;
+-  linux*)
++  linux* | k*bsd*-gnu)
+     case $cc_basename in
+       KCC*)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+@@ -13560,6 +13067,29 @@ if test -z "$aix_libpath"; then aix_libp
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
++      *)
++      case `$CC -V 2>&1 | sed 5q` in
++      *Sun\ C*)
++        # Sun C++ 5.9
++        no_undefined_flag_CXX=' -zdefs'
++        archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
++        archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
++        hardcode_libdir_flag_spec_CXX='-R$libdir'
++        whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
++
++        # Not sure whether something based on
++        # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
++        # would be better.
++        output_verbose_link_cmd='echo'
++
++        # Archives containing C++ object files must be created using
++        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
++        # necessary to make sure instantiated templates are included
++        # in the archive.
++        old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
++        ;;
++      esac
++      ;;
+     esac
+     ;;
+   lynxos*)
+@@ -13582,7 +13112,7 @@ if test -z "$aix_libpath"; then aix_libp
+       ;;
+     esac
+     ;;
+-  netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
++  netbsd* | netbsdelf*-gnu)
+     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+       wlarc=
+@@ -13598,16 +13128,20 @@ if test -z "$aix_libpath"; then aix_libp
+     ld_shlibs_CXX=no
+     ;;
+   openbsd*)
+-    hardcode_direct_CXX=yes
+-    hardcode_shlibpath_var_CXX=no
+-    archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+-    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+-    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+-      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+-      export_dynamic_flag_spec_CXX='${wl}-E'
+-      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++    if test -f /usr/libexec/ld.so; then
++      hardcode_direct_CXX=yes
++      hardcode_shlibpath_var_CXX=no
++      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
++      hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
++      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
++      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
++      export_dynamic_flag_spec_CXX='${wl}-E'
++      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++      fi
++      output_verbose_link_cmd='echo'
++    else
++      ld_shlibs_CXX=no
+     fi
+-    output_verbose_link_cmd='echo'
+     ;;
+   osf3*)
+     case $cc_basename in
+@@ -13769,15 +13303,10 @@ if test -z "$aix_libpath"; then aix_libp
+       case $host_os in
+         solaris2.[0-5] | solaris2.[0-5].*) ;;
+         *)
+-          # The C++ compiler is used as linker so we must use $wl
+-          # flag to pass the commands to the underlying system
+-          # linker. We must also pass each convience library through
+-          # to the system linker between allextract/defaultextract.
+-          # The C++ compiler will combine linker options so we
+-          # cannot just pass the convience library names through
+-          # without $wl.
++          # The compiler driver will combine and reorder linker options,
++          # but understands `-z linker_flag'.
+           # Supported since Solaris 2.6 (maybe 2.5.1?)
+-          whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
++          whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+           ;;
+       esac
+       link_all_deplibs_CXX=yes
+@@ -13824,6 +13353,12 @@ if test -z "$aix_libpath"; then aix_libp
+         fi
+         hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
++        case $host_os in
++        solaris2.[0-5] | solaris2.[0-5].*) ;;
++        *)
++          whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
++          ;;
++        esac
+       fi
+       ;;
+     esac
+@@ -14015,7 +13550,7 @@ $rm -f confest.$objext
+ # PORTME: override above test on systems where it is broken
+ case $host_os in
+-interix3*)
++interix[3-9]*)
+   # Interix 3.5 installs completely hosed .la files for C++, so rather than
+   # hack all around it, let's just trust "g++" to DTRT.
+   predep_objects_CXX=
+@@ -14023,13 +13558,46 @@ interix3*)
+   postdeps_CXX=
+   ;;
++linux*)
++  case `$CC -V 2>&1 | sed 5q` in
++  *Sun\ C*)
++    # Sun C++ 5.9
++    #
++    # The more standards-conforming stlport4 library is
++    # incompatible with the Cstd library. Avoid specifying
++    # it if it's in CXXFLAGS. Ignore libCrun as
++    # -library=stlport4 depends on it.
++    case " $CXX $CXXFLAGS " in
++    *" -library=stlport4 "*)
++      solaris_use_stlport4=yes
++      ;;
++    esac
++    if test "$solaris_use_stlport4" != yes; then
++      postdeps_CXX='-library=Cstd -library=Crun'
++    fi
++    ;;
++  esac
++  ;;
++
+ solaris*)
+   case $cc_basename in
+   CC*)
++    # The more standards-conforming stlport4 library is
++    # incompatible with the Cstd library. Avoid specifying
++    # it if it's in CXXFLAGS. Ignore libCrun as
++    # -library=stlport4 depends on it.
++    case " $CXX $CXXFLAGS " in
++    *" -library=stlport4 "*)
++      solaris_use_stlport4=yes
++      ;;
++    esac
++
+     # Adding this requires a known-good setup of shared libraries for
+     # Sun compiler versions before 5.6, else PIC objects from an old
+     # archive will be linked into the output, leading to subtle bugs.
+-    postdeps_CXX='-lCstd -lCrun'
++    if test "$solaris_use_stlport4" != yes; then
++      postdeps_CXX='-library=Cstd -library=Crun'
++    fi
+     ;;
+   esac
+   ;;
+@@ -14066,12 +13634,14 @@ echo $ECHO_N "checking for $compiler opt
+       # like `-m68040'.
+       lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+       ;;
+-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+       # PIC is the default for these OSes.
+       ;;
+-    mingw* | os2* | pw32*)
++    mingw* | cygwin* | os2* | pw32*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
++      # Although the cygwin gcc ignores -fPIC, still need this for old-style
++      # (--disable-auto-import) libraries
+       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+       ;;
+     darwin* | rhapsody*)
+@@ -14083,7 +13653,7 @@ echo $ECHO_N "checking for $compiler opt
+       # DJGPP does not support shared libraries at all
+       lt_prog_compiler_pic_CXX=
+       ;;
+-    interix3*)
++    interix[3-9]*)
+       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+@@ -14149,7 +13719,7 @@ echo $ECHO_N "checking for $compiler opt
+           ;;
+       esac
+       ;;
+-      freebsd* | kfreebsd*-gnu | dragonfly*)
++      freebsd* | dragonfly*)
+       # FreeBSD uses GNU C++
+       ;;
+       hpux9* | hpux10* | hpux11*)
+@@ -14192,7 +13762,7 @@ echo $ECHO_N "checking for $compiler opt
+           ;;
+       esac
+       ;;
+-      linux*)
++      linux* | k*bsd*-gnu)
+       case $cc_basename in
+         KCC*)
+           # KAI C++ Compiler
+@@ -14219,6 +13789,14 @@ echo $ECHO_N "checking for $compiler opt
+           lt_prog_compiler_static_CXX='-non_shared'
+           ;;
+         *)
++          case `$CC -V 2>&1 | sed 5q` in
++          *Sun\ C*)
++            # Sun C++ 5.9
++            lt_prog_compiler_pic_CXX='-KPIC'
++            lt_prog_compiler_static_CXX='-Bstatic'
++            lt_prog_compiler_wl_CXX='-Qoption ld '
++            ;;
++          esac
+           ;;
+       esac
+       ;;
+@@ -14235,7 +13813,7 @@ echo $ECHO_N "checking for $compiler opt
+           ;;
+       esac
+       ;;
+-      netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
++      netbsd* | netbsdelf*-gnu)
+       ;;
+       osf3* | osf4* | osf5*)
+       case $cc_basename in
+@@ -14333,7 +13911,7 @@ if test "${lt_prog_compiler_pic_works_CX
+ else
+   lt_prog_compiler_pic_works_CXX=no
+   ac_outfile=conftest.$ac_objext
+-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+    # Insert the option either (1) after the last *FLAGS variable, or
+    # (2) before a word containing "conftest.", or (3) at the end.
+@@ -14344,11 +13922,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:14347: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:13925: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+-   echo "$as_me:14351: \$? = $ac_status" >&5
++   echo "$as_me:13929: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+@@ -14397,7 +13975,7 @@ else
+   lt_prog_compiler_static_works_CXX=no
+    save_LDFLAGS="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
++   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+      # The linker can only warn and ignore the option if not recognized
+      # So say no if there are warnings
+@@ -14437,7 +14015,7 @@ else
+    mkdir conftest
+    cd conftest
+    mkdir out
+-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+    lt_compiler_flag="-o out/conftest2.$ac_objext"
+    # Insert the option either (1) after the last *FLAGS variable, or
+@@ -14448,11 +14026,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:14451: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:14029: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+-   echo "$as_me:14455: \$? = $ac_status" >&5
++   echo "$as_me:14033: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s out/conftest2.$ac_objext
+    then
+      # The compiler can only warn and ignore the option if not recognized
+@@ -14518,12 +14096,9 @@ echo $ECHO_N "checking whether the $comp
+     export_symbols_cmds_CXX="$ltdll_cmds"
+   ;;
+   cygwin* | mingw*)
+-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
++    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+   ;;
+-  kfreebsd*-gnu)
+-    link_all_deplibs_CXX=no
+-  ;;
+-  linux*)
++  linux* | k*bsd*-gnu)
+     link_all_deplibs_CXX=no
+   ;;
+   *)
+@@ -14555,7 +14130,7 @@ x|xyes)
+       { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+       $rm conftest*
+-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+       if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+@@ -14613,20 +14188,7 @@ shlibpath_overrides_runpath=unknown
+ version_type=none
+ dynamic_linker="$host_os ld.so"
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
+-if test "$GCC" = yes; then
+-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+-    # if the path contains ";" then we assume it to be the separator
+-    # otherwise default to the standard path separator (i.e. ":") - it is
+-    # assumed that no part of a normal pathname contains ";" but that should
+-    # okay in the real world where ";" in dirpaths is itself problematic.
+-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+-  else
+-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+-  fi
+-else
+-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+-fi
++
+ need_lib_prefix=unknown
+ hardcode_into_libs=no
+@@ -14783,12 +14345,7 @@ darwin* | rhapsody*)
+   shlibpath_overrides_runpath=yes
+   shlibpath_var=DYLD_LIBRARY_PATH
+   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+-  if test "$GCC" = yes; then
+-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+-  else
+-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+-  fi
++
+   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+   ;;
+@@ -14805,18 +14362,6 @@ freebsd1*)
+   dynamic_linker=no
+   ;;
+-kfreebsd*-gnu)
+-  version_type=linux
+-  need_lib_prefix=no
+-  need_version=no
+-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+-  soname_spec='${libname}${release}${shared_ext}$major'
+-  shlibpath_var=LD_LIBRARY_PATH
+-  shlibpath_overrides_runpath=no
+-  hardcode_into_libs=yes
+-  dynamic_linker='GNU ld.so'
+-  ;;
+-
+ freebsd* | dragonfly*)
+   # DragonFly does not have aout.  When/if they implement a new
+   # versioning mechanism, adjust this.
+@@ -14854,7 +14399,7 @@ freebsd* | dragonfly*)
+     shlibpath_overrides_runpath=no
+     hardcode_into_libs=yes
+     ;;
+-  freebsd*) # from 4.6 on
++  *) # from 4.6 on, and DragonFly
+     shlibpath_overrides_runpath=yes
+     hardcode_into_libs=yes
+     ;;
+@@ -14917,7 +14462,7 @@ hpux9* | hpux10* | hpux11*)
+   postinstall_cmds='chmod 555 $lib'
+   ;;
+-interix3*)
++interix[3-9]*)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+@@ -14972,7 +14517,7 @@ linux*oldld* | linux*aout* | linux*coff*
+   ;;
+ # This must be Linux ELF.
+-linux*)
++linux* | k*bsd*-gnu)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+@@ -14988,7 +14533,7 @@ linux*)
+   # Append ld.so.conf contents to the search path
+   if test -f /etc/ld.so.conf; then
+-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
++    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[    ]*hwcap[        ]/d;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+   fi
+@@ -15013,18 +14558,6 @@ netbsdelf*-gnu)
+   dynamic_linker='NetBSD ld.elf_so'
+   ;;
+-knetbsd*-gnu)
+-  version_type=linux
+-  need_lib_prefix=no
+-  need_version=no
+-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+-  soname_spec='${libname}${release}${shared_ext}$major'
+-  shlibpath_var=LD_LIBRARY_PATH
+-  shlibpath_overrides_runpath=no
+-  hardcode_into_libs=yes
+-  dynamic_linker='GNU ld.so'
+-  ;;
+-
+ netbsd*)
+   version_type=sunos
+   need_lib_prefix=no
+@@ -15106,6 +14639,10 @@ osf3* | osf4* | osf5*)
+   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+   ;;
++rdos*)
++  dynamic_linker=no
++  ;;
++
+ solaris*)
+   version_type=linux
+   need_lib_prefix=no
+@@ -15300,6 +14837,7 @@ if test -f "$ltmain"; then
+     module_cmds_CXX \
+     module_expsym_cmds_CXX \
+     lt_cv_prog_compiler_c_o_CXX \
++    fix_srcfile_path_CXX \
+     exclude_expsyms_CXX \
+     include_expsyms_CXX; do
+@@ -15620,7 +15158,7 @@ sys_lib_search_path_spec=$lt_sys_lib_sea
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+ # Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path="$fix_srcfile_path_CXX"
++fix_srcfile_path=$lt_fix_srcfile_path
+ # Set to yes if exported symbols are required.
+ always_export_symbols=$always_export_symbols_CXX
+@@ -15711,10 +15249,17 @@ objext=o
+ objext_F77=$objext
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
++lt_simple_compile_test_code="\
++      subroutine t
++      return
++      end
++"
+ # Code to be used in simple link tests
+-lt_simple_link_test_code="      program t\n      end\n"
++lt_simple_link_test_code="\
++      program t
++      end
++"
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+&