changeset 25:2110e0cf64ac

* clean littles things in configure.ac * added --with-visarc and --with-nwatowav
author thib
date Fri, 27 Feb 2009 19:13:00 +0000
parents c9e218c2c3f1
children f45da03ca631
files autogen.sh configure.ac music2/Makefile.am system/Makefile.am
diffstat 4 files changed, 39 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 autoheader && \
-aclocal -I . -I /usr/share/aclocal && \
+aclocal -I . && \
 automake --add-missing && \
 autoconf
 
--- a/configure.ac
+++ b/configure.ac
@@ -78,14 +78,18 @@ AC_CHECK_LIB(z, zlibVersion)
 AC_CHECK_LIB(png, png_write_end)
 AC_CHECK_LIB(jpeg, jpeg_start_decompress)
 dnl ogg vobis
-AC_ARG_ENABLE(tremor,
-	[ --enable-tremor	enable tremor (integer-only implementation for vorbisfile) [ default no]])
-AC_CHECK_LIB(ogg, ogg_stream_init)
-AC_CHECK_LIB(vorbis,  vorbis_book_decode,,,-logg)
-if test X$enable_tremor = X"yes"; then
-	AC_CHECK_LIB(vorbisidec,  ov_read,,,-logg -lvorbis)
-else
-	AC_CHECK_LIB(vorbisfile,  ov_read,,,-logg -lvorbis)
+AC_ARG_WITH(vorbis,
+	AS_HELP_STRING([--disable-vorbis], [Build with vorbis and ogg (default yes)]))
+if test X$with_vorbis = X"yes"; then
+    AC_ARG_ENABLE(tremor, AS_HELP_STRING([--enable-tremor],
+        [enable tremor (integer-only implementation of vorbisfile) (default no)]))
+    AC_CHECK_LIB(ogg, ogg_stream_init)
+    AC_CHECK_LIB(vorbis,  vorbis_book_decode,,,-logg)
+    if test X$enable_tremor = X"yes"; then
+    	AC_CHECK_LIB(vorbisidec,  ov_read,,,-logg -lvorbis)
+    else
+    	AC_CHECK_LIB(vorbisfile,  ov_read,,,-logg -lvorbis)
+    fi
 fi
 
 dnl SDL config
@@ -122,15 +126,27 @@ dnl Check option ... Zaurus or embed mac
 USE_X11=1
 DISPSIZE="no"
 
+AC_ARG_ENABLE(nwatowav,
+    AS_HELP_STRING([--enable-nwatowav], [Build the nwatowav utility (default no)]))
+if test X$enable_nwatowav = X"yes"; then
+    AC_SUBST(NWATOWAV, ['nwatowav${EXEEXT}'])
+fi
+
+AC_ARG_ENABLE(visarc,
+    AS_HELP_STRING([--enable-visarc], [Build the visarc utility (default no)]))
+if test X$enable_visarc = X"yes"; then
+    AC_SUBST(VISARC, ['visarc${EXEEXT}'])
+fi
+
 AC_ARG_ENABLE(zaurus,
-	[ --enable-zaurus	compile for zaurus environment [ default no]])
+    AS_HELP_STRING([--enable-zaurus], [Compile for zaurus environment (default no)]))
 if test X$enable_zaurus = X"yes"; then
 	USE_X11=0
 	DISPSIZE="320x240"
 fi
 
 AC_ARG_ENABLE(x11,
-	[ --disable-x11		turn off using X11 library [default enable]])
+    AS_HELP_STRING([--disable-x11], [Use the X11 library (default yes)]))
 if test X$x11 = X"no"; then
 	USE_X11=0
 else
@@ -141,7 +157,8 @@ else
 fi
 
 AC_ARG_ENABLE(displaysize,
-	[ --enable-displaysize=SIZE  change default display size, for example --enable-displaysize=320x240],
+    AS_HELP_STRING([--enable-displaysize=SIZE],
+                   [Change default display size, for example --enable-displaysize=320x240]),
 	displaysize=$enableval)
 if test X$displaysize != X; then
 	DISPSIZE=$displaysize
--- a/music2/Makefile.am
+++ b/music2/Makefile.am
@@ -2,9 +2,11 @@ noinst_LIBRARIES = libmusic.a
 libmusic_a_SOURCES = music.cc koedec.cc koedec_ogg.cc wavfile.cc \
                      movie.cc nwatowav.cc music.h wavfile.h
 
-#bin_PROGRAMS = nwatowav
-#nwatowav_SOURCES = nwatowav.cc
-#nwatowav_CPPFLAGS = -DUSE_MAIN
+bin_PROGRAMS = $(NWATOWAV)
+EXTRA_PROGRAMS = nwatowav
+
+nwatowav_SOURCES = nwatowav.cc
+nwatowav_CPPFLAGS = -DUSE_MAIN
 
 INCLUDES = @SDL_CFLAGS@
 
--- a/system/Makefile.am
+++ b/system/Makefile.am
@@ -1,9 +1,11 @@
 noinst_LIBRARIES = libsystem.a
 libsystem_a_SOURCES = file.cc system_config.cc file.h file_impl.h system_config.h
 
-#bin_PROGRAMS = visarc
-#visarc_SOURCES = visarc.cc
-#visarc_LDADD = libsystem.a
+bin_PROGRAMS = $(VISARC)
+EXTRA_PROGRAMS = visarc
+
+visarc_SOURCES = visarc.cc
+visarc_LDADD = libsystem.a
 
 AM_CPPFLAGS = @CFLAGS@ @DEFS@