| 1 |
#!/bin/sh |
| 2 |
# $Id: satellite4-config.in,v 1.1.1.1 2004/03/31 08:15:05 orrisroot Exp $ |
| 3 |
|
| 4 |
# @configure_input@ |
| 5 |
# |
| 6 |
|
| 7 |
prefix=@prefix@ |
| 8 |
exec_prefix=@exec_prefix@ |
| 9 |
exec_prefix_set=no |
| 10 |
data_dir=@datadir@/@PACKAGE_NAME@ |
| 11 |
|
| 12 |
project=@PACKAGE_NAME@ |
| 13 |
version=@PACKAGE_VERSION@ |
| 14 |
satellite4_include_dir=@sl4includedir@ |
| 15 |
satellite4_lib_dir=@sl4libdir@ |
| 16 |
satellite4_libexec_dir=@sl4libexecdir@ |
| 17 |
satellite4_doc_dir=@sl4docdir@ |
| 18 |
satellite4_share_dir=@sl4sharedir@ |
| 19 |
satellite4_examples_dir=@examplesdir@ |
| 20 |
satellite4_module_dir=@moduledir@ |
| 21 |
satellite4_systemrc_dir=@systemrcdir@ |
| 22 |
pthread_cflags="@PTHREAD_CFLAGS@" |
| 23 |
pthread_libs="@PTHREAD_LIBS@" |
| 24 |
|
| 25 |
usage() |
| 26 |
{ |
| 27 |
cat <<EOF |
| 28 |
Usage: satellite-config [OPTIONS] |
| 29 |
Options: |
| 30 |
[--prefix[=DIR]] |
| 31 |
[--exec-prefix[=DIR]] |
| 32 |
[--version] |
| 33 |
[--libs] |
| 34 |
[--cflags] |
| 35 |
[--include-dir] |
| 36 |
[--lib-dir] |
| 37 |
[--module-dir] |
| 38 |
EOF |
| 39 |
exit $1 |
| 40 |
} |
| 41 |
|
| 42 |
if test $# -eq 0; then |
| 43 |
usage 1 1>&2 |
| 44 |
fi |
| 45 |
|
| 46 |
lib_libsl4=yes |
| 47 |
lib_satellite=yes |
| 48 |
lib_pthread=yes |
| 49 |
|
| 50 |
while 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 |
if test $exec_prefix_set = no ; then |
| 60 |
exec_prefix=$optarg |
| 61 |
fi |
| 62 |
;; |
| 63 |
--prefix) |
| 64 |
echo_prefix=yes |
| 65 |
;; |
| 66 |
--exec-prefix=*) |
| 67 |
exec_prefix=$optarg |
| 68 |
exec_prefix_set=yes |
| 69 |
;; |
| 70 |
--exec-prefix) |
| 71 |
echo_exec_prefix=yes |
| 72 |
;; |
| 73 |
--version) |
| 74 |
echo $version |
| 75 |
exit 0 |
| 76 |
;; |
| 77 |
--cflags) |
| 78 |
echo_cflags=yes |
| 79 |
;; |
| 80 |
--libs) |
| 81 |
echo_libs=yes |
| 82 |
;; |
| 83 |
--include-dir) |
| 84 |
echo_include_dir=yes |
| 85 |
;; |
| 86 |
--lib-dir) |
| 87 |
echo_lib_dir=yes |
| 88 |
;; |
| 89 |
--module-dir) |
| 90 |
echo_module_dir=yes |
| 91 |
;; |
| 92 |
*) |
| 93 |
usage 1 1>&2 |
| 94 |
;; |
| 95 |
esac |
| 96 |
shift |
| 97 |
done |
| 98 |
|
| 99 |
if test "$echo_prefix" = "yes"; then |
| 100 |
echo $prefix |
| 101 |
fi |
| 102 |
if test "$echo_exec_prefix" = "yes"; then |
| 103 |
echo $exec_prefix |
| 104 |
fi |
| 105 |
if test "$echo_cflags" = "yes"; then |
| 106 |
pthcf="" |
| 107 |
if test "$lib_pthread" = "yes"; then |
| 108 |
pthcf=$pthread_cflags |
| 109 |
fi |
| 110 |
echo -I$satellite4_include_dir $pthcf |
| 111 |
fi |
| 112 |
if test "$echo_libs" = "yes"; then |
| 113 |
libsp="" |
| 114 |
if test "$lib_satellite" = "yes"; then |
| 115 |
libsp="-lsatellite -lsl4" |
| 116 |
fi |
| 117 |
libpth="" |
| 118 |
if test "$lib_pthread" = "yes"; then |
| 119 |
libpth=$pthread_libs |
| 120 |
fi |
| 121 |
echo -L$satellite4_lib_dir $libsp $libpth |
| 122 |
fi |
| 123 |
if test "$echo_include_dir" = "yes"; then |
| 124 |
echo $satellite4_include_dir |
| 125 |
fi |
| 126 |
if test "$echo_lib_dir" = "yes"; then |
| 127 |
echo $satellite4_lib_dir |
| 128 |
fi |
| 129 |
if test "$echo_module_dir" = "yes"; then |
| 130 |
echo $satellite4_module_dir |
| 131 |
fi |