home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / MySql / scripts / mysql_config.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2001-01-01  |  2.1 KB  |  75 lines

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