fix
[libdbcli.git] / config.sh
blob61ded04e84c7ddeed94c1bb6958d1dfda751f2b7
1 #!/bin/bash
3 TOP=$1
4 PREFIX=`echo $2 | sed "s/\\//\\\\\\\\\\\//g"`
5 HAVE_PGSQL=$3
6 HAVE_MYSQL=$4
7 HAVE_MONETDB=$5
8 HAVE_FBSQL=$6
10 if [ "$HAVE_MYSQL" == "yes" ]; then
11 MYSQL_INCLUDE_DIR=`mysql_config --include | sed "s/\\//\\\\\\\\\\\//g"`
12 MYSQL_LIBS=`mysql_config --libs | sed "s/\\//\\\\\\\\\\\//g"`
13 sed -e "s/@prefix/$PREFIX/g" -e "s/@mysql_libs/$MYSQL_LIBS/g" -e "s/@mysql_include_dir/$MYSQL_INCLUDE_DIR/g" $TOP/src/mysql/libmycli.pc.in > $TOP/src/mysql/libmycli.pc
16 if [ "$HAVE_PGSQL" == "yes" ]; then
17 PG_INCLUDE_DIR=`pg_config --includedir | sed "s/\\//\\\\\\\\\\\//g"`
18 PG_LIB_DIR=`pg_config --libdir | sed "s/\\//\\\\\\\\\\\//g"`
19 sed -e "s/@prefix/$PREFIX/g" -e "s/@pg_include_dir/$PG_INCLUDE_DIR/g" -e "s/@pg_lib_dir/$PG_LIB_DIR/g" $TOP/src/pg/libpgcli.pc.in > $TOP/src/pg/libpgcli.pc
22 if [ "$HAVE_MONETDB" == "yes" ]; then
23 MAPI_INCLUDE=`pkg-config --cflags monetdb-mapi | sed "s/\\//\\\\\\\\\\\//g"`
24 MAPI_LIBS=`pkg-config --libs monetdb-mapi | sed "s/\\//\\\\\\\\\\\//g"`
25 sed -e "s/@prefix/$PREFIX/g" -e "s/@mapi_include/$MAPI_INCLUDE/g" -e "s/@mapi_libs/$MAPI_LIBS/g" $TOP/src/mdb/libmdbcli.pc.in > $TOP/src/mdb/libmdbcli.pc
28 if [ "$HAVE_FBSQL" == "yes" ]; then
29 GDS_LIBS=`fb_config --libs | sed "s/\\//\\\\\\\\\\\//g"`
30 sed -e "s/@prefix/$PREFIX/g" -e "s/@gds_libs/$GDS_LIBS/g" $TOP/src/gds/libgdscli.pc.in > $TOP/src/gds/libgdscli.pc