[PATCH] ltdl: set libltdl_cv_need_uscore to yes on OS/2

2014-11-21 Thread KO Myung-Hun
On OS/2, dlopen() does not support a program. So libltdl_cv_need_uscore
is set to unknown, but dlsym() requires an underscore prefix. So set
libltdl_cv_need_uscore to yes on OS/2 if lt_cv_sys_symbol_underscore is
yes and libltdl_cv_need_uscore is unknown.

* m4/ltdl.m4 (LT_FUNC_DLSYM_USCORE): set libltdl_cv_need_uscore to yes
on os2*.
---
 m4/ltdl.m4 | 5 +
 1 file changed, 5 insertions(+)

diff --git a/m4/ltdl.m4 b/m4/ltdl.m4
index eeb37ac..ce7b2b7 100644
--- a/m4/ltdl.m4
+++ b/m4/ltdl.m4
@@ -804,6 +804,11 @@ if test yes = "$lt_cv_sys_symbol_underscore"; then
[libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
[],  [libltdl_cv_need_uscore=cross])
  LIBS=$save_LIBS
+ if test x"$libltdl_cv_need_uscore" = xunknown; then
+   case $host_os in
+ os2*) libltdl_cv_need_uscore=yes ;;
+   esac
+ fi
])
   fi
 fi
-- 
1.8.5.2




Re: [PATCH] Do not test undef symbols across shlibs on AIX.

2014-11-21 Thread Gary V. Vaughan
Hi Michael,

On Nov 21, 2014, at 12:50 PM, Michael Haubenwallner 
 wrote:
> 
> On AIX, undefined symbols across shared libraries can work only when
> the main program explicitly exports those symbols. As this is bad
> practice anyway and -no-undefined should be preferred, we skip this.
> * tests/template.at: Skip test with undef syms across libraries on AIX.
> ---
> tests/template.at | 6 +-
> 1 file changed, 5 insertions(+), 1 deletion(-)

Also, applied and pushed.  Thanks again!
-- 
Gary V. Vaughan (gary AT gnu DOT org)


Re: [PATCH] question mark is extended regex for non-GNU grep

2014-11-21 Thread Gary V. Vaughan
On Nov 21, 2014, at 2:53 PM, Michael Haubenwallner 
 wrote:
> 
> On 11/21/2014 03:06 PM, Eric Blake wrote:
>> On 11/21/2014 05:11 AM, Michael Haubenwallner wrote:
>>> Accepting \? for at-most-once in basic regex is a GNU grep extension,
>>> not accepted by AIX grep for example.
>>> * tests/libtool.at: Need EGREP for ? operator, and ? without \ then.
>>> With EGREP, need one more \ for $.
>> 
>> Or, stick with GREP but use \{0,1\} instead of \?.
> 
> Possible as well, thanks!
> /haubi/
> <0001-question-mark-is-extended-regex-for-non-GNU-grep.patch>

Applied and pushed on master, many thanks!
-- 
Gary V. Vaughan (gary AT gnu DOT org)


Re: [PATCH] question mark is extended regex for non-GNU grep

2014-11-21 Thread Michael Haubenwallner

On 11/21/2014 03:06 PM, Eric Blake wrote:
> On 11/21/2014 05:11 AM, Michael Haubenwallner wrote:
>> Accepting \? for at-most-once in basic regex is a GNU grep extension,
>> not accepted by AIX grep for example.
>> * tests/libtool.at: Need EGREP for ? operator, and ? without \ then.
>> With EGREP, need one more \ for $.
> 
> Or, stick with GREP but use \{0,1\} instead of \?.

Possible as well, thanks!
/haubi/
>From d11a1079e84949cb9067f0109e33a82259817fe6 Mon Sep 17 00:00:00 2001
From: Michael Haubenwallner 
Date: Fri, 21 Nov 2014 15:49:19 +0100
Subject: [PATCH 1/2] question mark is extended regex for non-GNU grep

Accepting \? for at-most-once in basic regex is a GNU grep extension,
not accepted by AIX grep for example.
* tests/libtool.at: Use \{0,1\} instead of ? with GREP.
---
 tests/libtool.at | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/libtool.at b/tests/libtool.at
index a466790..7431820 100755
--- a/tests/libtool.at
+++ b/tests/libtool.at
@@ -116,14 +116,14 @@ for mode in compile link install; do
 	   [0], [stdout])
   # NOTE: we use "..."'"'"..." to insert a literal quote into the expression
   #   because "...\"..." is not expanded consistently by all shells.
