Minor PNG fix in configure script. Updates to macosxbuild for universal builds.
authordarco <darco@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 3 Jun 2006 20:12:46 +0000 (20:12 +0000)
committerdarco <darco@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 3 Jun 2006 20:12:46 +0000 (20:12 +0000)
git-svn-id: http://svn.voria.com/code@179 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/config/configure.ac
synfig-core/trunk/macosxbuild.sh

index 09ebcfb..9345e77 100644 (file)
@@ -341,9 +341,16 @@ AC_CHECK_LIB(png, png_write_row,[
        AC_SUBST(PNG_LIBS)
        AM_CONDITIONAL(HAVE_LIBPNG,true)
 ],[
-       AC_MSG_RESULT([ *** PNG Output target disabled])
-       TARGET_PNG="no"
-       AM_CONDITIONAL(HAVE_LIBPNG,false)
+       AC_CHECK_LIB(png12, png_write_row,[
+       PNG_LIBS="-lpng12"
+       AC_DEFINE(HAVE_LIBPNG,[])
+       AC_SUBST(PNG_LIBS)
+       AM_CONDITIONAL(HAVE_LIBPNG,true)
+       ],[
+               AC_MSG_RESULT([ *** PNG Output target disabled])
+               TARGET_PNG="no"
+               AM_CONDITIONAL(HAVE_LIBPNG,false)
+       ],[-lz -L${exec_prefix}/lib])
 ],[-lz -L${exec_prefix}/lib])
 
 AC_CHECK_LIB(jpeg, main,[
index cc47cb3..3191e61 100755 (executable)
@@ -1,8 +1,11 @@
 #!/bin/sh
 
 #OPTIONS="--disable-optimization --enable-debug"
-export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig
-OPTIONS=""
+
+PREFIX=/Applications/SynfigStudio.app/Contents/synfig
+
+export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig
+OPTIONS="--prefix=$PREFIX"
 #OPTIONS="$OPTIONS --enable-timelimit=120"
 #OPTIONS="$OPTIONS --enable-optimization=2"
 OPTIONS="$OPTIONS --enable-optimization=3"
@@ -11,9 +14,21 @@ OPTIONS="$OPTIONS --enable-optimization=3"
 OPTIONS="$OPTIONS --disable-debug"
 #OPTIONS="$OPTIONS --with-vimage"
 OPTIONS="$OPTIONS --without-openexr"
+OPTIONS="$OPTIONS --disable-dependency-tracking"
+#OPTIONS="$OPTIONS --enable-universal"
+
+ARCH_FLAGS=""
+ARCH_FLAGS="$ARCH_FLAGS -arch ppc"
+ARCH_FLAGS="$ARCH_FLAGS -arch i386"
 
-CC=gcc
-CXX=g++
+LDFLAGS="-L$PREFIX/lib"
+CFLAGS="-I$PREFIX/include"
+CXXFLAGS="-I$PREFIX/include"
+
+CC="gcc $LDFLAGS $CFLAGS $ARCH_FLAGS"
+CXX="g++ $LDFLAGS $CFLAGS $ARCH_FLAGS"
+CPP="gcc -E"
+CXXCPP="g++ -E"
 
 #distcc --version && {
 #      CC=distcc
@@ -31,11 +46,14 @@ mkdir $BUILDDIR
 
 cd $BUILDDIR
 
-echo ../configure $OPTIONS CC="$CC" CXX="$CXX"
+echo ../configure $OPTIONS CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS"
+
+../configure $OPTIONS CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" MACOS_DEPLOYMENT_TARGET=10.4 || exit 1
 
-../configure $OPTIONS CC="$CC" CXX="$CXX" MACOS_DEPLOYMENT_TARGET=10.4 || exit 1
+make
+make install-strip
 
-make package $MAKEFLAGS
+#make package $MAKEFLAGS
 
 #make installer