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.

653 lines
15KB

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