You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

673 lines
16KB

  1. #!/bin/sh
  2. #
  3. # ffmpeg configure script (c) 2000, 2001, 2002 Fabrice Bellard
  4. #
  5. # set temporary file name
  6. if test ! -z "$TMPDIR" ; then
  7. TMPDIR1="${TMPDIR}"
  8. elif test ! -z "$TEMPDIR" ; then
  9. TMPDIR1="${TEMPDIR}"
  10. else
  11. TMPDIR1="/tmp"
  12. fi
  13. TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
  14. TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
  15. TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
  16. TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
  17. # default parameters
  18. prefix="/usr/local"
  19. cross_prefix=""
  20. cc="gcc"
  21. ar="ar"
  22. ranlib="ranlib"
  23. make="make"
  24. strip="strip"
  25. cpu=`uname -m`
  26. mmx="default"
  27. altivec="default"
  28. mmi="default"
  29. case "$cpu" in
  30. i386|i486|i586|i686|i86pc|BePC)
  31. cpu="x86"
  32. ;;
  33. armv4l)
  34. cpu="armv4l"
  35. ;;
  36. alpha)
  37. cpu="alpha"
  38. ;;
  39. "Power Macintosh"|ppc)
  40. cpu="powerpc"
  41. ;;
  42. mips)
  43. cpu="mips"
  44. ;;
  45. *)
  46. cpu="unknown"
  47. ;;
  48. esac
  49. gprof="no"
  50. v4l="yes"
  51. audio_oss="yes"
  52. audio_beos="no"
  53. network="yes"
  54. zlib="yes"
  55. mp3lame="no"
  56. vorbis="no"
  57. a52="yes"
  58. a52bin="no"
  59. win32="no"
  60. cygwin="no"
  61. lshared="no"
  62. extralibs="-lm"
  63. simpleidct="yes"
  64. bigendian="no"
  65. vhook="no"
  66. mpegaudio_hp="yes"
  67. SHFLAGS=-shared
  68. netserver="no"
  69. # OS specific
  70. targetos=`uname -s`
  71. case $targetos in
  72. BeOS)
  73. prefix="/boot/home/config"
  74. # helps building libavcodec
  75. CFLAGS="-O3 -DPIC -fomit-frame-pointer"
  76. # 3 gcc releases known for BeOS, each with ugly bugs
  77. gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
  78. case "$gcc_version" in
  79. 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
  80. mmx="no"
  81. ;;
  82. *20010315*) echo "BeBits gcc"
  83. CFLAGS="$CFLAGS -fno-expensive-optimizations"
  84. ;;
  85. esac
  86. SHFLAGS=-nostart
  87. # disable linux things
  88. audio_oss="no"
  89. v4l="no"
  90. # enable beos things
  91. audio_beos="yes"
  92. # no need for libm, but the inet stuff
  93. # Check for BONE
  94. if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
  95. extralibs="-lbind -lsocket"
  96. else
  97. netserver="yes"
  98. extralibs="-lnet"
  99. fi ;;
  100. FreeBSD)
  101. v4l="no"
  102. audio_oss="yes"
  103. make="gmake"
  104. LDFLAGS="-export-dynamic"
  105. ;;
  106. BSD/OS)
  107. v4l="no"
  108. audio_oss="yes"
  109. extralibs="-lpoll -lgnugetopt -lm"
  110. make="gmake"
  111. ;;
  112. Darwin)
  113. cc="cc"
  114. v4l="no"
  115. audio_oss="no"
  116. CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
  117. SHFLAGS="-dynamiclib"
  118. extralibs=""
  119. darwin="yes"
  120. strip="strip -x"
  121. ;;
  122. CYGWIN*)
  123. v4l="no"
  124. audio_oss="yes"
  125. extralibs=""
  126. cygwin="yes"
  127. test -f /usr/include/inttypes.h || \
  128. test -f /usr/local/include/inttypes.h || \
  129. echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
  130. "/usr/include/inttypes.h !!!"
  131. ;;
  132. Linux)
  133. LDFLAGS=-rdynamic
  134. ;;
  135. *) ;;
  136. esac
  137. # find source path
  138. # XXX: we assume an absolute path is given when launching configure,
  139. # except in './configure' case.
  140. source_path=${0%configure}
  141. source_path=${source_path%/}
  142. source_path_used="yes"
  143. if test -z "$source_path" -o "$source_path" = "." ; then
  144. source_path=`pwd`
  145. source_path_used="no"
  146. fi
  147. cat > $TMPC << EOF
  148. #include <dlfcn.h>
  149. int main( void ) { return (int) dlopen("foo", 0); }
  150. EOF
  151. ldl=-ldl
  152. if $cc -o $TMPO $TMPC -ldl 2> /dev/null ; then
  153. vhook=yes
  154. fi
  155. if $cc -o $TMPO $TMPC 2> /dev/null ; then
  156. vhook=yes
  157. ldl=""
  158. fi
  159. cat > $TMPC << EOF
  160. #include <X11/Xlib.h>
  161. #include <Imlib2.h>
  162. int main( void ) { return (int) imlib_load_font("foo"); }
  163. EOF
  164. imlib2=no
  165. if $cc -o $TMPO $TMPC -lImlib2 2> /dev/null ; then
  166. imlib2=yes
  167. fi
  168. for opt do
  169. case "$opt" in
  170. --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
  171. ;;
  172. --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
  173. ;;
  174. --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
  175. ;;
  176. --cc=*) cc=`echo $opt | cut -d '=' -f 2`
  177. ;;
  178. --make=*) make=`echo $opt | cut -d '=' -f 2`
  179. ;;
  180. --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
  181. ;;
  182. --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
  183. ;;
  184. --extra-libs=*) extralibs=${opt#--extra-libs=}
  185. ;;
  186. --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
  187. ;;
  188. --disable-mmx) mmx="no"
  189. ;;
  190. --disable-altivec) altivec="no"
  191. ;;
  192. --enable-gprof) gprof="yes"
  193. ;;
  194. --disable-v4l) v4l="no"
  195. ;;
  196. --disable-audio-oss) audio_oss="no"
  197. ;;
  198. --disable-audio-beos) audio_beos="no"
  199. ;;
  200. --disable-network) network="no"
  201. ;;
  202. --disable-zlib) zlib="no"
  203. ;;
  204. --disable-a52) a52="no"
  205. ;;
  206. --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
  207. ;;
  208. --enable-mp3lame) mp3lame="yes"
  209. ;;
  210. --enable-vorbis) vorbis="yes"
  211. ;;
  212. --disable-vhook) vhook="no"
  213. ;;
  214. --disable-simple_idct) simpleidct="no"
  215. ;;
  216. --enable-win32) win32="yes"
  217. ;;
  218. --enable-shared) lshared="yes"
  219. ;;
  220. --disable-mpegaudio-hp) mpegaudio_hp="no"
  221. ;;
  222. esac
  223. done
  224. # compute mmx state
  225. if test $mmx = "default"; then
  226. if test $cpu = "x86"; then
  227. mmx="yes"
  228. else
  229. mmx="no"
  230. fi
  231. fi
  232. # Can only do AltiVec on PowerPC
  233. if test $altivec = "default"; then
  234. if test $cpu = "powerpc"; then
  235. altivec="yes"
  236. else
  237. altivec="no"
  238. fi
  239. fi
  240. # See does our compiler support Motorola AltiVec C API
  241. if test $altivec = "yes"; then
  242. cat > $TMPC << EOF
  243. int main(void) {
  244. vector signed int v1, v2, v3;
  245. v1 = vec_add(v2,v3);
  246. return 0;
  247. }
  248. EOF
  249. $cc -o $TMPO $TMPC -faltivec 2> /dev/null || altivec="no"
  250. fi
  251. # Can only do mmi on mips
  252. if test $mmi = "default"; then
  253. if test $cpu = "mips"; then
  254. mmi="yes"
  255. else
  256. mmi="no"
  257. fi
  258. fi
  259. # See does our compiler support mmi
  260. if test $mmi = "yes"; then
  261. cat > $TMPC << EOF
  262. int main(void) {
  263. __asm__ ("lq \$2, 0(\$2)");
  264. return 0;
  265. }
  266. EOF
  267. $cc -o $TMPO $TMPC 2> /dev/null || mmi="no"
  268. fi
  269. # Checking for CFLAGS
  270. if test -z "$CFLAGS"; then
  271. CFLAGS="-O3"
  272. fi
  273. if test "$win32" = "yes" ; then
  274. cross_prefix="i386-mingw32msvc-"
  275. v4l="no"
  276. audio_oss="no"
  277. network="no"
  278. fi
  279. cc="${cross_prefix}${cc}"
  280. ar="${cross_prefix}${ar}"
  281. ranlib="${cross_prefix}${ranlib}"
  282. strip="${cross_prefix}${strip}"
  283. if test -z "$cross_prefix" ; then
  284. # ---
  285. # big/little endian test
  286. cat > $TMPC << EOF
  287. #include <inttypes.h>
  288. int main(int argc, char ** argv){
  289. volatile uint32_t i=0x01234567;
  290. return (*((uint8_t*)(&i))) == 0x67;
  291. }
  292. EOF
  293. if $cc -o $TMPO $TMPC 2>/dev/null ; then
  294. $TMPO && bigendian="yes"
  295. else
  296. echo big/little test failed
  297. fi
  298. else
  299. # if cross compiling, cannot launch a program, so make a static guess
  300. if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
  301. bigendian="yes"
  302. fi
  303. fi
  304. # ---
  305. # check availability of some header files
  306. cat > $TMPC << EOF
  307. #include <malloc.h>
  308. int main( void ) { return 0; }
  309. EOF
  310. _memalign=no
  311. _malloc_h=no
  312. if $cc -o $TMPO $TMPC 2> /dev/null ; then
  313. _malloc_h=yes
  314. _memalign=yes
  315. # check for memalign - atmos
  316. cat > $TMPC << EOF
  317. #include <malloc.h>
  318. int main ( void ) {
  319. char *string = NULL;
  320. string = memalign(64, sizeof(char));
  321. return 0;
  322. }
  323. EOF
  324. $cc -o $TMPO $TMPC 2> /dev/null || _memalign=no
  325. fi
  326. cat > $TMPC << EOF
  327. #define _GNU_SOURCE
  328. #include <time.h>
  329. int main( void ) { return *strptime("", "", 0); }
  330. EOF
  331. strptime=no
  332. if $cc -o $TMPO $TMPC 2> /dev/null ; then
  333. strptime=yes
  334. fi
  335. if test "$zlib" = "yes"; then
  336. # check for zlib - mmu_man
  337. cat > $TMPC << EOF
  338. #include <zlib.h>
  339. int main ( void ) {
  340. if (zlibVersion() != ZLIB_VERSION)
  341. puts("zlib version differs !!!");
  342. return 1;
  343. return 0;
  344. }
  345. EOF
  346. $cc -o $TMPO $TMPC -lz 2> /dev/null || zlib="no"
  347. # $TMPO 2> /dev/null > /dev/null || zlib="no"
  348. # XXX: more tests needed - runtime test
  349. fi
  350. if test "$zlib" = "yes"; then
  351. extralibs="$extralibs -lz"
  352. fi
  353. # test for lrintf in math.h
  354. cat > $TMPC << EOF
  355. #define _ISOC9X_SOURCE 1
  356. #include <math.h>
  357. int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
  358. EOF
  359. have_lrintf="no"
  360. if $cc $extralibs -o $TMPO $TMPC 2> /dev/null ; then
  361. have_lrintf="yes"
  362. $TMPO 2> /dev/null > /dev/null || have_lrintf="no"
  363. fi
  364. _restrict=
  365. for restrict_keyword in restrict __restrict__ __restrict; do
  366. echo "void foo(char * $restrict_keyword p);" > $TMPC
  367. if $cc -c -o $TMPO $TMPC 2> /dev/null; then
  368. _restrict=$restrict_keyword
  369. break;
  370. fi
  371. done
  372. if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
  373. cat << EOF
  374. Usage: configure [options]
  375. Options: [defaults in brackets after descriptions]
  376. EOF
  377. echo "Standard options:"
  378. echo " --help print this message"
  379. echo " --prefix=PREFIX install in PREFIX [$prefix]"
  380. echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
  381. echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
  382. echo " --enable-win32 enable win32 cross compile"
  383. echo " --disable-a52 disable GPL'ed A52 support [default=no]"
  384. echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
  385. echo " --enable-shared build shared libraries [default=no]"
  386. echo ""
  387. echo "Advanced options (experts only):"
  388. echo " --source-path=PATH path of source code [$source_path]"
  389. echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
  390. echo " --cc=CC use C compiler CC [$cc]"
  391. echo " --make=MAKE use specified make [$make]"
  392. echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
  393. echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
  394. echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
  395. echo " --cpu=CPU force cpu to CPU [$cpu]"
  396. echo " --disable-mmx disable mmx usage"
  397. echo " --disable-altivec disable AltiVec usage"
  398. echo " --disable-audio-oss disable OSS audio support [default=no]"
  399. echo " --disable-audio-beos disable BeOS audio support [default=no]"
  400. echo " --disable-v4l disable video4linux grabbing [default=no]"
  401. echo " --disable-network disable network support [default=no]"
  402. echo " --disable-zlib disable zlib [default=no]"
  403. echo " --disable-simple_idct disable simple IDCT routines [default=no]"
  404. echo " --disable-vhook disable video hooking support"
  405. echo " --enable-gprof enable profiling with gprof [$gprof]"
  406. echo " --disable-mpegaudio-hp faster (but less accurate)"
  407. echo " mpegaudio decoding [default=no]"
  408. echo ""
  409. echo "NOTE: The object files are build at the place where configure is launched"
  410. exit 1
  411. fi
  412. echo "Install prefix $prefix"
  413. echo "Source path $source_path"
  414. echo "C compiler $cc"
  415. echo "make $make"
  416. echo "CPU $cpu"
  417. echo "Big Endian $bigendian"
  418. if test $cpu = "x86"; then
  419. echo "MMX enabled $mmx"
  420. fi
  421. if test $cpu = "mips"; then
  422. echo "MMI enabled $mmi"
  423. fi
  424. if test $cpu = "powerpc"; then
  425. echo "AltiVec enabled $altivec"
  426. fi
  427. echo "gprof enabled $gprof"
  428. echo "zlib enabled $zlib"
  429. echo "mp3lame enabled $mp3lame"
  430. echo "vorbis enabled $vorbis"
  431. echo "a52 support $a52"
  432. echo "a52 dlopened $a52bin"
  433. echo "Video hooking $vhook"
  434. if test "$vhook" = "yes" ; then
  435. echo "Imlib2 support $imlib2"
  436. fi
  437. echo "Creating config.mak and config.h"
  438. echo "# Automatically generated by configure - do not modify" > config.mak
  439. echo "/* Automatically generated by configure - do not modify */" > $TMPH
  440. echo "prefix=$prefix" >> config.mak
  441. echo "MAKE=$make" >> config.mak
  442. echo "CC=$cc" >> config.mak
  443. echo "AR=$ar" >> config.mak
  444. echo "RANLIB=$ranlib" >> config.mak
  445. echo "STRIP=$strip" >> config.mak
  446. echo "OPTFLAGS=$CFLAGS" >> config.mak
  447. echo "LDFLAGS=$LDFLAGS" >> config.mak
  448. echo "SHFLAGS=$SHFLAGS" >> config.mak
  449. if test "$cpu" = "x86" ; then
  450. echo "TARGET_ARCH_X86=yes" >> config.mak
  451. echo "#define ARCH_X86 1" >> $TMPH
  452. elif test "$cpu" = "armv4l" ; then
  453. echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
  454. echo "#define ARCH_ARMV4L 1" >> $TMPH
  455. elif test "$cpu" = "alpha" ; then
  456. echo "TARGET_ARCH_ALPHA=yes" >> config.mak
  457. echo "#define ARCH_ALPHA 1" >> $TMPH
  458. elif test "$cpu" = "sparc64" ; then
  459. echo "TARGET_ARCH_SPARC64=yes" >> config.mak
  460. echo "#define ARCH_SPARC64 1" >> $TMPH
  461. elif test "$cpu" = "powerpc" ; then
  462. echo "TARGET_ARCH_POWERPC=yes" >> config.mak
  463. echo "#define ARCH_POWERPC 1" >> $TMPH
  464. elif test "$cpu" = "mips" ; then
  465. echo "TARGET_ARCH_MIPS=yes" >> config.mak
  466. echo "#define ARCH_MIPS 1" >> $TMPH
  467. fi
  468. if test "$bigendian" = "yes" ; then
  469. echo "WORDS_BIGENDIAN=yes" >> config.mak
  470. echo "#define WORDS_BIGENDIAN 1" >> $TMPH
  471. fi
  472. if test "$mmx" = "yes" ; then
  473. echo "TARGET_MMX=yes" >> config.mak
  474. echo "#define HAVE_MMX 1" >> $TMPH
  475. fi
  476. if test "$mmi" = "yes" ; then
  477. echo "TARGET_MMI=yes" >> config.mak
  478. echo "#define HAVE_MMI 1" >> $TMPH
  479. fi
  480. if test "$altivec" = "yes" ; then
  481. echo "TARGET_ALTIVEC=yes" >> config.mak
  482. echo "#define HAVE_ALTIVEC 1" >> $TMPH
  483. fi
  484. if test "$gprof" = "yes" ; then
  485. echo "TARGET_GPROF=yes" >> config.mak
  486. echo "#define HAVE_GPROF 1" >> $TMPH
  487. fi
  488. if test "$strptime" = "yes" ; then
  489. echo "#define HAVE_STRPTIME 1" >> $TMPH
  490. else
  491. echo "BUILD_STRPTIME=yes" >> config.mak
  492. fi
  493. if test "$imlib2" = "yes" ; then
  494. echo "HAVE_IMLIB2=yes" >> config.mak
  495. fi
  496. if test "$have_lrintf" = "yes" ; then
  497. echo "#define HAVE_LRINTF 1" >> $TMPH
  498. fi
  499. if test "$vhook" = "yes" ; then
  500. echo "BUILD_VHOOK=yes" >> config.mak
  501. echo "#define HAVE_VHOOK 1" >> $TMPH
  502. extralibs="$extralibs $ldl"
  503. fi
  504. if test "$lshared" = "yes" ; then
  505. echo "BUILD_SHARED=yes" >> config.mak
  506. echo "PIC=-fPIC" >> config.mak
  507. fi
  508. echo "EXTRALIBS=$extralibs" >> config.mak
  509. echo -n "VERSION=" >>config.mak
  510. head $source_path/VERSION >>config.mak
  511. echo "" >>config.mak
  512. # if you do not want to use encoders, disable that.
  513. echo "#define CONFIG_ENCODERS 1" >> $TMPH
  514. echo "CONFIG_ENCODERS=yes" >> config.mak
  515. # if you do not want to use decoders, disable that.
  516. echo "#define CONFIG_DECODERS 1" >> $TMPH
  517. echo "CONFIG_DECODERS=yes" >> config.mak
  518. # AC3
  519. if test "$a52" = "yes" ; then
  520. echo "#define CONFIG_AC3 1" >> $TMPH
  521. echo "CONFIG_AC3=yes" >> config.mak
  522. if test "$a52bin" = "yes" ; then
  523. echo "#define CONFIG_A52BIN 1" >> $TMPH
  524. echo "CONFIG_A52BIN=yes" >> config.mak
  525. fi
  526. fi
  527. # mpeg audio high precision mode
  528. if test "$mpegaudio_hp" = "yes" ; then
  529. echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
  530. fi
  531. if test "$v4l" = "yes" ; then
  532. echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
  533. echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
  534. fi
  535. if test "$audio_oss" = "yes" ; then
  536. echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
  537. echo "CONFIG_AUDIO_OSS=yes" >> config.mak
  538. fi
  539. if test "$audio_beos" = "yes" ; then
  540. echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
  541. echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
  542. fi
  543. if test "$network" = "yes" ; then
  544. echo "#define CONFIG_NETWORK 1" >> $TMPH
  545. echo "CONFIG_NETWORK=yes" >> config.mak
  546. fi
  547. if test "$zlib" = "yes" ; then
  548. echo "#define CONFIG_ZLIB 1" >> $TMPH
  549. echo "CONFIG_ZLIB=yes" >> config.mak
  550. fi
  551. if test "$mp3lame" = "yes" ; then
  552. echo "#define CONFIG_MP3LAME 1" >> $TMPH
  553. echo "CONFIG_MP3LAME=yes" >> config.mak
  554. fi
  555. if test "$vorbis" = "yes" ; then
  556. echo "#define CONFIG_VORBIS 1" >> $TMPH
  557. echo "CONFIG_VORBIS=yes" >> config.mak
  558. fi
  559. if test "$win32" = "yes" ; then
  560. echo "#define CONFIG_WIN32 1" >> $TMPH
  561. echo "CONFIG_WIN32=yes" >> config.mak
  562. fi
  563. if test "$cygwin" = "yes" ; then
  564. # setup correct exesuffix
  565. echo "CONFIG_WIN32=yes" >> config.mak
  566. fi
  567. if test "$darwin" = "yes"; then
  568. echo "#define CONFIG_DARWIN 1" >> $TMPH
  569. echo "CONFIG_DARWIN=yes" >> config.mak
  570. fi
  571. if test "$_malloc_h" = "yes" ; then
  572. echo "#define HAVE_MALLOC_H 1" >> $TMPH
  573. else
  574. echo "#undef HAVE_MALLOC_H" >> $TMPH
  575. fi
  576. if test "$_memalign" = "yes" ; then
  577. echo "#define HAVE_MEMALIGN 1" >> $TMPH
  578. else
  579. echo "#undef HAVE_MEMALIGN" >> $TMPH
  580. fi
  581. if test "$netserver" = "yes" ; then
  582. echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
  583. echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
  584. fi
  585. if test "$simpleidct" = "yes" ; then
  586. echo "#define SIMPLE_IDCT 1" >> $TMPH
  587. fi
  588. echo "#define restrict $_restrict" >> $TMPH
  589. # build tree in object directory if source path is different from current one
  590. if test "$source_path_used" = "yes" ; then
  591. DIRS="libav libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
  592. libavcodec/ppc libavcodec/liba52 libavcodec/mlib tests"
  593. FILES="Makefile libav/Makefile libavcodec/Makefile tests/Makefile"
  594. for dir in $DIRS ; do
  595. mkdir -p $dir
  596. done
  597. for f in $FILES ; do
  598. ln -sf $source_path/$f $f
  599. done
  600. fi
  601. echo "SRC_PATH=$source_path" >> config.mak
  602. diff $TMPH config.h >/dev/null 2>&1
  603. if test $? -ne 0 ; then
  604. mv -f $TMPH config.h
  605. else
  606. echo "config.h is unchanged"
  607. fi
  608. rm -f $TMPO $TMPC $TMPS $TMPH