[PATCH 2/2] Added autoconf option for utilities and embedded

Job baseband at hackwerk.org
Sun Aug 21 15:18:24 UTC 2011


From: job <job at hackwerk.org>

---
 configure.ac      |   25 +++++++++++++++++++++++++
 utils/Makefile.am |    2 ++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index bdc630c..e89afea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,6 +99,31 @@ AC_ARG_ENABLE(msgfile,
 	[enable_msgfile=$enableval], [enable_msgfile="yes"])
 AM_CONDITIONAL(ENABLE_MSGFILE, test x"$enable_msgfile" = x"yes")
 
+AC_ARG_ENABLE(utilities,
+        [AS_HELP_STRING(
+                [--disable-utilities],
+                [Disable building utility programs],
+        )],
+        [enable_utilities=$enableval], [enable_utilities="yes"])
+AM_CONDITIONAL(ENABLE_UTILITIES, test x"$enable_utilities" = x"yes")
+
+AC_ARG_ENABLE(embedded,
+	[AS_HELP_STRING(
+		[--enable-embedded],
+		[Enable building for embedded use and disable unsupported features]
+	)],
+	[embedded=$enableval], [embedded="no"])
+if test x"$embedded" = x"yes"
+then
+	AC_DEFINE([EMBEDDED],[1],[Select building for embedded use])
+	AM_CONDITIONAL(ENABLE_TESTS, false)
+	AM_CONDITIONAL(ENABLE_PLUGIN, false)
+	AM_CONDITIONAL(ENABLE_MSGFILE, false)
+	AM_CONDITIONAL(ENABLE_VTY, false)
+	AM_CONDITIONAL(ENABLE_TALLOC, false)
+	AM_CONDITIONAL(ENABLE_UTILITIES, false)
+	AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort])
+fi
 
 AC_OUTPUT(
 	libosmocore.pc
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 645cfd5..22903d9 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -1,5 +1,7 @@
+if ENABLE_UTILITIES
 INCLUDES = $(all_includes) -I$(top_srcdir)/include
 noinst_PROGRAMS = osmo-arfcn
 
 osmo_arfcn_SOURCES = osmo-arfcn.c
 osmo_arfcn_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la
+endif
-- 
1.7.4.1





More information about the baseband-devel mailing list