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.

1259 lines
30KB

  1. #!/bin/sh
  2. #
  3. # ffmpeg configure script (c) 2000, 2001, 2002 Fabrice Bellard
  4. #
  5. if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
  6. cat << EOF
  7. Usage: configure [options]
  8. Options: [defaults in brackets after descriptions]
  9. EOF
  10. echo "Standard options:"
  11. echo " --help print this message"
  12. echo " --prefix=PREFIX install in PREFIX [$prefix]"
  13. echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
  14. echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
  15. echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
  16. echo " --enable-faad enable faad support via libfaad [default=no]"
  17. echo " --enable-faadbin build faad support with runtime linking [default=no]"
  18. echo " --enable-faac enable faac support via libfaac [default=no]"
  19. echo " --enable-mingw32 enable mingw32 native/cross windows compile"
  20. echo " --enable-a52 enable GPL'ed A52 support [default=no]"
  21. echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
  22. echo " --enable-pp enable GPL'ed post processing support [default=no]"
  23. echo " --enable-shared-pp use libpostproc.so [default=no]"
  24. echo " --enable-shared build shared libraries [default=no]"
  25. echo " --enable-amr_nb enable amr_nb float audio codec"
  26. echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
  27. echo " --enable-amr_wb enable amr_wb float audio codec"
  28. echo " --enable-sunmlib use Sun medialib [default=no]"
  29. echo ""
  30. echo "Advanced options (experts only):"
  31. echo " --source-path=PATH path of source code [$source_path]"
  32. echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
  33. echo " --cc=CC use C compiler CC [$cc]"
  34. echo " --make=MAKE use specified make [$make]"
  35. echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
  36. echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
  37. echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
  38. echo " --cpu=CPU force cpu to CPU [$cpu]"
  39. echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
  40. echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
  41. echo " --disable-mmx disable mmx usage"
  42. echo " --disable-altivec disable AltiVec usage"
  43. echo " --disable-audio-oss disable OSS audio support [default=no]"
  44. echo " --disable-audio-beos disable BeOS audio support [default=no]"
  45. echo " --disable-v4l disable video4linux grabbing [default=no]"
  46. echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
  47. echo " --disable-network disable network support [default=no]"
  48. echo " --disable-zlib disable zlib [default=no]"
  49. echo " --disable-simple_idct disable simple IDCT routines [default=no]"
  50. echo " --disable-vhook disable video hooking support"
  51. echo " --enable-gprof enable profiling with gprof [$gprof]"
  52. echo " --disable-debug disable debugging symbols"
  53. echo " --disable-opts disable compiler optimizations"
  54. echo " --disable-mpegaudio-hp faster (but less accurate)"
  55. echo " mpegaudio decoding [default=no]"
  56. echo " --disable-ffserver disable ffserver build"
  57. echo " --disable-ffplay disable ffplay build"
  58. echo " --disable-risky disables patent encumbered codecs"
  59. echo " --enable-small optimize for size instead of speed"
  60. echo ""
  61. echo "NOTE: The object files are build at the place where configure is launched"
  62. exit 1
  63. fi
  64. # set temporary file name
  65. if test ! -z "$TMPDIR" ; then
  66. TMPDIR1="${TMPDIR}"
  67. elif test ! -z "$TEMPDIR" ; then
  68. TMPDIR1="${TEMPDIR}"
  69. else
  70. TMPDIR1="/tmp"
  71. fi
  72. TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
  73. TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
  74. TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
  75. TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
  76. TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
  77. # default parameters
  78. prefix="/usr/local"
  79. mandir=""
  80. bindir=""
  81. cross_prefix=""
  82. cc="gcc"
  83. ar="ar"
  84. ranlib="ranlib"
  85. make="make"
  86. strip="strip"
  87. cpu=`uname -m`
  88. tune="generic"
  89. powerpc_perf="no"
  90. mmx="default"
  91. altivec="default"
  92. mmi="default"
  93. case "$cpu" in
  94. i386|i486|i586|i686|i86pc|BePC)
  95. cpu="x86"
  96. ;;
  97. # armv4l is a subset of armv5tel
  98. armv4l|armv5tel)
  99. cpu="armv4l"
  100. ;;
  101. alpha)
  102. cpu="alpha"
  103. ;;
  104. "Power Macintosh"|ppc)
  105. cpu="powerpc"
  106. ;;
  107. mips)
  108. cpu="mips"
  109. ;;
  110. sun4u)
  111. cpu="sparc64"
  112. ;;
  113. sh4)
  114. cpu="sh4"
  115. ;;
  116. *)
  117. cpu="unknown"
  118. ;;
  119. esac
  120. gprof="no"
  121. v4l="yes"
  122. audio_oss="yes"
  123. audio_beos="no"
  124. dv1394="yes"
  125. network="yes"
  126. zlib="yes"
  127. mp3lame="no"
  128. vorbis="no"
  129. faad="no"
  130. faadbin="no"
  131. faac="no"
  132. a52="no"
  133. a52bin="no"
  134. pp="no"
  135. shared_pp="no"
  136. mingw32="no"
  137. cygwin="no"
  138. os2="no"
  139. lshared="no"
  140. optimize="yes"
  141. debug="yes"
  142. extralibs="-lm"
  143. simpleidct="yes"
  144. bigendian="no"
  145. emu_fast_int="no"
  146. vhook="default"
  147. dlfcn="no"
  148. dlopen="no"
  149. mpegaudio_hp="yes"
  150. SHFLAGS=-shared
  151. netserver="no"
  152. need_inet_aton="no"
  153. ffserver="yes"
  154. ffplay="yes"
  155. LDFLAGS=-Wl,--warn-common
  156. FFSLDFLAGS=-Wl,-E
  157. LIBPREF="lib"
  158. LIBSUF=".a"
  159. SLIBPREF="lib"
  160. SLIBSUF=".so"
  161. EXESUF=""
  162. risky="yes"
  163. amr_nb="no"
  164. amr_wb="no"
  165. amr_nb_fixed="no"
  166. sunmlib="no"
  167. # OS specific
  168. targetos=`uname -s`
  169. case $targetos in
  170. BeOS)
  171. prefix="/boot/home/config"
  172. # helps building libavcodec
  173. CFLAGS="-DPIC -fomit-frame-pointer"
  174. # 3 gcc releases known for BeOS, each with ugly bugs
  175. gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
  176. case "$gcc_version" in
  177. 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
  178. mmx="no"
  179. ;;
  180. *20010315*) echo "BeBits gcc"
  181. CFLAGS="$CFLAGS -fno-expensive-optimizations"
  182. ;;
  183. esac
  184. SHFLAGS=-nostart
  185. # disable linux things
  186. audio_oss="no"
  187. v4l="no"
  188. dv1394="no"
  189. # enable beos things
  190. audio_beos="yes"
  191. # no need for libm, but the inet stuff
  192. # Check for BONE
  193. if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
  194. extralibs="-lbind -lsocket"
  195. else
  196. netserver="yes"
  197. need_inet_aton="yes"
  198. extralibs="-lnet"
  199. fi ;;
  200. SunOS)
  201. v4l="no"
  202. audio_oss="no"
  203. dv1394="no"
  204. make="gmake"
  205. LDFLAGS=""
  206. FFSLDFLAGS=""
  207. need_inet_aton="yes"
  208. extralibs="$extralibs -lsocket -lnsl"
  209. ;;
  210. FreeBSD)
  211. v4l="no"
  212. audio_oss="yes"
  213. dv1394="no"
  214. make="gmake"
  215. LDFLAGS="$LDFLAGS -export-dynamic"
  216. ;;
  217. BSD/OS)
  218. v4l="no"
  219. audio_oss="yes"
  220. dv1394="no"
  221. extralibs="-lpoll -lgnugetopt -lm"
  222. make="gmake"
  223. ;;
  224. Darwin)
  225. cc="cc"
  226. v4l="no"
  227. audio_oss="no"
  228. dv1394="no"
  229. ffserver="no"
  230. SHFLAGS="-dynamiclib"
  231. extralibs=""
  232. darwin="yes"
  233. strip="strip -x"
  234. LDFLAGS="-Wl,-d"
  235. FFSLDFLAGS=-Wl,-bind_at_load
  236. ;;
  237. MINGW32*)
  238. # Note: the rest of the mingw32 config is done afterwards as mingw32
  239. # can be forced on command line for linux cross compilation
  240. mingw32="yes"
  241. ;;
  242. CYGWIN*)
  243. v4l="no"
  244. audio_oss="yes"
  245. dv1394="no"
  246. extralibs=""
  247. cygwin="yes"
  248. test -f /usr/include/inttypes.h || \
  249. test -f /usr/local/include/inttypes.h || \
  250. echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
  251. "/usr/include/inttypes.h !!!"
  252. ;;
  253. Linux)
  254. LDFLAGS="$LDFLAGS -rdynamic"
  255. ;;
  256. IRIX*)
  257. ranlib="echo ignoring ranlib"
  258. v4l="no"
  259. audio_oss="no"
  260. make="gmake"
  261. ;;
  262. OS/2)
  263. TMPE=$TMPE".exe"
  264. ar="emxomfar -p64"
  265. ranlib="echo ignoring ranlib"
  266. strip="echo ignoring strip"
  267. CFLAGS="-Zomf"
  268. LDFLAGS="-Zomf -Zstack 16384 -s"
  269. SHFLAGS=""
  270. FFSLDFLAGS=""
  271. LIBPREF=""
  272. LIBSUF=".lib"
  273. SLIBPREF=""
  274. SLIBSUF=".dll"
  275. EXESUF=".exe"
  276. extralibs=""
  277. v4l="no"
  278. audio_oss="no"
  279. dv1394="no"
  280. network="no"
  281. ffserver="no"
  282. os2="yes"
  283. ;;
  284. *) ;;
  285. esac
  286. # From mplayer configure. We need TARGET_OS available
  287. # to the Makefile, so it can distinguish between flavors
  288. # of AltiVec on PowerPC
  289. TARGET_OS=`( uname -s ) 2>&1`
  290. case "$TARGET_OS" in
  291. Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
  292. ;;
  293. IRIX*)
  294. TARGET_OS=IRIX
  295. ;;
  296. HP-UX*)
  297. TARGET_OS=HP-UX
  298. ;;
  299. [cC][yY][gG][wW][iI][nN]*)
  300. TARGET_OS=CYGWIN
  301. ;;
  302. *)
  303. TARGET_OS="$TARGET_OS-UNKNOWN"
  304. ;;
  305. esac
  306. # find source path
  307. # XXX: we assume an absolute path is given when launching configure,
  308. # except in './configure' case.
  309. source_path="`echo $0 | sed -e 's#/configure##'`"
  310. source_path_used="yes"
  311. if test -z "$source_path" -o "$source_path" = "." ; then
  312. source_path=`pwd`
  313. source_path_used="no"
  314. fi
  315. for opt do
  316. case "$opt" in
  317. --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
  318. ;;
  319. --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
  320. ;;
  321. --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
  322. ;;
  323. --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
  324. ;;
  325. --cc=*) cc=`echo $opt | cut -d '=' -f 2`
  326. ;;
  327. --make=*) make=`echo $opt | cut -d '=' -f 2`
  328. ;;
  329. --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
  330. ;;
  331. --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
  332. ;;
  333. --extra-libs=*) extralibs=${opt#--extra-libs=}
  334. ;;
  335. --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
  336. ;;
  337. --tune=*) tune=`echo $opt | cut -d '=' -f 2`
  338. ;;
  339. --powerpc-perf-enable) powerpc_perf="yes"
  340. ;;
  341. --disable-mmx) mmx="no"
  342. ;;
  343. --disable-altivec) altivec="no"
  344. ;;
  345. --enable-gprof) gprof="yes"
  346. ;;
  347. --disable-v4l) v4l="no"
  348. ;;
  349. --disable-audio-oss) audio_oss="no"
  350. ;;
  351. --disable-audio-beos) audio_beos="no"
  352. ;;
  353. --disable-dv1394) dv1394="no"
  354. ;;
  355. --disable-network) network="no"
  356. ;;
  357. --disable-zlib) zlib="no"
  358. ;;
  359. --enable-a52) a52="yes"
  360. ;;
  361. --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
  362. ;;
  363. --enable-pp) pp="yes"
  364. ;;
  365. --enable-shared-pp) shared_pp="yes"
  366. ;;
  367. --enable-mp3lame) mp3lame="yes"
  368. ;;
  369. --enable-vorbis) vorbis="yes"
  370. ;;
  371. --enable-faad) faad="yes"
  372. ;;
  373. --enable-faadbin) faadbin="yes"
  374. ;;
  375. --enable-faac) faac="yes"
  376. ;;
  377. --disable-vhook) vhook="no"
  378. ;;
  379. --disable-simple_idct) simpleidct="no"
  380. ;;
  381. --enable-mingw32) mingw32="yes"
  382. ;;
  383. --enable-shared) lshared="yes"
  384. ;;
  385. --disable-debug) debug="no"
  386. ;;
  387. --disable-opts) optimize="no"
  388. ;;
  389. --disable-mpegaudio-hp) mpegaudio_hp="no"
  390. ;;
  391. --disable-ffserver) ffserver="no"
  392. ;;
  393. --disable-ffplay) ffplay="no"
  394. ;;
  395. --disable-risky) risky="no"
  396. ;;
  397. --enable-small) optimize="small"
  398. ;;
  399. --enable-amr_nb) amr_nb="yes"
  400. ;;
  401. --enable-amr_nb-fixed) amr_nb_fixed="yes"
  402. ;;
  403. --enable-amr_wb) amr_wb="yes"
  404. ;;
  405. --enable-sunmlib) sunmlib="yes"
  406. ;;
  407. esac
  408. done
  409. # compute mmx state
  410. if test $mmx = "default"; then
  411. if test $cpu = "x86"; then
  412. mmx="yes"
  413. else
  414. mmx="no"
  415. fi
  416. fi
  417. #Darwin CC versions
  418. needmdynamicnopic="no"
  419. if test $targetos = Darwin; then
  420. if test -n "`$cc -v 2>&1 | grep xlc`"; then
  421. CFLAGS="-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
  422. else
  423. gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
  424. case "$gcc_version" in
  425. *2.95*)
  426. CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
  427. ;;
  428. *3.*)
  429. CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
  430. if test "$lshared" = no; then
  431. needmdynamicnopic="yes"
  432. fi
  433. ;;
  434. *)
  435. CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
  436. if test "$lshared" = no; then
  437. needmdynamicnopic="yes"
  438. fi
  439. ;;
  440. esac
  441. fi
  442. fi
  443. # Can only do AltiVec on PowerPC
  444. if test $altivec = "default"; then
  445. if test $cpu = "powerpc"; then
  446. altivec="yes"
  447. else
  448. altivec="no"
  449. fi
  450. fi
  451. # Add processor-specific flags
  452. TUNECPU="generic"
  453. if test $tune != "generic"; then
  454. case $tune in
  455. 601|ppc601|PowerPC601)
  456. CFLAGS="$CFLAGS -mcpu=601"
  457. if test $altivec = "yes"; then
  458. echo "WARNING: tuning for PPC601 but altivec enabled !";
  459. fi
  460. TUNECPU=ppc601
  461. ;;
  462. 603*|ppc603*|PowerPC603*)
  463. CFLAGS="$CFLAGS -mcpu=603"
  464. if test $altivec = "yes"; then
  465. echo "WARNING: tuning for PPC603 but altivec enabled !";
  466. fi
  467. TUNECPU=ppc603
  468. ;;
  469. 604*|ppc604*|PowerPC604*)
  470. CFLAGS="$CFLAGS -mcpu=604"
  471. if test $altivec = "yes"; then
  472. echo "WARNING: tuning for PPC604 but altivec enabled !";
  473. fi
  474. TUNECPU=ppc604
  475. ;;
  476. G3|g3|75*|ppc75*|PowerPC75*)
  477. CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"
  478. if test $altivec = "yes"; then
  479. echo "WARNING: tuning for PPC75x but altivec enabled !";
  480. fi
  481. TUNECPU=ppc750
  482. ;;
  483. G4|g4|745*|ppc745*|PowerPC745*)
  484. CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
  485. if test $altivec = "no"; then
  486. echo "WARNING: tuning for PPC745x but altivec disabled !";
  487. fi
  488. TUNECPU=ppc7450
  489. ;;
  490. 74*|ppc74*|PowerPC74*)
  491. CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
  492. if test $altivec = "no"; then
  493. echo "WARNING: tuning for PPC74xx but altivec disabled !";
  494. fi
  495. TUNECPU=ppc7400
  496. ;;
  497. G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
  498. CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc64 -force_cpusubtype_ALL "
  499. if test $altivec = "no"; then
  500. echo "WARNING: tuning for PPC970 but altivec disabled !";
  501. fi
  502. TUNECPU=ppc970
  503. ;;
  504. *)
  505. echo "WARNING: unknown CPU "$tune", ignored"
  506. ;;
  507. esac
  508. fi
  509. # AltiVec flags: The FSF version of GCC differs from the Apple version
  510. if test $cpu = "powerpc"; then
  511. if test $altivec = "yes"; then
  512. if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
  513. CFLAGS="$CFLAGS -faltivec"
  514. else
  515. CFLAGS="$CFLAGS -maltivec -mabi=altivec"
  516. fi
  517. fi
  518. fi
  519. # See if we have <altivec.h>
  520. cat > $TMPC << EOF
  521. #include <altivec.h>
  522. int main( void ) { return 0; }
  523. EOF
  524. _altivec_h="no"
  525. if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
  526. _altivec_h="yes"
  527. fi
  528. # See does our compiler support Motorola AltiVec C API
  529. if test $altivec = "yes"; then
  530. if test $_altivec_h = "yes"; then
  531. cat > $TMPC << EOF
  532. #include <altivec.h>
  533. int main(void) {
  534. vector signed int v1, v2, v3;
  535. v1 = vec_add(v2,v3);
  536. return 0;
  537. }
  538. EOF
  539. else
  540. cat > $TMPC << EOF
  541. int main(void) {
  542. vector signed int v1, v2, v3;
  543. v1 = vec_add(v2,v3);
  544. return 0;
  545. }
  546. EOF
  547. fi
  548. $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
  549. fi
  550. # Can only do mmi on mips
  551. if test $mmi = "default"; then
  552. if test $cpu = "mips"; then
  553. mmi="yes"
  554. else
  555. mmi="no"
  556. fi
  557. fi
  558. # See does our compiler support mmi
  559. if test $mmi = "yes"; then
  560. cat > $TMPC << EOF
  561. int main(void) {
  562. __asm__ ("lq \$2, 0(\$2)");
  563. return 0;
  564. }
  565. EOF
  566. $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
  567. fi
  568. if test "$mingw32" = "yes" ; then
  569. v4l="no"
  570. audio_oss="no"
  571. dv1394="no"
  572. ffserver="no"
  573. network="no"
  574. LIBPREF=""
  575. LIBSUF=".lib"
  576. SLIBPREF=""
  577. SLIBSUF=".dll"
  578. EXESUF=".exe"
  579. prefix="/c/Program Files/FFmpeg"
  580. bindir="$prefix"
  581. fi
  582. cc="${cross_prefix}${cc}"
  583. ar="${cross_prefix}${ar}"
  584. ranlib="${cross_prefix}${ranlib}"
  585. strip="${cross_prefix}${strip}"
  586. if test -z "$cross_prefix" ; then
  587. # ---
  588. # big/little endian test
  589. cat > $TMPC << EOF
  590. #include <inttypes.h>
  591. int main(int argc, char ** argv){
  592. volatile uint32_t i=0x01234567;
  593. return (*((uint8_t*)(&i))) == 0x67;
  594. }
  595. EOF
  596. if $cc -o $TMPE $TMPC 2>/dev/null ; then
  597. $TMPE && bigendian="yes"
  598. else
  599. echo big/little test failed
  600. fi
  601. else
  602. # if cross compiling, cannot launch a program, so make a static guess
  603. if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
  604. bigendian="yes"
  605. fi
  606. fi
  607. # ---
  608. # *int_fast* test
  609. cat > $TMPC << EOF
  610. #include <inttypes.h>
  611. int main(int argc, char ** argv){
  612. volatile uint_fast64_t i=0x01234567;
  613. return 0;
  614. }
  615. EOF
  616. $cc -o $TMPE $TMPC 2>/dev/null || emu_fast_int="yes"
  617. # ---
  618. # check availability of some header files
  619. cat > $TMPC << EOF
  620. #include <malloc.h>
  621. int main( void ) { return 0; }
  622. EOF
  623. _memalign=no
  624. _malloc_h=no
  625. if $cc -o $TMPE $TMPC 2> /dev/null ; then
  626. _malloc_h=yes
  627. _memalign=yes
  628. # check for memalign - atmos
  629. cat > $TMPC << EOF
  630. #include <malloc.h>
  631. int main ( void ) {
  632. char *string = NULL;
  633. string = memalign(64, sizeof(char));
  634. return 0;
  635. }
  636. EOF
  637. $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
  638. fi
  639. cat > $TMPC << EOF
  640. #include <time.h>
  641. int main( void ) { localtime_r(NULL, NULL); }
  642. EOF
  643. localtime_r=no
  644. if $cc -o $TMPE $TMPC 2> /dev/null ; then
  645. localtime_r=yes
  646. fi
  647. if test "$zlib" = "yes"; then
  648. # check for zlib - mmu_man
  649. cat > $TMPC << EOF
  650. #include <zlib.h>
  651. int main ( void ) {
  652. if (zlibVersion() != ZLIB_VERSION)
  653. puts("zlib version differs !!!");
  654. return 1;
  655. return 0;
  656. }
  657. EOF
  658. $cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
  659. # $TMPE 2> /dev/null > /dev/null || zlib="no"
  660. # XXX: more tests needed - runtime test
  661. fi
  662. if test "$zlib" = "yes"; then
  663. extralibs="$extralibs -lz"
  664. fi
  665. # test for lrintf in math.h
  666. cat > $TMPC << EOF
  667. #define _ISOC9X_SOURCE 1
  668. #include <math.h>
  669. int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
  670. EOF
  671. have_lrintf="no"
  672. if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
  673. have_lrintf="yes"
  674. $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
  675. fi
  676. _restrict=
  677. for restrict_keyword in restrict __restrict__ __restrict; do
  678. echo "void foo(char * $restrict_keyword p);" > $TMPC
  679. if $cc -c -o $TMPO $TMPC 2> /dev/null; then
  680. _restrict=$restrict_keyword
  681. break;
  682. fi
  683. done
  684. # test gcc version to see if vector builtins can be used
  685. # currently only used on i386 for MMX builtins
  686. cat > $TMPC << EOF
  687. int main(void) {
  688. #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  689. return 0;
  690. #else
  691. #error no vector builtins
  692. #endif
  693. }
  694. EOF
  695. builtin_vector=no
  696. if $cc -o $TMPO $TMPC 2> /dev/null ; then
  697. builtin_vector=yes
  698. fi
  699. # dlopen/dlfcn.h probing
  700. cat > $TMPC << EOF
  701. #include <dlfcn.h>
  702. int main( void ) { return (int) dlopen("foo", 0); }
  703. EOF
  704. ldl=-ldl
  705. if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
  706. dlfcn=yes
  707. dlopen=yes
  708. fi
  709. if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then
  710. dlfcn=yes
  711. dlopen=yes
  712. ldl=""
  713. fi
  714. cat > $TMPC << EOF
  715. int main( void ) { return (int) dlopen("foo", 0); }
  716. EOF
  717. if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
  718. dlopen=yes
  719. fi
  720. if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then
  721. dlopen=yes
  722. ldl=""
  723. fi
  724. if test "$vhook" = "default" ; then
  725. vhook="$dlopen"
  726. fi
  727. ##########################################
  728. # imlib probe
  729. cat > $TMPC << EOF
  730. #include <X11/Xlib.h>
  731. #include <Imlib2.h>
  732. int main( void ) { return (int) imlib_load_font("foo"); }
  733. EOF
  734. imlib2=no
  735. if $cc -o $TMPE $TMPC -lImlib2 > /dev/null 2>&1 ; then
  736. imlib2=yes
  737. fi
  738. ##########################################
  739. # freetype probe
  740. cat > $TMPC << EOF
  741. #include <ft2build.h>
  742. int main( void ) { return (int) FT_Init_FreeType(0); }
  743. EOF
  744. freetype2=no
  745. if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
  746. if test "`which freetype-config`" != ""; then
  747. if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` > /dev/null 2>&1 ; then
  748. freetype2=yes
  749. fi
  750. fi
  751. fi
  752. ##########################################
  753. # SDL probe
  754. cat > $TMPC << EOF
  755. #include <SDL.h>
  756. #undef main /* We don't want SDL to override our main() */
  757. int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
  758. EOF
  759. sdl_too_old=no
  760. sdl=no
  761. if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` > /dev/null 2>&1 ; then
  762. _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
  763. if test "$_sdlversion" -lt 121 ; then
  764. sdl_too_old=yes
  765. else
  766. sdl=yes
  767. fi
  768. fi
  769. case "`$cc -v 2>&1 | grep version`" in
  770. *gcc*)
  771. CFLAGS="-Wall $CFLAGS"
  772. ;;
  773. *)
  774. ;;
  775. esac
  776. if test "$sdl" = "no" ; then
  777. ffplay=no
  778. fi
  779. if test "$debug" = "yes"; then
  780. CFLAGS="$CFLAGS -g"
  781. fi
  782. if test "$optimize" = "small"; then
  783. # CFLAGS=${CFLAGS//-O3/-Os}
  784. CFLAGS="$CFLAGS -Os"
  785. fi
  786. if test "$optimize" = "yes"; then
  787. if test -n "`$cc -v 2>&1 | grep xlc`"; then
  788. CFLAGS="$CFLAGS -O5"
  789. LDFLAGS="$LDFLAGS -O5"
  790. else
  791. CFLAGS="$CFLAGS -O3"
  792. fi
  793. fi
  794. if test x"$bindir" = x""; then
  795. bindir="${prefix}/bin"
  796. fi
  797. if test x"$mandir" = x""; then
  798. mandir="${prefix}/man"
  799. fi
  800. echo "Install prefix $prefix"
  801. echo "Source path $source_path"
  802. echo "C compiler $cc"
  803. echo "make $make"
  804. echo "CPU $cpu ($tune)"
  805. echo "Big Endian $bigendian"
  806. echo "broken inttypes.h $emu_fast_int"
  807. if test $cpu = "x86"; then
  808. echo "MMX enabled $mmx"
  809. echo "Vector Builtins $builtin_vector"
  810. fi
  811. if test $cpu = "mips"; then
  812. echo "MMI enabled $mmi"
  813. fi
  814. if test $cpu = "powerpc"; then
  815. echo "AltiVec enabled $altivec"
  816. fi
  817. echo "gprof enabled $gprof"
  818. echo "zlib enabled $zlib"
  819. echo "mp3lame enabled $mp3lame"
  820. echo "vorbis enabled $vorbis"
  821. echo "faad enabled $faad"
  822. echo "faadbin enabled $faadbin"
  823. echo "faac enabled $faac"
  824. echo "a52 support $a52"
  825. echo "a52 dlopened $a52bin"
  826. echo "pp support $pp"
  827. echo "debug symbols $debug"
  828. echo "optimize $optimize"
  829. echo "shared pp $shared_pp"
  830. echo "Video hooking $vhook"
  831. echo "SDL support $sdl"
  832. if test $sdl_too_old = "yes"; then
  833. echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
  834. fi
  835. echo "risky / patent encumbered codecs $risky"
  836. if test "$vhook" = "yes" ; then
  837. echo "Imlib2 support $imlib2"
  838. echo "freetype support $freetype2"
  839. fi
  840. echo "Sun medialib support" $sunmlib
  841. echo "AMR-NB float support" $amr_nb
  842. echo "AMR-NB fixed support" $amr_nb_fixed
  843. echo "AMR-WB float support" $amr_wb
  844. echo "Creating config.mak and config.h"
  845. echo "# Automatically generated by configure - do not modify" > config.mak
  846. echo "/* Automatically generated by configure - do not modify */" > $TMPH
  847. echo "prefix=$prefix" >> config.mak
  848. echo "bindir=$bindir" >> config.mak
  849. echo "mandir=$mandir" >> config.mak
  850. echo "MAKE=$make" >> config.mak
  851. echo "CC=$cc" >> config.mak
  852. echo "AR=$ar" >> config.mak
  853. echo "RANLIB=$ranlib" >> config.mak
  854. echo "STRIP=$strip" >> config.mak
  855. # SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic. Used when building
  856. # shared modules on OS/X (vhook/Makefile).
  857. SHCFLAGS=$CFLAGS
  858. if test "$needmdynamicnopic" = yes; then
  859. CFLAGS="$CFLAGS -mdynamic-no-pic"
  860. fi
  861. echo "OPTFLAGS=$CFLAGS" >> config.mak
  862. echo "SHCFLAGS=$SHCFLAGS">>config.mak
  863. echo "LDFLAGS=$LDFLAGS" >> config.mak
  864. echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
  865. echo "SHFLAGS=$SHFLAGS" >> config.mak
  866. echo "LIBPREF=$LIBPREF" >> config.mak
  867. echo "LIBSUF=$LIBSUF" >> config.mak
  868. echo "SLIBPREF=$SLIBPREF" >> config.mak
  869. echo "SLIBSUF=$SLIBSUF" >> config.mak
  870. echo "EXESUF=$EXESUF" >> config.mak
  871. echo "TARGET_OS=$TARGET_OS" >> config.mak
  872. if test "$cpu" = "x86" ; then
  873. echo "TARGET_ARCH_X86=yes" >> config.mak
  874. echo "#define ARCH_X86 1" >> $TMPH
  875. elif test "$cpu" = "armv4l" ; then
  876. echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
  877. echo "#define ARCH_ARMV4L 1" >> $TMPH
  878. elif test "$cpu" = "alpha" ; then
  879. echo "TARGET_ARCH_ALPHA=yes" >> config.mak
  880. echo "#define ARCH_ALPHA 1" >> $TMPH
  881. elif test "$cpu" = "sparc64" ; then
  882. echo "TARGET_ARCH_SPARC64=yes" >> config.mak
  883. echo "#define ARCH_SPARC64 1" >> $TMPH
  884. elif test "$cpu" = "powerpc" ; then
  885. echo "TARGET_ARCH_POWERPC=yes" >> config.mak
  886. echo "#define ARCH_POWERPC 1" >> $TMPH
  887. if test "$powerpc_perf" = "yes"; then
  888. echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
  889. fi
  890. elif test "$cpu" = "mips" ; then
  891. echo "TARGET_ARCH_MIPS=yes" >> config.mak
  892. echo "#define ARCH_MIPS 1" >> $TMPH
  893. elif test "$cpu" = "sh4" ; then
  894. echo "TARGET_ARCH_SH4=yes" >> config.mak
  895. echo "#define ARCH_SH4 1" >> $TMPH
  896. fi
  897. echo "#define TUNECPU $TUNECPU" >> $TMPH
  898. if test "$bigendian" = "yes" ; then
  899. echo "WORDS_BIGENDIAN=yes" >> config.mak
  900. echo "#define WORDS_BIGENDIAN 1" >> $TMPH
  901. fi
  902. if test "$emu_fast_int" = "yes" ; then
  903. echo "#define EMULATE_FAST_INT 1" >> $TMPH
  904. fi
  905. if test "$mmx" = "yes" ; then
  906. echo "TARGET_MMX=yes" >> config.mak
  907. echo "#define HAVE_MMX 1" >> $TMPH
  908. echo "#define __CPU__ 586" >> $TMPH
  909. fi
  910. if test "$builtin_vector" = "yes" ; then
  911. echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
  912. echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
  913. fi
  914. if test "$mmi" = "yes" ; then
  915. echo "TARGET_MMI=yes" >> config.mak
  916. echo "#define HAVE_MMI 1" >> $TMPH
  917. fi
  918. if test "$altivec" = "yes" ; then
  919. echo "TARGET_ALTIVEC=yes" >> config.mak
  920. echo "#define HAVE_ALTIVEC 1" >> $TMPH
  921. echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
  922. echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
  923. if test "$_altivec_h" = "yes" ; then
  924. echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
  925. else
  926. echo "#undef HAVE_ALTIVEC_H" >> $TMPH
  927. fi
  928. fi
  929. if test "$gprof" = "yes" ; then
  930. echo "TARGET_GPROF=yes" >> config.mak
  931. echo "#define HAVE_GPROF 1" >> $TMPH
  932. fi
  933. if test "$localtime_r" = "yes" ; then
  934. echo "#define HAVE_LOCALTIME_R 1" >> $TMPH
  935. fi
  936. if test "$imlib2" = "yes" ; then
  937. echo "HAVE_IMLIB2=yes" >> config.mak
  938. fi
  939. if test "$freetype2" = "yes" ; then
  940. echo "HAVE_FREETYPE2=yes" >> config.mak
  941. fi
  942. if test "$sunmlib" = "yes" ; then
  943. echo "HAVE_MLIB=yes" >> config.mak
  944. echo "#define HAVE_MLIB 1" >> $TMPH
  945. extralibs="$extralibs -lmlib"
  946. fi
  947. if test "$sdl" = "yes" ; then
  948. echo "CONFIG_SDL=yes" >> config.mak
  949. echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
  950. echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
  951. fi
  952. if test "$have_lrintf" = "yes" ; then
  953. echo "#define HAVE_LRINTF 1" >> $TMPH
  954. fi
  955. if test "$vhook" = "yes" ; then
  956. echo "BUILD_VHOOK=yes" >> config.mak
  957. echo "#define HAVE_VHOOK 1" >> $TMPH
  958. extralibs="$extralibs $ldl"
  959. fi
  960. if test "$lshared" = "yes" ; then
  961. echo "BUILD_SHARED=yes" >> config.mak
  962. echo "PIC=-fPIC" >> config.mak
  963. fi
  964. echo "EXTRALIBS=$extralibs" >> config.mak
  965. version=`grep '#define FFMPEG_VERSION ' $source_path/libavcodec/avcodec.h |
  966. cut -d '"' -f 2`
  967. echo "VERSION=$version" >>config.mak
  968. # if you do not want to use encoders, disable that.
  969. echo "#define CONFIG_ENCODERS 1" >> $TMPH
  970. echo "CONFIG_ENCODERS=yes" >> config.mak
  971. # if you do not want to use decoders, disable that.
  972. echo "#define CONFIG_DECODERS 1" >> $TMPH
  973. echo "CONFIG_DECODERS=yes" >> config.mak
  974. # AC3
  975. if test "$a52" = "yes" ; then
  976. echo "#define CONFIG_AC3 1" >> $TMPH
  977. echo "CONFIG_AC3=yes" >> config.mak
  978. if test "$a52bin" = "yes" ; then
  979. echo "#define CONFIG_A52BIN 1" >> $TMPH
  980. echo "CONFIG_A52BIN=yes" >> config.mak
  981. fi
  982. fi
  983. # PP
  984. if test "$pp" = "yes" ; then
  985. echo "#define CONFIG_PP 1" >> $TMPH
  986. echo "CONFIG_PP=yes" >> config.mak
  987. if test "$shared_pp" = "yes" ; then
  988. echo "#define SHARED_PP 1" >> $TMPH
  989. echo "SHARED_PP=yes" >> config.mak
  990. fi
  991. fi
  992. # mpeg audio high precision mode
  993. if test "$mpegaudio_hp" = "yes" ; then
  994. echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
  995. fi
  996. if test "$v4l" = "yes" ; then
  997. echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
  998. echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
  999. fi
  1000. if test "$dv1394" = "yes" ; then
  1001. echo "#define CONFIG_DV1394 1" >> $TMPH
  1002. echo "CONFIG_DV1394=yes" >> config.mak
  1003. fi
  1004. if test "$dlopen" = "yes" ; then
  1005. echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
  1006. fi
  1007. if test "$dlfcn" = "yes" ; then
  1008. echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
  1009. fi
  1010. if test "$audio_oss" = "yes" ; then
  1011. echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
  1012. echo "CONFIG_AUDIO_OSS=yes" >> config.mak
  1013. fi
  1014. if test "$audio_beos" = "yes" ; then
  1015. echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
  1016. echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
  1017. fi
  1018. if test "$network" = "yes" ; then
  1019. echo "#define CONFIG_NETWORK 1" >> $TMPH
  1020. echo "CONFIG_NETWORK=yes" >> config.mak
  1021. fi
  1022. if test "$zlib" = "yes" ; then
  1023. echo "#define CONFIG_ZLIB 1" >> $TMPH
  1024. echo "CONFIG_ZLIB=yes" >> config.mak
  1025. fi
  1026. if test "$mp3lame" = "yes" ; then
  1027. echo "#define CONFIG_MP3LAME 1" >> $TMPH
  1028. echo "CONFIG_MP3LAME=yes" >> config.mak
  1029. fi
  1030. if test "$vorbis" = "yes" ; then
  1031. echo "#define CONFIG_VORBIS 1" >> $TMPH
  1032. echo "CONFIG_VORBIS=yes" >> config.mak
  1033. fi
  1034. if test "$faad" = "yes" ; then
  1035. echo "#define CONFIG_FAAD 1" >> $TMPH
  1036. echo "CONFIG_FAAD=yes" >> config.mak
  1037. fi
  1038. if test "$faadbin" = "yes" ; then
  1039. echo "#define CONFIG_FAADBIN 1" >> $TMPH
  1040. echo "CONFIG_FAADBIN=yes" >> config.mak
  1041. fi
  1042. if test "$faac" = "yes" ; then
  1043. echo "#define CONFIG_FAAC 1" >> $TMPH
  1044. echo "CONFIG_FAAC=yes" >> config.mak
  1045. fi
  1046. if test "$mingw32" = "yes" ; then
  1047. echo "#define CONFIG_WIN32 1" >> $TMPH
  1048. echo "CONFIG_WIN32=yes" >> config.mak
  1049. echo "#ifndef __MINGW32__" >> $TMPH
  1050. echo "#define __MINGW32__ 1" >> $TMPH
  1051. echo "#endif" >> $TMPH
  1052. fi
  1053. if test "$os2" = "yes" ; then
  1054. echo "#define CONFIG_OS2 1" >> $TMPH
  1055. echo "CONFIG_OS2=yes" >> config.mak
  1056. fi
  1057. if test "$TARGET_OS" = "SunOS" ; then
  1058. echo "#define CONFIG_SUNOS 1" >> $TMPH
  1059. fi
  1060. if test "$darwin" = "yes"; then
  1061. echo "#define CONFIG_DARWIN 1" >> $TMPH
  1062. echo "CONFIG_DARWIN=yes" >> config.mak
  1063. fi
  1064. if test "$_malloc_h" = "yes" ; then
  1065. echo "#define HAVE_MALLOC_H 1" >> $TMPH
  1066. else
  1067. echo "#undef HAVE_MALLOC_H" >> $TMPH
  1068. fi
  1069. if test "$_memalign" = "yes" ; then
  1070. echo "#define HAVE_MEMALIGN 1" >> $TMPH
  1071. else
  1072. echo "#undef HAVE_MEMALIGN" >> $TMPH
  1073. fi
  1074. if test "$netserver" = "yes" ; then
  1075. echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
  1076. echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
  1077. fi
  1078. if test "$need_inet_aton" = "yes" ; then
  1079. echo "NEED_INET_ATON=yes" >> config.mak
  1080. fi
  1081. if test "$simpleidct" = "yes" ; then
  1082. echo "#define SIMPLE_IDCT 1" >> $TMPH
  1083. fi
  1084. if test "$ffserver" = "yes" ; then
  1085. echo "#define CONFIG_FFSERVER 1" >> $TMPH
  1086. echo "CONFIG_FFSERVER=yes" >> config.mak
  1087. fi
  1088. if test "$ffplay" = "yes" ; then
  1089. echo "CONFIG_FFPLAY=yes" >> config.mak
  1090. fi
  1091. if test "$risky" = "yes" ; then
  1092. echo "#define CONFIG_RISKY 1" >> $TMPH
  1093. echo "CONFIG_RISKY=yes" >> config.mak
  1094. fi
  1095. echo "#define restrict $_restrict" >> $TMPH
  1096. # build tree in object directory if source path is different from current one
  1097. if test "$source_path_used" = "yes" ; then
  1098. DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
  1099. libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
  1100. FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
  1101. for dir in $DIRS ; do
  1102. mkdir -p $dir
  1103. done
  1104. for f in $FILES ; do
  1105. ln -sf $source_path/$f $f
  1106. done
  1107. fi
  1108. echo "SRC_PATH=$source_path" >> config.mak
  1109. if test "$amr_wb" = "yes" ; then
  1110. echo "#define AMR_WB 1" >> $TMPH
  1111. echo "AMR_WB=yes" >> config.mak
  1112. echo
  1113. echo "AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204"
  1114. echo "V5.1.0 from "
  1115. echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip"
  1116. echo "and extracted the source to libavcodec/amrwb_float"
  1117. echo
  1118. fi
  1119. if test "$amr_nb" = "yes" ; then
  1120. echo "#define AMR_NB 1" >> $TMPH
  1121. echo "AMR_NB=yes" >> config.mak
  1122. echo
  1123. if test "$amr_nb_fixed" = "yes" ; then
  1124. echo "AMR_NB_FIXED=yes" >> config.mak
  1125. echo "#define AMR_NB_FIXED 1" >> $TMPH
  1126. echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
  1127. echo "REL-5 version 5.1.0 from "
  1128. echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
  1129. echo "and extracted src to libavcodec/amr"
  1130. echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
  1131. echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
  1132. echo
  1133. else
  1134. echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
  1135. echo "REL-5 V5.1.0 from "
  1136. echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
  1137. echo "and extracted the source to libavcodec/amr_float"
  1138. echo
  1139. fi
  1140. fi
  1141. diff $TMPH config.h >/dev/null 2>&1
  1142. if test $? -ne 0 ; then
  1143. mv -f $TMPH config.h
  1144. else
  1145. echo "config.h is unchanged"
  1146. fi
  1147. rm -f $TMPO $TMPC $TMPE $TMPS $TMPH