Mercurial > mplayer.hg
comparison configure @ 28263:89b5b5b03ff4
cosmetics: Move some checks to more logical places.
author | diego |
---|---|
date | Sun, 11 Jan 2009 12:58:06 +0000 |
parents | be9b682b9437 |
children | 7b7e005eaed1 |
comparison
equal
deleted
inserted
replaced
28262:4e1becdb816e | 28263:89b5b5b03ff4 |
---|---|
2975 _def_network='#undef CONFIG_NETWORK' | 2975 _def_network='#undef CONFIG_NETWORK' |
2976 _ftp=no | 2976 _ftp=no |
2977 fi | 2977 fi |
2978 echores "$_network" | 2978 echores "$_network" |
2979 | 2979 |
2980 | |
2981 echocheck "inet6" | |
2982 if test "$_inet6" = auto ; then | |
2983 cat > $TMPC << EOF | |
2984 #include <sys/types.h> | |
2985 #if !defined(_WIN32) || defined(__CYGWIN__) | |
2986 #include <sys/socket.h> | |
2987 #include <netinet/in.h> | |
2988 #else | |
2989 #include <ws2tcpip.h> | |
2990 #endif | |
2991 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; } | |
2992 EOF | |
2993 _inet6=no | |
2994 if cc_check $_ld_sock ; then | |
2995 _inet6=yes | |
2996 fi | |
2997 fi | |
2998 if test "$_inet6" = yes ; then | |
2999 _def_inet6='#define HAVE_AF_INET6 1' | |
3000 else | |
3001 _def_inet6='#undef HAVE_AF_INET6' | |
3002 fi | |
3003 echores "$_inet6" | |
3004 | |
3005 | |
3006 echocheck "gethostbyname2" | |
3007 if test "$_gethostbyname2" = auto ; then | |
3008 cat > $TMPC << EOF | |
3009 #include <sys/types.h> | |
3010 #include <sys/socket.h> | |
3011 #include <netdb.h> | |
3012 int main(void) { gethostbyname2("", AF_INET); return 0; } | |
3013 EOF | |
3014 _gethostbyname2=no | |
3015 if cc_check ; then | |
3016 _gethostbyname2=yes | |
3017 fi | |
3018 fi | |
3019 if test "$_gethostbyname2" = yes ; then | |
3020 _def_gethostbyname2='#define HAVE_GETHOSTBYNAME2 1' | |
3021 else | |
3022 _def_gethostbyname2='#undef HAVE_GETHOSTBYNAME2' | |
3023 fi | |
3024 echores "$_gethostbyname2" | |
3025 | |
3026 | |
2980 echocheck "inttypes.h (required)" | 3027 echocheck "inttypes.h (required)" |
2981 cat > $TMPC << EOF | 3028 cat > $TMPC << EOF |
2982 #include <inttypes.h> | 3029 #include <inttypes.h> |
2983 int main(void) { return 0; } | 3030 int main(void) { return 0; } |
2984 EOF | 3031 EOF |
3070 def_alloca_h='#define HAVE_ALLOCA_H 1' | 3117 def_alloca_h='#define HAVE_ALLOCA_H 1' |
3071 else | 3118 else |
3072 def_alloca_h='#undef HAVE_ALLOCA_H' | 3119 def_alloca_h='#undef HAVE_ALLOCA_H' |
3073 fi | 3120 fi |
3074 echores "$_alloca" | 3121 echores "$_alloca" |
3122 | |
3123 | |
3124 echocheck "fastmemcpy" | |
3125 # fastmemcpy check is done earlier with tests of CPU & binutils features | |
3126 if test "$_fastmemcpy" = yes ; then | |
3127 _def_fastmemcpy='#define CONFIG_FASTMEMCPY 1' | |
3128 else | |
3129 _def_fastmemcpy='#undef CONFIG_FASTMEMCPY' | |
3130 fi | |
3131 echores "$_fastmemcpy" | |
3075 | 3132 |
3076 | 3133 |
3077 echocheck "mman.h" | 3134 echocheck "mman.h" |
3078 cat > $TMPC << EOF | 3135 cat > $TMPC << EOF |
3079 #include <sys/types.h> | 3136 #include <sys/types.h> |
3513 _def_posix_select='#undef HAVE_POSIX_SELECT' | 3570 _def_posix_select='#undef HAVE_POSIX_SELECT' |
3514 #select() of kLIBC (OS/2) supports socket only | 3571 #select() of kLIBC (OS/2) supports socket only |
3515 ! os2 && cc_check && _posix_select=yes \ | 3572 ! os2 && cc_check && _posix_select=yes \ |
3516 && _def_posix_select='#define HAVE_POSIX_SELECT 1' | 3573 && _def_posix_select='#define HAVE_POSIX_SELECT 1' |
3517 echores "$_posix_select" | 3574 echores "$_posix_select" |
3575 | |
3576 | |
3577 echocheck "audio select()" | |
3578 if test "$_select" = no ; then | |
3579 _def_select='#undef HAVE_AUDIO_SELECT' | |
3580 elif test "$_select" = yes ; then | |
3581 _def_select='#define HAVE_AUDIO_SELECT 1' | |
3582 fi | |
3583 echores "$_select" | |
3518 | 3584 |
3519 | 3585 |
3520 echocheck "gettimeofday()" | 3586 echocheck "gettimeofday()" |
3521 cat > $TMPC << EOF | 3587 cat > $TMPC << EOF |
3522 #include <stdio.h> | 3588 #include <stdio.h> |
4986 echores "$_directx" | 5052 echores "$_directx" |
4987 | 5053 |
4988 fi #if win32; then | 5054 fi #if win32; then |
4989 | 5055 |
4990 | 5056 |
4991 echocheck "NAS" | |
4992 if test "$_nas" = auto ; then | |
4993 cat > $TMPC << EOF | |
4994 #include <audio/audiolib.h> | |
4995 int main(void) { return 0; } | |
4996 EOF | |
4997 _nas=no | |
4998 cc_check $_ld_lm -laudio -lXt && _nas=yes | |
4999 fi | |
5000 if test "$_nas" = yes ; then | |
5001 _def_nas='#define CONFIG_NAS 1' | |
5002 _libs_mplayer="$_libs_mplayer -laudio -lXt" | |
5003 _aomodules="nas $_aomodules" | |
5004 else | |
5005 _noaomodules="nas $_noaomodules" | |
5006 _def_nas='#undef CONFIG_NAS' | |
5007 fi | |
5008 echores "$_nas" | |
5009 | |
5010 echocheck "DXR2" | 5057 echocheck "DXR2" |
5011 if test "$_dxr2" = auto; then | 5058 if test "$_dxr2" = auto; then |
5012 _dxr2=no | 5059 _dxr2=no |
5013 cat > $TMPC << EOF | 5060 cat > $TMPC << EOF |
5014 #include <dxr2ioctl.h> | 5061 #include <dxr2ioctl.h> |
5222 else | 5269 else |
5223 _def_esd='#undef CONFIG_ESD' | 5270 _def_esd='#undef CONFIG_ESD' |
5224 _def_esd_latency='#undef CONFIG_ESD_LATENCY' | 5271 _def_esd_latency='#undef CONFIG_ESD_LATENCY' |
5225 _noaomodules="esd $_noaomodules" | 5272 _noaomodules="esd $_noaomodules" |
5226 fi | 5273 fi |
5274 | |
5275 | |
5276 echocheck "NAS" | |
5277 if test "$_nas" = auto ; then | |
5278 cat > $TMPC << EOF | |
5279 #include <audio/audiolib.h> | |
5280 int main(void) { return 0; } | |
5281 EOF | |
5282 _nas=no | |
5283 cc_check $_ld_lm -laudio -lXt && _nas=yes | |
5284 fi | |
5285 if test "$_nas" = yes ; then | |
5286 _def_nas='#define CONFIG_NAS 1' | |
5287 _libs_mplayer="$_libs_mplayer -laudio -lXt" | |
5288 _aomodules="nas $_aomodules" | |
5289 else | |
5290 _noaomodules="nas $_noaomodules" | |
5291 _def_nas='#undef CONFIG_NAS' | |
5292 fi | |
5293 echores "$_nas" | |
5294 | |
5227 | 5295 |
5228 echocheck "pulse" | 5296 echocheck "pulse" |
5229 if test "$_pulse" = auto ; then | 5297 if test "$_pulse" = auto ; then |
5230 _pulse=no | 5298 _pulse=no |
5231 if $_pkg_config --exists 'libpulse >= 0.9' ; then | 5299 if $_pkg_config --exists 'libpulse >= 0.9' ; then |
7028 test "$_zlib" = yes && _libavencoders="$_libavencoders PNG_ENCODER" | 7096 test "$_zlib" = yes && _libavencoders="$_libavencoders PNG_ENCODER" |
7029 _libavmuxers="" | 7097 _libavmuxers="" |
7030 fi | 7098 fi |
7031 echores "$_mencoder" | 7099 echores "$_mencoder" |
7032 | 7100 |
7033 echocheck "fastmemcpy" | |
7034 # fastmemcpy check is done earlier with tests of CPU & binutils features | |
7035 if test "$_fastmemcpy" = yes ; then | |
7036 _def_fastmemcpy='#define CONFIG_FASTMEMCPY 1' | |
7037 else | |
7038 _def_fastmemcpy='#undef CONFIG_FASTMEMCPY' | |
7039 fi | |
7040 echores "$_fastmemcpy" | |
7041 | |
7042 | 7101 |
7043 echocheck "UnRAR executable" | 7102 echocheck "UnRAR executable" |
7044 if test "$_unrar_exec" = auto ; then | 7103 if test "$_unrar_exec" = auto ; then |
7045 _unrar_exec="yes" | 7104 _unrar_exec="yes" |
7046 mingw32 && _unrar_exec="no" | 7105 mingw32 && _unrar_exec="no" |
7355 _def_pvr='#undef CONFIG_PVR' | 7414 _def_pvr='#undef CONFIG_PVR' |
7356 fi | 7415 fi |
7357 echores "$_pvr" | 7416 echores "$_pvr" |
7358 | 7417 |
7359 | 7418 |
7360 echocheck "audio select()" | |
7361 if test "$_select" = no ; then | |
7362 _def_select='#undef HAVE_AUDIO_SELECT' | |
7363 elif test "$_select" = yes ; then | |
7364 _def_select='#define HAVE_AUDIO_SELECT 1' | |
7365 fi | |
7366 echores "$_select" | |
7367 | |
7368 | |
7369 echocheck "ftp" | 7419 echocheck "ftp" |
7370 if ! beos && test "$_ftp" = yes ; then | 7420 if ! beos && test "$_ftp" = yes ; then |
7371 _def_ftp='#define CONFIG_FTP 1' | 7421 _def_ftp='#define CONFIG_FTP 1' |
7372 _inputmodules="ftp $_inputmodules" | 7422 _inputmodules="ftp $_inputmodules" |
7373 else | 7423 else |
7461 fi | 7511 fi |
7462 else | 7512 else |
7463 _def_xmms='#undef CONFIG_XMMS' | 7513 _def_xmms='#undef CONFIG_XMMS' |
7464 fi | 7514 fi |
7465 echores "$_xmms" | 7515 echores "$_xmms" |
7466 | |
7467 echocheck "inet6" | |
7468 if test "$_inet6" = auto ; then | |
7469 cat > $TMPC << EOF | |
7470 #include <sys/types.h> | |
7471 #if !defined(_WIN32) || defined(__CYGWIN__) | |
7472 #include <sys/socket.h> | |
7473 #include <netinet/in.h> | |
7474 #else | |
7475 #include <ws2tcpip.h> | |
7476 #endif | |
7477 int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; } | |
7478 EOF | |
7479 _inet6=no | |
7480 if cc_check $_ld_sock ; then | |
7481 _inet6=yes | |
7482 fi | |
7483 fi | |
7484 if test "$_inet6" = yes ; then | |
7485 _def_inet6='#define HAVE_AF_INET6 1' | |
7486 else | |
7487 _def_inet6='#undef HAVE_AF_INET6' | |
7488 fi | |
7489 echores "$_inet6" | |
7490 | |
7491 | |
7492 echocheck "gethostbyname2" | |
7493 if test "$_gethostbyname2" = auto ; then | |
7494 cat > $TMPC << EOF | |
7495 #include <sys/types.h> | |
7496 #include <sys/socket.h> | |
7497 #include <netdb.h> | |
7498 int main(void) { gethostbyname2("", AF_INET); return 0; } | |
7499 EOF | |
7500 _gethostbyname2=no | |
7501 if cc_check ; then | |
7502 _gethostbyname2=yes | |
7503 fi | |
7504 fi | |
7505 | |
7506 if test "$_gethostbyname2" = yes ; then | |
7507 _def_gethostbyname2='#define HAVE_GETHOSTBYNAME2 1' | |
7508 else | |
7509 _def_gethostbyname2='#undef HAVE_GETHOSTBYNAME2' | |
7510 fi | |
7511 echores "$_gethostbyname2" | |
7512 | 7516 |
7513 | 7517 |
7514 # --------------- GUI specific tests begin ------------------- | 7518 # --------------- GUI specific tests begin ------------------- |
7515 echocheck "GUI" | 7519 echocheck "GUI" |
7516 echo "$_gui" | 7520 echo "$_gui" |