summaryrefslogtreecommitdiff
path: root/autoopts/autoopts-config.in
blob: 177cdd406e89d7abf45a13f5774d34356247f944 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#! @CONFIG_SHELL@
## ---------------------------------------------------------------------
## autoopts-config.in -- Describe AutoOpts configuration
##
##  Autoopts Copyright (c) 1992-2012 by Bruce Korb
##
## DO NOT EDIT THIS FILE   (autoopts-config.in)
## 
## It has been AutoGen-ed  August 11, 2012 at 09:41:23 AM by AutoGen 5.16.2pre7
## From the definitions    aoconf.def
## and the template file   aoconf.tpl
##
      prefix="@prefix@"
 datarootdir="@datarootdir@"
     datadir="@datadir@"
     package="@PACKAGE@"
  includedir="@includedir@"
 exec_prefix="@exec_prefix@"
      bindir="@bindir@"
      libdir="@libdir@"
      ldopts="@AG_LDFLAGS@"
      exeext="@EXEEXT@"
     version="@AO_CURRENT@:@AO_REVISION@:@AO_AGE@"
      dotver="@AO_CURRENT@.@AO_REVISION@.@AO_AGE@"
  pkgdatadir="${datadir}/${package}"
     autogen="${bindir}/autogen${exeext}"
     ldflags="-L${libdir} -lopts"
        libs="${ldflags}"
      libsrc="${pkgdatadir}/libopts-${dotver}.tar.gz"
 static_libs="${libdir}/libopts.a"
      cflags="-I${includedir}"
test 'X@ENABLE_STATIC@' = Xno && static_libs=''
case "${libdir}" in
/lib | /lib64 | /usr/lib | /usr/lib64 )
    ldopts=''
    ldflags=-lopts
    ;;

* )
    test -n "${ldopts}" && \
        ldflags="${ldopts}${libdir} ${ldflags}"
    ;;
esac
libs=${ldflags}
test "${includedir}" = "/usr/include" && cflags=""
optlist="\
    autogen     bindir      cflags      datadir     datarootdir dotver
    everything  exec_prefix exeext      includedir  ldflags     ldopts
    libdir      libs        libsrc      package     pkgdatadir  prefix
    static_libs version"

usage()
{
  test $# -gt 0 && {
    exec 1>&2
    echo autoopts-config error: "$*"
  }

  echo Usage: autoopts-config \<\<OPTION\>\> [ ... ]
  echo Options may be one or more of:

  for o in $optlist
  do  echo "       ${o}"
  done | sed 's,_,-,g'
  echo 'NB: "everything" will print out the list of all names and values.'
  exit $#
}

test $# -gt 0 || usage "No value specified"

# Figure out what's wanted
#
val=''
for o in "$@" ; do
  o=`echo ${o} | sed 's,^-*,,;s/-/_/g'`
  case "$o" in
  help | h | \? )   usage ;;
  *[!a-zA-Z0-9_]* ) usage "Invalid name:  ${o}" ;;

  prefix      ) val="${val} ${prefix}"       ;;
  datarootdir ) val="${val} ${datarootdir}"  ;;
  datadir     ) val="${val} ${datadir}"      ;;
  package     ) val="${val} ${package}"      ;;
  includedir  ) val="${val} ${includedir}"   ;;
  exec_prefix ) val="${val} ${exec_prefix}"  ;;
  bindir      ) val="${val} ${bindir}"       ;;
  libdir      ) val="${val} ${libdir}"       ;;
  ldopts      ) val="${val} ${ldopts}"       ;;
  exeext      ) val="${val} ${exeext}"       ;;
  version     ) val="${val} ${version}"      ;;
  dotver      ) val="${val} ${dotver}"       ;;
  pkgdatadir  ) val="${val} ${pkgdatadir}"   ;;
  autogen     ) val="${val} ${autogen}"      ;;
  ldflags     ) val="${val} ${ldflags}"      ;;
  libs        ) val="${val} ${libs}"         ;;
  libsrc      ) val="${val} ${libsrc}"       ;;
  static_libs ) val="${val} ${static_libs}"  ;;
  cflags      ) val="${val} ${cflags}"       ;;
  everything  )
     for o in ${optlist}
     do test ${o} = everything && continue
        eval v=\"\${${o}}\"
        test -z "${v}" && echo ${o} || \
           printf "%-12s $v\n" ${o}
     done
     exit 0
     ;;

  * ) usage "Unknown value name:  ${o}" ;;
  esac
done

echo "${val}"
## end of autoopts-config.in