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.

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