--- configure Mon Sep 6 21:56:44 2004 +++ configure Sat Sep 11 21:26:40 2004 @@ -70,6 +70,7 @@ mingw32() { issystem "MINGW32" ; return "$?" ; } morphos() { issystem "MorphOS" ; return "$?" ; } win32() { cygwin || mingw32 ; return "$?" ; } +beos() { issystem "BEOS" ; return "$?" ; } # arch test boolean functions # x86/x86pc is used by QNX @@ -408,7 +409,7 @@ # OS name system_name=`( uname -s ) 2>&1` case "$system_name" in - Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU) + Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS) ;; IRIX*) system_name=IRIX @@ -447,7 +448,7 @@ # x86/x86pc is used by QNX case "`( uname -m ) 2>&1`" in - i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;; + i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;; ia64) host_arch=ia64 ;; x86_64|amd64) host_arch=x86_64 ;; macppc|ppc) host_arch=ppc ;; @@ -1967,6 +1968,7 @@ alpha && linux && _vidix=yes qnx && _vidix=no sunos && _vidix=no + beos && _vidix=no fi echocheck "mplayer binary name" @@ -2034,6 +2036,28 @@ echores "none" fi +echocheck "-lposix" +cat > $TMPC < $TMPC < $TMPC << EOF #include int main(void) { (void) gethostbyname(0); return 0; } @@ -2286,6 +2311,7 @@ cc_check -lnsl && _ld_sock="-lnsl" cc_check -lsocket -lnsl && _ld_sock="-lsocket -lnsl" cc_check -lsocket -ldnet && _ld_sock="-lsocket -ldnet" +cc_check -lsocket -lbind && _ld_sock="-lsocket -lbind" if test $_winsock2 = auto && not cygwin ; then _winsock2=no cat > $TMPC << EOF @@ -2921,6 +2947,20 @@ echores "$_vsscanf" +echocheck "swab()" +cat > $TMPC << EOF +#include +int main(void) { swab(0, 0, 0); return 0; } +EOF +_swab=no +cc_check && _swab=yes +if test "$_swab" = yes ; then + _def_swab='#define HAVE_SWAB 1' +else + _def_swab='#undef HAVE_SWAB' +fi +echores "$_swab" + echocheck "posix select()" cat > $TMPC << EOF #include @@ -3449,10 +3489,10 @@ int main(void) { return 0; } EOF _gl=no - if cc_check $_inc_x11 $_ld_x11 -lGL -lm ; then + if cc_check $_inc_x11 $_ld_x11 -lGL $_lm ; then _gl=yes _ld_gl="-lGL" - elif cc_check $_inc_x11 $_ld_x11 -lGL -lm $_ld_pthread ; then + elif cc_check $_inc_x11 $_ld_x11 -lGL $_lm $_ld_pthread ; then _gl=yes _ld_gl="-lGL $_ld_pthread" elif cc_check -lopengl32 ; then @@ -3602,11 +3642,11 @@ int main(void) { return 0; } EOF _svga=no - cc_check -lvgagl -lvga -lm && _svga=yes + cc_check -lvgagl -lvga $_lm && _svga=yes fi if test "$_svga" = yes ; then _def_svga='#define HAVE_SVGALIB 1' - _ld_svga='-lvgagl -lvga -lm' + _ld_svga='-lvgagl -lvga $_lm' _vosrc="$_vosrc vo_svga.c" _vomodules="svga $_vomodules" else @@ -3747,7 +3787,7 @@ return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver)); } EOF - if cc_check -lpng -lz -lm ; then + if cc_check -lpng -lz $_lm ; then if "$TMPO" >> "$TMPLOG" ; then _png=yes echores yes @@ -3786,7 +3826,7 @@ return 0; } EOF - if cc_check -ljpeg -lm ; then + if cc_check -ljpeg $_lm ; then if "$TMPO" >> "$TMPLOG" ; then _jpg=yes fi @@ -4041,7 +4081,7 @@ int main(void) { return 0; } EOF _nas=no - cc_check -laudio $_inc_x11 -lXt $_ld_x11 -lm && _nas=yes + cc_check -laudio $_inc_x11 -lXt $_ld_x11 $_lm && _nas=yes fi if test "$_nas" = yes ; then _def_nas='#define HAVE_NAS 1' @@ -4603,11 +4643,11 @@ int main(void) { return 1; } EOF _cdparanoia=no - if cc_check $_inc_cdparanoia $_ld_cdparanoia -lcdda_interface -lcdda_paranoia -lm ; then + if cc_check $_inc_cdparanoia $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_lm ; then _cdparanoia=yes else for I in /usr/include/cdda /usr/local/include/cdda ; do - if cc_check -I$I $_ld_cdparanoia -lcdda_interface -lcdda_paranoia -lm ; then + if cc_check -I$I $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_lm ; then _cdparanoia=yes; _inc_cdparanoia="-I$I"; break fi done @@ -4852,7 +4892,7 @@ #include int main(void) { vorbis_packet_blocksize(0,0); return 0; } EOF - cc_check -lvorbis -logg -lm && _vorbis=yes + cc_check -lvorbis -logg $_lm && _vorbis=yes fi if test "$_vorbis" = yes ; then _def_vorbis='#define HAVE_OGGVORBIS 1' @@ -4912,7 +4952,7 @@ return 0; } EOF - cc_check -ltheora -logg -lm && _theora=yes + cc_check -ltheora -logg $_lm && _theora=yes fi if test "$_theora" = yes ; then _def_theora='#define HAVE_OGGTHEORA 1' @@ -4952,11 +4992,11 @@ #include int main(void) { dts_init (0); return 0; } EOF - cc_check $_inc_libdts $_ld_libdts -ldts -lm && _libdts=yes + cc_check $_inc_libdts $_ld_libdts -ldts $_lm && _libdts=yes fi if test "$_libdts" = yes ; then _def_libdts='#define CONFIG_DTS 1' - _ld_libdts="$_ld_libdts -ldts -lm" + _ld_libdts="$_ld_libdts -ldts $_lm" _codecmodules="libdts $_codecmodules" else _def_libdts='#undef CONFIG_DTS' @@ -5022,7 +5062,7 @@ #include int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); return 0; } EOF - cc_check $_inc_faad $_ld_faad -lm && _faad_external=yes + cc_check $_inc_faad $_ld_faad $_lm && _faad_external=yes fi echores "$_faad_external" else @@ -5045,7 +5085,7 @@ return 0; } EOF - if cc_check -I- $_inc_faad $_ld_faad -lm && "$TMPO" >> "$TMPLOG" ; then + if cc_check -I- $_inc_faad $_ld_faad $_lm && "$TMPO" >> "$TMPLOG" ; then _faad_version=`"$TMPO"` _faad_tempversion=`"$TMPO" | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1\2/'` _def_faad_version="#define FAADVERSION $_faad_tempversion" @@ -5367,7 +5407,7 @@ return 0; } EOF - if cc_check -lavcodec -lm ; then + if cc_check -lavcodec $_lm ; then _libavcodecso=yes echores "yes (using libavcodec.so)" else @@ -5414,7 +5454,7 @@ #include int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; } EOF - cc_check -ldv -lm && _libdv=yes + cc_check -ldv $_lm && _libdv=yes fi if test "$_libdv" = yes ; then _def_libdv='#define HAVE_LIBDV095 1' @@ -5469,7 +5509,7 @@ #include int main(void) { xvid_init(0, 0, 0, 0); return 0; } EOF -_ld_xvid="$_ld_xvid -lxvidcore -lm" +_ld_xvid="$_ld_xvid -lxvidcore $_lm" if test "$_xvid" != no && cc_check $_inc_xvid $_ld_xvid ; then _xvid=yes _def_xvid3='#define HAVE_XVID3 1' @@ -5504,7 +5544,7 @@ #include int main(void) { (void) decore(0, 0, 0, 0); return 0; } EOF - cc_check -lm "$_ld_xvid" && _xvidcompat=yes + cc_check $_lm "$_ld_xvid" && _xvidcompat=yes echores "$_xvidcompat" fi @@ -5515,7 +5555,7 @@ #include int main(void) { x264_encoder_open((void*)0); return 0; } EOF -_ld_x264="$_ld_x264 -lx264 -lm" +_ld_x264="$_ld_x264 -lx264 $_lm" if test "$_x264" != no && cc_check $_inc_x264 $_ld_x264 ; then _x264=yes _def_x264='#define HAVE_X264 1' @@ -5534,7 +5574,7 @@ #include int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; } EOF -if test "$_divx4linux" != no && cc_check -lm -ldivxdecore -lm ; then +if test "$_divx4linux" != no && cc_check $_lm -ldivxdecore $_lm ; then _opendivx=no _ld_decore='-ldivxdecore' _def_decore='#define NEW_DECORE 1' @@ -5552,7 +5592,7 @@ #include int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_INIT; } EOF -if test "$_divx4linux" != no && cc_check -lm -ldivxdecore -lm ; then +if test "$_divx4linux" != no && cc_check $_lm -ldivxdecore $_lm ; then _opendivx=no # _ld_decore='-ldivxdecore opendivx/postprocess.o' _ld_decore='-ldivxdecore' @@ -5607,7 +5647,7 @@ int main(void) { lame_version_t lv; (void) lame_init(); get_lame_version_numerical(&lv); printf("%d%d\n",lv.major,lv.minor); return 0; } EOF # Note: libmp3lame usually depends on vorbis - cc_check -lmp3lame $_ld_vorbis -lm && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _mp3lame=yes + cc_check -lmp3lame $_ld_vorbis $_lm && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _mp3lame=yes if test "$_mp3lame" = yes ; then _def_mp3lame="#define HAVE_MP3LAME `$TMPO`" _def_cfg_mp3lame="#define CONFIG_MP3LAME `$TMPO`" @@ -5624,7 +5664,7 @@ #include int main(void) { (void) encore(0, 0, 0, 0); return 0; } EOF - if test "$_divx4linux" != no && cc_check -ldivxencore -lm ; then + if test "$_divx4linux" != no && cc_check -ldivxencore $_lm ; then _def_encore='#define HAVE_DIVX4ENCORE 1' _ld_encore='-ldivxencore' echores "DivX4linux (with libdivxencore.so)" @@ -5781,7 +5821,7 @@ echores "$_network" echocheck "ftp" -if test "$_ftp" != no ; then +if !beos && test "$_ftp" != no ; then _def_ftp='#define HAVE_FTP 1' _inputmodules="ftp $_inputmodules" else @@ -6078,6 +6118,17 @@ fi fi +echocheck "compiler support for -fno-PIC" +cat > $TMPC < $TMPC << EOF @@ -6256,6 +6307,7 @@ STATIC_LIB = $_ld_static ENCA_LIB = $_ld_enca HAVE_PTHREADS = $_pthreads +MATH_LIB = $_lm X11_INC = $_inc_x11 X11DIR = $_ld_x11 @@ -6600,6 +6652,9 @@ /* Define this if your system has vsscanf */ $_def_vsscanf + +/* Define this if your system has swab */ +$_def_swab /* Define this if your system has no posix select */ $_def_no_posix_select --- Makefile Mon Aug 30 16:12:10 2004 +++ Makefile Sat Sep 11 20:34:23 2004 @@ -209,7 +209,7 @@ ifeq ($(TARGET_WIN32),yes) windres -o osdep/mplayer-rc.o osdep/mplayer.rc endif - $(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) $(ARCH_LIB) $(I18NLIBS) -lm + $(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) $(ARCH_LIB) $(I18NLIBS) $(MATH_LIB) mplayer.exe.spec.c: libmpcodecs/libmpcodecs.a winebuild -fPIC -o mplayer.exe.spec.c -exe mplayer.exe -mcui \ @@ -217,14 +217,14 @@ -L/usr/local/lib/wine -lkernel32 mplayer.exe.so: $(MPLAYER_DEP) mplayer.exe.spec.c - $(CC) $(CFLAGS) -Wall -shared -Wl,-rpath,/usr/local/lib -Wl,-Bsymbolic -o mplayer.exe.so $(OBJS_MPLAYER) mplayer.exe.spec.c libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) $(ARCH_LIB) -lwine -lm + $(CC) $(CFLAGS) -Wall -shared -Wl,-rpath,/usr/local/lib -Wl,-Bsymbolic -o mplayer.exe.so $(OBJS_MPLAYER) mplayer.exe.spec.c libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) $(ARCH_LIB) -lwine $(MATH_LIB) mplayer_wine.so: $(MPLAYER_DEP) - $(CC) $(CFLAGS) -shared -Wl,-Bsymbolic -o mplayer_wine.so mplayer_wine.spec.c $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) -lwine $(ARCH_LIB) -lm + $(CC) $(CFLAGS) -shared -Wl,-Bsymbolic -o mplayer_wine.so mplayer_wine.spec.c $(OBJS_MPLAYER) libvo/libvo.a libao2/libao2.a $(MENU_LIBS) $(VIDIX_LIBS) $(GUI_LIBS) $(COMMON_LIBS) $(GTK_LIBS) $(VO_LIBS) $(AO_LIBS) $(EXTRA_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(STATIC_LIB) -lwine $(ARCH_LIB) $(MATH_LIB) ifeq ($(MENCODER),yes) $(PRG_MENCODER): $(MENCODER_DEP) - $(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) libmpcodecs/libmpencoders.a $(ENCORE_LIB) $(COMMON_LIBS) $(EXTRA_LIB) $(MLIB_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(ARCH_LIB) $(I18NLIBS) -lm + $(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) libmpcodecs/libmpencoders.a $(ENCORE_LIB) $(COMMON_LIBS) $(EXTRA_LIB) $(MLIB_LIB) $(LIRC_LIB) $(LIRCC_LIB) $(ARCH_LIB) $(I18NLIBS) $(MATH_LIB) endif codecs.conf.h: $(PRG_CFG) etc/codecs.conf