Xcode 2.1 cleanup, universal binary experiments
[TestXSLT.git] / libs / compile_libs.sh
index 30d6c72..04c95f4 100644 (file)
@@ -3,6 +3,7 @@
 echo executing $0
 echo ACTION is $ACTION
 
+SDKFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
 
 LIBS_TAR_DIR="`pwd`/libs"
 LIBS_DEST_DIR="$BUILD_DIR/libs"
@@ -28,20 +29,25 @@ echo $LIBS_TAR_DIR / $LIBS_DEST_DIR / $LIBS_INST_DIR / $LIBS_BUILD_DIR
 LIB="$LIBS_DEST_DIR/libxml2.dylib"
 if [ ! -e "$LIB" ]; then
 
+
        echo building "$LIB"
 
        cd "$LIBS_SRC_DIR"
        tar -xzf "$TAR_LIBXML2"
        cd libxml2-*
-       ./configure --prefix="$LIBS_INST_DIR"
+       make distclean
+       ./configure --without-python --prefix="$LIBS_INST_DIR"
        make install
 
-       cp "$LIBS_INST_DIR/lib/libxml2.dylib" "$LIB"
+       lipo -create "$LIBS_INST_DIR/lib/libxml2.dylib" -output "$LIB"
        perl "$LIBS_TAR_DIR/fix_install_paths.pl" "$LIB" "$BUILD_DIR"
 
+       #cp "$LIBS_INST_DIR/lib/libxml2.dylib" "$LIB"
+
 fi
 
 
+
 #### setup libxslt
 LIB="$LIBS_DEST_DIR/libxslt.dylib"
 if [ ! -e "$LIB" ]; then
@@ -51,15 +57,19 @@ if [ ! -e "$LIB" ]; then
        cd "$LIBS_SRC_DIR"
        tar -xzf "$TAR_LIBXSLT"
        cd libxslt-*
+       make distclean
        ./configure --prefix="$LIBS_INST_DIR" --with-libxml-prefix="$LIBS_INST_DIR"
        make install
 
-       cp "$LIBS_INST_DIR/lib/libxslt.dylib" "$LIB"
+
+       lipo -create "$LIBS_INST_DIR/lib/libxslt.dylib" -output "$LIB"
        perl "$LIBS_TAR_DIR/fix_install_paths.pl" "$LIB" "$BUILD_DIR"
 
-       cp "$LIBS_INST_DIR/lib/libexslt.dylib" "$LIBS_DEST_DIR/libexslt.dylib"
+       lipo -create "$LIBS_INST_DIR/lib/libexslt.dylib" -output "$LIBS_DEST_DIR/libexslt.dylib"
        perl "$LIBS_TAR_DIR/fix_install_paths.pl" "$LIBS_DEST_DIR/libexslt.dylib" "$BUILD_DIR"
 
+
+
 fi
 
 
@@ -67,17 +77,20 @@ fi
 LIB="$LIBS_DEST_DIR/libexpat.dylib"
 if [ ! -e "$LIB" ]; then
 
+
        echo building "$LIB"
 
        cd "$LIBS_SRC_DIR"
        tar -xzf "$TAR_EXPAT"
        cd expat-*
+       make distclean
        ./configure --prefix="$LIBS_INST_DIR"
        INSTALL_ROOT="/" make -e install
-
-       cp "$LIBS_INST_DIR/lib/libexpat.dylib" "$LIB"
+       
+       #cp "$LIBS_INST_DIR/lib/libexpat.dylib" "$LIB"
+       lipo -create "$LIBS_INST_DIR/lib/libexpat.dylib" -output "$LIB"
        perl "$LIBS_TAR_DIR/fix_install_paths.pl" "$LIB" "$BUILD_DIR"
-
+       
 fi
 
 
@@ -90,11 +103,13 @@ if [ ! -e "$LIB" ]; then
        cd "$LIBS_SRC_DIR"
        tar -xzf "$TAR_SABLOT"
        cd Sablot-*
+       make distclean
 
        ./configure --disable-adding-meta --with-expat="$LIBS_INST_DIR" --prefix="$LIBS_INST_DIR"
        make install
-
-       cp "$LIBS_INST_DIR/lib/libSablot.dylib" "$LIB"
+       
+       #cp "$LIBS_INST_DIR/lib/libSablot.dylib" "$LIB"
+       lipo -create "$LIBS_INST_DIR/lib/libSablot.dylib" -output "$LIB"
        perl "$LIBS_TAR_DIR/fix_install_paths.pl" "$LIB" "$BUILD_DIR"
 
 fi
@@ -102,49 +117,3 @@ fi
 
 exit
 
-SUBDIR=libxml2
-GNUSTYLEPREFIX=$TARGET_BUILD_DIR/libxml2-gnustyle
-ICONVPREFIX=$TARGET_BUILD_DIR/libiconv-gnustyle
-
-# make sure things match our expectations
-#
-if [ ! -d $SUBDIR ]; then
-       echo no $SUBDIR dir in current dir `pwd`, cannot continue!
-       exit 1
-fi
-
-
-if [ x$ACTION = "xclean" ]; then
-
-       echo cleaning up...
-       rm -rf $GNUSTYLEPREFIX
-       cd $SUBDIR
-       make distclean
-
-elif [ x$ACTION = "x" ]; then
-
-       echo building...
-
-       cd $SUBDIR
-
-       if [ ! -f Makefile ]; then
-
-               echo no Makefile, running configure
-
-               ./configure --prefix=$GNUSTYLEPREFIX --without-python --with-iconv=$ICONVPREFIX
-
-       fi
-
-       
-       if [ ! -d $GNUSTYLEPREFIX ]; then
-
-               make install
-
-       fi
-
-
-fi
-
-
-
-