Переглянути джерело

build: Switch from --without- to --disable- for programs to be built

The standard way to select if a specific component of the build is to
be enabled or disabled is through --enable-foo and --disable-foo
options, --with-foo and --without-foo are used for selecting external
modules to be used.
Guillem Jover 14 роки тому
батько
коміт
1fcb0305c9
7 змінених файлів з 30 додано та 30 видалено
  1. 1 1
      Makefile.am
  2. 5 5
      README
  3. 4 4
      configure.ac
  4. 11 11
      m4/dpkg-build.m4
  5. 3 3
      man/Makefile.am
  6. 1 1
      src/help.c
  7. 5 5
      utils/Makefile.am

+ 1 - 1
Makefile.am

@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-if WITH_DSELECT
+if BUILD_DSELECT
   MAYBE_DSELECT = dselect
 endif
 

+ 5 - 5
README

@@ -71,7 +71,7 @@ To enable optional functionality or programs, this software might be needed:
   xz's liblzma (used instead of xz command-line tool)
   libbzip2 (used instead of bzip2 command-line tool)
   libselinux
-  curses compatible library (needed on --with-dselect)
+  curses compatible library (needed on --enable-dselect)
 
 To run the test suite («make check»):
 
@@ -100,10 +100,10 @@ see all available configuration options please run «./configure --help».
 The following configure options might be of interest to disable specific
 programs:
 
-  --without-dselect
-  --without-start-stop-daemon
-  --without-update-alternatives
-  --without-install-info
+  --disable-dselect
+  --disable-start-stop-daemon
+  --disable-update-alternatives
+  --disable-install-info
 
 And the following to disable modifications to the build flags:
 

+ 4 - 4
configure.ac

@@ -21,10 +21,10 @@ DPKG_DIST_CHECK([test "$GMSGFMT" = ":" && test "$USE_NLS" = "yes"],
                 [gettext required when NLS support enabled])
 
 # Allow compilation without optional programs
-DPKG_WITH_PROG([dselect])
-DPKG_WITH_PROG([start-stop-daemon])
-DPKG_WITH_PROG([update-alternatives])
-DPKG_WITH_PROG([install-info])
+DPKG_BUILD_PROG([dselect])
+DPKG_BUILD_PROG([start-stop-daemon])
+DPKG_BUILD_PROG([update-alternatives])
+DPKG_BUILD_PROG([install-info])
 
 # Allow alternate directories
 DPKG_WITH_DIR([admindir], [${localstatedir}/lib/${PACKAGE_NAME}],

+ 11 - 11
m4/dpkg-build.m4

@@ -1,24 +1,24 @@
-# Copyright © 2010 Guillem Jover <guillem@debian.org>
+# Copyright © 2010-2012 Guillem Jover <guillem@debian.org>
 
-# DPKG_WITH_PROG(PROG)
-# --------------
+# DPKG_BUILD_PROG(PROG)
+# ---------------
 # Allow disabling compilation and usage of specific programs.
-AC_DEFUN([DPKG_WITH_PROG], [
+AC_DEFUN([DPKG_BUILD_PROG], [
   AC_MSG_CHECKING([whether to build $1])
-  AC_ARG_WITH([$1],
-    AS_HELP_STRING([--without-$1], [do not build or use $1]),
-    [build_]AS_TR_SH([$1])[=$with_]AS_TR_SH([$1]),
+  AC_ARG_ENABLE([$1],
+    AS_HELP_STRING([--disable-$1], [do not build or use $1]),
+    [build_]AS_TR_SH([$1])[=$enable_]AS_TR_SH([$1]),
     [build_]AS_TR_SH([$1])[=yes]
   )
-  AM_CONDITIONAL([WITH_]AS_TR_CPP([$1]),
+  AM_CONDITIONAL([BUILD_]AS_TR_CPP([$1]),
                  [test "x$build_]AS_TR_SH([$1])[" = "xyes"])
   AS_IF([test "x$build_]AS_TR_SH([$1])[" = "xyes"], [
-    AC_DEFINE([WITH_]AS_TR_CPP([$1]), 1, [Define to 1 if $1 is compiled.])
+    AC_DEFINE([BUILD_]AS_TR_CPP([$1]), 1, [Define to 1 if $1 is compiled.])
   ], [
-    AC_DEFINE([WITH_]AS_TR_CPP([$1]), 0)
+    AC_DEFINE([BUILD_]AS_TR_CPP([$1]), 0)
   ])
   AC_MSG_RESULT([$build_]AS_TR_SH([$1]))
-])# DPKG_WITH_PROG
+])# DPKG_BUILD_PROG
 
 # DPKG_WITH_DIR(DIR, DEFAULT, DESCRIPTION)
 # -------------

+ 3 - 3
man/Makefile.am

@@ -40,18 +40,18 @@ dist_man_MANS = \
 	dpkg.1 \
 	dpkg.cfg.5
 
-if WITH_DSELECT
+if BUILD_DSELECT
 dist_man_MANS += \
 	dselect.1 \
 	dselect.cfg.5
 endif
 
-if WITH_START_STOP_DAEMON
+if BUILD_START_STOP_DAEMON
 dist_man_MANS += \
 	start-stop-daemon.8
 endif
 
-if WITH_UPDATE_ALTERNATIVES
+if BUILD_UPDATE_ALTERNATIVES
 dist_man_MANS += \
 	update-alternatives.8
 endif

+ 1 - 1
src/help.c

@@ -97,7 +97,7 @@ void checkpath(void) {
     FIND,
     BACKEND,
     "ldconfig",
-#if WITH_START_STOP_DAEMON
+#if BUILD_START_STOP_DAEMON
     "start-stop-daemon",
 #endif
     NULL

+ 5 - 5
utils/Makefile.am

@@ -16,7 +16,7 @@ EXTRA_DIST = \
 
 bin_PROGRAMS =
 
-if WITH_UPDATE_ALTERNATIVES
+if BUILD_UPDATE_ALTERNATIVES
 bin_PROGRAMS += update-alternatives
 endif
 
@@ -30,7 +30,7 @@ update_alternatives_LDADD = \
 
 sbin_PROGRAMS =
 
-if WITH_START_STOP_DAEMON
+if BUILD_START_STOP_DAEMON
 sbin_PROGRAMS += start-stop-daemon
 
 start_stop_daemon_SOURCES = \
@@ -41,7 +41,7 @@ start_stop_daemon_LDADD = \
 	$(SSD_LIBS)
 endif
 
-if WITH_INSTALL_INFO
+if BUILD_INSTALL_INFO
 sbin_PROGRAMS += dpkg-install-info
 
 # Automake has its own install-info rule, gah
@@ -54,7 +54,7 @@ endif
 transform = s/dpkg-install-info/install-info/; $(program_transform_name)
 
 install-data-local:
-if WITH_UPDATE_ALTERNATIVES
+if BUILD_UPDATE_ALTERNATIVES
 	$(mkdir_p) $(DESTDIR)$(sysconfdir)/alternatives
 	$(mkdir_p) $(DESTDIR)$(admindir)/alternatives
 	$(INSTALL_DATA) $(srcdir)/README.alternatives $(DESTDIR)$(sysconfdir)/alternatives/README
@@ -62,7 +62,7 @@ endif
 
 uninstall-local:
 	rm -f $(DESTDIR)$(sysconfdir)/alternatives/README
-if WITH_INSTALL_INFO
+if BUILD_INSTALL_INFO
 	rm -f $(DESTDIR)$(sbindir)/install-info
 endif