LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Help with variables in autoconf needed (https://www.linuxquestions.org/questions/programming-9/help-with-variables-in-autoconf-needed-228158/)

MadCactus 09-08-2004 09:33 AM

Help with variables in autoconf needed
 
Hi,

I'm having trouble getting CHECK_LIB to work with the following configure.in script:


Snip ...

Code:

# check for X:
AC_PATH_X

# linker flags for using with CHECK_LIB - checked library is appended automatically:
X_LDFLAGS="$X_LIBS -lX11 -lXmu -lXext -lXi"

GL_LDFLAGS="$X_LDFLAGS"

GLU_LDFLAGS="$GL_LDFLAGS -lGL"

GLUT_LDFLAGS="$GLU_LDFLAGS -lGLU"

AC_SUBST(X_LDFLAGS, $X_LDFLAGS)

AC_SUBST(GL_LDFLAGS, $GL_LDFLAGS)

AC_SUBST(GLU_LDFLAGS, $GLU_LDFLAGS)

AC_SUBST(GLUT_LDFLAGS, $GLUT_LDFLAGS)

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CC_C_O
AC_PROG_INSTALL

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h unistd.h math.h GL/gl.h GL/glut.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
               
# Check for libs:
AC_CHECK_LIB(GL, glVertex3f,
                  [],
                  AC_MSG_ERROR([*** libGL not found ***]),
                  $GL_LDFLAGS)

AC_CHECK_LIB(GLU, gluBeginCurve,
                  [],
                  AC_MSG_ERROR([*** libGLU not found ***]),
                  $GLU_LDFLAGS)

AC_CHECK_LIB(glut, glutMainLoop,
                  [],
                  AC_MSG_ERROR([*** libglut not found ***]),
                  $GLUT_LDFLAGS)

It throws a *** libGL not found *** error even though libGL exists and is in the path, and the flags are right. Any idea what i'm doing wrong? I thought it might be the variables, but just copying and pasting still doesn't work.


All times are GMT -5. The time now is 03:25 AM.