]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix more libtool system header includes
authorAmos Jeffries <amosjeffries@squid-cache.org>
Wed, 4 Aug 2010 13:12:03 +0000 (07:12 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Wed, 4 Aug 2010 13:12:03 +0000 (07:12 -0600)
bootstrap.sh

index a96d338106cb6be3197818f387e56a27d13a3904..22177bd09e7a1cb782a4e91fd146b01ba756a8c1 100755 (executable)
@@ -115,12 +115,17 @@ bootstrap_libtoolize() {
         chmod u-w $makefile
 
         # Libtool 2.2.6b we bundle is slightly broken with non-portable dependencies
-        sed 's/<libltdl\/lt_system.h>/\"libltdl\/lt_system.h\"/g' $src/ltdl.h |
-            sed 's/<libltdl\/lt_error.h>/\"libltdl\/lt_error.h\"/g' |
-            sed 's/<libltdl\/lt_dlloader.h>/\"libltdl\/lt_dlloader.h\"/g' > $src/ltdl.h.new;
-        chmod u+w $src/ltdl.h
-        mv $src/ltdl.h.new $src/ltdl.h
-        chmod u-w $src/ltdl.h
+        # HACK: Make it backward-compatible by linking the bundled headers.
+        for f in ltdl.h libltdl/lt_error.h libltdl/lt_system.h libltdl/lt_dlloader.h; do
+            echo "Fixing $f ..."
+            sed 's/<libltdl\/lt_system.h>/\"libltdl\/lt_system.h\"/g' $src/$fh |
+                sed 's/<libltdl\/lt__glibc.h>/\"libltdl\/lt__glibc.h\"/g' |
+                sed 's/<libltdl\/lt_error.h>/\"libltdl\/lt_error.h\"/g' |
+                sed 's/<libltdl\/lt_dlloader.h>/\"libltdl\/lt_dlloader.h\"/g' > $src/$f.new;
+            chmod u+w $src/$f
+            mv $src/$f.new $src/$f
+            chmod u-w $src/$f
+        done
     fi
 }