comparison configure @ 16252:aa8f80ce03a4

Remove unnecessary subshell invocations.
author diego
date Wed, 17 Aug 2005 23:39:19 +0000
parents ae5caba38b89
children 578e8b4c3e7f
comparison
equal deleted inserted replaced
16251:ae5caba38b89 16252:aa8f80ce03a4
34 echo >> "$TMPLOG" 34 echo >> "$TMPLOG"
35 cat "$TMPC" >> "$TMPLOG" 35 cat "$TMPC" >> "$TMPLOG"
36 echo >> "$TMPLOG" 36 echo >> "$TMPLOG"
37 echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $TMPC -o $TMPO $@" >> "$TMPLOG" 37 echo "$_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra $TMPC -o $TMPO $@" >> "$TMPLOG"
38 rm -f "$TMPO" 38 rm -f "$TMPO"
39 ( $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1 39 $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra "$TMPC" -o "$TMPO" "$@" >> "$TMPLOG" 2>&1
40 TMP="$?" 40 TMP="$?"
41 echo >> "$TMPLOG" 41 echo >> "$TMPLOG"
42 echo "ldd $TMPO" >> "$TMPLOG" 42 echo "ldd $TMPO" >> "$TMPLOG"
43 ( $_ldd "$TMPO" ) >> "$TMPLOG" 2>&1 43 $_ldd "$TMPO" >> "$TMPLOG" 2>&1
44 echo >> "$TMPLOG" 44 echo >> "$TMPLOG"
45 return "$TMP" 45 return "$TMP"
46 } 46 }
47 47
48 # Display error message, flushes tempfile, exit 48 # Display error message, flushes tempfile, exit
443 done 443 done
444 444
445 # Determine our OS name and CPU architecture 445 # Determine our OS name and CPU architecture
446 if test -z "$_target" ; then 446 if test -z "$_target" ; then
447 # OS name 447 # OS name
448 system_name=`( uname -s ) 2>&1` 448 system_name=`uname -s 2>&1`
449 case "$system_name" in 449 case "$system_name" in
450 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS) 450 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS)
451 ;; 451 ;;
452 IRIX*) 452 IRIX*)
453 system_name=IRIX 453 system_name=IRIX
469 ;; 469 ;;
470 esac 470 esac
471 471
472 472
473 # host's CPU/instruction set 473 # host's CPU/instruction set
474 host_arch=`( uname -p ) 2>&1` 474 host_arch=`uname -p 2>&1`
475 case "$host_arch" in 475 case "$host_arch" in
476 i386|sparc|ppc|alpha|arm|mips|vax) 476 i386|sparc|ppc|alpha|arm|mips|vax)
477 ;; 477 ;;
478 powerpc) # Darwin returns 'powerpc' 478 powerpc) # Darwin returns 'powerpc'
479 host_arch=ppc 479 host_arch=ppc
483 483
484 # Maybe uname -m (machine hardware name) returns something we 484 # Maybe uname -m (machine hardware name) returns something we
485 # recognize. 485 # recognize.
486 486
487 # x86/x86pc is used by QNX 487 # x86/x86pc is used by QNX
488 case "`( uname -m ) 2>&1`" in 488 case "`uname -m 2>&1`" in
489 i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;; 489 i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;;
490 ia64) host_arch=ia64 ;; 490 ia64) host_arch=ia64 ;;
491 x86_64|amd64) 491 x86_64|amd64)
492 if [ "`$_cc -dumpmachine | grep x86_64 | cut -d- -f1`" = "x86_64" -a \ 492 if [ "`$_cc -dumpmachine | grep x86_64 | cut -d- -f1`" = "x86_64" -a \
493 -z "`echo $CFLAGS | grep -- -m32`" ]; then 493 -z "`echo $CFLAGS | grep -- -m32`" ]; then
586 if test "$_skip_cc_check" != yes ; then 586 if test "$_skip_cc_check" != yes ; then
587 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure) 587 # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure)
588 if test "`basename $_cc`" = "icc" || test "`basename $_cc`" = "ecc"; then 588 if test "`basename $_cc`" = "icc" || test "`basename $_cc`" = "ecc"; then
589 echocheck "$_cc version" 589 echocheck "$_cc version"
590 cc_vendor=intel 590 cc_vendor=intel
591 cc_name=`( $_cc -V ) 2>&1 | _head 1 | cut -d ',' -f 1` 591 cc_name=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 1`
592 cc_version=`( $_cc -V ) 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3` 592 cc_version=`$_cc -V 2>&1 | _head 1 | cut -d ',' -f 2 | cut -d ' ' -f 3`
593 _cc_major=`echo $cc_version | cut -d '.' -f 1` 593 _cc_major=`echo $cc_version | cut -d '.' -f 1`
594 _cc_minor=`echo $cc_version | cut -d '.' -f 2` 594 _cc_minor=`echo $cc_version | cut -d '.' -f 2`
595 # TODO verify older icc/ecc compatibility 595 # TODO verify older icc/ecc compatibility
596 case $cc_version in 596 case $cc_version in
597 '') 597 '')
610 echores "$cc_version" 610 echores "$cc_version"
611 else 611 else
612 for _cc in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc ; do 612 for _cc in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc ; do
613 echocheck "$_cc version" 613 echocheck "$_cc version"
614 cc_vendor=gnu 614 cc_vendor=gnu
615 cc_name=`( $_cc -v ) 2>&1 | _tail 1 | cut -d ' ' -f 1` 615 cc_name=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
616 cc_version=`( $_cc -dumpversion ) 2>&1` 616 cc_version=`$_cc -dumpversion 2>&1`
617 if test "$?" -gt 0; then 617 if test "$?" -gt 0; then
618 cc_version="not found" 618 cc_version="not found"
619 fi 619 fi
620 case $cc_version in 620 case $cc_version in
621 '') 621 '')
636 cc_version="$cc_version, bad" 636 cc_version="$cc_version, bad"
637 cc_verc_fail=yes 637 cc_verc_fail=yes
638 ;; 638 ;;
639 esac 639 esac
640 echores "$cc_version" 640 echores "$cc_version"
641 (test "$cc_verc_fail" = "no") && break 641 test "$cc_verc_fail" = "no" && break
642 done 642 done
643 fi # icc 643 fi # icc
644 if test "$cc_verc_fail" = yes ; then 644 if test "$cc_verc_fail" = yes ; then
645 cat <<EOF 645 cat <<EOF
646 646
687 687
688 read _answer 688 read _answer
689 689
690 fi 690 fi
691 echocheck "host cc" 691 echocheck "host cc"
692 if not test "$_host_cc" ; then 692 test "$_host_cc" || _host_cc=$_cc
693 _host_cc=$_cc
694 fi
695 echores $_host_cc 693 echores $_host_cc
696 694
697 695
698 # --- 696 # ---
699 697
1185 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then 1183 if test "$_cc_major" -ge "3" && test "$cpu_understands_mvi" = "1" ; then
1186 _def_gcc_mvi_support="#define CAN_COMPILE_ALPHA_MVI 1" 1184 _def_gcc_mvi_support="#define CAN_COMPILE_ALPHA_MVI 1"
1187 echores "yes" 1185 echores "yes"
1188 else 1186 else
1189 _def_gcc_mvi_support="#undef CAN_COMPILE_ALPHA_MVI" 1187 _def_gcc_mvi_support="#undef CAN_COMPILE_ALPHA_MVI"
1190 echores "no, GCC = `( $_cc -dumpversion ) 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)" 1188 echores "no, GCC = `$_cc -dumpversion 2>&1` (must be >= 3), CPU = $proc (must be pca56 or later)"
1191 fi 1189 fi
1192 ;; 1190 ;;
1193 1191
1194 mips) 1192 mips)
1195 _def_arch='#define ARCH_SGI_MIPS 1' 1193 _def_arch='#define ARCH_SGI_MIPS 1'
2625 _def_malloc='#define HAVE_MALLOC_H 1' 2623 _def_malloc='#define HAVE_MALLOC_H 1'
2626 else 2624 else
2627 _def_malloc='#undef HAVE_MALLOC_H' 2625 _def_malloc='#undef HAVE_MALLOC_H'
2628 fi 2626 fi
2629 # malloc.h emits a warning in FreeBSD and OpenBSD 2627 # malloc.h emits a warning in FreeBSD and OpenBSD
2630 (freebsd || openbsd) && _def_malloc='#undef HAVE_MALLOC_H' 2628 freebsd || openbsd && _def_malloc='#undef HAVE_MALLOC_H'
2631 echores "$_malloc" 2629 echores "$_malloc"
2632 2630
2633 2631
2634 echocheck "memalign()" 2632 echocheck "memalign()"
2635 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ? 2633 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
4278 GifFileType gif; 4276 GifFileType gif;
4279 printf("UserData is at address %p\n", gif.UserData); 4277 printf("UserData is at address %p\n", gif.UserData);
4280 return 0; 4278 return 0;
4281 } 4279 }
4282 EOF 4280 EOF
4283 if cc_check "$_ld_gif" && ( "$TMPO" ) >>"$TMPLOG" 2>&1 ; then 4281 if cc_check "$_ld_gif" && "$TMPO" >>"$TMPLOG" 2>&1 ; then
4284 _def_gif_tvt_hack='#undef HAVE_GIF_TVT_HACK' 4282 _def_gif_tvt_hack='#undef HAVE_GIF_TVT_HACK'
4285 echores "disabled" 4283 echores "disabled"
4286 else 4284 else
4287 echores "enabled" 4285 echores "enabled"
4288 fi 4286 fi
4622 4620
4623 cat > $TMPC << EOF 4621 cat > $TMPC << EOF
4624 #include <esd.h> 4622 #include <esd.h>
4625 int main(void) { return 0; } 4623 int main(void) { return 0; }
4626 EOF 4624 EOF
4627 cc_check `esd-config --libs` `esd-config --cflags` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _esd=yes 4625 cc_check `esd-config --libs` `esd-config --cflags` && "$TMPO" >> "$TMPLOG" 2>&1 && _esd=yes
4628 4626
4629 fi 4627 fi
4630 fi 4628 fi
4631 echores "$_esd" 4629 echores "$_esd"
4632 4630
4659 #include <polyp/polyplib.h> 4657 #include <polyp/polyplib.h>
4660 #include <polyp/mainloop.h> 4658 #include <polyp/mainloop.h>
4661 #include <polyp/polyplib-error.h> 4659 #include <polyp/polyplib-error.h>
4662 int main(void) { return 0; } 4660 int main(void) { return 0; }
4663 EOF 4661 EOF
4664 cc_check `pkg-config --libs --cflags polyplib polyplib-error polyplib-mainloop` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _polyp=yes 4662 cc_check `pkg-config --libs --cflags polyplib polyplib-error polyplib-mainloop` && "$TMPO" >> "$TMPLOG" 2>&1 && _polyp=yes
4665 4663
4666 fi 4664 fi
4667 fi 4665 fi
4668 echores "$_polyp" 4666 echores "$_polyp"
4669 4667
4680 4678
4681 4679
4682 echocheck "JACK" 4680 echocheck "JACK"
4683 if test "$_jack" = auto ; then 4681 if test "$_jack" = auto ; then
4684 _jack=no 4682 _jack=no
4685 if ( ( pkg-config --modversion jack ) > /dev/null 2>&1 ) && 4683 if ( pkg-config --modversion jack > /dev/null 2>&1 ) &&
4686 ( jackd --version | grep version | awk '{ print $3 }' ) >> "$TMPLOG" 2>&1 ; then 4684 jackd --version | grep version | awk '{ print $3 }' >> "$TMPLOG" 2>&1 ; then
4687 4685
4688 cat > $TMPC << EOF 4686 cat > $TMPC << EOF
4689 #include <jack/jack.h> 4687 #include <jack/jack.h>
4690 int main(void) { jack_client_new("test"); return 0; } 4688 int main(void) { jack_client_new("test"); return 0; }
4691 EOF 4689 EOF
4692 cc_check `pkg-config --libs --cflags jack` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _jack=yes 4690 cc_check `pkg-config --libs --cflags jack` && "$TMPO" >> "$TMPLOG" 2>&1 && _jack=yes
4693 fi 4691 fi
4694 fi 4692 fi
4695 4693
4696 if test "$_jack" = yes ; then 4694 if test "$_jack" = yes ; then
4697 _def_jack='#define USE_JACK 1' 4695 _def_jack='#define USE_JACK 1'
5062 } 5060 }
5063 return 0; 5061 return 0;
5064 } 5062 }
5065 EOF 5063 EOF
5066 _freetype=no 5064 _freetype=no
5067 cc_check `$_freetypeconfig --cflags` `$_freetypeconfig --libs` && ( $TMPO >> "$TMPLOG" ) && _freetype=yes 5065 cc_check `$_freetypeconfig --cflags` `$_freetypeconfig --libs` && $TMPO >> "$TMPLOG" && _freetype=yes
5068 else 5066 else
5069 _freetype=no 5067 _freetype=no
5070 fi 5068 fi
5071 fi 5069 fi
5072 if test "$_freetype" = yes ; then 5070 if test "$_freetype" = yes ; then
5097 return 0; 5095 return 0;
5098 5096
5099 } 5097 }
5100 EOF 5098 EOF
5101 _fontconfig=no 5099 _fontconfig=no
5102 cc_check `pkg-config --cflags --libs fontconfig` && ( $TMPO >> "$TMPLOG" ) && _fontconfig=yes 5100 cc_check `pkg-config --cflags --libs fontconfig` && $TMPO >> "$TMPLOG" && _fontconfig=yes
5103 else 5101 else
5104 _fontconfig=no 5102 _fontconfig=no
5105 fi 5103 fi
5106 fi 5104 fi
5107 if test "$_fontconfig" = yes ; then 5105 if test "$_fontconfig" = yes ; then
5129 } 5127 }
5130 return 0; 5128 return 0;
5131 } 5129 }
5132 EOF 5130 EOF
5133 _fribidi=no 5131 _fribidi=no
5134 cc_check `$_fribidiconfig --cflags` `$_fribidiconfig --libs` && ( $TMPO >> "$TMPLOG" ) && _fribidi=yes 5132 cc_check `$_fribidiconfig --cflags` `$_fribidiconfig --libs` && $TMPO >> "$TMPLOG" && _fribidi=yes
5135 else 5133 else
5136 _fribidi=no 5134 _fribidi=no
5137 fi 5135 fi
5138 fi 5136 fi
5139 if test "$_fribidi" = yes ; then 5137 if test "$_fribidi" = yes ; then
6250 cat > $TMPC <<EOF 6248 cat > $TMPC <<EOF
6251 #include <lame/lame.h> 6249 #include <lame/lame.h>
6252 int main(void) { lame_version_t lv; (void) lame_init(); get_lame_version_numerical(&lv); printf("%d%d\n",lv.major,lv.minor); return 0; } 6250 int main(void) { lame_version_t lv; (void) lame_init(); get_lame_version_numerical(&lv); printf("%d%d\n",lv.major,lv.minor); return 0; }
6253 EOF 6251 EOF
6254 # Note: libmp3lame usually depends on vorbis 6252 # Note: libmp3lame usually depends on vorbis
6255 cc_check -lmp3lame $_ld_vorbis $_ld_lm && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _mp3lame=yes 6253 cc_check -lmp3lame $_ld_vorbis $_ld_lm && "$TMPO" >> "$TMPLOG" 2>&1 && _mp3lame=yes
6256 if test "$_mp3lame" = yes ; then 6254 if test "$_mp3lame" = yes ; then
6257 _def_mp3lame="#define HAVE_MP3LAME `$TMPO`" 6255 _def_mp3lame="#define HAVE_MP3LAME `$TMPO`"
6258 _def_cfg_mp3lame="#define CONFIG_MP3LAME `$TMPO`" 6256 _def_cfg_mp3lame="#define CONFIG_MP3LAME `$TMPO`"
6259 _ld_mp3lame="-lmp3lame $_ld_vorbis" 6257 _ld_mp3lame="-lmp3lame $_ld_vorbis"
6260 else 6258 else
6424 _ftp=no 6422 _ftp=no
6425 fi 6423 fi
6426 echores "$_network" 6424 echores "$_network"
6427 6425
6428 echocheck "ftp" 6426 echocheck "ftp"
6429 if (not beos) && (test "$_ftp" != no) ; then 6427 if not beos && test "$_ftp" != no ; then
6430 _def_ftp='#define HAVE_FTP 1' 6428 _def_ftp='#define HAVE_FTP 1'
6431 _inputmodules="ftp $_inputmodules" 6429 _inputmodules="ftp $_inputmodules"
6432 else 6430 else
6433 _noinputmodules="ftp $_noinputmodules" 6431 _noinputmodules="ftp $_noinputmodules"
6434 _def_ftp='#undef HAVE_FTP' 6432 _def_ftp='#undef HAVE_FTP'
6734 elif test -z "$CFLAGS" ; then 6732 elif test -z "$CFLAGS" ; then
6735 CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" 6733 CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
6736 # always compile with '-g' if .developer: 6734 # always compile with '-g' if .developer:
6737 if test -f ".developer" ; then 6735 if test -f ".developer" ; then
6738 CFLAGS="-g $CFLAGS" 6736 CFLAGS="-g $CFLAGS"
6739 if (test "$_crash_debug" = auto) && (not mingw32) ; then 6737 if test "$_crash_debug" = auto && not mingw32 ; then
6740 _crash_debug=yes 6738 _crash_debug=yes
6741 fi 6739 fi
6742 _stripbinaries=no 6740 _stripbinaries=no
6743 fi 6741 fi
6744 else 6742 else
6866 _vosrc="$_vosrc vo_cvidix.c" 6864 _vosrc="$_vosrc vo_cvidix.c"
6867 _vomodules="cvidix $_vomodules" 6865 _vomodules="cvidix $_vomodules"
6868 else 6866 else
6869 _novomodules="cvidix $_novomodules" 6867 _novomodules="cvidix $_novomodules"
6870 fi 6868 fi
6871 if test "$_vidix" = yes && (win32); then 6869 if test "$_vidix" = yes && win32; then
6872 _vosrc="$_vosrc vo_winvidix.c" 6870 _vosrc="$_vosrc vo_winvidix.c"
6873 _vomodules="winvidix $_vomodules" 6871 _vomodules="winvidix $_vomodules"
6874 _ld_win32libs="-lgdi32 $_ld_win32libs" 6872 _ld_win32libs="-lgdi32 $_ld_win32libs"
6875 else 6873 else
6876 _novomodules="winvidix $_novomodules" 6874 _novomodules="winvidix $_novomodules"