automake
[Top][All Lists]
Advanced

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

Conditional problem


From: Jose Roman Bilbao
Subject: Conditional problem
Date: Fri, 06 Feb 2004 09:24:23 +0100

Hi,

What is wrong with this piece of code? It always says that there is no
OpenGL although it has been found:

#checking for OpenGL
MDL_HAVE_OPENGL

if test -z "$GL_LIBS"
then
        AC_MSG_RESULT([GL libs not found, OpenGL disabled.])
else
        if test -z "$GL_CFLAGS"
        then
                AC_MSG_RESULT([GL headers not found, OpenGL disabled.])
        else
                AC_MSG_RESULT([OpenGL flags: $GL_CFLAGS])
                AC_MSG_RESULT([OpenGL libs: $GL_LIBS])
        fi
fi
AM_CONDITIONAL( WITH_OPENGL, test -n "$GL_FLAGS")
AM_CONDITIONAL( WITH_OPENGL, test -n "$GL_LIBS")

if test x"$WITH_OPENGL" = xtrue; then
      AC_MSG_RESULT( OpenGL)
else
        AC_MSG_RESULT( NO OpenGL )
fi

I suppose it is my inexperience, I have read autoconf and automake
manuals and still no solution. Another minor question. Why do we add "x"
in:

if test x"$WITH_OPENGL" = xtrue; then

Thanks,
Roman





reply via email to

[Prev in Thread] Current Thread [Next in Thread]