1 |
#!/bin/sh |
#! /usr/bin/env sh |
2 |
# |
# |
3 |
# Converts -Dmacro to #define macro |
# Converts -Dmacro to #define macro |
4 |
# and -Umacro to #undef macro |
# and -Umacro to #undef macro |
20 |
|
|
21 |
EOF |
EOF |
22 |
|
|
23 |
for ac_option ; do |
BARRIER= |
24 |
case $ac_option in |
|
25 |
|
# Process arguments |
26 |
|
for arg in $@ |
27 |
|
do |
28 |
|
case $arg in |
29 |
|
-b*) |
30 |
|
BARRIER=`echo $arg | sed 's/-b//'` |
31 |
|
echo "#ifndef ${BARRIER}" |
32 |
|
echo "#define ${BARRIER}" |
33 |
|
;; |
34 |
-D*) |
-D*) |
35 |
echo $ac_option | sed 's/-D/#define /' | sed 's/=/ /' |
echo $arg | sed 's/-D/#define /' | sed 's/=/ /' |
36 |
;; |
;; |
37 |
-U*) |
-U*) |
38 |
echo $ac_option | sed 's/-U/#undef /' | sed 's/=/ /' |
echo $arg | sed 's/-U/#undef /' | sed 's/=/ /' |
39 |
;; |
;; |
40 |
*) |
*) |
41 |
echo "/* " $ac_option " */" |
echo "/* " $arg " */" |
42 |
;; |
;; |
43 |
esac |
esac |
44 |
done |
done |
45 |
|
|
46 |
|
if test ! "x${BARRIER}" = x ; then |
47 |
|
echo "#endif /* ${BARRIER} */" |
48 |
|
fi |