summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2008-11-01 12:27:29 +0000
committerphintuka <phintuka>2008-11-01 12:27:29 +0000
commitfec36aae2ef6963ade6acce7cb10f2f0593199b5 (patch)
treeab723e9381fedfaae1fbd9bc5ab996282ba1a023
parent7ec425f90a0d970d72fe5babac7cce9b34b1b453 (diff)
downloadxineliboutput-fec36aae2ef6963ade6acce7cb10f2f0593199b5.tar.gz
xineliboutput-fec36aae2ef6963ade6acce7cb10f2f0593199b5.tar.bz2
Use configure-detected libs for linking
-rw-r--r--Makefile21
-rwxr-xr-xconfigure30
2 files changed, 30 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 379b82fa..fc528463 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
# See the main source file 'xineliboutput.c' for copyright information and
# how to reach the author.
#
-# $Id: Makefile,v 1.48 2008-11-01 07:39:27 phintuka Exp $
+# $Id: Makefile,v 1.49 2008-11-01 12:27:29 phintuka Exp $
#
# The official name of this plugin.
@@ -180,17 +180,7 @@ endif
###
INCLUDES += -I$(VDRINCDIR)
-LIBS_XINE += $(shell (pkg-config libxine --atleast-version=1.1.90 && pkg-config libxine --libs) || xine-config --libs)
-LIBS_X11 += -L/usr/X11R6/lib -lX11 -lXv -lXext
-ifeq ($(HAVE_XRENDER), yes)
- LIBS_X11 += -lXrender
-endif
-ifeq ($(HAVE_XRANDR), yes)
- LIBS_X11 += -lXrandr
-endif
-ifeq ($(HAVE_XINERAMA), yes)
- LIBS_X11 += -lXinerama
-endif
+LIBS_X11 += -L/usr/X11R6/lib -lXv -lXext
ifeq ($(ARCH_APPLE_DARWIN), yes)
INCLUDES += -I/sw/include
@@ -203,11 +193,6 @@ endif
DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' \
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
-DXINELIBOUTPUT_VERSION='"$(VERSION)"'
-ifeq ($(HAVE_LIBEXTRACTOR), yes)
- INCLUDES += $(shell pkg-config libextractor --cflags-only-I)
- LIBS_VDR += $(shell pkg-config libextractor --libs-only-L)
- LIBS_VDR += $(shell pkg-config libextractor --libs-only-l)
-endif
# check for yaegp patch
#YAEPG = $(shell grep -q 'vidWin' \$(VDRINCDIR)/vdr/osd.h && echo "1")
@@ -476,5 +461,5 @@ clean:
xine/*.flc $(VDR_FBFE) $(VDR_SXFE) mpg2c black_720x576.c \
nosignal_720x576.c vdrlogo_720x576.c vdr-sxfe vdr-fbfe \
$(PODIR)/*.mo $(PODIR)/*.pot \
- features.h config.mak
+ features.h config.mak configure.log
diff --git a/configure b/configure
index 2fbb8946..37181b49 100755
--- a/configure
+++ b/configure
@@ -7,7 +7,7 @@
# See the main source file 'xineliboutput.c' for copyright information and
# how to reach the author.
#
-# * $Id: configure,v 1.2 2008-10-31 20:50:24 phintuka Exp $
+# * $Id: configure,v 1.3 2008-11-01 12:27:29 phintuka Exp $
#
PKG_CONFIG="pkg-config"
@@ -39,7 +39,7 @@ log(){
}
logdbg(){
- [ $debug = xyes ] && log "$@" || echo "$@" >> $logfile
+ [ x$debug = xyes ] && log "$@" || echo "$@" >> $logfile
}
not_in_list(){
@@ -51,6 +51,19 @@ not_in_list(){
return 0
}
+add_flag(){
+ eval not_in_list $flag \$$flags_list || return 1
+ eval $flags_list=\"\$${flags_list} ${flag}\"
+}
+
+add_flags(){
+ flags_list=$1
+ shift
+ for flag in $*; do
+ add_flag $flags_list $flag
+ done
+}
+
#
# enable/disable
#
@@ -121,7 +134,8 @@ test_library_c(){
if test $err = 0; then
log "yes"
- eval LIBS_$subsys=\""\$LIBS_$subsys $lib"\"
+ add_flags LIBS_$subsys $lib
+ logdbg adding $lib to LIBS_$subsys
else
log "no"
logdbg "--------"
@@ -341,3 +355,13 @@ for feature in $FEATURES; do
echo "HAVE_$feature=yes">>$makefile ||
echo "HAVE_$feature=no">>$makefile
done
+echo >> $makefile
+
+# cc/ld flags
+echo "CFLAGS_XINE += $CFLAGS_XINE">>$makefile
+echo "CFLAGS_VDR += $CFLAGS_VDR">>$makefile
+echo "CFLAGS_X11 += $CFLAGS_X11">>$makefile
+echo "LIBS_XINE += $LIBS_XINE">>$makefile
+echo "LIBS_VDR += $LIBS_VDR">>$makefile
+echo "LIBS_X11 += $LIBS_X11">>$makefile
+