Mercurial > mplayer.hg
comparison configure @ 3028:3bcd9ad27b6d
added dynamic linking flags runtime detection (-rdynamic - also now MPlayer compiles and runs fine under QNX)
author | alex |
---|---|
date | Tue, 20 Nov 2001 15:11:49 +0000 |
parents | 95dc79ab9f0d |
children | 41671548fde7 |
comparison
equal
deleted
inserted
replaced
3027:7b85ba8c9be5 | 3028:3bcd9ad27b6d |
---|---|
976 _def_kstat="#undef HAVE_LIBKSTAT" | 976 _def_kstat="#undef HAVE_LIBKSTAT" |
977 fi | 977 fi |
978 echores "$_kstat" | 978 echores "$_kstat" |
979 | 979 |
980 | 980 |
981 # required for nanosleep on some systems | |
981 echocheck "posix4" | 982 echocheck "posix4" |
982 cat > $TMPC << EOF | 983 cat > $TMPC << EOF |
983 int main(void) { return 0; } | 984 int main(void) { return 0; } |
984 EOF | 985 EOF |
985 _posix4=no | 986 _posix4=no |
996 int main(void) { return 0; } | 997 int main(void) { return 0; } |
997 EOF | 998 EOF |
998 cc_check $_ld_sock -lsocket && _ld_sock="$_ld_sock -lsocket" | 999 cc_check $_ld_sock -lsocket && _ld_sock="$_ld_sock -lsocket" |
999 cc_check $_ld_sock -lnsl && _ld_sock="$_ld_sock -lnsl" | 1000 cc_check $_ld_sock -lnsl && _ld_sock="$_ld_sock -lnsl" |
1000 if test "$_ld_sock" ; then | 1001 if test "$_ld_sock" ; then |
1001 echores "$_ld_sock" | 1002 echores "using $_ld_sock" |
1002 else | 1003 else |
1003 echores "not needed" | 1004 echores "not needed" |
1004 fi | 1005 fi |
1005 | 1006 |
1006 | 1007 |
1089 _def_dl='#undef HAVE_LIBDL' | 1090 _def_dl='#undef HAVE_LIBDL' |
1090 fi | 1091 fi |
1091 echores "$_dl" | 1092 echores "$_dl" |
1092 | 1093 |
1093 | 1094 |
1095 echocheck "dynamic linking" | |
1096 # FIXME !! make this dynamic detection to work | |
1097 # also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic) | |
1098 _ld_dl_dynamic='' | |
1099 if qnx ; then | |
1100 _ld_dl_dynamic='' | |
1101 else | |
1102 _ld_dl_dynamic='-rdynamic' | |
1103 fi | |
1104 #cat > $TMPC << EOF | |
1105 #int main(void) { return 0; } | |
1106 #EOF | |
1107 #if cc_check -rdynamic ; then | |
1108 # _ld_dl_dynamic='-rdynamic' | |
1109 #elif cc_check -Bdynamic ; then | |
1110 # _ld_dl_dynamic='-Bdynamic' | |
1111 #elif cc_check ; then | |
1112 # _ld_dl_dynamic='' | |
1113 #fi | |
1114 echores "using $_ld_dl_dynamic" | |
1115 | |
1116 | |
1094 echocheck "pthread" | 1117 echocheck "pthread" |
1095 cat > $TMPC << EOF | 1118 cat > $TMPC << EOF |
1096 #include <pthread.h> | 1119 #include <pthread.h> |
1097 int main(void) { (void) pthread_create (0, 0, 0, 0); return 0; } | 1120 int main(void) { (void) pthread_create (0, 0, 0, 0); return 0; } |
1098 EOF | 1121 EOF |
1101 elif cc_check -lpthread ; then | 1124 elif cc_check -lpthread ; then |
1102 _ld_pthread='-lpthread' | 1125 _ld_pthread='-lpthread' |
1103 elif cc_check -pthread ; then | 1126 elif cc_check -pthread ; then |
1104 _ld_pthread='-pthread' | 1127 _ld_pthread='-pthread' |
1105 else | 1128 else |
1106 die "Lib pthread not found." | 1129 die "Lib pthread not found. (needed by windows and networking stuff)" |
1107 fi | 1130 fi |
1108 echores "using $_ld_pthread" | 1131 echores "using $_ld_pthread" |
1109 | 1132 |
1110 | 1133 |
1111 echocheck "sys/soundcard.h" | 1134 echocheck "sys/soundcard.h" |
2340 _def_confwin32='#define WIN32' | 2363 _def_confwin32='#define WIN32' |
2341 else | 2364 else |
2342 _confcygwin="TARGET_CYGWIN = no" | 2365 _confcygwin="TARGET_CYGWIN = no" |
2343 fi | 2366 fi |
2344 | 2367 |
2345 _ld_arch="$_ld_pthread $_ld_dl" | 2368 _ld_arch="$_ld_pthread $_ld_dl $_ld_dl_dynamic" |
2346 bsd && _ld_arch="-rdynamic $_ld_arch" | 2369 #bsd && _ld_arch="-rdynamic $_ld_arch" |
2347 bsdos && _ld_arch="$_ld_arch -ldvd" | 2370 bsdos && _ld_arch="$_ld_arch -ldvd" |
2348 | 2371 |
2349 _def_debug='#undef MP_DEBUG' | 2372 _def_debug='#undef MP_DEBUG' |
2350 test "$_debug" && _def_debug='#define MP_DEBUG 1' | 2373 test "$_debug" && _def_debug='#define MP_DEBUG 1' |
2351 | 2374 |