[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev cfg_defs.sh
From: |
pg |
Subject: |
lynx-dev cfg_defs.sh |
Date: |
Sat, 17 Oct 1998 18:03:43 -0600 (MDT) |
Hello, Lyncei,
The Bourne Shell "set" command may generate either of two different
output formats, POSIX, or non-POSIX. cfg_defs.sh accounts for both
of these when generating config.cache. Unfortunately these two cases
generate two distinctly different formats of config.cache. Even more
unfortunately, cfg_defs.sh accommodates only the non-POSIX format.
Here's a patch. Since I seem to be the entire POSIX user/developer
community, :-) there's no urgency to add this to 2.8.1.
-- gil
===========================================================
diff -brc ./orig/lynxsrc/cfg_defs.sh ./lynxsrc/cfg_defs.sh
*** ./orig/lynxsrc/cfg_defs.sh Fri Sep 25 04:41:38 1998
--- ./lynxsrc/cfg_defs.sh Sat Oct 17 17:49:01 1998
***************
*** 11,16 ****
--- 11,35 ----
CONST char *value;
} config_cache[] = {
EOF
+
+ # Empirical test for format of config.cache.
+ # I'd welcome a better touchstone.
+ # Ideally, "configure" should generate a uniform format config.cache.
+ # -- gil
+ case `grep '^ac_cv_func_' config.cache | head -1` in
+
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ *{*'="'* )
+ sed \
+ -e '/^#/d' \
+ -e 's/^.[^=]*_cv_/ { "/' \
+ -e 's/=\${.*=/", /' \
+ -e 's/}$/ },/' \
+ config.cache | sort
+ ;;
+ # `set' does not quote correctly, so add quotes
+ # ( cf. configure script's building config.cache )
+ * )
sed -e '/^#/d' \
-e 's/"/\\"/g' \
-e 's/=}$/=""}/' \
***************
*** 21,26 ****
--- 40,47 ----
-e 's/"}$/}/' \
-e 's/}$/" },/' \
config.cache | sort
+ ;; esac
+
cat <<EOF
};
***************
- lynx-dev cfg_defs.sh,
pg <=