root/mpich2/branches/dev/kumudb/confdb/aclocal_enable.m4
@
4870
| Revision 4870, 1.2 KB (checked in by kumudb, 5 months ago) |
|---|
| Line | |
|---|---|
| 1 | dnl |
| 2 | dnl NOT YET READY |
| 3 | dnl |
| 4 | dnl This contains some helper macros to help handle complex enable values |
| 5 | dnl such as |
| 6 | dnl --enable-g=g,mem=trace |
| 7 | dnl and |
| 8 | dnl --enable-g=all |
| 9 | dnl |
| 10 | dnl for --enable-name, use |
| 11 | dnl PAC_ARG_ENABLE_PARSE(name) |
| 12 | dnl |
| 13 | dnl Not done: |
| 14 | dnl Provide a list of allowed values (to allow checking for missed values) |
| 15 | dnl Provide an option to automatically define a value. We currently |
| 16 | dnl set HAVE_ENABLE_NAME_SUBNAME=value. For example |
| 17 | dnl --enable-g=g,mem=trace |
| 18 | dnl would set the variables |
| 19 | dnl HAVE_ENABLE_G_G=yes |
| 20 | dnl HAVE_ENABLE_G_MEM=trace |
| 21 | dnl |
| 22 | AC_DEFUN([PAC_ARG_ENABLE_PARSE],[ |
| 23 | eval ac_e_parse=${enable}_$1 |
| 24 | save_IFS="$IFS" |
| 25 | IFS="," |
| 26 | for ac_opt in $ac_e_parse ; do |
| 27 | dnl handle ac_opt has a value |
| 28 | case "$ac_opt" in |
| 29 | *=*) ac_optname=`echo "$ac_opt" | sed 's/=.*//'` |
| 30 | ac_optarg=`echo "$ac_opt" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 31 | *) ac_optname=$ac_opt |
| 32 | ac_optarg=yes ;; |
| 33 | esac |
| 34 | dnl Still need to upcase the name |
| 35 | changequote(<<,>>)dnl |
| 36 | define(<<AC_VAR_NAME>>, translit($1,[a-z],[A-Z]))dnl |
| 37 | ac_opt_name_caps=`echo $ac_opt_name | tr a-z A-Z` |
| 38 | changequote([,])dnl |
| 39 | ac_opt_name=HAVE_ENABLE_[]AC_VAR_NAME[]_${ac_opt_name_caps} |
| 40 | eval $ac_opt_name=$ac_optarg |
| 41 | done |
| 42 | ]) |
Note: See TracBrowser
for help on using the browser.
