~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to scripts/mysql_config.sh

  • Committer: bk at mysql
  • Date: 2000-07-31 19:29:14 UTC
  • Revision ID: sp1r-bk@work.mysql.com-20000731192914-08846
Import changeset

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
 
3
 
4
# This program is free software; you can redistribute it and/or modify
 
5
# it under the terms of the GNU General Public License as published by
 
6
# the Free Software Foundation; either version 2 of the License, or
 
7
# (at your option) any later version.
 
8
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
# GNU General Public License for more details.
 
13
 
14
# You should have received a copy of the GNU General Public License
 
15
# along with this program; if not, write to the Free Software
 
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
 
 
18
# This script reports various configuration settings that may be needed
 
19
# when using the MySQL client library.
 
20
 
 
21
ldata='@localstatedir@'
 
22
execdir='@libexecdir@'
 
23
bindir='@bindir@'
 
24
pkglibdir='@pkglibdir@'
 
25
pkgincludedir='@pkgincludedir@'
 
26
version='@VERSION@'
 
27
socket='@MYSQL_UNIX_ADDR@'
 
28
port='@MYSQL_TCP_PORT@'
 
29
ldflags='@LDFLAGS@'
 
30
client_libs='@CLIENT_LIBS@'
 
31
 
 
32
libs="$ldflags -L'$pkglibdir' -lmysqlclient $client_libs"
 
33
cflags="-I'$pkgincludedir'"
 
34
 
 
35
usage () {
 
36
        cat <<EOF
 
37
Usage: $0 [OPTIONS]
 
38
Options:
 
39
        --cflags        [$cflags]
 
40
        --libs          [$libs]
 
41
        --socket        [$socket]
 
42
        --port          [$port]
 
43
        --version       [$version]
 
44
EOF
 
45
        exit 1
 
46
}
 
47
 
 
48
if ! test $# -gt 0; then usage; fi
 
49
 
 
50
while test $# -gt 0; do
 
51
        case $1 in
 
52
        --cflags)  echo "$cflags" ;;
 
53
        --libs)    echo "$libs" ;;
 
54
        --socket)  echo "$socket" ;;
 
55
        --port)    echo "$port" ;;
 
56
        --version) echo "$version" ;;
 
57
        *)         usage ;;
 
58
        esac
 
59
 
 
60
        shift
 
61
done
 
62
 
 
63
#echo "ldata: '"$ldata"'"
 
64
#echo "execdir: '"$execdir"'"
 
65
#echo "bindir: '"$bindir"'"
 
66
#echo "pkglibdir: '"$pkglibdir"'"
 
67
#echo "pkgincludedir: '"$pkgincludedir"'"
 
68
#echo "version: '"$version"'"
 
69
#echo "socket: '"$socket"'"
 
70
#echo "port: '"$port"'"
 
71
#echo "ldflags: '"$ldflags"'"
 
72
#echo "client_libs: '"$client_libs"'"
 
73
 
 
74
exit 0