I have modified the Birdstep section of the config.m4 in the /ext/odbc directory,
but it does not appear to have any effect. What I am trying to do is call the
AC_DEFINE macro with the define value to be based on the operating system. I am
very new to autoconf, so I based my changes on the AC_FIND_SOLID_LIBS macro at
the very beginning of this same config.m4 file.
Below is the entire Birdstep section of config.m4. My changes lie between "dnl
BEGIN_BIRDSTEP_CHANGES" and "dnl END_BIRDSTEP_CHANGES". Note that if I simply
insert the AC_DEFINE in the file, it works fine, but if I try to use a case block,
it isn't working... Can anyone tell me what I am doing wrong here? (Yes, I'm
deleting the autom4te.cache and running buildconf after modifying the config.m4)
AC_MSG_CHECKING(for Birdstep support)
AC_ARG_WITH(birdstep,
[ --with-birdstep[=DIR] Include Birdstep support. DIR is the Birdstep base
install directory, defaults to /usr/local/birdstep.],
[
PHP_WITH_SHARED
dnl BEGIN_BIRDSTEP_CHANGES
ac_birdstep_uname_s=uname -s 2>/dev/null
ac_birdstep_uname_p=uname -p 2>/dev/null
case $ac_birdstep_uname_s in
AIX)
AC_DEFINE(AIX_POWERPC,1,[ ]);;
HP-UX)
AC_DEFINE(HPUX_PARISC,1,[ ]);;
Linux)
AC_DEFINE(LINUX_X86,1,[ ]);;
QNX)
AC_DEFINE(NEUTRINO_X86,1,[ ]);;
SunOs)
if test "$ac_birdstep_uname_p" == "i386"; then
AC_DEFINE(SOLARIS_X86,1,[ ])
elif test "$ac_birdstep_uname_p" == "sparc"; then
AC_DEFINE(SOLARIS_SPARC,1,[ ])
fi;;
UnixWare)
AC_DEFINE(UNIXWARE_X86,1,[ ]);;
esac
dnl END_BIRDSTEP_CHANGES
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
ODBC_INCDIR=/usr/local/birdstep/include
ODBC_LIBDIR=/usr/local/birdstep/lib
else
ODBC_INCDIR=$withval/include
ODBC_LIBDIR=$withval/lib
fi
ODBC_INCLUDE=-I$ODBC_INCDIR
ODBC_TYPE=birdstep
ODBC_LFLAGS=-L$ODBC_LIBDIR
ODBC_LIBS="-lCrdbc32"
AC_DEFINE(HAVE_BIRDSTEP,1,[ ])
dnl AC_DEFINE(LINUX_X86,1,[ ]) #if I do this, it works fine.
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
],[
AC_MSG_RESULT(no)
])
fi
Birdstep Technology John Higgins
Office: 206 748 5353 Software Engineer
Fax: 206 748 5200 Direct: 206 748 5240
Web: http://www.birdstep.com