Skip to content

Instantly share code, notes, and snippets.

@thinktainer
Created September 19, 2014 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinktainer/716fd8e13020521d9b5d to your computer and use it in GitHub Desktop.
Save thinktainer/716fd8e13020521d9b5d to your computer and use it in GitHub Desktop.
missing odbc_config on ubuntu 14.04
#! /bin/sh
# This shell script saves various pieces of information about the
# installed version of unixODBC. Packages that interface to
# unixODBC can use it to configure their build.
# This file replaces the standard odbc_config, which is not
# relocatable
#
# Author: Alberto Di Meglio <alberto.di.meglio@cern.ch>
# Public domain
me=`basename $0`
mydir=`dirname $0`
mydir=${mydir%/bin}
# stored configuration values
val_prefix="$mydir"
val_bindir="$mydir/bin"
val_includedir="$mydir/include"
val_libdir="$mydir/lib"
val_libs="-L$mydir/lib -lodbc"
val_version='2.2.11'
help="\
$me provides information about the installed version of unixODBC.
Usage:
$me OPTION...
Options:
--prefix show the installation prefix
--exec-prefix show the installation prefix
--bin-prefix show location of user executables
--include-prefix show location of C header files of the client
interfaces
--lib-prefix show location of object code libraries
--libs show link arguments
--version show the unixODBC version, then exit
--help show this help, then exit"
advice="\
Try \"$me --help\" for more information."
if test "$#" -eq 0 ; then
echo "$me: argument required" 1>&2
echo "$advice" 1>&2
exit 1
fi
show=
for opt
do
case "$opt" in
--prefix) show="$show \$val_prefix";;
--exec-prefix) show="$show \$val_prefix";;
--bin-prefix) show="$show \$val_bindir";;
--include-prefix)
show="$show \$val_includedir";;
--lib-prefix) show="$show \$val_libdir";;
--libs) show="$show \$val_libs";;
--configure) show="$show \$val_configure";;
--version) echo "$val_version"
exit 0;;
--help|-\?) echo "$help"
exit 0;;
*) echo "$me: invalid argument: $opt" 1>&2
echo "$advice" 1>&2
exit 1;;
esac
done
for thing in $show
do
eval "echo $thing"
done
# end of odbc_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment