diff options
author | Richard Boulton <richard@tartarus.org> | 2001-06-28 15:39:48 +0000 |
---|---|---|
committer | Richard Boulton <richard@tartarus.org> | 2001-06-28 15:39:48 +0000 |
commit | fa53aaa72fcea8995e0f0c506b0f0c1f6d33e47f (patch) | |
tree | d7e47bc1c30aad7d67fba593ed6ec8b1360474c8 /acinclude.m4 | |
parent | 4dce71b5a77805f21cf1d0300da64bfe7beb8f89 (diff) |
Add ACTION-IF-USE and ACTION-IF-NOTUSE parameters to GST_CHECK_FEATURE.
Original commit message from CVS:
Add ACTION-IF-USE and ACTION-IF-NOTUSE parameters to GST_CHECK_FEATURE.
Convert glib2 check to use GST_CHECK_FEATURE.
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 731b60b2ce..34ca272948 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -297,7 +297,8 @@ dnl Perform a check for a feature for GStreamer dnl Richard Boulton <richard-alsa@tartarus.org> dnl Last modification: 25/06/2001 dnl GST_CHECK_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION, -dnl DEPENDENT-PLUGINS, TEST-FOR-FEATURE) +dnl DEPENDENT-PLUGINS, TEST-FOR-FEATURE, +dnl DISABLE-BY-DEFAULT, ACTION-IF-USE, ACTION-IF-NOTUSE) dnl dnl This macro adds a command line argument to enable the user to enable dnl or disable a feature, and if the feature is enabled, performs a supplied @@ -305,6 +306,14 @@ dnl test to check if the feature is available. dnl dnl The test should define HAVE_<FEATURE-NAME> to "yes" or "no" depending dnl on whether the feature is available. +dnl +dnl The macro will set USE_<<FEATURE-NAME> to "yes" or "no" depending on +dnl whether the feature is to be used. +dnl +dnl The macro will call AM_CONDTIONAL(USE_<<FEATURE-NAME>, ...) to allow +dnl the feature to control what is built in Makefile.ams. If you want +dnl additional actions resulting from the test, you can add them with the +dnl ACTION-IF-USE and ACTION-IF-NOTUSE parameters. dnl dnl FEATURE-NAME is the name of the feature, and should be in dnl purely upper case characters. @@ -316,12 +325,16 @@ dnl or "no" depending on whether the feature is dnl available. dnl DISABLE-BY-DEFAULT if "disabled", the feature is disabled by default, dnl if any other value, the feature is enabled by default. +dnl ACTION-IF-USE any extra actions to perform if the feature is to be +dnl used. +dnl ACTION-IF-NOTUSE any extra actions to perform if the feature is not to +dnl be used. dnl AC_DEFUN(GST_CHECK_FEATURE, [dnl builtin(define, [gst_endisable], ifelse($5, [disabled], [enable], [disable]))dnl AC_ARG_ENABLE(translit([$1], A-Z, a-z), - [ ]builtin(format, --%-26s gst_endisable %s: %s, gst_endisable-translit([$1], A-Z, a-z), [$2], [$3]), + [ ]builtin(format, --%-26s gst_endisable %s, gst_endisable-translit([$1], A-Z, a-z), [$2]ifelse([$3],,,: [$3])), [ case "${enableval}" in yes) USE_[$1]=yes ;; no) USE_[$1]=no ;; @@ -350,10 +363,13 @@ if test x$USE_[$1] = xyes; then fi fi dnl *** Warn if it's disabled or not found -if test x$USE_[$1] = xno; then - AC_MSG_WARN( +if test x$USE_[$1] = xyes; then + ifelse([$6], , :, [$6]) +else + ifelse([$3], , :, [AC_MSG_WARN( ***** NOTE: These plugins won't be built: [$3] -) +)]) + ifelse([$7], , :, [$7]) fi dnl *** Define the conditional as appropriate AM_CONDITIONAL(USE_[$1], test x$USE_[$1] = xyes) |