I'm attempting to rebuild the gdal package under x86_64 with Oracle Spatial support at the latest version (1.9.2) (the version in community is at 1.9.0 right now and does not include Oracle support).
gdal uses the standard autoconf/automake toolchain for its build process, and allows users to specify which external libraries they want to link in the configure script. To enable Oracle Spatial support in gdal, one would pass the --with-oci option to configure. This works fine for me and detects the contents of my oracle-instantclient-basic and oracle-instantclient-sdk packages (aur packages containing the necessary Oracle libs and headers) when I do it manually, i.e.:
./configure --prefix=/usr --with-netcdf --with-libtiff --with-sqlite3 \ --with-geotiff --with-mysql --with-python --without-libtool --with-curl \ --with-hdf5 --with-perl --with-geos --with-png \ --with-oci
However, when the exact same line runs inside of the build() function of a makepkg run, the configure script fails to detect the OCI libraries. I know that the configure script is supposed to work by reading the ORACLE_HOME environment variable to find the necessary Oracle libraries and headers, and I've double-checked that this environment variable is being set properly inside of the makepkg run with a couple of echo statements before the configure line is run.
Is there something else that I could be missing about the environment variables or build context inside of makepkg that could be causing this? I've already looked through /etc/makepkg.conf and couldn't find anything that would seem to make a difference, but I'll readily admit that I don't have a ton of knowledge about the autotools library detection process other than the fact that I've built a few packages with the toolchain.
Any help/ideas would be greatly appreciated. Here's the PKGBUILD I'm using if you want to try it for yourself (based off of gdal 1.9.0-1 in community): https://gist.github.com/3920468