Forgot your password?
typodupeerror
Programming

Journal jvervloet's Journal: FreeBSD and the GNU autotools

Did you ever try to develop a C++ library using the GNU autotools under FreeBSD ? Well I did, and it wasn't easy.

I encountered a lot of problems, and I didn't find an answer anywhere on the Internet. But from now on, an answer can be found right here :-)

The idea was to create a C++ library, which should be used in combination with GMP. Now here is what you should do :

FreeBSD installs its ports in /usr/local/, so I had to set the environment variable CPPFLAGS to "-I /usr/local/include/", so that the gmp header files were found by configure. I didn't set the LDFLAGS to anything, because this caused the linking to fail. (I don't know why, but it did.) I was lucky that I didn't need LDFLAGS, because my library didn't have to include things from other libraries in /usr/local/lib/.

Another problem was that the configure script generated by autoconf produced this error message :

loading cache /dev/null within ltconfig
ltconfig: you must specify a host type if you use `--no-verify'
Try `ltconfig --help' for more information.
configure: error: libtool configure failed

I created this bootstrap script as workaround, which generates a correct configure script.

set -x
aclocal -I config
libtoolize --force --copy
autoheader
automake --add-missing --copy
autoconf
tempfile=`mktemp johan.XXXXXX`
cp configure $tempfile
sed 's/--no-verify//g' $tempfile > configure
rm $tempfile

If anyone knows something about the origin of all these troubles, or if there is a more easy way to solve all these, please let me know.

This discussion has been archived. No new comments can be posted.

FreeBSD and the GNU autotools

Comments Filter:

If you do something right once, someone will ask you to do it again.

Working...