summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am9
-rw-r--r--client/Makefile.am7
-rw-r--r--configure.in89
3 files changed, 72 insertions, 33 deletions
diff --git a/Makefile.am b/Makefile.am
index e3f7a71..0cde25b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,8 @@
AUTOMAKE_OPTIONS = gnu
-SUBDIRS = pixmaps tools etc man lib client server
-DISTDIRS = pixmaps tools etc man lib client server
+SUBDIRS = pixmaps tools etc man lib \
+ $(CLIENT_DIR) \
+ $(SERVER_DIR)
+DISTDIRS = pixmaps tools etc man lib \
+ $(CLIENT_DIR) \
+ $(SERVER_DIR)
+
diff --git a/client/Makefile.am b/client/Makefile.am
index a89f214..c815678 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -1,5 +1,5 @@
AM_CXXFLAGS := -I../lib -L../lib \
- $(CXXFLAGS) $(EXTRA_CXXFLAGS) -I../include $(QT_CXXFLAGS) \
+ $(CXXFLAGS) $(EXTRA_CXXFLAGS) -I../include $(QT_CXXFLAGS) $(SDL_CFLAGS) \
-DQT_THREAD_SUPPORT \
-DPIXMAPS=\"$(datadir)/pixmaps\" \
-DETC=\"$(prefix)/etc/miav\"
@@ -44,7 +44,10 @@ EXTRA_DIST = \
videowidget.h \
yuv_draw.h
-miav_client_LDADD := $(shell if [ $QT_CXXFLAGS ] ; then ../tools/MocList o; fi ) ../lib/libmiav.la
+miav_client_LDADD := $(shell if [ $QT_CXXFLAGS ] ; then ../tools/MocList o; fi ) \
+ ../lib/libmiav.la \
+ $(SDL_LIBS) \
+ $(QT_LDADD)
miav_client_MOC = $(shell if [ $QT_CXXFLAGS ] ; then ../tools/MocList cc; fi )
diff --git a/configure.in b/configure.in
index 2f0b804..8833754 100644
--- a/configure.in
+++ b/configure.in
@@ -11,22 +11,31 @@ AM_CONFIG_HEADER(config.h)
AC_STDC_HEADERS
CXXFLAGS="$CXXFLAGS -Wall -Werror"
-AC_ARG_WITH(gui, [ --without-gui build without GUI support])
-if test x$with_gui != xno && test -z "$GUI"; then
+AC_OUTPUT(lib/Makefile)
+
+AC_ARG_WITH(client, [ --without-client Build without client support])
+if test x$with_client != xno && test -z "$CLIENT"; then
+ CLIENT_DIR=client
+ AC_SUBST(CLIENT_DIR)
+
dnl =====================
dnl Check for SDL library
dnl =====================
SDL_VERSION=1.2.0
AM_PATH_SDL($SDL_VERSION,:,AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
- CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
- LDFLAGS="$LDFLAGS $SDL_LIBS"
+# CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
+# LDFLAGS="$LDFLAGS $SDL_LIBS"
+ AC_SUBST(SDL_CFLAGS)
+ AC_SUBST(SDL_LIBS)
dnl =====================
dnl Check for QT library
dnl =====================
gw_CHECK_QT
- CXXFLAGS="$CXXFLAGS $QT_CXXLAGS"
- LDFLAGS="$LDFLAGS $QT_LDADD"
+# CXXFLAGS="$CXXFLAGS $QT_CXXLAGS"
+# LDFLAGS="$LDFLAGS $QT_LDADD"
+ AC_SUBST(QT_CXXFLAGS)
+ AC_SUBST(QT_LDADD)
dnl ======================
dnl Check for raw1394 library
@@ -34,10 +43,43 @@ if test x$with_gui != xno && test -z "$GUI"; then
AC_CHECK_HEADER(libraw1394/raw1394.h, , AC_MSG_ERROR([*** libraw1394 headers not found!]))
AC_CHECK_LIB(raw1394, raw1394_get_userdata, , AC_MSG_ERROR([*** libraw1394 not found!]))
+ AC_OUTPUT(client/Makefile)
+
dnl Make code aware of the gui
- AC_DEFINE([USE_GUI], [], [Is defined if the project is configured to compile with gui])
+ AC_DEFINE([USE_CLIENT], [], [Is defined if the project is configured to compile with client])
else
- AC_MSG_WARN([*** Building without GUI support!])
+ AC_MSG_WARN([*** Building without client support])
+fi
+
+AC_ARG_WITH(server, [ --without-server Build without server support])
+if test x$with_server != xno && test -z "$SERVER"; then
+ SERVER_DIR=server
+ AC_SUBST(SERVER_DIR)
+
+ dnl ======================
+ dnl Check for Jpeg library
+ dnl ======================
+ AC_CHECK_HEADER(jpeglib.h, , AC_MSG_ERROR([*** libJpeg not found!]))
+ AC_CHECK_LIB(jpeg, jpeg_start_compress, , AC_MSG_ERROR([*** libJpeg not found!]))
+
+ dnl ======================
+ dnl Check for Fame library
+ dnl ======================
+ AC_CHECK_HEADER(fame.h, , AC_MSG_ERROR([*** libFAME include files not found!]))
+ AC_CHECK_LIB(fame, fame_init, , AC_MSG_ERROR([*** libFAME not found!]))
+
+ dnl ======================
+ dnl Check for Lame library
+ dnl ======================
+ AC_CHECK_HEADER(lame/lame.h, , AC_MSG_ERROR([*** libLAME (libmp3lame) include files not found!]))
+ AC_CHECK_LIB(mp3lame, lame_init, , AC_MSG_ERROR([*** libLAME (libmp3lame) not found!]))
+
+ AC_OUTPUT(server/Makefile)
+
+ dnl Make code aware of the gui
+ AC_DEFINE([USE_SERVER], [], [Is defined if the project is configured to compile with server])
+else
+ AC_MSG_WARN([*** Building without server support])
fi
dnl ======================
@@ -52,24 +94,6 @@ dnl ======================
AC_CHECK_HEADER(libdv/dv.h, , AC_MSG_ERROR([*** libdv headers not found!]))
AC_CHECK_LIB(dv, dv_decode_full_frame, , AC_MSG_ERROR([*** libdv not found!]))
-dnl ======================
-dnl Check for Jpeg library
-dnl ======================
-AC_CHECK_HEADER(jpeglib.h, , AC_MSG_ERROR([*** libJpeg not found!]))
-AC_CHECK_LIB(jpeg, jpeg_start_compress, , AC_MSG_ERROR([*** libJpeg not found!]))
-
-dnl ======================
-dnl Check for Fame library
-dnl ======================
-AC_CHECK_HEADER(fame.h, , AC_MSG_ERROR([*** libFAME include files not found!]))
-AC_CHECK_LIB(fame, fame_init, , AC_MSG_ERROR([*** libFAME not found!]))
-
-dnl ======================
-dnl Check for Lame library
-dnl ======================
-AC_CHECK_HEADER(lame/lame.h, , AC_MSG_ERROR([*** libLAME (libmp3lame) include files not found!]))
-AC_CHECK_LIB(mp3lame, lame_init, , AC_MSG_ERROR([*** libLAME (libmp3lame) not found!]))
-
#dnl ======================
#dnl Check for mplex library
#dnl ======================
@@ -126,10 +150,17 @@ AC_SUBST(LDFLAGS)
AC_OUTPUT(
Makefile
- lib/Makefile
- client/Makefile
- server/Makefile
tools/Makefile
etc/Makefile
pixmaps/Makefile
man/Makefile)
+
+#AC_OUTPUT(
+# Makefile
+# lib/Makefile
+# client/Makefile
+# server/Makefile
+# tools/Makefile
+# etc/Makefile
+# pixmaps/Makefile
+# man/Makefile)