1# Copyright (C) 1999-2011, International Business Machines  Corporation and others.  All Rights Reserved.
2s%^\([a-zA-Z0-9\._-]*\)[ 	]*+=%\1=$(\1) %
3s%^[A-Z]*_SO_TARG*%## &%
4s%^SHARED_OBJECT.*%## &%
5s%^LD_SONAME.*%## &%
6s%$(\([^\)]*\))%${\1}%g
7s%^	%#M#	%
8s@^[a-zA-Z%$.][^=]*$@#M#&@
9s@^\([a-zA-Z][-.a-zA-Z_0-9-]*\)[	 ]*=[ 	]*\(.*\)@\1="\2"@
10s@^\([a-zA-Z][-a-zA-Z_0-9-]*\)\.\([a-zA-Z_0-9-]*\)[	 ]*=[ 	]*\(.*\)@\1_\2=\3@
11s@^\([a-zA-Z][-a-zA-Z_0-9-]*\)\-\([a-zA-Z_0-9-]*\)[	 ]*=[ 	]*\(.*\)@\1_\2=\3@
12s@\${\([a-zA-Z][-a-zA-Z_0-9-]*\)\.\([a-zA-Z_0-9-]*\)}@${\1_\2}@g
13s@^\(prefix\)=\(.*\)@default_\1=\2\
14if [ "x${\1}" = "x" ]; then \1="$default_\1"; fi@
15s@^\(ENABLE_RPATH\)=\(.*\)@default_\1=\2\
16if [ "x${\1}" = "x" ]; then \1="$default_\1"; fi@
17s%^#SH#[ ]*%%
18s%'\$\$'%\\\$\\\$%g
19