[FFmpeg-devel] [PATCH] configure: allow the gas-preprocessor to be called with an absolute path.

Lars Hammarstrand lars.hammarstrand at gmail.com
Mon Apr 15 16:21:41 CEST 2013


*

This two line patch lets the configure tool address the gas-preprocessor
with an absolute path when included with either the “--as=” or with a
separate “--gas=” option.  The patch is backward compatible and will not
break any current configuration setups.

It will solves the problem where you need to manage different or legacy
versions of gas-preprocessor which were previously installed. There is no
ticket associated with this patch but I can create one if necessary. For
more details:
http://thread.gmane.org/gmane.comp.video.ffmpeg.libav.user/10324/focus=10406

diff --git a/configure b/configure

index f146f7e..836991b 100755
--- a/configure
+++ b/configure
@@ -1595,6 +1595,7 @@ CMDLINE_SET="
     cxx
     dep_cc
     extra_version
+    gas
     host_cc
     host_cflags
     host_ld
@@ -3318,7 +3319,7 @@ case $target_os in
         strip="strip -d"
         ;;
     darwin)
-        gas="gas-preprocessor.pl $cc"
+        test "${as#*gas-preprocessor.pl}" != "$as" || gas="${gas:=
gas-preprocessor.pl} ${as:=$cc}"
         enabled ppc && add_asflags -force_cpusubtype_ALL
         SHFLAGS='-dynamiclib -Wl,-single_module
-Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
         enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress


The new behavior that comes with this patch can be utilized in the
following ways:

Examples:

1. Just as single option that includes both the gas-preprocessor.pl and
cc/as at the same time:

  $ configure --as=”/opt/app/build-tools/gas-preprocessor.pl \


/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc”

2. Point out the gas-preprocessor with a separate option in conjunction
with --as:

  $ configure --gas=”/opt/app/build-tools/gas-preprocessor.pl” \


--as=”/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc”

3. Address only the the gas-preprocessor and it will automatically fall
back to as or cc whichever that's defined:

  $ configure --gas=”/opt/app/build-tools/gas-preprocessor.pl”

4. Or if no gas-preprocessor.pl is explicitly defined, it falls back to the
old behaivor.

--

Attached patch file for current master (rev 3d8afb2):
 configure-master-rev-3d8afb2.patch*
*
*
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure-master-rev-3d8afb2.patch
Type: application/octet-stream
Size: 755 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130415/63c833bb/attachment.obj>


More information about the ffmpeg-devel mailing list