Salome HOME
Another fix of hack_libtool() function for latest versions of autoconf (e.g. 2.67) V5_1_5_BR V5_1_5 V5_1_5_patch02 V5_1_5rc2 V5_1_5rc3
authorvsr <vsr@opencascade.com>
Wed, 3 Nov 2010 09:31:54 +0000 (09:31 +0000)
committervsr <vsr@opencascade.com>
Wed, 3 Nov 2010 09:31:54 +0000 (09:31 +0000)
configure.ac

index f614b827151f4cbae66c1c86337b7890f61514a1..54bde6a4d1a5eca9548fa38a7388468bc02000df 100644 (file)
@@ -383,6 +383,19 @@ AC_OUTPUT_COMMANDS([ \
       chmod +x ./bin/*; \
 ])
 
+AC_CONFIG_COMMANDS([hack_libtool],[
+sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
+  if test \"\$(echo \$[@] | grep -E '\\\-L/usr/lib(/../lib)?(64)? ')\" == \"\" \n\
+  then\n\
+    cmd=\"\1 \$[@]\"\n\
+  else\n\
+    cmd=\"\1 \"\`echo \$[@] | sed -r -e 's|(.*)-L/usr/lib(/../lib)?(64)? (.*)|\\\1\\\4 -L/usr/lib\\\3|g'\`\n\
+  fi\n\
+  \$cmd\n\
+}\n\
+CC=\"hack_libtool\"%g" libtool
+],[])
+
 # This list is initiated using autoscan and must be updated manually
 # when adding a new file <filename>.in to manage. When you execute
 # autoscan, the Makefile list is generated in the output file configure.scan.
@@ -402,5 +415,3 @@ AC_OUTPUT([ \
   SIERPINSKY_version.h \
   Makefile \
 ])
-
-AC_HACK_LIBTOOL