Fixed enable-shared would not work when cairo is not available. Added a new flag name FLTKCAIROOPTION for conditional -l cairo lib include.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6484 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Fabien Costantini 2008-10-25 14:53:03 +00:00
parent ab5d636106
commit f6d5f48bbe

View File

@ -121,6 +121,46 @@ fi
AC_ARG_ENABLE(gl, [ --enable-gl turn on OpenGL support [default=yes]])
dnl Check for Cairo library unless disabled...
CAIRODIR=""
CAIROFLAGS=""
LINKFLTKCAIRO=""
FLTKCAIROOPTION=""
CairolibsCAIROLIBS=""
AC_ARG_ENABLE(cairo,[ --enable-cairoext use fltk code instrumentation for cairo extended use (default=no)])
if test x$enable_cairoext = xyes; then
AC_DEFINE(USE_CAIRO)
AC_DEFINE(HAVE_CAIRO)
dnl FIXME This part should be fixed so configure do not depend on
dnl we do not rely on pkg-config .
CAIRODIR="cairo"
CAIROFLAGS="`pkg-config --cflags cairo`"
CAIROLIBS="-lcairo -lpixman-1"
CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
LINKFLTKCAIRO="../lib/libfltk_cairo.a"
FLTKCAIROOPTION="-lfltk_cairo$SHAREDSUFFIX"
LIBS="$CAIROLIBS $LINKFLTKCAIRO $LIBS"
fi
AC_ARG_ENABLE(cairo,[ --enable-cairo use lib Cairo (default=no)])
if test x$enable_cairo = xyes; then
AC_DEFINE(HAVE_CAIRO)
dnl FIXME This part should be fixed so configure do not depend on
dnl we do not rely on pkg-config .
CAIRODIR="cairo"
CAIROFLAGS="`pkg-config --cflags cairo`"
CAIROLIBS="-lcairo -lpixman-1"
CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
LINKFLTKCAIRO="../lib/libfltk_cairo.a"
FLTKCAIROOPTION="-lfltk_cairo$SHAREDSUFFIX"
fi
AC_SUBST(CAIRODIR)
AC_SUBST(CAIROFLAGS)
AC_SUBST(CAIROLIBS)
AC_SUBST(LINKFLTKCAIRO)
AC_SUBST(FLTKCAIROOPTION)
AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=no]])
if test x$enable_shared = xyes; then
PICFLAG=1
@ -237,7 +277,7 @@ if test x$enable_shared = xyes; then
;;
esac
LINKSHARED="-L../src -lfltk_cairo$SHAREDSUFFIX -lfltk_images$SHAREDSUFFIX -lfltk_forms$SHAREDSUFFIX -lfltk$SHAREDSUFFIX"
LINKSHARED="-L../src $(FLTKCAIROOPTION) -lfltk_images$SHAREDSUFFIX -lfltk_forms$SHAREDSUFFIX -lfltk$SHAREDSUFFIX"
else
DSOCOMMAND="echo"
DSOLINK=""
@ -249,7 +289,7 @@ else
PICFLAG=0
SHAREDSUFFIX=""
FLUID="fluid"
LINKSHARED="../lib/libfltk_cairo.a ../lib/libfltk_images.a ../lib/libfltk_forms.a ../lib/libfltk.a"
LINKSHARED="$(LINKFLTKCAIRO) ../lib/libfltk_images.a ../lib/libfltk_forms.a ../lib/libfltk.a"
fi
AC_SUBST(DSOCOMMAND)
@ -571,43 +611,6 @@ LIBS="$SAVELIBS"
dnl See if we need a .exe extension on executables...
AC_EXEEXT
dnl Check for Cairo library unless disabled...
CAIRODIR=""
CAIROFLAGS=""
LINKFLTKCAIRO=""
CAIROLIBS=""
AC_ARG_ENABLE(cairo,[ --enable-cairoext use fltk code instrumentation for cairo extended use (default=no)])
if test x$enable_cairoext = xyes; then
AC_DEFINE(USE_CAIRO)
AC_DEFINE(HAVE_CAIRO)
dnl FIXME This part should be fixed so configure do not depend on
dnl we do not rely on pkg-config .
CAIRODIR="cairo"
CAIROFLAGS="`pkg-config --cflags cairo`"
CAIROLIBS="-lcairo -lpixman-1"
CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
LINKFLTKCAIRO="../lib/libfltk_cairo.a"
LIBS="$CAIROLIBS $LINKFLTKCAIRO $LIBS"
fi
dnl Check for Cairo library unless disabled...
AC_ARG_ENABLE(cairo,[ --enable-cairo use lib Cairo (default=no)])
if test x$enable_cairo = xyes; then
AC_DEFINE(HAVE_CAIRO)
dnl FIXME This part should be fixed so configure do not depend on
dnl we do not rely on pkg-config .
CAIRODIR="cairo"
CAIROFLAGS="`pkg-config --cflags cairo`"
CAIROLIBS="-lcairo -lpixman-1"
CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
LINKFLTKCAIRO="../lib/libfltk_cairo.a"
fi
AC_SUBST(CAIRODIR)
AC_SUBST(CAIROFLAGS)
AC_SUBST(CAIROLIBS)
AC_SUBST(LINKFLTKCAIRO)
dnl Check for pthreads for multi-threaded apps...
have_pthread=no
PTHREAD_FLAGS=""