[gimp-gap] fixed configure and build issues for Mac specific bugs



commit 073457de56c2c07ec0e2c698cac773bf7093de9e
Author: Wolfgang Hofer <wolfgangh svn gnome org>
Date:   Sun May 10 16:18:43 2009 +0200

    fixed configure and build issues for Mac specific bugs
---
 ChangeLog               |   18 ++++++++++++++++++
 configure.in            |   39 +++++++++++++++++++++++++++++++++++++--
 extern_libs/Makefile.am |    8 ++++----
 3 files changed, 59 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 71c977d..dfdb16c 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2009-05-10 Wolfgang Hofer <hof gimp org>
+
+configure and build issues to fix Mac specific bugs reported by David Evans.
+
+- applied patch from David Evans  for properly detection of  FAAD2. (provided at Bug #581807) 
+- use gmake via variable $EXGMAKE for build external libs if available. if gmake not available
+  $EXGMAKE points to make program. (shall fix #581805)
+
+- pass configue options 
+    --prefix=
+    --with-ff-extra-cflags
+    --with-ff-extra-ldflags
+  to ffmpeg configure. (shall fix #581809)
+
+  
+  * configure.in
+  * extern_libs/Makefile.am
+
 2009-04-28 Wolfgang Hofer <hof gimp org>
 
 - fixed Grab Path Points default settings bug #580416
diff --git a/configure.in b/configure.in
index e3be722..7b6779c 100644
--- a/configure.in
+++ b/configure.in
@@ -74,6 +74,15 @@ case x"$target" in
 esac
 AC_MSG_RESULT([$target_or_host])
 
+dnl check if gmake is available
+EXGMAKE=make
+type gmake
+rc_gmake_check=$?
+if test $rc_gmake_check = 0; then
+  EXGMAKE=gmake
+fi
+AC_SUBST(EXGMAKE)
+
 dnl prefix and suffix of librarynames (for win32 environment)
 dnl notes:
 dnl older gimp-gap releases automatically used .lib suffix (MSVC style) when build runs in MinGW
@@ -197,7 +206,7 @@ faad_warn=""
 AC_ARG_ENABLE(ff_libfaad,
               [  --disable-ff-libfaad          configure libavformat without libfaad])
   if test "x$enable_ff_libfaad" != "xno"; then
-    AC_CHECK_LIB(faad, faacDecOpen,
+    AC_CHECK_LIB(faad, NeAACDecOpen,
         [AC_CHECK_HEADER(faad.h,
           FF_LIBFAAD="-lfaad",
           faad_warn="$NEW_LINE ** faad header file (faad.h) not found (not critical)")],
@@ -309,6 +318,12 @@ fi)
 dnl assume ffmpeg libs build "no" (in case disabled)
 build_ffmpeg_libs_yesno="no"
 
+AC_ARG_WITH(ff-extra-cflags, [  --with-ff-extra-cflags=cflags    specify extra c-compiler flags for compiling ffmpeg],
+   FF_EXTRA_CFLAGS=$with_ff_extra_cflags)
+
+AC_ARG_WITH(ff-extra-ldflags, [  --with-ff-extra-ldflags=ldflags    specify extra linker flags for linking ffmpeg libs],
+   FF_EXTRA_LDFLAGS=$with_ff_extra_ldflags)
+
 
 moved_old_ffmpeg_warn=""
 AC_ARG_ENABLE(libavformat,
@@ -408,9 +423,29 @@ INFORMATION: old ffmpeg was moved to $FFMPEG_DIR-OLD
       dnl read configure options for the external lib from a file      
       dnl the current simple implementation requires all options in one line
       FFMPEG_CONFIGURE_OPTIONS=`cat "$extern_libs_dir/configure_options_ffmpeg.txt" | grep -v '^#'`
+      
+      ff_pass_through_flags=""
+      if test "x$prefix" != "x"; then
+         if test "$prefix" != "NONE"; then
+            ff_pass_through_flags=" --prefix=$prefix $ff_pass_through_flags"
+         fi
+      fi
+      
+      if test "x$FF_EXTRA_CFLAGS" != "x"; then
+      	 ff_pass_through_flags=" $ff_pass_through_flags --extra-cflags=$FF_EXTRA_CFLAGS "
+      fi
+      
+      if test "x$FF_EXTRA_LDFLAGS" != "x"; then
+      	 ff_pass_through_flags=" $ff_pass_through_flags --extra-ldflags=$FF_EXTRA_LDFLAGS "
+      fi
+
       if test "x$CC" != "x"; then
-      	 FFMPEG_CONFIGURE_OPTIONS=" --cc=$CC $FFMPEG_CONFIGURE_OPTIONS"
+      	 ff_pass_through_flags=" $ff_pass_through_flags --cc=$CC "
       fi
+      
+      FFMPEG_CONFIGURE_OPTIONS=" $ff_pass_through_flags $FFMPEG_CONFIGURE_OPTIONS"
+ 
+ 
 
       dnl configure ffmpeg bzip2 usage
       if test "x$FF_BZIP2" != "x"; then
diff --git a/extern_libs/Makefile.am b/extern_libs/Makefile.am
index 51227ef..4b1419b 100644
--- a/extern_libs/Makefile.am
+++ b/extern_libs/Makefile.am
@@ -44,17 +44,17 @@ if BUILD_FFMPEG_LIBS
 $(x_ffmpeg_libavformat):
 	echo "cd $(FFMPEG_DIR)"; \
 	cd $(FFMPEG_DIR);\
-	make
+	$(EXGMAKE)
 
 $(x_ffmpeg_libavcodec):
 	echo "cd $(FFMPEG_DIR)"; \
 	cd $(FFMPEG_DIR);\
-	make
+	$(EXGMAKE)
 
 $(x_ffmpeg_libavutil):
 	echo "cd $(FFMPEG_DIR)"; \
 	cd $(FFMPEG_DIR);\
-	make
+	$(EXGMAKE)
 
 endif
 
@@ -63,7 +63,7 @@ if BUILD_LIBMPEG3_LIB
 $(x_libmpeg3):
 	echo "cd $(LMPEG3_DIR)"; \
 	cd $(LMPEG3_DIR); \
-	make
+	$(EXGMAKE)
 
 endif
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]