Mercurial > mplayer.hg
comparison configure @ 16651:6e45efe0e619
General cleanup: do not link -lm multiple times, use for...in loops instead
of some if..elif constructs etc.
author | reimar |
---|---|
date | Mon, 03 Oct 2005 19:36:32 +0000 |
parents | a1b00d12f578 |
children | 338f5c64434b |
comparison
equal
deleted
inserted
replaced
16650:831cdc896c4c | 16651:6e45efe0e619 |
---|---|
2386 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; } | 2386 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; } |
2387 EOF | 2387 EOF |
2388 _kstat=no | 2388 _kstat=no |
2389 cc_check -lkstat && _kstat=yes | 2389 cc_check -lkstat && _kstat=yes |
2390 if test "$_kstat" = yes ; then | 2390 if test "$_kstat" = yes ; then |
2391 _def_kstat="#define HAVE_LIBKSTAT 1" | |
2391 _ld_arch="-lkstat $_ld_arch" | 2392 _ld_arch="-lkstat $_ld_arch" |
2392 fi | |
2393 if test "$_kstat" = yes ; then | |
2394 _def_kstat="#define HAVE_LIBKSTAT 1" | |
2395 else | 2393 else |
2396 _def_kstat="#undef HAVE_LIBKSTAT" | 2394 _def_kstat="#undef HAVE_LIBKSTAT" |
2397 fi | 2395 fi |
2398 echores "$_kstat" | 2396 echores "$_kstat" |
2399 | 2397 |
2460 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind): | 2458 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind): |
2461 cat > $TMPC << EOF | 2459 cat > $TMPC << EOF |
2462 #include <netdb.h> | 2460 #include <netdb.h> |
2463 int main(void) { (void) gethostbyname(0); return 0; } | 2461 int main(void) { (void) gethostbyname(0); return 0; } |
2464 EOF | 2462 EOF |
2465 cc_check -lsocket && _ld_sock="-lsocket" | 2463 for _ld_tmp in "-lsocket" "-lnsl" "-lsocket -lnsl" "-lsocket -ldnet" "-lsocket -lbind" ; do |
2466 cc_check -lnsl && _ld_sock="-lnsl" | 2464 cc_check $_ld_tmp && _ld_sock="$_ld_tmp" && break |
2467 cc_check -lsocket -lnsl && _ld_sock="-lsocket -lnsl" | 2465 done |
2468 cc_check -lsocket -ldnet && _ld_sock="-lsocket -ldnet" | |
2469 cc_check -lsocket -lbind && _ld_sock="-lsocket -lbind" | |
2470 if test $_winsock2 = auto && not cygwin ; then | 2466 if test $_winsock2 = auto && not cygwin ; then |
2471 _winsock2=no | 2467 _winsock2=no |
2472 cat > $TMPC << EOF | 2468 cat > $TMPC << EOF |
2473 #include <winsock2.h> | 2469 #include <winsock2.h> |
2474 int main(void) { (void) gethostbyname(0); return 0; } | 2470 int main(void) { (void) gethostbyname(0); return 0; } |
2698 cat > $TMPC << EOF | 2694 cat > $TMPC << EOF |
2699 #include <dlfcn.h> | 2695 #include <dlfcn.h> |
2700 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; } | 2696 int main(void) { dlopen(0, 0); dlclose(0); dlsym(0, 0); return 0; } |
2701 EOF | 2697 EOF |
2702 _dl=no | 2698 _dl=no |
2703 if cc_check ; then | 2699 for _ld_tmp in "" "-ldl" ; do |
2704 _dl=yes | 2700 cc_check $_ld_tmp && ld_dl="$_ld_tmp" && _dl=yes && break |
2705 elif cc_check -ldl ; then | 2701 done |
2706 _dl=yes | |
2707 _ld_dl='-ldl' | |
2708 fi | |
2709 if test "$_dl" = yes ; then | 2702 if test "$_dl" = yes ; then |
2710 _def_dl='#define HAVE_LIBDL 1' | 2703 _def_dl='#define HAVE_LIBDL 1' |
2711 else | 2704 else |
2712 _def_dl='#undef HAVE_LIBDL' | 2705 _def_dl='#undef HAVE_LIBDL' |
2713 fi | 2706 fi |
2742 #echores "using $_ld_dl_dynamic" | 2735 #echores "using $_ld_dl_dynamic" |
2743 | 2736 |
2744 _def_threads='#undef HAVE_THREADS' | 2737 _def_threads='#undef HAVE_THREADS' |
2745 | 2738 |
2746 echocheck "pthread" | 2739 echocheck "pthread" |
2747 _ld_pthread='' | |
2748 if test "$_pthreads" != no ; then | 2740 if test "$_pthreads" != no ; then |
2749 cat > $TMPC << EOF | 2741 cat > $TMPC << EOF |
2750 #include <pthread.h> | 2742 #include <pthread.h> |
2751 void* func(void *arg) { return arg; } | 2743 void* func(void *arg) { return arg; } |
2752 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; } | 2744 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; } |
2753 EOF | 2745 EOF |
2754 if hpux ; then | 2746 _pthreads=no |
2755 _ld_pthread='' | 2747 if not hpux ; then |
2756 elif ( cc_check -lpthreadGC2 && $TMPO ) ; then # mingw pthreads-win32 | 2748 for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do |
2757 _ld_pthread='-lpthreadGC2' | |
2758 elif ( cc_check && $TMPO ) ; then # QNX | |
2759 _ld_pthread=' ' # _ld_pthread='' would disable pthreads, but the test worked | |
2760 elif ( cc_check -lpthread && $TMPO ) ; then | |
2761 _ld_pthread='-lpthread' | |
2762 elif ( cc_check -pthread && $TMPO ) ; then | |
2763 _ld_pthread='-pthread' | |
2764 else | |
2765 if test "$_ld_static" ; then | |
2766 # for crosscompilation, we cannot execute the program, be happy if we can link statically | 2749 # for crosscompilation, we cannot execute the program, be happy if we can link statically |
2767 if ( cc_check -lpthread ) ; then | 2750 cc_check $_ld_tmp && ($TMPO || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break |
2768 _ld_pthread='-lpthread' | 2751 done |
2769 elif ( cc_check -pthread ) ; then | 2752 fi |
2770 _ld_pthread='-pthread' | 2753 fi |
2771 else | 2754 if test "$_pthreads" = yes ; then |
2772 _ld_pthread='' | |
2773 fi | |
2774 else | |
2775 _ld_pthread='' | |
2776 fi | |
2777 fi | |
2778 fi | |
2779 if test "$_ld_pthread" != '' ; then | |
2780 echores "yes (using $_ld_pthread)" | 2755 echores "yes (using $_ld_pthread)" |
2781 _pthreads='yes' | 2756 _pthreads='yes' |
2782 _def_pthreads='#define HAVE_PTHREADS 1' | 2757 _def_pthreads='#define HAVE_PTHREADS 1' |
2783 _def_threads='#define HAVE_THREADS 1' | 2758 _def_threads='#define HAVE_THREADS 1' |
2784 else | 2759 else |
2826 ; | 2801 ; |
2827 } | 2802 } |
2828 } | 2803 } |
2829 EOF | 2804 EOF |
2830 _iconv=no | 2805 _iconv=no |
2831 if cc_check $_ld_lm ; then | 2806 for _ld_tmp in "" "-liconv" "-liconv $_ld_dl" ; do |
2832 _iconv=yes | 2807 cc_check $_ld_lm $_ld_tmp && _ld_iconv="$_ld_tmp" && _iconv=yes && break |
2833 elif cc_check $_ld_lm -liconv ; then | 2808 done |
2834 _iconv=yes | |
2835 _ld_iconv='-liconv' | |
2836 elif cc_check $_ld_lm -liconv $_ld_dl ; then | |
2837 _iconv=yes | |
2838 _ld_iconv="-liconv $_ld_dl" | |
2839 fi | |
2840 fi | 2809 fi |
2841 if test "$_iconv" = yes ; then | 2810 if test "$_iconv" = yes ; then |
2842 _def_iconv='#define USE_ICONV 1' | 2811 _def_iconv='#define USE_ICONV 1' |
2843 else | 2812 else |
2844 _def_iconv='#undef USE_ICONV' | 2813 _def_iconv='#undef USE_ICONV' |
3003 if test "$_termcap" = auto ; then | 2972 if test "$_termcap" = auto ; then |
3004 cat > $TMPC <<EOF | 2973 cat > $TMPC <<EOF |
3005 int main(void) { return 0; } | 2974 int main(void) { return 0; } |
3006 EOF | 2975 EOF |
3007 _termcap=no | 2976 _termcap=no |
3008 cc_check -ltermcap && _termcap=yes && _ld_termcap='-ltermcap' | 2977 for _ld_tmp in "-ltermcap" "-ltinfo" ; do |
3009 cc_check -ltinfo && _termcap=yes && _ld_termcap='-ltinfo' | 2978 cc_check $_ld_tmp && _ld_termcap="$_ld_tmp" && _termcap=yes && break |
2979 done | |
3010 fi | 2980 fi |
3011 if test "$_termcap" = yes ; then | 2981 if test "$_termcap" = yes ; then |
3012 _def_termcap='#define USE_TERMCAP 1' | 2982 _def_termcap='#define USE_TERMCAP 1' |
3013 _res_comment="using $_ld_termcap" | 2983 _res_comment="using $_ld_termcap" |
3014 else | 2984 else |
3354 _smbsupport=no | 3324 _smbsupport=no |
3355 cat > $TMPC << EOF | 3325 cat > $TMPC << EOF |
3356 #include <libsmbclient.h> | 3326 #include <libsmbclient.h> |
3357 int main(void) { smbc_opendir("smb://"); return 0; } | 3327 int main(void) { smbc_opendir("smb://"); return 0; } |
3358 EOF | 3328 EOF |
3359 if cc_check -lsmbclient ; then | 3329 for _ld_tmp in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do |
3360 _smbsupport=yes | 3330 cc_check $_ld_tmp && _ld_smb="$_ld_tmp" && _smbsupport=yes && break |
3361 _ld_smb="-lsmbclient" | 3331 done |
3362 else | |
3363 if cc_check -lsmbclient $_ld_dl ; then | |
3364 _smbsupport=yes | |
3365 _ld_smb="-lsmbclient $_ld_dl" | |
3366 else | |
3367 if cc_check -lsmbclient $_ld_dl -lnsl ; then | |
3368 _smbsupport=yes | |
3369 _ld_smb="-lsmbclient $_ld_dl -lnsl" | |
3370 else | |
3371 if cc_check -lsmbclient $_ld_dl -lssl -lnsl ; then | |
3372 _smbsupport=yes | |
3373 _ld_smb="-lsmbclient $_ld_dl -lssl -lnsl" | |
3374 fi | |
3375 fi | |
3376 fi | |
3377 fi | |
3378 fi | 3332 fi |
3379 | 3333 |
3380 if test "$_smbsupport" = yes; then | 3334 if test "$_smbsupport" = yes; then |
3381 _def_smbsupport="#define LIBSMBCLIENT" | 3335 _def_smbsupport="#define LIBSMBCLIENT" |
3382 _inputmodules="smb $_inputmodules" | 3336 _inputmodules="smb $_inputmodules" |
3574 echores "$_x11" | 3528 echores "$_x11" |
3575 | 3529 |
3576 | 3530 |
3577 echocheck "DPMS" | 3531 echocheck "DPMS" |
3578 _xdpms3=no | 3532 _xdpms3=no |
3533 _xdpms4=no | |
3579 if test "$_x11" = yes ; then | 3534 if test "$_x11" = yes ; then |
3580 cat > $TMPC <<EOF | 3535 cat > $TMPC <<EOF |
3581 #include <X11/Xmd.h> | 3536 #include <X11/Xmd.h> |
3582 #include <X11/Xlib.h> | 3537 #include <X11/Xlib.h> |
3583 #include <X11/Xutil.h> | 3538 #include <X11/Xutil.h> |
3586 int main(void) { | 3541 int main(void) { |
3587 (void) DPMSQueryExtension(0, 0, 0); | 3542 (void) DPMSQueryExtension(0, 0, 0); |
3588 } | 3543 } |
3589 EOF | 3544 EOF |
3590 cc_check $_inc_x11 -lXdpms $_ld_x11 && _xdpms3=yes | 3545 cc_check $_inc_x11 -lXdpms $_ld_x11 && _xdpms3=yes |
3591 fi | |
3592 _xdpms4=no | |
3593 if test "$_x11" = yes ; then | |
3594 cat > $TMPC <<EOF | 3546 cat > $TMPC <<EOF |
3595 #include <X11/Xlib.h> | 3547 #include <X11/Xlib.h> |
3596 #include <X11/extensions/dpms.h> | 3548 #include <X11/extensions/dpms.h> |
3597 int main(void) { | 3549 int main(void) { |
3598 (void) DPMSQueryExtension(0, 0, 0); | 3550 (void) DPMSQueryExtension(0, 0, 0); |
3917 p = aa_getrenderparams(); | 3869 p = aa_getrenderparams(); |
3918 aa_autoinitkbd(c,0); | 3870 aa_autoinitkbd(c,0); |
3919 return 0; } | 3871 return 0; } |
3920 EOF | 3872 EOF |
3921 _aa=no | 3873 _aa=no |
3922 if cc_check -laa ; then | 3874 for _ld_tmp in "-laa" "$_ld_x11 -laa" ; do |
3923 _aa=yes | 3875 cc_check $_ld_tmp && _ld_aa=$_ld_tmp && _aa=yes && break |
3924 _ld_aa="-laa" | 3876 done |
3925 elif cc_check $_ld_x11 -laa ; then | |
3926 _aa=yes | |
3927 _ld_aa="$_ld_x11 -laa" | |
3928 fi | |
3929 fi | 3877 fi |
3930 if test "$_aa" = yes ; then | 3878 if test "$_aa" = yes ; then |
3931 _def_aa='#define HAVE_AA 1' | 3879 _def_aa='#define HAVE_AA 1' |
3932 if cygwin ; then | 3880 if cygwin ; then |
3933 _ld_aa=`aalib-config --libs | cut -d " " -f 2,5,6` | 3881 _ld_aa=`aalib-config --libs | cut -d " " -f 2,5,6` |
3974 _svga=no | 3922 _svga=no |
3975 cc_check -lvga $_ld_lm && _svga=yes | 3923 cc_check -lvga $_ld_lm && _svga=yes |
3976 fi | 3924 fi |
3977 if test "$_svga" = yes ; then | 3925 if test "$_svga" = yes ; then |
3978 _def_svga='#define HAVE_SVGALIB 1' | 3926 _def_svga='#define HAVE_SVGALIB 1' |
3979 _ld_svga="-lvga $_ld_lm" | 3927 _ld_svga="-lvga" |
3980 _vosrc="$_vosrc vo_svga.c" | 3928 _vosrc="$_vosrc vo_svga.c" |
3981 _vomodules="svga $_vomodules" | 3929 _vomodules="svga $_vomodules" |
3982 else | 3930 else |
3983 _def_svga='#undef HAVE_SVGALIB' | 3931 _def_svga='#undef HAVE_SVGALIB' |
3984 _novomodules="svga $_novomodules" | 3932 _novomodules="svga $_novomodules" |
4211 #include <gif_lib.h> | 4159 #include <gif_lib.h> |
4212 int main(void) { | 4160 int main(void) { |
4213 return 0; | 4161 return 0; |
4214 } | 4162 } |
4215 EOF | 4163 EOF |
4216 if cc_check -lungif && "$TMPO" >> "$TMPLOG" ; then | 4164 for _ld_tmp in "-lungif" "-lungif $_ld_x11" "-lgif" "-lgif $_ld_x11" ; do |
4217 _gif=yes | 4165 cc_check $_ld_tmp && "$TMPO" >> "$TMPLOG" && _ld_gif="$_ld_tmp" && _gif=yes && break |
4218 _ld_gif="-lungif" | 4166 done |
4219 elif cc_check -lungif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then | |
4220 _gif=yes | |
4221 _ld_gif="-lungif $_ld_x11" | |
4222 elif cc_check -lgif && "$TMPO" >> "$TMPLOG" ; then | |
4223 _gif=yes | |
4224 _ld_gif="-lgif" | |
4225 elif cc_check -lgif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then | |
4226 _gif=yes | |
4227 _ld_gif="-lgif $_ld_x11" | |
4228 fi | |
4229 fi | 4167 fi |
4230 | 4168 |
4231 # If no library was found, and the user wants support forced, | 4169 # If no library was found, and the user wants support forced, |
4232 # then we force it on with libgif, as this is the safest | 4170 # then we force it on with libgif, as this is the safest |
4233 # assumption IMHO. (libungif & libregif both create symbolic | 4171 # assumption IMHO. (libungif & libregif both create symbolic |
4424 _noaomodules="dsound $_noaomodules" | 4362 _noaomodules="dsound $_noaomodules" |
4425 fi | 4363 fi |
4426 echores "$_directx" | 4364 echores "$_directx" |
4427 | 4365 |
4428 echocheck "NAS" | 4366 echocheck "NAS" |
4429 if test "$_nas" = auto || test "$_nas" = yes ; then | 4367 if test "$_nas" = auto ; then |
4430 cat > $TMPC << EOF | 4368 cat > $TMPC << EOF |
4431 #include <audio/audiolib.h> | 4369 #include <audio/audiolib.h> |
4432 int main(void) { return 0; } | 4370 int main(void) { return 0; } |
4433 EOF | 4371 EOF |
4434 _nas=no | 4372 _nas=no |
4446 echores "$_nas" | 4384 echores "$_nas" |
4447 | 4385 |
4448 echocheck "DXR2" | 4386 echocheck "DXR2" |
4449 if test "$_dxr2" = auto; then | 4387 if test "$_dxr2" = auto; then |
4450 _dxr2=no | 4388 _dxr2=no |
4389 cat > $TMPC << EOF | |
4390 #include <dxr2ioctl.h> | |
4391 int main(void) { return 0; } | |
4392 EOF | |
4451 for _inc_dxr2 in "$_inc_dxr2" \ | 4393 for _inc_dxr2 in "$_inc_dxr2" \ |
4452 "-I/usr/local/include/dxr2" \ | 4394 "-I/usr/local/include/dxr2" \ |
4453 "-I/usr/include/dxr2"; do | 4395 "-I/usr/include/dxr2"; do |
4454 cat > $TMPC << EOF | |
4455 #include <dxr2ioctl.h> | |
4456 int main(void) { return 0; } | |
4457 EOF | |
4458 cc_check $_inc_dxr2 && _dxr2=yes && break | 4396 cc_check $_inc_dxr2 && _dxr2=yes && break |
4459 done | 4397 done |
4460 fi | 4398 fi |
4461 if test "$_dxr2" = yes; then | 4399 if test "$_dxr2" = yes; then |
4462 _def_dxr2='#define HAVE_DXR2 1' | 4400 _def_dxr2='#define HAVE_DXR2 1' |
4683 fi | 4621 fi |
4684 | 4622 |
4685 | 4623 |
4686 echocheck "JACK" | 4624 echocheck "JACK" |
4687 if test "$_jack" = auto ; then | 4625 if test "$_jack" = auto ; then |
4688 _jack=no | 4626 _jack=yes |
4689 if ( pkg-config --modversion jack > /dev/null 2>&1 ) && | |
4690 jackd --version | grep version | awk '{ print $3 }' >> "$TMPLOG" 2>&1 ; then | |
4691 | 4627 |
4692 cat > $TMPC << EOF | 4628 cat > $TMPC << EOF |
4693 #include <jack/jack.h> | 4629 #include <jack/jack.h> |
4694 int main(void) { jack_client_new("test"); return 0; } | 4630 int main(void) { jack_client_new("test"); return 0; } |
4695 EOF | 4631 EOF |
4696 cc_check `pkg-config --libs --cflags jack` && "$TMPO" >> "$TMPLOG" 2>&1 && _jack=yes | 4632 if cc_check -ljack ; then |
4697 fi | 4633 _ld_jack="-ljack" |
4634 elif cc_check `pkg-config --libs --cflags jack` ; then | |
4635 _ld_jack="`pkg-config --libs jack`" | |
4636 _inc_jack="`pkg-config --cflags jack`" | |
4637 else | |
4638 _jack=no | |
4639 fi | |
4698 fi | 4640 fi |
4699 | 4641 |
4700 if test "$_jack" = yes ; then | 4642 if test "$_jack" = yes ; then |
4701 _def_jack='#define USE_JACK 1' | 4643 _def_jack='#define USE_JACK 1' |
4702 _aosrc="$_aosrc ao_jack.c" | 4644 _aosrc="$_aosrc ao_jack.c" |
4703 _aomodules="jack $_aomodules" | 4645 _aomodules="jack $_aomodules" |
4704 _ld_jack="`pkg-config --libs jack`" | |
4705 _inc_jack=`pkg-config --cflags jack` | |
4706 else | 4646 else |
4707 _noaomodules="jack $_noaomodules" | 4647 _noaomodules="jack $_noaomodules" |
4708 fi | 4648 fi |
4709 echores "$_jack" | 4649 echores "$_jack" |
4710 | 4650 |
5011 #include <cdda_paranoia.h> | 4951 #include <cdda_paranoia.h> |
5012 // This need a better test. How ? | 4952 // This need a better test. How ? |
5013 int main(void) { return 1; } | 4953 int main(void) { return 1; } |
5014 EOF | 4954 EOF |
5015 _cdparanoia=no | 4955 _cdparanoia=no |
5016 if cc_check $_inc_cdparanoia $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm ; then | 4956 for _inc_tmp in "$_inc_cdparanoia" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do |
5017 _cdparanoia=yes | 4957 cc_check $_inc_tmp $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm && _inc_cdparanoia="$_inc_tmp" && _cdparanoia=yes && break |
5018 else | 4958 done |
5019 for I in /usr/include/cdda /usr/local/include/cdda ; do | |
5020 if cc_check -I$I $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm ; then | |
5021 _cdparanoia=yes; _inc_cdparanoia="-I$I"; break | |
5022 fi | |
5023 done | |
5024 fi | |
5025 fi | 4959 fi |
5026 if test "$_cdparanoia" = yes ; then | 4960 if test "$_cdparanoia" = yes ; then |
5027 _def_cdparanoia='#define HAVE_CDDA' | 4961 _def_cdparanoia='#define HAVE_CDDA' |
5028 _inputmodules="cdda $_inputmodules" | 4962 _inputmodules="cdda $_inputmodules" |
5029 _ld_cdparanoia="$_ld_cdparanoia -lcdda_interface -lcdda_paranoia" | 4963 _ld_cdparanoia="$_ld_cdparanoia -lcdda_interface -lcdda_paranoia" |
5091 _fontconfig=no | 5025 _fontconfig=no |
5092 _res_comment="freetype support needed" | 5026 _res_comment="freetype support needed" |
5093 fi | 5027 fi |
5094 echocheck "fontconfig" | 5028 echocheck "fontconfig" |
5095 if test "$_fontconfig" = auto ; then | 5029 if test "$_fontconfig" = auto ; then |
5096 if ( pkg-config --modversion fontconfig) > /dev/null 2>&1 ; then | |
5097 cat > $TMPC << EOF | 5030 cat > $TMPC << EOF |
5098 #include <stdio.h> | 5031 #include <stdio.h> |
5099 #include <fontconfig/fontconfig.h> | 5032 #include <fontconfig/fontconfig.h> |
5100 int main() | 5033 int main() |
5101 { | 5034 { |
5106 } | 5039 } |
5107 return 0; | 5040 return 0; |
5108 | 5041 |
5109 } | 5042 } |
5110 EOF | 5043 EOF |
5111 _fontconfig=no | 5044 _fontconfig=yes |
5112 cc_check `pkg-config --cflags --libs fontconfig` && $TMPO >> "$TMPLOG" && _fontconfig=yes | 5045 if cc_check -lfontconfig ; then |
5113 else | 5046 _ld_fontconfig="-lfontconfig" |
5114 _fontconfig=no | 5047 elif cc_check `pkg-config --cflags --libs fontconfig` ; then |
5115 fi | 5048 _inc_fontconfig=`pkg-config --cflags fontconfig` |
5049 _ld_fontconfig=`pkg-config --libs fontconfig` | |
5050 else | |
5051 _fontconfig=no | |
5052 fi | |
5116 fi | 5053 fi |
5117 if test "$_fontconfig" = yes ; then | 5054 if test "$_fontconfig" = yes ; then |
5118 _def_fontconfig='#define HAVE_FONTCONFIG' | 5055 _def_fontconfig='#define HAVE_FONTCONFIG' |
5119 _inc_fontconfig=`pkg-config --cflags fontconfig` | |
5120 _ld_fontconfig=`pkg-config --libs fontconfig` | |
5121 else | 5056 else |
5122 _def_fontconfig='#undef HAVE_FONTCONFIG' | 5057 _def_fontconfig='#undef HAVE_FONTCONFIG' |
5123 fi | 5058 fi |
5124 echores "$_fontconfig" | 5059 echores "$_fontconfig" |
5125 | 5060 |
5430 EOF | 5365 EOF |
5431 cc_check $_inc_libdts $_ld_libdts -ldts $_ld_lm && _libdts=yes | 5366 cc_check $_inc_libdts $_ld_libdts -ldts $_ld_lm && _libdts=yes |
5432 fi | 5367 fi |
5433 if test "$_libdts" = yes ; then | 5368 if test "$_libdts" = yes ; then |
5434 _def_libdts='#define CONFIG_DTS 1' | 5369 _def_libdts='#define CONFIG_DTS 1' |
5435 _ld_libdts="$_ld_libdts -ldts $_ld_lm" | 5370 _ld_libdts="$_ld_libdts -ldts" |
5436 _codecmodules="libdts $_codecmodules" | 5371 _codecmodules="libdts $_codecmodules" |
5437 else | 5372 else |
5438 _def_libdts='#undef CONFIG_DTS' | 5373 _def_libdts='#undef CONFIG_DTS' |
5439 _nocodecmodules="libdts $_nocodecmodules" | 5374 _nocodecmodules="libdts $_nocodecmodules" |
5440 fi | 5375 fi |
5490 cat > $TMPC <<EOF | 5425 cat > $TMPC <<EOF |
5491 #include <inttypes.h> | 5426 #include <inttypes.h> |
5492 #include <faac.h> | 5427 #include <faac.h> |
5493 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; } | 5428 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; } |
5494 EOF | 5429 EOF |
5495 if ( cc_check -c -O4 -lfaac $_ld_lm ); then | 5430 _faac=no |
5496 _faac=yes | 5431 for _ld_tmp in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do |
5497 elif ( cc_check -c -O4 -lfaac -lmp4v2 -lstdc++ $_ld_lm ); then | 5432 cc_check -c -O4 $_ld_tmp $_ld_lm && _ld_faac="$_ld_tmp" && faac=yes && break |
5498 _faac=yes | 5433 done |
5499 _ld_faac="-lmp4v2 -lstdc++" | |
5500 else | |
5501 _faac=no | |
5502 fi | |
5503 fi | 5434 fi |
5504 if test "$_faac" = yes ; then | 5435 if test "$_faac" = yes ; then |
5505 _def_faac="#define HAVE_FAAC 1" | 5436 _def_faac="#define HAVE_FAAC 1" |
5506 _codecmodules="$_codecmodules faac" | 5437 _codecmodules="faac $_codecmodules" |
5507 _ld_faac="-lfaac $_ld_faac" | |
5508 else | 5438 else |
5509 _def_faac="#undef HAVE_FAAC" | 5439 _def_faac="#undef HAVE_FAAC" |
5510 _nocodecmodules="$_nocodecmodules faac" | 5440 _nocodecmodules="faac $_nocodecmodules" |
5511 fi | 5441 fi |
5512 echores "$_faac" | 5442 echores "$_faac" |
5513 | 5443 |
5514 echocheck "internal FAAD2 (AAC) support" | 5444 echocheck "internal FAAD2 (AAC) support" |
5515 _inc_faad="-I`pwd`/libfaad2" | 5445 _inc_faad="-I`pwd`/libfaad2" |
5778 #error Please upgrade to version 2004.07.19 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/> | 5708 #error Please upgrade to version 2004.07.19 or later of the "LIVE555 Streaming Media" libraries - available from <www.live555.com/liveMedia/> |
5779 #endif | 5709 #endif |
5780 int main(void) {} | 5710 int main(void) {} |
5781 EOF | 5711 EOF |
5782 | 5712 |
5783 _live_dist=no | 5713 _live=no |
5784 if test -z "$_livelibdir" ; then | 5714 for I in "$_livelibdir" "$_libdir/live" "/usr/lib/live" "/usr/local/live" "/usr/local/lib/live" ; do |
5715 cc_check -I$I/liveMedia/include -I$I/UsageEnvironment/include -I$I/groupsock/include && _livelibdir=$I && _live=yes && break | |
5716 done | |
5717 if test "$_live" != yes ; then | |
5785 if cc_check -I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/groupsock; then | 5718 if cc_check -I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/groupsock; then |
5786 _live_dist=yes | 5719 _live_dist=yes |
5787 else | |
5788 for I in $_libdir/live /usr/lib/live /usr/local/live /usr/local/lib/live; do | |
5789 if test -d "$I" ; then | |
5790 _livelibdir="$I" | |
5791 break; | |
5792 fi; | |
5793 done | |
5794 fi | 5720 fi |
5795 fi | 5721 fi |
5796 | 5722 |
5797 if test "$_live_dist" = no && test "$_livelibdir" && cc_check -I$_livelibdir/liveMedia/include \ | |
5798 -I$_livelibdir/UsageEnvironment/include -I$_livelibdir/groupsock/include; then | |
5799 _live=yes | |
5800 else | |
5801 _live=no | |
5802 fi | |
5803 TMPC=$_TMPC | 5723 TMPC=$_TMPC |
5804 fi | 5724 fi |
5805 if test "$_live" = yes && test "$_network" = yes ; then | 5725 if test "$_live" = yes && test "$_network" = yes ; then |
5806 echores "yes (using $_livelibdir)" | 5726 echores "yes (using $_livelibdir)" |
5807 _def_live='#define STREAMING_LIVE555 1' | 5727 _def_live='#define STREAMING_LIVE555 1' |
6078 echocheck "XviD" | 5998 echocheck "XviD" |
6079 cat > $TMPC << EOF | 5999 cat > $TMPC << EOF |
6080 #include <xvid.h> | 6000 #include <xvid.h> |
6081 int main(void) { xvid_init(0, 0, 0, 0); return 0; } | 6001 int main(void) { xvid_init(0, 0, 0, 0); return 0; } |
6082 EOF | 6002 EOF |
6083 _ld_xvid="$_ld_xvid -lxvidcore $_ld_lm" | 6003 _ld_xvid="$_ld_xvid -lxvidcore" |
6084 if test "$_xvid" != no && cc_check $_inc_xvid $_ld_xvid ; then | 6004 if test "$_xvid" != no && cc_check $_inc_xvid $_ld_xvid $_ld_lm ; then |
6085 _xvid=yes | 6005 _xvid=yes |
6086 _def_xvid3='#define HAVE_XVID3 1' | 6006 _def_xvid3='#define HAVE_XVID3 1' |
6087 _def_xvid4='#undef HAVE_XVID4' | 6007 _def_xvid4='#undef HAVE_XVID4' |
6088 _codecmodules="xvid $_codecmodules" | 6008 _codecmodules="xvid $_codecmodules" |
6089 else | 6009 else |
6090 cat > $TMPC << EOF | 6010 cat > $TMPC << EOF |
6091 #include <xvid.h> | 6011 #include <xvid.h> |
6092 int main(void) { xvid_global(0, 0, 0, 0); return 0; } | 6012 int main(void) { xvid_global(0, 0, 0, 0); return 0; } |
6093 EOF | 6013 EOF |
6094 if test "$_xvid" != no && cc_check $_inc_xvid $_ld_xvid ; then | 6014 if test "$_xvid" != no && cc_check $_inc_xvid $_ld_xvid $_ld_lm ; then |
6095 _xvid=yes | 6015 _xvid=yes |
6096 _def_xvid3='#undef HAVE_XVID3' | 6016 _def_xvid3='#undef HAVE_XVID3' |
6097 _def_xvid4='#define HAVE_XVID4 1' | 6017 _def_xvid4='#define HAVE_XVID4 1' |
6098 _codecmodules="xvid $_codecmodules" | 6018 _codecmodules="xvid $_codecmodules" |
6099 else | 6019 else |
6126 #if X264_BUILD < 29 | 6046 #if X264_BUILD < 29 |
6127 #error We do not support old versions of x264. Get the latest from SVN. | 6047 #error We do not support old versions of x264. Get the latest from SVN. |
6128 #endif | 6048 #endif |
6129 int main(void) { x264_encoder_open((void*)0); return 0; } | 6049 int main(void) { x264_encoder_open((void*)0); return 0; } |
6130 EOF | 6050 EOF |
6131 _ld_x264="$_ld_x264 -lx264 $_ld_lm $_ld_pthread" | 6051 _ld_x264="$_ld_x264 -lx264 $_ld_pthread" |
6132 if test "$_x264" != no && \ | 6052 if test "$_x264" != no && \ |
6133 ( cc_check $_inc_x264 $_ld_x264 || \ | 6053 ( cc_check $_inc_x264 $_ld_x264 $_ld_lm || \ |
6134 ( test "$_x11" = yes && cc_check $_inc_x264 $_inc_x11 $_ld_x264 $_ld_x11 )) ; \ | 6054 ( test "$_x11" = yes && cc_check $_inc_x264 $_inc_x11 $_ld_x264 $_ld_x11 $_ld_lm )) ; \ |
6135 then | 6055 then |
6136 _x264=yes | 6056 _x264=yes |
6137 _def_x264='#define HAVE_X264 1' | 6057 _def_x264='#define HAVE_X264 1' |
6138 _codecmodules="x264 $_codecmodules" | 6058 _codecmodules="x264 $_codecmodules" |
6139 else | 6059 else |