-  AT_CHECK([$GREP "$mode:.*$match_preflag"'"\?'"$flag:test"'"\? ' stdout],
+  AT_CHECK([$GREP "$mode:.*$match_preflag"'"\{0,1\}'"$flag:test"'"\{0,1\} ' stdout],
 	  [0], [ignore])
 
   # Shell metacharacters that should be backslashified by libtool.
   for mchar in \" \` \$; do
 AT_CHECK([$LIBTOOL -n --mode=$mode $preargs $preflag"$flag$mchar:test$mchar" $postargs],
 	 [0], [stdout])
-AT_CHECK([$GREP "$mode:.*$match_preflag"'"'"\?$flag$mchar:test$mchar"'"'"\? " stdout], [0], [ignore])
+AT_CHECK([$GREP "$mode:.*$match_preflag"'"'"\{0,1\}$flag$mchar:test$mchar"'"'"\{0,1\} " stdout], [0], [ignore])
   done
 
   # Shell metacharacters that should be double quoted by libtool, and need
-- 
1.8.5.5



Re: [PATCH] question mark is extended regex for non-GNU grep

2014-11-21 Thread Eric Blake
On 11/21/2014 05:11 AM, Michael Haubenwallner wrote:
> Accepting \? for at-most-once in basic regex is a GNU grep extension,
> not accepted by AIX grep for example.
> * tests/libtool.at: Need EGREP for ? operator, and ? without \ then.
> With EGREP, need one more \ for $.

Or, stick with GREP but use \{0,1\} instead of \?.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


[PATCH] Do not test undef symbols across shlibs on AIX.

2014-11-21 Thread Michael Haubenwallner
On AIX, undefined symbols across shared libraries can work only when
the main program explicitly exports those symbols. As this is bad
practice anyway and -no-undefined should be preferred, we skip this.
* tests/template.at: Skip test with undef syms across libraries on AIX.
---
 tests/template.at | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/template.at b/tests/template.at
index a5bfcef..da9ed0f 100644
--- a/tests/template.at
+++ b/tests/template.at
@@ -129,10 +129,12 @@ LT_AT_TAG([CXX])
 AT_KEYWORDS([libtool])
 
 noskip=:
+withundef=:
 # Mac OS X.
 # The linker has issues with this test.
 case $host in
 *-darwin*) noskip=false ;;
+*-aix*) withundef=false ;;
 esac
 
 
@@ -243,7 +245,7 @@ AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS 
$LDFLAGS -o sub/main$EXE
 [0], [ignore], [ignore])
 LT_AT_EXEC_CHECK([./sub/main], [ignore])
 # lib convenience
-if $noskip; then
+if $noskip && $withundef; then
   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
lib2/libb.la lib2/b.lo -rpath /foo],
   [0], [ignore], [ignore])
   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la],
@@ -254,11 +256,13 @@ fi
 # both installed
 AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
lib/liba.la lib/a.lo -rpath /foo],
 [0], [ignore], [ignore])
+if $withundef; then
 AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
lib2/libb.la lib2/b.lo -rpath /bar],
 [0], [ignore], [ignore])
 AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la],
 [0], [ignore], [ignore])
 LT_AT_EXEC_CHECK([./sub/main])
+fi
 # both convenience, libb depending on liba
 AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
lib/liba.la lib/a.lo],
 [0], [ignore], [ignore])
-- 
1.8.5.5




[PATCH] question mark is extended regex for non-GNU grep

2014-11-21 Thread Michael Haubenwallner
Accepting \? for at-most-once in basic regex is a GNU grep extension,
not accepted by AIX grep for example.
* tests/libtool.at: Need EGREP for ? operator, and ? without \ then.
With EGREP, need one more \ for $.
---
 tests/libtool.at | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/libtool.at b/tests/libtool.at
index a466790..04655dd 100755
--- a/tests/libtool.at
+++ b/tests/libtool.at
@@ -116,14 +116,15 @@ for mode in compile link install; do
   [0], [stdout])
   # NOTE: we use "..."'"'"..." to insert a literal quote into the expression
   #   because "...\"..." is not expanded consistently by all shells.
-  AT_CHECK([$GREP 
"$mode:.*$match_preflag"'"\?'"$flag:test"'"\? ' stdout],
+  AT_CHECK([$EGREP "$mode:.*$match_preflag"'"?'"$flag:test"'"? 
' stdout],
  [0], [ignore])
 
   # Shell metacharacters that should be backslashified by libtool.
   for mchar in \" \` \$; do
 AT_CHECK([$LIBTOOL -n --mode=$mode $preargs 
$preflag"$flag$mchar:test$mchar" $postargs],
 [0], [stdout])
-AT_CHECK([$GREP 
"$mode:.*$match_preflag"'"'"\?$flag$mchar:test$mchar"'"'"\? " stdout], 
[0], [ignore])
+test \$ = "$mchar" && mchar="\\$mchar" # for $EGREP
+AT_CHECK([$EGREP 
"$mode:.*$match_preflag"'"'"?$flag$mchar:test$mchar"'"'"? " stdout], 
[0], [ignore])
   done
 
   # Shell metacharacters that should be double quoted by libtool, and need
-- 
1.8.5.5