summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2007-11-16 12:23:01 +0000
committerdeva <deva>2007-11-16 12:23:01 +0000
commitcafc81accaec5ccea041ba46869432fc796d69e8 (patch)
tree96e57c2f37234c2cfe5bb547eeee8e24760efb96
parent8196872e3b240ef93fc17dd3c05a7d97a8015d88 (diff)
Added --with-debug for -Wall -Werror and -gstable_0_3
-rw-r--r--configure.in181
1 files changed, 38 insertions, 143 deletions
diff --git a/configure.in b/configure.in
index 6c78153..48b5a5a 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
# Filename: configure.in
-AC_INIT(client/miav_client.cc)
-AM_INIT_AUTOMAKE( miav, 0.4.0 )
+AC_INIT(src/miav.cc)
+AM_INIT_AUTOMAKE( miav, 0.3.2 )
AC_PROG_CXX
@@ -10,167 +10,71 @@ AM_PROG_LIBTOOL
AM_CONFIG_HEADER(config.h)
AC_STDC_HEADERS
-CXXFLAGS="$CXXFLAGS -I../lib"
-LDFLAGS="$LDFLAGS -L../lib"
-
-AC_OUTPUT(lib/Makefile)
-
-AC_DEFINE_UNQUOTED(ETC, "$prefix/etc/miav", [The path to the config files])
-AC_DEFINE_UNQUOTED(PIXMAPS, "$prefix/share/pixmaps", [The path to the pixmap files])
-
-AC_ARG_WITH(debug, [ --with-debug Build with debugging (-g -Wall -Werror)])
+AC_ARG_WITH(debug, [ --with-debug build with debug support])
if test x$with_debug == xyes; then
- CXXFLAGS="$CXXFLAGS -g -Wall -Werror"
-
- dnl =====================
- dnl Check for efence library
- dnl =====================
-# AC_CHECK_HEADER(efencepp.h, , AC_MSG_ERROR([*** The electric fence include file not found!]))
-# AC_CHECK_LIB(efence, malloc, , AC_MSG_ERROR([*** The electric fence library (libefence.a) was not found!]))
-# LDFLAGS="$LDFLAGS -lefence"
-
- AC_MSG_WARN([*** Building DEBUG support])
-
- dnl Make code aware of debug
- AC_DEFINE([USE_DEBUG], [], [Is defined if the project is configured to compile with debugging])
+ AC_MSG_WARN([*** Building with debug support!])
+ CXXFLAGS="$CXXFLAGS -Wall -Werror -g"
fi
-AC_ARG_WITH(client, [ --without-client Build without client support])
-if test x$with_client != xno; 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"
-# AC_SUBST(SDL_CFLAGS)
-# AC_SUBST(SDL_LIBS)
-#
+AC_ARG_WITH(gui, [ --without-gui build without GUI support])
+if test x$with_gui != xno && test -z "$GUI"; then
dnl =====================
dnl Check for QT library
dnl =====================
gw_CHECK_QT
-# CXXFLAGS="$CXXFLAGS $QT_CXXLAGS"
-# LDFLAGS="$LDFLAGS $QT_LDADD"
- AC_SUBST(QT_CXXFLAGS)
- AC_SUBST(QT_LDADD)
-
- dnl ======================
- dnl Check for the Xv extension
- dnl ======================
- AC_CHECK_HEADER(X11/extensions/Xvlib.h, , AC_MSG_ERROR([*** The Xv extension include files not found!]))
- AC_CHECK_LIB(Xv, XvQueryExtension, , AC_MSG_ERROR([*** The Xv extension library (libXv.a) not found!]))
-
+ CXXFLAGS="$CXXFLAGS $QT_CXXLAGS"
+ LDFLAGS="$LDFLAGS $QT_LDADD"
+
+ 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"
+
dnl ======================
dnl Check for raw1394 library
dnl ======================
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!]))
- dnl ======================
- dnl Check for the cairo library
- dnl ======================
- AC_CHECK_HEADER(cairo/cairo-features.h, , AC_MSG_ERROR([*** cairo headers not found!]))
- CAIRO_CXXFLAGS="`pkg-config --cflags cairo` -I/usr/local/include"
- AC_SUBST(CAIRO_CXXFLAGS)
- AC_CHECK_LIB(svg-cairo, svg_cairo_create, , AC_MSG_ERROR([*** libcairo not found!]))
- CAIRO_LDFLAGS="`pkg-config --libs cairo` -lsvg -lsvg-cairo"
- AC_SUBST(CAIRO_LDFLAGS)
-
- AC_OUTPUT(client/Makefile)
-
dnl Make code aware of the gui
- AC_DEFINE([USE_CLIENT], [], [Is defined if the project is configured to compile with client])
+ AC_DEFINE([USE_GUI], [], [Is defined if the project is configured to compile with gui])
else
- AC_MSG_WARN([*** Building without client support])
-fi
-
-AC_ARG_WITH(server, [ --without-server Build without server support])
-if test x$with_server != xno; 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])
+ AC_MSG_WARN([*** Building without GUI support!])
fi
dnl ======================
-dnl Check for getopt
+dnl Check for pthread library
dnl ======================
-AC_HAVE_HEADERS(getopt.h)
+AC_CHECK_HEADER(pthread.h, , AC_MSG_ERROR([*** pthread headers not found!]))
+AC_CHECK_LIB(pthread, sem_init, , AC_MSG_ERROR([*** libpthread not found!]))
dnl ======================
-dnl Check for the lua library
+dnl Check for dv library
dnl ======================
-LUADIR="/usr"
-
-AC_ARG_WITH(luadir, [ --with-luadir=DIR The prefix to where LUA 5.1 is installed],
- LUADIR=${withval}
-)
-
-LDFLAGS="${LDFLAGS} -L${LUADIR}/lib"
-LIBS="${LIBS} -llua -lm -ldl"
-CFLAGS="${CFLAGS} -I${LUADIR}/include"
-CXXFLAGS="${CXXFLAGS} -I${LUADIR}/include"
-CPPFLAGS="${CPPFLAGS} -I${LUADIR}/include"
-
-AC_SUBST(CFLAGS)
-AC_SUBST(CXXFLAGS)
-AC_SUBST(CPPFLAGS)
-AC_SUBST(LDFLAGS)
-AC_SUBST(LIBS)
-AC_CHECK_HEADER(lua.h, , AC_MSG_ERROR([*** lua headers not found!]))
-AC_CHECK_HEADER(lualib.h, , AC_MSG_ERROR([*** lualib header not found!]))
-AC_CHECK_HEADER(lauxlib.h, , AC_MSG_ERROR([*** lauxlib header not found!]))
-AC_MSG_CHECKING([for lua_open in -llua using LUADIR=${LUADIR}])
-AC_TRY_RUN([
- #include <lua.h>
+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!]))
- int main(int argc, char *argv[])
- {
- lua_open();
- return 0;
- }
-],AC_MSG_RESULT([yes]), AC_MSG_ERROR([*** lib lua 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 pthread library
+dnl Check for Fame library
dnl ======================
-AC_CHECK_HEADER(pthread.h, , AC_MSG_ERROR([*** pthread headers not found!]))
-AC_CHECK_LIB(pthread, sem_init, , AC_MSG_ERROR([*** libpthread not found!]))
+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 dv library
+dnl Check for Lame library
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!]))
+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
@@ -228,17 +132,8 @@ AC_SUBST(LDFLAGS)
AC_OUTPUT(
Makefile
+ src/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)