Commit 544bdffc authored by Christophe Massiot's avatar Christophe Massiot

* Don't miserably die in `make` when ./configure hasn't be run ;

* Fixed a bug when compiling KDE plug-in without Qt plug-in ;
* Now taking into account $KDEDIR ;
* Made SDL configure error messages more explicit ;
* --disable-sdl is now correctly taken into account ;
* Changed the order of evaluation of sdl-config and sdl11-config ;
* Finally fixed SDL*/SDL.h check ;
parent 20823a81
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
# vlc (VideoLAN Client) main Makefile - (c)1998 VideoLAN # vlc (VideoLAN Client) main Makefile - (c)1998 VideoLAN
############################################################################### ###############################################################################
include Makefile.opts ifeq ($(shell [ ! -r Makefile.opts ] && echo 1),)
include Makefile.opts
endif
############################################################################### ###############################################################################
# Objects and files # Objects and files
...@@ -95,7 +97,13 @@ export ...@@ -95,7 +97,13 @@ export
# #
# Virtual targets # Virtual targets
# #
all: vlc ${ALIASES} plugins vlc.app all: Makefile.opts vlc ${ALIASES} plugins vlc.app
Makefile.opts:
@echo "**** No configuration found, running ./configure..."
./configure
$(MAKE) all
exit
clean: libdvdcss-clean plugins-clean vlc-clean clean: libdvdcss-clean plugins-clean vlc-clean
rm -f src/*/*.o extras/*/*.o rm -f src/*/*.o extras/*/*.o
...@@ -279,7 +287,7 @@ libdvdcss-snapshot: clean Makefile.opts ...@@ -279,7 +287,7 @@ libdvdcss-snapshot: clean Makefile.opts
rm -Rf /tmp/libdvdcss-${LIBDVDCSS_VERSION}* rm -Rf /tmp/libdvdcss-${LIBDVDCSS_VERSION}*
.PHONY: vlc.app .PHONY: vlc.app
vlc.app: vlc.app: Makefile.opts
ifneq (,$(findstring darwin,$(SYS))) ifneq (,$(findstring darwin,$(SYS)))
rm -Rf vlc.app rm -Rf vlc.app
mkdir -p vlc.app/Contents/Resources mkdir -p vlc.app/Contents/Resources
...@@ -375,6 +383,6 @@ $(BUILTIN_OBJ): FORCE ...@@ -375,6 +383,6 @@ $(BUILTIN_OBJ): FORCE
# #
# libdvdcss target # libdvdcss target
# #
libdvdcss: libdvdcss: Makefile.opts
cd extras/libdvdcss && $(MAKE) cd extras/libdvdcss && $(MAKE)
This diff is collapsed.
...@@ -525,10 +525,11 @@ dnl SDL module ...@@ -525,10 +525,11 @@ dnl SDL module
dnl dnl
AC_ARG_ENABLE(sdl, AC_ARG_ENABLE(sdl,
[ --disable-sdl SDL support (default enabled)]) [ --disable-sdl SDL support (default enabled)])
if test "x$withval" != "xno" if test "x$enable_sdl" != "xno"
then then
AC_PATH_PROG(SDL_CONFIG, sdl-config, no) AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no)
SDL_HEADER="SDL/SDL.h" SDL_CONFIG=${SDL12_CONFIG}
SDL_HEADER="SDL12/SDL.h"
if test x${SDL_CONFIG} = xno if test x${SDL_CONFIG} = xno
then then
AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no) AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no)
...@@ -537,29 +538,31 @@ then ...@@ -537,29 +538,31 @@ then
fi fi
if test x${SDL_CONFIG} = xno if test x${SDL_CONFIG} = xno
then then
AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no) AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
SDL_CONFIG=${SDL12_CONFIG} SDL_HEADER="SDL/SDL.h"
SDL_HEADER="SDL12/SDL.h"
fi fi
if test x${SDL_CONFIG} != xno if test x${SDL_CONFIG} != xno
then then
AC_CHECK_HEADERS($SDL_HEADER, [], AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
<${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
[ echo "The development package for SDL is not installed. Please install it" [ echo "The development package for SDL is not installed. Please install it"
echo "and try again." echo "and try again. Alternatively you can also configure with --disable-sdl."
exit ]) exit 1 ])
if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
then then
echo "You need SDL version 1.1.5 or later." echo "You need SDL version 1.1.5 or later. Install it and try again."
exit echo "Alternatively, you can also configure with --disable-sdl."
exit 1
fi fi
PLUGINS="${PLUGINS} sdl" PLUGINS="${PLUGINS} sdl"
CFLAGS_SDL="`${SDL_CONFIG} --cflags`" CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`" LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
elif test "x$withval" = "xyes" elif test "x$enable_sdl" = "xyes"
then then
echo "I couldn't find the SDL package. You can download libSDL from" echo "I couldn't find the SDL package. You can download libSDL from"
echo "http://www.libsdl.org/." echo "http://www.libsdl.org/, or configure with --disable-sdl. Have a"
exit echo "nice day."
exit 1
fi fi
fi fi
...@@ -638,7 +641,13 @@ AC_ARG_ENABLE(kde, ...@@ -638,7 +641,13 @@ AC_ARG_ENABLE(kde,
[if test x$enable_kde = xyes; then [if test x$enable_kde = xyes; then
PLUGINS="${PLUGINS} kde" PLUGINS="${PLUGINS} kde"
ALIASES="${ALIASES} kvlc" ALIASES="${ALIASES} kvlc"
LIB_KDE="-lkfile" LIB_KDE="-L${KDEDIR}/lib -lkfile"
if test -x ${QTDIR}/bin/moc
then
MOC=${QTDIR}/bin/moc
else
MOC=moc
fi
fi]) fi])
dnl dnl
......
...@@ -88,6 +88,9 @@ ...@@ -88,6 +88,9 @@
/* Define if you have the <getopt.h> header file. */ /* Define if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H #undef HAVE_GETOPT_H
/* Define if you have the <gtk/gtk.h> header file. */
#undef HAVE_GTK_GTK_H
/* Define if you have the <image.h> header file. */ /* Define if you have the <image.h> header file. */
#undef HAVE_IMAGE_H #undef HAVE_IMAGE_H
...@@ -145,9 +148,6 @@ ...@@ -145,9 +148,6 @@
/* Define if you have the <unistd.h> header file. */ /* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define if you have the <videolan/dvdcss.h> header file. */
#undef HAVE_VIDEOLAN_DVDCSS_H
/* Define if you have the <winioctl.h> header file. */ /* Define if you have the <winioctl.h> header file. */
#undef HAVE_WINIOCTL_H #undef HAVE_WINIOCTL_H
...@@ -193,12 +193,6 @@ ...@@ -193,12 +193,6 @@
/* Define if you want DVD CSS decryption. */ /* Define if you want DVD CSS decryption. */
#undef HAVE_CSS #undef HAVE_CSS
/* Define if you have SDL/SDL.h */ /* Indicate whether we should use SDL/SDL.h or SDL11/SDL.h */
#undef HAVE_SDL_SDL_H #undef SDL_INCLUDE_FILE
/* Define if you have SDL/SDL11.h */
#undef HAVE_SDL11_SDL_H
/* Define if you have SDL/SDL12.h */
#undef HAVE_SDL12_SDL_H
...@@ -21,6 +21,11 @@ PLUGIN_KDE = kde.o \ ...@@ -21,6 +21,11 @@ PLUGIN_KDE = kde.o \
knetdialog.o \ knetdialog.o \
ktitlemenu.o ktitlemenu.o
KDE_CFLAGS = -I/usr/include/kde -I/usr/include/qt
ifneq ($(KDEDIR),)
KDE_CFLAGS += -I$(KDEDIR)/include -I$(QTDIR)/include
endif
PLUGIN_KDE_MOC = $(MOCFILES:%.cpp=%.o) PLUGIN_KDE_MOC = $(MOCFILES:%.cpp=%.o)
BUILTIN_KDE = $(PLUGIN_KDE:%.o=BUILTIN_%.o) BUILTIN_KDE = $(PLUGIN_KDE:%.o=BUILTIN_%.o)
...@@ -39,19 +44,19 @@ $(MOCFILES): %.moc.cpp: %.h ...@@ -39,19 +44,19 @@ $(MOCFILES): %.moc.cpp: %.h
$(PLUGIN_KDE): %.o: .dep/%.dpp $(PLUGIN_KDE): %.o: .dep/%.dpp
$(PLUGIN_KDE): %.o: %.cpp $(PLUGIN_KDE): %.o: %.cpp
$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -DPLUGIN -DMODULE_NAME=kde -c -o $@ $< $(CC) $(CFLAGS) $(PCFLAGS) $(KDE_CFLAGS) -DPLUGIN -DMODULE_NAME=kde -c -o $@ $<
$(PLUGIN_KDE_MOC): %.o: .dep/%.dpp $(PLUGIN_KDE_MOC): %.o: .dep/%.dpp
$(PLUGIN_KDE_MOC): %.o: %.cpp $(PLUGIN_KDE_MOC): %.o: %.cpp
$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -DPLUGIN -DMODULE_NAME=kde -c -o $@ $< $(CC) $(CFLAGS) $(PCFLAGS) $(KDE_CFLAGS) -DPLUGIN -DMODULE_NAME=kde -c -o $@ $<
$(BUILTIN_KDE): BUILTIN_%.o: .dep/%.dpp $(BUILTIN_KDE): BUILTIN_%.o: .dep/%.dpp
$(BUILTIN_KDE): BUILTIN_%.o: %.cpp $(BUILTIN_KDE): BUILTIN_%.o: %.cpp
$(CC) $(CFLAGS) -DBUILTIN -I/usr/include/kde -I/usr/include/qt -DBUILTIN -DMODULE_NAME=kde -c -o $@ $< $(CC) $(CFLAGS) -DBUILTIN $(KDE_CFLAGS) -DBUILTIN -DMODULE_NAME=kde -c -o $@ $<
$(BUILTIN_KDE_MOC): BUILTIN_%.o: .dep/%.dpp $(BUILTIN_KDE_MOC): BUILTIN_%.o: .dep/%.dpp
$(BUILTIN_KDE_MOC): BUILTIN_%.o: %.cpp $(BUILTIN_KDE_MOC): BUILTIN_%.o: %.cpp
$(CC) $(CFLAGS) -DBUILTIN -I/usr/include/kde -I/usr/include/qt -DBUILTIN -DMODULE_NAME=kde -c -o $@ $< $(CC) $(CFLAGS) -DBUILTIN $(KDE_CFLAGS) -DBUILTIN -DMODULE_NAME=kde -c -o $@ $<
# #
# Real targets # Real targets
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_sdl.c : audio sdl functions library * aout_sdl.c : audio sdl functions library
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: aout_sdl.c,v 1.17 2001/07/27 16:40:20 massiot Exp $ * $Id: aout_sdl.c,v 1.18 2001/07/30 13:57:46 massiot Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -38,15 +38,7 @@ ...@@ -38,15 +38,7 @@
#include <stdio.h> /* "intf_msg.h" */ #include <stdio.h> /* "intf_msg.h" */
#include <stdlib.h> /* calloc(), malloc(), free() */ #include <stdlib.h> /* calloc(), malloc(), free() */
#if HAVE_SDL_SDL_H #include SDL_INCLUDE_FILE
# include <SDL/SDL.h>
#elif HAVE_SDL11_SDL_H
# include <SDL11/SDL.h>
#elif HAVE_SDL12_SDL_H
# include <SDL12/SDL.h>
#else
# error
#endif
#include "config.h" #include "config.h"
#include "common.h" /* boolean_t, byte_t */ #include "common.h" /* boolean_t, byte_t */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method * vout_sdl.c: SDL video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vout_sdl.c,v 1.60 2001/07/27 16:40:20 massiot Exp $ * $Id: vout_sdl.c,v 1.61 2001/07/30 13:57:46 massiot Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org> * Pierre Baillet <oct@zoy.org>
...@@ -40,15 +40,7 @@ ...@@ -40,15 +40,7 @@
# include <netinet/in.h> /* BSD: struct in_addr */ # include <netinet/in.h> /* BSD: struct in_addr */
#endif #endif
#if HAVE_SDL_SDL_H #include SDL_INCLUDE_FILE
# include <SDL/SDL.h>
#elif HAVE_SDL11_SDL_H
# include <SDL11/SDL.h>
#elif HAVE_SDL12_SDL_H
# include <SDL12/SDL.h>
#else
# error
#endif
#include "config.h" #include "config.h"
#include "common.h" #include "common.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment