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 @@
# 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
......@@ -95,7 +97,13 @@ export
#
# 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
rm -f src/*/*.o extras/*/*.o
......@@ -279,7 +287,7 @@ libdvdcss-snapshot: clean Makefile.opts
rm -Rf /tmp/libdvdcss-${LIBDVDCSS_VERSION}*
.PHONY: vlc.app
vlc.app:
vlc.app: Makefile.opts
ifneq (,$(findstring darwin,$(SYS)))
rm -Rf vlc.app
mkdir -p vlc.app/Contents/Resources
......@@ -375,6 +383,6 @@ $(BUILTIN_OBJ): FORCE
#
# libdvdcss target
#
libdvdcss:
libdvdcss: Makefile.opts
cd extras/libdvdcss && $(MAKE)
This diff is collapsed.
......@@ -525,10 +525,11 @@ dnl SDL module
dnl
AC_ARG_ENABLE(sdl,
[ --disable-sdl SDL support (default enabled)])
if test "x$withval" != "xno"
if test "x$enable_sdl" != "xno"
then
AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
SDL_HEADER="SDL/SDL.h"
AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no)
SDL_CONFIG=${SDL12_CONFIG}
SDL_HEADER="SDL12/SDL.h"
if test x${SDL_CONFIG} = xno
then
AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no)
......@@ -537,29 +538,31 @@ then
fi
if test x${SDL_CONFIG} = xno
then
AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no)
SDL_CONFIG=${SDL12_CONFIG}
SDL_HEADER="SDL12/SDL.h"
AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
SDL_HEADER="SDL/SDL.h"
fi
if test x${SDL_CONFIG} != xno
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 "and try again."
exit ])
echo "and try again. Alternatively you can also configure with --disable-sdl."
exit 1 ])
if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
then
echo "You need SDL version 1.1.5 or later."
exit
echo "You need SDL version 1.1.5 or later. Install it and try again."
echo "Alternatively, you can also configure with --disable-sdl."
exit 1
fi
PLUGINS="${PLUGINS} sdl"
CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
elif test "x$withval" = "xyes"
elif test "x$enable_sdl" = "xyes"
then
echo "I couldn't find the SDL package. You can download libSDL from"
echo "http://www.libsdl.org/."
exit
echo "http://www.libsdl.org/, or configure with --disable-sdl. Have a"
echo "nice day."
exit 1
fi
fi
......@@ -638,7 +641,13 @@ AC_ARG_ENABLE(kde,
[if test x$enable_kde = xyes; then
PLUGINS="${PLUGINS} kde"
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])
dnl
......
......@@ -88,6 +88,9 @@
/* Define if you have the <getopt.h> header file. */
#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. */
#undef HAVE_IMAGE_H
......@@ -145,9 +148,6 @@
/* Define if you have the <unistd.h> header file. */
#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. */
#undef HAVE_WINIOCTL_H
......@@ -193,12 +193,6 @@
/* Define if you want DVD CSS decryption. */
#undef HAVE_CSS
/* Define if you have SDL/SDL.h */
#undef HAVE_SDL_SDL_H
/* Define if you have SDL/SDL11.h */
#undef HAVE_SDL11_SDL_H
/* Define if you have SDL/SDL12.h */
#undef HAVE_SDL12_SDL_H
/* Indicate whether we should use SDL/SDL.h or SDL11/SDL.h */
#undef SDL_INCLUDE_FILE
......@@ -21,6 +21,11 @@ PLUGIN_KDE = kde.o \
knetdialog.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)
BUILTIN_KDE = $(PLUGIN_KDE:%.o=BUILTIN_%.o)
......@@ -39,19 +44,19 @@ $(MOCFILES): %.moc.cpp: %.h
$(PLUGIN_KDE): %.o: .dep/%.dpp
$(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: %.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: %.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: %.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
......
......@@ -2,7 +2,7 @@
* aout_sdl.c : audio sdl functions library
*****************************************************************************
* 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>
* Samuel Hocevar <sam@zoy.org>
......@@ -38,15 +38,7 @@
#include <stdio.h> /* "intf_msg.h" */
#include <stdlib.h> /* calloc(), malloc(), free() */
#if HAVE_SDL_SDL_H
# 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 SDL_INCLUDE_FILE
#include "config.h"
#include "common.h" /* boolean_t, byte_t */
......
......@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method
*****************************************************************************
* 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>
* Pierre Baillet <oct@zoy.org>
......@@ -40,15 +40,7 @@
# include <netinet/in.h> /* BSD: struct in_addr */
#endif
#if HAVE_SDL_SDL_H
# 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 SDL_INCLUDE_FILE
#include "config.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