From 2f62a9c3fd06aa5eb989d0b834df4ebc89d88604 Mon Sep 17 00:00:00 2001 From: flameeyes Date: Thu, 30 Mar 2006 10:47:51 +0000 Subject: [PATCH] Add a --disable-cxx configure parameter so that the C++ bindings can be skipped. --- configure.ac | 13 +++++++------ include/Makefile.am | 5 ++++- lib/Makefile.am | 12 ++++++++---- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index b52f76cc..a4f205cb 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ define(RELEASE_NUM, 77) define(CDIO_VERSION_STR, 0.$1) AC_PREREQ(2.52) -AC_REVISION([$Id: configure.ac,v 1.192 2006/03/25 00:22:47 rocky Exp $])dnl +AC_REVISION([$Id: configure.ac,v 1.193 2006/03/30 10:47:51 flameeyes Exp $])dnl AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM)) AC_CONFIG_SRCDIR(src/cd-info.c) @@ -79,16 +79,17 @@ AC_ARG_WITH(versioned_libs, [ --without-versioned-libs build versioned library symbols (default enabled if you have GNU ld)], enable_versioned_libs="${withval}", enable_versioned_libs=yes) -AC_ARG_ENABLE(cpp_progs, - [ --enable-cpp-progs make C++ example programs (default enabled)], - enable_cpp_progs=no, - enable_cpp_progs=yes) +AC_ARG_ENABLE([cxx], + AC_HELP_STRING([--disable-cxx], [Disable C++ bindings (default enabled)])) +AM_CONDITIONAL([ENABLE_CXX_BINDINGS], [test "x$enable_cxx" != "xno"]) +AC_ARG_ENABLE(cpp_progs, + [ --enable-cpp-progs make C++ example programs (default enabled)]) AM_CONDITIONAL(ENABLE_CPP, test x"$enable_cpp_progs" = "xyes") dnl We use C AC_PROG_CC -dnl We also use C++ in example programs +dnl We also use C++ in example programs and for CXX bindings AC_PROG_CXX dnl Checks for programs. diff --git a/include/Makefile.am b/include/Makefile.am index f89bfd1b..1efc4275 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,2 +1,5 @@ +if ENABLE_CXX_BINDINGS +cxxdirs = cdio++ +endif -SUBDIRS = cdio cdio++ +SUBDIRS = cdio $(cxxdirs) diff --git a/lib/Makefile.am b/lib/Makefile.am index f730752b..50b1c2af 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,4 +1,4 @@ -# $Id: Makefile.am,v 1.68 2005/11/10 11:11:15 rocky Exp $ +# $Id: Makefile.am,v 1.69 2006/03/30 10:47:51 flameeyes Exp $ # # Copyright (C) 2003, 2004 Rocky Bernstein # @@ -21,7 +21,11 @@ ######################################################## if BUILD_CD_PARANOIA -SUBDIRS = cdio++ driver iso9660 cdda_interface paranoia udf -else -SUBDIRS = cdio++ driver iso9660 udf +paranoiadirs = cdda_interface paranoia endif + +if ENABLE_CXX_BINDINGS +cxxdirs = cdio++ +endif + +SUBDIRS = driver iso9660 udf $(paranoiadirs) $(cxxdirs)