181 |
$debug || |
$debug || |
182 |
{ |
{ |
183 |
trap 'status=$?; rm -rf $tmp && exit $status' 0 |
trap 'status=$?; rm -rf $tmp && exit $status' 0 |
184 |
trap '(exit $?); exit' 1 2 13 15 |
trap '(exit 1); exit 1' 1 2 13 15 |
185 |
} |
} |
186 |
|
|
187 |
# Create a (secure) tmp directory for tmp files. |
# Create a (secure) tmp directory for tmp files. |
196 |
} || |
} || |
197 |
{ |
{ |
198 |
echo "$me: cannot create a temporary directory in $TMPDIR" >&2 |
echo "$me: cannot create a temporary directory in $TMPDIR" >&2 |
199 |
(exit 1); exit |
(exit 1); exit 1 |
200 |
} |
} |
201 |
|
|
202 |
# Preach. |
# Preach. |
219 |
More sophisticated templates can also be produced, see the |
More sophisticated templates can also be produced, see the |
220 |
documentation. |
documentation. |
221 |
EOF |
EOF |
222 |
$warning_error && { (exit 1); exit; } |
$warning_error && { (exit 1); exit 1; } |
223 |
fi |
fi |
224 |
|
|
225 |
acconfigs= |
acconfigs= |
237 |
*in ) infile=configure.in;; |
*in ) infile=configure.in;; |
238 |
* ) |
* ) |
239 |
echo "$me: no input file" >&2 |
echo "$me: no input file" >&2 |
240 |
exit 1;; |
(exit 1); exit 1;; |
241 |
esac;; |
esac;; |
242 |
1) infile=$1 ;; |
1) infile=$1 ;; |
243 |
*) exec >&2 |
*) exec >&2 |
244 |
echo "$me: invalid number of arguments." |
echo "$me: invalid number of arguments." |
245 |
echo "$help" |
echo "$help" |
246 |
(exit 1); exit ;; |
(exit 1); exit 1;; |
247 |
esac |
esac |
248 |
|
|
249 |
# Set up autoconf. |
# Set up autoconf. |
261 |
--trace AH_OUTPUT:'ac_verbatim_$1="\ |
--trace AH_OUTPUT:'ac_verbatim_$1="\ |
262 |
$2"' \ |
$2"' \ |
263 |
--trace AC_DEFINE_TRACE_LITERAL:'syms="$$syms $1"' \ |
--trace AC_DEFINE_TRACE_LITERAL:'syms="$$syms $1"' \ |
264 |
$infile >$tmp/traces.sh || { (exit 1); exit; } |
$infile >$tmp/traces.sh || { (exit 1); exit 1; } |
265 |
|
|
266 |
$verbose $me: sourcing $tmp/traces.sh >&2 |
$verbose $me: sourcing $tmp/traces.sh >&2 |
267 |
if (set -e && . $tmp/traces.sh) >/dev/null 2>&1; then |
if (set -e && . $tmp/traces.sh) >/dev/null 2>&1; then |
268 |
. $tmp/traces.sh |
. $tmp/traces.sh |
269 |
else |
else |
270 |
echo "$me: error: shell error while sourcing $tmp/traces.sh" >&2 |
echo "$me: error: shell error while sourcing $tmp/traces.sh" >&2 |
271 |
(exit 1); exit |
(exit 1); exit 1 |
272 |
fi |
fi |
273 |
|
|
274 |
|
|
290 |
# Support "outfile[:infile]", defaulting infile="outfile.in". |
# Support "outfile[:infile]", defaulting infile="outfile.in". |
291 |
case "$config_h" in |
case "$config_h" in |
292 |
"") echo "$me: error: AC_CONFIG_HEADERS not found in $infile" >&2 |
"") echo "$me: error: AC_CONFIG_HEADERS not found in $infile" >&2 |
293 |
(exit 1); exit ;; |
(exit 1); exit 1 ;; |
294 |
*:*) config_h_in=`echo "$config_h" | sed 's/.*://'` |
*:*) config_h_in=`echo "$config_h" | sed 's/.*://'` |
295 |
config_h=`echo "$config_h" | sed 's/:.*//'` ;; |
config_h=`echo "$config_h" | sed 's/:.*//'` ;; |
296 |
*) config_h_in="$config_h.in" ;; |
*) config_h_in="$config_h.in" ;; |
357 |
fi |
fi |
358 |
fi |
fi |
359 |
|
|
360 |
(exit $status); exit |
(exit $status); exit $status |