HerbertKoelman / cpp-atmi

Application-to-Transaction Monitor Interface (ATMI) C++ library
http://herbertkoelman.github.com/cpp-atmi
Other
7 stars 0 forks source link

Make fails to find header file yaml.h on AIX #34

Closed HerbertKoelman closed 11 years ago

HerbertKoelman commented 11 years ago
chatelet(herbert)$ make
        xlC_r -O5 -qmaxmem=-1 -qsmp -I../../include  -c YamlParser.cpp
"../../include/YamlParser.h", line 23.10: 1540-0836 (S) The #include file <yaml.h> is not found.
make: 1254-004 The error code from the last command is 1.
HerbertKoelman commented 11 years ago

libyaml installs into /usr/local/include and /usr/local/lib which are not searched by default when compiling. We need a way to set compiler flags in generated Makefile to include these pathes.

HerbertKoelman commented 11 years ago

Libraries and include files directories can be located using the following configure syntax:

CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib configure

This will add compiler options to the one already set bu configure.

HerbertKoelman commented 11 years ago

Added configure option:

AC_ARG_ENABLE([localdir], AS_HELP_STRING([--enable-localdir],[adds -I and -L to /usr/local include and lib respectively.]), CFLAGS="-I /usr/local/include -L /usr/local/lib" )

HerbertKoelman commented 11 years ago

Compiling on Tuxedo with yaml installed into /usr/local:

configure --enable-localdir && make