2012-05-07 48 views
3
# configure for i386 build 
./configure \ 
--cc=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc \ 
--as='gas-preprocessor.pl /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' \ 
--sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk \ 
--extra-ldflags=-L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/system \ 
--target-os=darwin \ 
--arch=i386 \ 
--cpu=i386 \ 
--extra-cflags='-arch i386' \ 
--extra-ldflags='-arch i386' \ 
--prefix=compiled/i386 \ 
--enable-cross-compile \ 
--disable-armv5te \ 
--disable-ffmpeg \ 
--disable-ffplay \ 
--disable-ffserver \ 
--disable-ffprobe \ 
--disable-doc 

下面將爲i386構建ffmpeg靜態庫。但我不知道該選項的含義,如「--extra-cflags」,「 - extra-ldflags」,「 - sysroot =」,「 - as =」。一個配置的選項,如「--extra-cflags」---我很困惑

誰能告訴我有關這些選項的意思?在那裏我可以找到詳細的解釋?

謝謝。我在等你的幫助。

回答

4

您可以隨時運行configure腳本作爲configure --help;它會打印一份使用說明和有關許多可接受參數的信息 - 並且通常會希望獲得特定於軟件包的參數。

這就是說,--extra-cflags將用於C編譯器額外命令行開關,--as將使路徑到彙編,--sysroot會給替代安裝目錄,--extra-ldflags將爲所述接頭提供額外的標誌。這些都是相當先進的,你不太可能需要使用它們。

+0

謝謝恩內斯特,我按照你的幫助。並找到理解這一點的方法。再次感謝。 – Henry

0

這是一個有趣的configure腳本,因爲通常Autoconf使用C標誌(CFLAGS)和C編譯器位置(CC)等環境變量。例如:

CC=/path/to/my/specific/gcc/version CFLAGS="-I/additional/include/dir -L/additional/library/dir" \ 
./configure --prefix=/installation/dir --host=cross-compiler-triplet-if-any \ 
--enable-something --with-some-feature --disable-something-else 
+0

問題中的情況在我看來就像交叉編譯(很可能是x86模擬器的「iPhone」),所以可能需要重寫需要爲主機構建所需設置的環境變量,其中需要值建立目標。 –

+0

謝謝eepp和chris stratton。我知道這些選項現在是環境變量。我可以找到幫助來執行configure -help。 – Henry