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.

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