optimized freetype detection.
authorkramm <kramm>
Tue, 23 Nov 2004 15:21:09 +0000 (15:21 +0000)
committerkramm <kramm>
Tue, 23 Nov 2004 15:21:09 +0000 (15:21 +0000)
configure

index 54af742..0cafc5c 100755 (executable)
--- a/configure
+++ b/configure
@@ -1019,6 +1019,7 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-checkmem       turn on ccmalloc debugging
   --enable-debug          turn on debugging
+  --enable-profiling      turn on profiling
   --enable-warnings       turn on compiler warnings
   --enable-optimizations  turn on compiler optimizations (recommended for avi2swf)
   --disable-lame          don't compile any L.A.M.E. mp3 encoding code in
@@ -1491,6 +1492,11 @@ if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
   DEBUG=true
 fi;
+# Check whether --enable-profiling or --disable-profiling was given.
+if test "${enable_profiling+set}" = set; then
+  enableval="$enable_profiling"
+  PROFILING=true
+fi;
 # Check whether --enable-warnings or --disable-warnings was given.
 if test "${enable_warnings+set}" = set; then
   enableval="$enable_warnings"
@@ -1508,7 +1514,7 @@ if test "${enable_lame+set}" = set; then
 fi;
 
 PACKAGE=swftools
-VERSION=2004-11-07-1822
+VERSION=2004-11-13-2026
 
 
 # ------------------------------------------------------------------
@@ -1526,9 +1532,18 @@ fi
 if test "x$CHECKMEM" '!=' "x";then
     DEBUG=yes
 fi
+if test "x$PROFILING" '!=' "x";then
+    DEBUG=yes
+fi
 if test "x$DEBUG" '!=' "x";then
-    CFLAGS="$WARNINGS -g $CFLAGS"
-    CXXFLAGS="$WARNINGS -g $CXXFLAGS"
+    if test "x$PROFILING" = "x";then
+        CFLAGS="$WARNINGS -g $CFLAGS"
+        CXXFLAGS="$WARNINGS -g $CXXFLAGS"
+    else
+        CFLAGS="$WARNINGS -O2 -g -pg $CFLAGS"
+        CXXFLAGS="$WARNINGS -O2 -g -pg $CXXFLAGS"
+        LDFLAGS="-g -pg $LIBS"
+    fi
 else if test "x$OPTIMIZE" '!=' "x"; then
     CFLAGS="$WARNINGS -O3 -fomit-frame-pointer -Winline $CFLAGS"
     CXXFLAGS="$WARNINGS -O3 -fomit-frame-pointer -Winline $CXXFLAGS"
@@ -4798,7 +4813,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 4801 "configure"' > conftest.$ac_ext
+  echo '#line 4816 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -5374,7 +5389,7 @@ chmod -w .
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
 compiler_c_o=no
-if { (eval echo configure:5377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
   # The compiler can only warn and ignore the option if not recognized
   # So say no if there are warnings
   if test -s out/conftest.err; then
@@ -6607,7 +6622,7 @@ linux-gnu*)
   libsuff=
   case "$host_cpu" in
   x86_64*)
-    echo '#line 6610 "configure"' > conftest.$ac_ext
+    echo '#line 6625 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7355,7 +7370,7 @@ else
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 7358 "configure"
+#line 7373 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -7453,7 +7468,7 @@ else
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 7456 "configure"
+#line 7471 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -8221,6 +8236,11 @@ fi
 done
 
 
+OBJEXT="o"
+
+if test "x$EXEEXT" = "x.exe";then
+    OBJEXT="obj"
+fi
 
 
 
@@ -8329,6 +8349,10 @@ if test "$prefix" != "NONE" -a "$prefix" != "/usr/local" -a "$prefix" != "/usr/l
     # TODO- test whether gcc still works after this
 fi
 
+#Mac OS:
+#LDFLAGS "-L/sw/lib" ; CPPFLAGS "-I/sw/include -I/sw/include/lame"
+
+
 # this must be done after (I believe) AC_PROG_MAKE_SET
 if test "x$DEBUG" '!=' "x";then
     STRIP="@echo debug enabled, not stripping "
 fi
 fi
 
