[MPlayer-cvslog] r36005 - in trunk: Makefile configure

cehoyos subversion at mplayerhq.hu
Mon Mar 18 01:42:09 CET 2013


Author: cehoyos
Date: Mon Mar 18 01:42:09 2013
New Revision: 36005

Log:
Revert r36004, r36003, r35995, r35994, r35992: Fix default compilation.

Modified:
   trunk/Makefile
   trunk/configure

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	Sun Mar 17 23:47:48 2013	(r36004)
+++ trunk/Makefile	Mon Mar 18 01:42:09 2013	(r36005)
@@ -766,10 +766,8 @@ mplayer$(EXESUF): EXTRALIBS += $(EXTRALI
 mencoder$(EXESUF) mplayer$(EXESUF):
 	$(CC) -o $@ $^ $(EXTRALIBS)
 
-codec-cfg-test$(EXESUF): HOSTCFLAGS := $(HOSTCFLAGS) -DTESTING
-codec-cfg$(EXESUF) codecs2html$(EXESUF):  HOSTCFLAGS := $(HOSTCFLAGS) -DCODECS2HTML
-codec-cfg$(EXESUF) codec-cfg-test$(EXESUF) codecs2html$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h
-	$(HOST_CC) $(HOSTCFLAGS) -o $@ $<
+codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h
+	$(HOST_CC) -O -DCODECS2HTML -I. -Iffmpeg -o $@ $<
 
 codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf
 	./$^ > $@
@@ -797,7 +795,7 @@ version.h: version.sh $(wildcard .svn/en
 	./$< `$(CC) -dumpversion`
 
 %$(EXESUF): %.c
-	$(CC) $(CC_DEPFLAGS) $(CFLAGS) -o $@ $^ $(LIBS)
+	$(CC) $(CC_DEPFLAGS) $(CFLAGS) -o $@ $^
 
 %.ho: %.h
 	$(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
@@ -841,7 +839,7 @@ $(foreach lang, $(DOC_LANG_ALL),$(eval $
 ###### dependency declarations / specific CFLAGS ######
 
 # Make sure all generated header files are created.
-codec-cfg.o codec-cfg-test$(EXESUF): codecs.conf.h
+codec-cfg.o: codecs.conf.h
 $(DEP_FILES) $(MENCODER_DEPS) $(MPLAYER_DEPS): help_mp.h
 mpcommon.o osdep/mplayer-rc.o gui/dialog/about.o gui/win32/gui.o: version.h
 
@@ -1009,13 +1007,17 @@ endif
 
 ###### tests / tools #######
 
-MP_MSG_LIBS = -ltermcap -lm
-MP_MSG_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER)
+TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
 
-libvo/aspecttest$(EXESUF): libvo/aspect.o libvo/geometry.o $(MP_MSG_OBJS)
-libvo/aspecttest$(EXESUF): LIBS = $(MP_MSG_LIBS)
+codec-cfg-test$(EXESUF): codec-cfg.c codecs.conf.h help_mp.h
+	$(CC) -I. -Iffmpeg -DTESTING -o $@ $^
 
-LOADER_TEST_OBJS = $(SRCS_WIN32_EMULATION:.c=.o) $(SRCS_QTX_EMULATION:.S=.o) ffmpeg/libavutil/libavutil.a osdep/mmap_anon.o cpudetect.o path.o $(MP_MSG_OBJS)
+codecs2html$(EXESUF): codec-cfg.c help_mp.h
+	$(CC) -I. -Iffmpeg -DCODECS2HTML -o $@ $^
+
+libvo/aspecttest$(EXESUF): libvo/aspect.o libvo/geometry.o $(TEST_OBJS)
+
+LOADER_TEST_OBJS = $(SRCS_WIN32_EMULATION:.c=.o) $(SRCS_QTX_EMULATION:.S=.o) ffmpeg/libavutil/libavutil.a osdep/mmap_anon.o cpudetect.o path.o $(TEST_OBJS)
 
 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g
 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): $(LOADER_TEST_OBJS)
@@ -1049,8 +1051,7 @@ toolsclean:
 TOOLS/bmovl-test$(EXESUF): -lSDL_image
 
 TOOLS/subrip$(EXESUF): path.o sub/vobsub.o sub/spudec.o sub/unrar_exec.o \
-    ffmpeg/libswscale/libswscale.a ffmpeg/libavutil/libavutil.a $(MP_MSG_OBJS)
-TOOLS/subrip$(EXESUF): LIBS = $(MP_MSG_LIBS)
+    ffmpeg/libswscale/libswscale.a ffmpeg/libavutil/libavutil.a $(TEST_OBJS)
 
 TOOLS/vfw2menc$(EXESUF): -lwinmm -lole32
 

Modified: trunk/configure
==============================================================================
--- trunk/configure	Sun Mar 17 23:47:48 2013	(r36004)
+++ trunk/configure	Mon Mar 18 01:42:09 2013	(r36005)
@@ -2721,8 +2721,6 @@ else
   warn_cflags=yes
 fi
 
-CFLAGS="-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 $CFLAGS"
-
 if test "$cc_vendor" = "gnu" ; then
   cflag_check -fno-tree-vectorize && CFLAGS="$CFLAGS -fno-tree-vectorize"
   cflag_check -Wundef && WARNFLAGS="-Wundef $WARNFLAGS"
@@ -2732,6 +2730,8 @@ if test "$cc_vendor" = "gnu" ; then
   cflag_check -Wdisabled-optimization && WARN_CFLAGS="-Wdisabled-optimization $WARN_CFLAGS"
   cflag_check -Wmissing-prototypes && WARN_CFLAGS="-Wmissing-prototypes $WARN_CFLAGS"
   cflag_check -Wstrict-prototypes && WARN_CFLAGS="-Wstrict-prototypes $WARN_CFLAGS"
+else
+  CFLAGS="-D_ISOC99_SOURCE $CFLAGS"
 fi
 
 cflag_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer"
@@ -3279,7 +3279,7 @@ echores "$_kstat"
 for func in atanf cbrt cbrtf cosf expf exp2 exp2f isnan isinf llrint llrintf log2 log2f log10f lrint lrintf rint round roundf sinf trunc truncf; do
 echocheck $func
 eval _$func=no
-statement_check math.h "${func}(2.0)" && eval _$func=yes
+statement_check math.h "${func}(2.0)" -D_ISOC99_SOURCE && eval _$func=yes
 if eval test "x\$_$func" = "xyes"; then
   eval def_$func="\"#define HAVE_$(echo $func | toupper) 1\""
   echores yes
@@ -3293,7 +3293,7 @@ done
 for func in atan2f ldexpf powf; do
 echocheck $func
 eval _$func=no
-statement_check math.h "${func}(1.0,1.0)" && eval _$func=yes
+statement_check math.h "${func}(1.0,1.0)" -D_ISOC99_SOURCE && eval _$func=yes
 if eval test "x\$_$func" = "xyes"; then
   eval def_$func="\"#define HAVE_$(echo $func | toupper) 1\""
   echores yes
@@ -3306,7 +3306,7 @@ done
 
 echocheck "mkstemp"
 _mkstemp=no
-statement_check stdlib.h 'mkstemp("")' && _mkstemp=yes
+define_statement_check "_XOPEN_SOURCE 600" "stdlib.h" 'mkstemp("")' && _mkstemp=yes
 if test "$_mkstemp" = yes ; then
   def_mkstemp='#define HAVE_MKSTEMP 1'
 else
@@ -3678,7 +3678,7 @@ echores "$_memalign"
 echocheck "posix_memalign()"
 posix_memalign=no
 def_posix_memalign='#define HAVE_POSIX_MEMALIGN 0'
-statement_check stdlib.h 'posix_memalign(NULL, 0, 0)' &&
+define_statement_check "_XOPEN_SOURCE 600" "stdlib.h" 'posix_memalign(NULL, 0, 0)' &&
     posix_memalign=yes && def_posix_memalign='#define HAVE_POSIX_MEMALIGN 1'
 echores "$posix_memalign"
 
@@ -4103,8 +4103,13 @@ echores "$strsep"
 echocheck "vsscanf()"
 vsscanf=yes
 def_vsscanf='#define HAVE_VSSCANF 1'
-statement_check_broken stdarg.h stdio.h 'va_list ap; vsscanf("foo", "bar", ap)' ||
-    { vsscanf=no ; def_vsscanf='#undef HAVE_VSSCANF' ; }
+cat > $TMPC << EOF
+#define _ISOC99_SOURCE
+#include <stdarg.h>
+#include <stdio.h>
+int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
+EOF
+cc_check || { vsscanf=no ; def_vsscanf='#undef HAVE_VSSCANF' ; }
 echores "$vsscanf"
 
 


More information about the MPlayer-cvslog mailing list