Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / libiconv / windows / windres-options
blob779fddec305d1e78f1e5c3123683b3c380e4a82e
1 #!/bin/sh
2 # Usage: windres-options [--escape] PACKAGE_VERSION
3 # Outputs a set of command-line options for 'windres', containing definitions
4 # for the preprocessor variables
5 # PACKAGE_VERSION_STRING
6 # PACKAGE_VERSION_MAJOR
7 # PACKAGE_VERSION_MINOR
8 # PACKAGE_VERSION_SUBMINOR
10 escape=
11 if test "$1" = "--escape"; then
12 escape=yes
13 shift
15 version="$1" # something like 2.0 or 2.17 or 2.17.3 or 2.17.3-pre3
17 sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
22 sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
27 sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
34 echo "-DPACKAGE_VERSION_STRING=\"${version}\""
35 echo "-DPACKAGE_VERSION_MAJOR="`echo "${version}" | sed -n -e "$sed_extract_major"`
36 echo "-DPACKAGE_VERSION_MINOR="`echo "${version}" | sed -n -e "$sed_extract_minor"`
37 echo "-DPACKAGE_VERSION_SUBMINOR="`echo "${version}" | sed -n -e "$sed_extract_subminor"`
38 } |
40 if test -n "$escape"; then
41 sed -e 's,\(["\\]\),\\\1,g'
42 else
43 cat