-echo "$as_me:$LINENO: checking for FT_Init_FreeType in -lfreetype" >&5
+if test "x${FREETYPE_CONFIG}" '=' "x";then
+    # if we didn't find the freetype-config program, we won't
+    # know where the libs are expected to be. So just blindly
+    # try to link against them.
+    echo "$as_me:$LINENO: checking for FT_Init_FreeType in -lfreetype" >&5
 echo $ECHO_N "checking for FT_Init_FreeType in -lfreetype... $ECHO_C" >&6
 if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10186,8 +10214,10 @@ if test $ac_cv_lib_freetype_FT_Init_FreeType = yes; then
   HAVE_LIB_FREETYPE=1
 fi
 
+fi
 
-for ac_header in freetype/freetype.h
+
+for ac_header in ft2build.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -10331,13 +10361,14 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
- HAVE_FREETYPE_FREETYPE_H=1
+ HAVE_FT2BUILD_H=1
 fi
 
 done
 
+if test "x${HAVE_FT2BUILD_H}" '=' "x";then
 
-for ac_header in ft2build.h
+for ac_header in freetype/freetype.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -10481,13 +10512,15 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
- HAVE_FT2BUILD_H=1
+ HAVE_FREETYPE_FREETYPE_H=1
 fi
 
 done
 
+fi
 
-if test "x${HAVE_LIB_FREETYPE}" '!=' "x";then
+if test "x${HAVE_LIB_FREETYPE}" '!=' "x" -o \
+        "x${HAVE_FREETYPE_CONFIG}" '!=' "x";then
     if test "x${HAVE_FREETYPE_FREETYPE_H}" '!=' "x";then
        HAVE_FREETYPE=1
     fi
@@ -10497,15 +10530,15 @@ if test "x${HAVE_LIB_FREETYPE}" '!=' "x";then
 fi
 
 if test "x${HAVE_FREETYPE}" = "x1"; then
-    if test "x{$FREETYPE_CONFIG}" '!=' "x"; then
+    if test "x${FREETYPE_CONFIG}" '!=' "x"; then
        LIBS="$LIBS "`freetype-config --libs`
     else
        LIBS="$LIBS -lfreetype"
     fi
 
-if test "x${HAVE_FT2BUILD_H}" = "x1"; then
-    HAVE_FT2BUILD_H_DEFINE='#define HAVE_FT2BUILD_H'
-fi
+    if test "x${HAVE_FT2BUILD_H}" = "x1"; then
+       HAVE_FT2BUILD_H_DEFINE='#define HAVE_FT2BUILD_H'
+    fi
 
     echo "$as_me:$LINENO: checking whether we can compile the freetype test program" >&5
 echo $ECHO_N "checking whether we can compile the freetype test program... $ECHO_C" >&6
@@ -10896,7 +10929,7 @@ if test "x${DISABLE_LAME}" = "xtrue"; then
 else
     # old lame code at lib/lame
     if test -f lib/lame/Makefile.in; then
-       lame_objects="lame/psymodel.o lame/fft.o lame/newmdct.o lame/quantize.o lame/takehiro.o lame/reservoir.o lame/quantize_pvt.o lame/vbrquantize.o lame/encoder.o lame/id3tag.o lame/version.o lame/tables.o lame/util.o lame/bitstream.o lame/set_get.o lame/VbrTag.o lame/lame.o"
+       lame_objects="lame/psymodel.\$(O) lame/fft.\$(O) lame/newmdct.\$(O) lame/quantize.\$(O) lame/takehiro.\$(O) lame/reservoir.\$(O) lame/quantize_pvt.\$(O) lame/vbrquantize.\$(O) lame/encoder.\$(O) lame/id3tag.\$(O) lame/version.\$(O) lame/tables.\$(O) lame/util.\$(O) lame/bitstream.\$(O) lame/set_get.\$(O) lame/VbrTag.\$(O) lame/lame.\$(O)"
        lame_makefile="lib/lame/Makefile"
        CPPFLAGS="$CPPFLAGS -Ilame"
        cat >>confdefs.h <<_ACEOF