Commit 429f3039 authored by Stuart Levy's avatar Stuart Levy
Browse files

Explicit -lpng, -ljpeg. Find GLEW and FLTK even without --with-whatever.

parent 44bc7505
......@@ -108,46 +108,43 @@ dnl Check for FLTK
AC_ARG_WITH(fltk, [ --with-fltk=<d> find FLTK in -I<d>/include/FL -L<d>/lib ], with_fltk=$withval, with_fltk=/usr/local)
if test -n "$with_fltk" && test -d "$with_fltk"; then
if test -n "$with_fltk" && test -x "$with_fltk/fltk-config"; then
# maybe should test both $with_fltk and the include directory therein??
case "$with_fltk" in
*/) with_fltk=`expr "$with_fltk" : '\(.*\)/$'` ;;
esac
if test -x "$with_fltk/fltk-config"; then
dnl
FLTK_INC="`$with_fltk/fltk-config --use-gl --use-images --cxxflags`"
FLTK_LIB="`$with_fltk/fltk-config --use-gl --use-images --ldflags`"
else
FLTK_INC="`$with_fltk/fltk-config --use-gl --use-images --cxxflags`"
FLTK_LIB="`$with_fltk/fltk-config --use-gl --use-images --ldflags`"
fi
else
dnl otherwise we'd better be able to find fltk-config in $PATH somewhere
FLTK_INC="`$with_fltk/fltk-config --use-gl --use-images --cxxflags`"
FLTK_LIB="`$with_fltk/fltk-config --use-gl --use-images --ldflags`"
FLTK_LIBNAME="`$with_fltk/fltk-config --libs`"
else
dnl otherwise we'd better be able to find fltk-config in $PATH somewhere
FLTK_INC="`fltk-config --use-gl --use-images --cxxflags`"
FLTK_LIB="`fltk-config --use-gl --use-images --ldflags`"
FLTK_LIBNAME="`fltk-config --libs`"
fi
if test -z "$FLTK_INC"; then
if test -z "$FLTK_LIB"; then
AC_MSG_WARN("Couldn't find fltk-config -- is fltk 1.1.x (or later) installed?")
fi
CXXFLAGS="$CXXFLAGS $FLTK_INC"
CFLAGS="$CFLAGS $FLTK_INC"
AC_CHECK_HEADERS(png.h jpeglib.h)
AC_CHECK_LIB(png, png_access_version_number, FLTK_LIB="$FLTK_LIB -lpng -lz", :, -lpng -lz)
AC_CHECK_LIB(jpeg, jpeg_abort, FLTK_LIB="$FLTK_LIB -ljpeg", :, -ljpeg)
#----------- as of partiview 0.7.04 - marx: ------------------------------------
#we no longer support old file chooser so we deleted support for it from this file
#in any event you should be on fltk release 1.1.x (not 2.x).
# the library fltk_images did not exist prior to 1.1.x used to determine relase == 1.1.x
if test -f "$with_fltk/lib/libfltk_images.a" || \
test -f "$with_fltk/lib/libfltk_images.so"; then
:
else if test -n "$with_fltk" && test -d "$with_fltk"; then
AC_MSG_WARN("$with_fltk : we do not support fltk on releases earlier than 1.1.x. you must be on fltk release 1.1.x")
fi
fi
dnl if test -f "$with_fltk/lib/libfltk_images.a" || \
dnl test -f "$with_fltk/lib/libfltk_images.so"; then
dnl :
dnl else if test -n "$with_fltk" && test -d "$with_fltk"; then
dnl AC_MSG_WARN("$with_fltk : we do not support fltk on releases earlier than 1.1.x. you must be on fltk release 1.1.x")
dnl fi
dnl fi
#----------end as of partiview 0.7.04 - marx: -----------------------------------
......@@ -287,7 +284,6 @@ dnl -- GLEW stuff for vertex shaders
if test -n "$with_glew" && test "$with_glew" != "no"; then
if test -d "$with_glew"; then
AC_DEFINE(HAVE_LIBGLEW, [], [Define if GLEW extension library is present])
if test -n "$MINGW32"; then
# GLEW_LIB="$with_glew/lib/libglew32.dll.a"
GLEW_LIB="$with_glew/lib/libglew32.a"
......@@ -302,6 +298,9 @@ if test -n "$with_glew" && test "$with_glew" != "no"; then
AC_CHECK_LIB(GLEW, glewInit, GLEW_LIB="-lGLEW", [], $GLLIBS)
fi
fi
if test -n "$GLEW_LIB"; then
AC_DEFINE(HAVE_LIBGLEW, [], [Define if GLEW extension library is present])
fi
fi
AC_SUBST(GLEW_INC)
AC_SUBST(GLEW_LIB)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment