blob: 9fcafc99b7ac3b4f8addc91342063d6e37a39782 [file] [log] [blame]
Emeric Vigier2f625822012-08-06 11:09:52 -04001#!/bin/sh
2# Copyright (C) 2000-2005 Open Source Telecom Corporation.
3# Copyright (C) 2006-2008 David Sugar, Tycho Softworks.
4#
5# This file is free software; as a special exception the author gives
6# unlimited permission to copy and/or distribute it, with or without
7# modifications, as long as this notice is preserved.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
11# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13ost_cv_dynloader="@ost_cv_dynloader@"
14modflags="@MODULE_FLAGS@"
15ccflags="@THREAD_FLAGS@ @COMMON_FLAGS@"
16cclink="@SOCKET_LIBS@ @GETOPT_LIBS@ @THREAD_LIBS@"
17ccload="@DYN_LOADER@"
18ccstd="@SSL_LIBS@ @ZSTREAM_LIBS@"
19prefix="@prefix@"
20exec_prefix="@exec_prefix@"
21libdir="-L@libdir@"
22
23includedir="@includedir@"
24
25usage()
26{
27 cat <<EOF
28Usage: ccgnu2-config [OPTIONS]
29Options:
30 [--prefix[=DIR]]
31 [--sysroot[=DIR]]
32 [--exec-prefix[=DIR]]
33 [--version]
34 [--flags]
35 [--libs]
36 [--gnulibs]
37 [--iolibs]
38 [--extlibs]
39 [--stdlibs]
40 [--includes]
41 [--module]
42EOF
43 exit $1
44}
45
46if test $# -eq 0 ; then
47 usage 1 1>&2
48fi
49
50while test $# -gt 0 ; do
51 case "$1" in
52 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
53 *) optarg= ;;
54 esac
55
56 case "$1" in
57 --prefix=*)
58 prefix=$optarg
59 includedir=$prefix/include
60 libdir=$prefix/lib
61 ;;
62 --sysroot=*)
63 sysroot=$optarg
64 prefix=$sysroot$prefix
65 includedir=$sysroot$includedir
66 libdir="-L$sysroot@libdir@"
67 ;;
68 --prefix)
69 echo @prefix@
70 ;;
71 --exec-prefix=*)
72 exec_prefix=$optarg
73 libdir=$exec_prefix/lib
74 ;;
75 --exec-prefix)
76 echo $exec_prefix
77 ;;
78 --version)
79 echo @VERSION@
80 ;;
81 --flags)
82 echo $ccflags
83 ;;
84 --libs | --gnulibs)
85 echo $libdir -lccgnu2 $ccload $cclink
86 ;;
87 --cclibs)
88 echo $cclink
89 ;;
90 --iolibs)
91 echo $libdir -lccgnu2 $ccload $cclink
92 ;;
93 --stdlibs)
94 echo $libdir -lccext2 -lccgnu2 $ccstd $ccload $cclink
95 ;;
96 --extlibs)
97 echo -lccext2 $ccstd
98 ;;
99 --includes)
100 echo -I$includedir
101 ;;
102 --dyn | --dso)
103 echo $ost_cv_dynloader
104 ;;
105 --modflags | --module)
106 echo $modflags
107 ;;
108 --help)
109 usage 0
110 ;;
111 *)
112 usage 1 1>&2
113 ;;
114 esac
115 shift
116done
117