Re: autoconf not passing all the flags needed to g++

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24 June 2015 at 17:48, Robert Stolarz <robert.stolarz@xxxxxxxxxx> wrote:
> I'm trying to adapt the library soil2 to work with autoconf.
> http://pastebin.ca/raw/3035774 is what I have so far. My g++ invocation
> reads `g++ -I/usr/include/libdrm  -Wall -v -g -O2 -lGLEW -lGLU -lGL -lglfw
>  -lm  -o giants src/main.o` and `pkg-config --libs soil2` yields
> "-L/usr/lib/linux -lsoil2". Why aren't the soil2 flags showing up in my g++
> invocation?

You do

AM_CXXFLAGS = @gllibs_CFLAGS@ -Wall -v
AM_LDFLAGS = @gllibs_LIBS@ -lm

and

PKG_CHECK_MODULES([gllibs], [gl glew glfw3 >= 3.0])
PKG_CHECK_MODULES([soil2], [soil2])

i.e. you use the result of the gllibs check but not the result of the
soil2 check. It should rather be

AM_CXXFLAGS = @gllibs_CFLAGS@ @soil2_CFLAGS@ -Wall -v
AM_LDFLAGS = @gllibs_LIBS@ @soil2_CFLAGS@ -lm

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux