mirror of
https://github.com/mpv-player/mpv
synced 2025-01-18 21:31:13 +00:00
added dynamic linking flags runtime detection (-rdynamic - also now MPlayer compiles and runs fine under QNX)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3029 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a2d815af67
commit
1bff4ebaaa
7
Makefile
7
Makefile
@ -132,6 +132,9 @@ postproc/libpostproc.a:
|
||||
xa/libxa.a:
|
||||
$(MAKE) -C xa
|
||||
|
||||
g72x/libg72x.a:
|
||||
$(MAKE) -C libg72x
|
||||
|
||||
MPLAYER_DEP = $(OBJS_MPLAYER) $(LOADER_DEP) $(AV_DEP) $(COMMONLIBS)
|
||||
MENCODER_DEP = $(OBJS_MENCODER) $(LOADER_DEP) $(AV_DEP) $(COMMONLIBS)
|
||||
|
||||
@ -141,13 +144,13 @@ MENCODER_DEP += Gui/libgui.a
|
||||
endif
|
||||
|
||||
$(PRG): $(MPLAYER_DEP)
|
||||
$(CC) -rdynamic $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) -Llibmpdemux -lmpdemux $(XMM_LIBS) $(LIRC_LIBS) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(A_LIBS) $(VO_LIBS) $(CSS_LIB) $(GUI_LIBS) $(ARCH_LIBS) $(OSDEP_LIBS) $(PP_LIBS) $(XA_LIBS) $(DECORE_LIBS) $(TERMCAP_LIB) -lm $(STATIC)
|
||||
$(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) -Llibmpdemux -lmpdemux $(XMM_LIBS) $(LIRC_LIBS) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(A_LIBS) $(VO_LIBS) $(CSS_LIB) $(GUI_LIBS) $(ARCH_LIBS) $(OSDEP_LIBS) $(PP_LIBS) $(XA_LIBS) $(DECORE_LIBS) $(TERMCAP_LIB) -lm $(STATIC)
|
||||
|
||||
$(PRG_FIBMAP): fibmap_mplayer.o
|
||||
$(CC) -o $(PRG_FIBMAP) fibmap_mplayer.o
|
||||
|
||||
$(PRG_MENCODER): $(MENCODER_DEP)
|
||||
$(CC) -rdynamic $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) -Llibmpeg2 -lmpeg2 -Llibmpdemux -lmpdemux $(X_LIBS) $(XMM_LIBS) $(LIB_LOADER) $(AV_LIB) -lmp3lame $(A_LIBS) $(CSS_LIB) $(GUI_LIBS) $(ARCH_LIBS) $(OSDEP_LIBS) $(PP_LIBS) $(XA_LIBS) $(DECORE_LIBS) $(ENCORE_LIBS) $(TERMCAP_LIB) -lm
|
||||
$(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) -Llibmpeg2 -lmpeg2 -Llibmpdemux -lmpdemux $(X_LIBS) $(XMM_LIBS) $(LIB_LOADER) $(AV_LIB) -lmp3lame $(A_LIBS) $(CSS_LIB) $(GUI_LIBS) $(ARCH_LIBS) $(OSDEP_LIBS) $(PP_LIBS) $(XA_LIBS) $(DECORE_LIBS) $(ENCORE_LIBS) $(TERMCAP_LIB) -lm
|
||||
|
||||
# $(PRG_HQ): depfile mplayerHQ.o $(OBJS) loader/libloader.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
|
||||
# $(CC) $(CFLAGS) -o $(PRG_HQ) mplayerHQ.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader -ldl -Llibmpeg2 -lmpeg2 -Lopendivx -ldecore $(VO_LIBS) -Lencore -lencore -lpthread
|
||||
|
31
configure
vendored
31
configure
vendored
@ -978,6 +978,7 @@ fi
|
||||
echores "$_kstat"
|
||||
|
||||
|
||||
# required for nanosleep on some systems
|
||||
echocheck "posix4"
|
||||
cat > $TMPC << EOF
|
||||
int main(void) { return 0; }
|
||||
@ -998,7 +999,7 @@ EOF
|
||||
cc_check $_ld_sock -lsocket && _ld_sock="$_ld_sock -lsocket"
|
||||
cc_check $_ld_sock -lnsl && _ld_sock="$_ld_sock -lnsl"
|
||||
if test "$_ld_sock" ; then
|
||||
echores "$_ld_sock"
|
||||
echores "using $_ld_sock"
|
||||
else
|
||||
echores "not needed"
|
||||
fi
|
||||
@ -1091,6 +1092,28 @@ fi
|
||||
echores "$_dl"
|
||||
|
||||
|
||||
echocheck "dynamic linking"
|
||||
# FIXME !! make this dynamic detection to work
|
||||
# also gcc flags are different, but ld flags aren't (-Bdynamic/-Bstatic/-Bsymbolic)
|
||||
_ld_dl_dynamic=''
|
||||
if qnx ; then
|
||||
_ld_dl_dynamic=''
|
||||
else
|
||||
_ld_dl_dynamic='-rdynamic'
|
||||
fi
|
||||
#cat > $TMPC << EOF
|
||||
#int main(void) { return 0; }
|
||||
#EOF
|
||||
#if cc_check -rdynamic ; then
|
||||
# _ld_dl_dynamic='-rdynamic'
|
||||
#elif cc_check -Bdynamic ; then
|
||||
# _ld_dl_dynamic='-Bdynamic'
|
||||
#elif cc_check ; then
|
||||
# _ld_dl_dynamic=''
|
||||
#fi
|
||||
echores "using $_ld_dl_dynamic"
|
||||
|
||||
|
||||
echocheck "pthread"
|
||||
cat > $TMPC << EOF
|
||||
#include <pthread.h>
|
||||
@ -1103,7 +1126,7 @@ elif cc_check -lpthread ; then
|
||||
elif cc_check -pthread ; then
|
||||
_ld_pthread='-pthread'
|
||||
else
|
||||
die "Lib pthread not found."
|
||||
die "Lib pthread not found. (needed by windows and networking stuff)"
|
||||
fi
|
||||
echores "using $_ld_pthread"
|
||||
|
||||
@ -2342,8 +2365,8 @@ else
|
||||
_confcygwin="TARGET_CYGWIN = no"
|
||||
fi
|
||||
|
||||
_ld_arch="$_ld_pthread $_ld_dl"
|
||||
bsd && _ld_arch="-rdynamic $_ld_arch"
|
||||
_ld_arch="$_ld_pthread $_ld_dl $_ld_dl_dynamic"
|
||||
#bsd && _ld_arch="-rdynamic $_ld_arch"
|
||||
bsdos && _ld_arch="$_ld_arch -ldvd"
|
||||
|
||||
_def_debug='#undef MP_DEBUG'
|
||||
|
Loading…
Reference in New Issue
Block a user