dnl Process this file with autoconf to produce a configure script. dnl AC_INIT(db_test_suite) dnl dnl remove . from the path! dnl (because db2dcliff is always there) dnl oldpath="$PATH" newpath=":$PATH:" newpath=`echo "$newpath" | sed -e 's/:.:/:/g' -e 's/::/:/g' | sed -e 's/^://' -e 's/:$//'` PATH="$newpath" export PATH AC_PREFIX_PROGRAM(db2dcliff) if test "$prefix" = . then prefix=NONE fi PATH="$oldpath" AC_PROG_CC builtin(include, ./CONF/configure.in.fns) builtin(include, ./CONF/configure.in.perl) AC_SUBST(PERL) AC_SUBST(mybindir) AC_SUBST(mydatadir) AC_SUBST(mymandir) AC_SUBST(prefix) dnl dnl Figure out where to go. dnl if test "$prefix" != NONE then AC_MSG_CHECKING([prefix]) AC_MSG_RESULT($prefix) mybindir='${prefix}'/bin mydatadir='${prefix}'/share mymandir='${prefix}'/man else dnl defaults mybindir=/usr/local/bin mydatadir=/usr/local/share mymandir=/usr/local/man fi dnl I think these next lines allow --bindir=x to override dnl what's provided. test "$bindir" != '${exec_prefix}'/bin && mybindir=$bindir test "$datadir" != '${prefix}'/share && mydatadir=$datadir test "$mandir" != '${prefix}'/man && mymandir=$mandir AC_MSG_CHECKING([where programs will be installed]) AC_MSG_RESULT($mybindir) AC_MSG_CHECKING([where sample data will be installed]) AC_MSG_RESULT($mydatadir) dnl no man pages yet :-( dnl AC_MSG_CHECKING([man pages install in]) dnl AC_MSG_RESULT($mymandir) dnl echo prefix=$prefix dnl echo bindir=$bindir dnl echo datadir=$datadir dnl echo mandir=$mandir dnl dnl Now check for the sadly common error of people wanting to install dnl it in the current directory, and dnl catch that ~ expansion doesn't happen. dnl AC_MSG_CHECKING([that the installation directory is reasonable]) realhere=`pwd` realprefix=`( if test -d $prefix; then cd $prefix; pwd; else echo $prefix; fi; )` test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' export prefix export exec_prefix case "x$prefix" in x~*) AC_MSG_RESULT([no]) AC_MSG_ERROR([configure doesn't handle ~ expansion in $prefix, please respecify --prefix explicitly.]) ;; esac dnl eval it twice... ${exec_prefix} -> ${prefix} -> text realbindir="$mybindir" realbindir=`eval "echo $realbindir"` realbindir=`eval "echo $realbindir"` realbindir=`( if test -d $realbindir; then cd $realbindir; pwd; else echo $realbindir; fi; )` dnl echo realhere=$realhere dnl echo realprefix=$realprefix dnl echo realbindir=$realbindir if test "x$realhere" = "x$realprefix" -o "x$realhere" = "x$realbindir" then AC_MSG_RESULT([no]) AC_MSG_ERROR([configure it will install jdb in the source directory ($realhere), either because you asked it to with --prefix or because it found db2dcliff there and got confused. Please explicitly install jdb somewhere else by re-running configure with the --prefix=/some/dir or --bindir==/other/dir arguments. ]) fi AC_MSG_RESULT([yes]) dnl dnl tell people where it will be installed dnl pwd=${pwd:-`pwd`} AC_MSG_RESULT([ jdb programs will be installed in $realbindir (run them from there, not from $pwd)]) AC_PROG_INSTALL AC_OUTPUT(Makefile)