Ignore:
Timestamp:
Oct 20, 2006, 12:43:17 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Added a --enable-plugins configure flag that builds the GL and X11 drivers as plugins. This way, libcaca does not directly depend on those libraries.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/configure.ac

    r1207 r1208  
    6363
    6464dnl conditional builds
     65AC_ARG_ENABLE(plugins,
     66  [  --enable-plugins        build X11 and GL drivers as plugins])
    6567AC_ARG_ENABLE(doc,
    6668  [  --enable-doc            build documentation (needs doxygen and LaTeX)])
    6769
    68 AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h inttypes.h endian.h unistd.h arpa/inet.h netinet/in.h winsock2.h errno.h locale.h getopt.h)
     70AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h inttypes.h endian.h unistd.h arpa/inet.h netinet/in.h winsock2.h errno.h locale.h getopt.h dlfcn.h)
    6971AC_CHECK_FUNCS(signal ioctl vsnprintf getenv putenv strcasecmp htons)
    7072AC_CHECK_FUNCS(usleep gettimeofday)
     
    157159    AC_DEFINE(USE_X11, 1, Define to 1 to activate the X11 backend driver)
    158160    CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
    159     CACA_LIBS="${CACA_LIBS} -lX11 ${X_LIBS}"
     161    X11_LIBS="${X11_LIBS} -lX11 ${X_LIBS}"
    160162    CACA_DRIVERS="${CACA_DRIVERS} x11"],
    161163   [ac_cv_my_have_x11="no"],
     
    181183  if test "${ac_cv_my_have_gl}" = "yes"; then
    182184    AC_DEFINE(USE_GL, 1, Define to 1 to activate the OpenGL backend driver)
    183     CACA_LIBS="${CACA_LIBS} -lGL -lglut"
     185    GL_LIBS="${GL_LIBS} -lGL -lglut"
    184186    CACA_DRIVERS="${CACA_DRIVERS} gl"
    185187  elif test "${enable_gl}" = "yes"; then
     
    225227AM_CONDITIONAL(USE_KERNEL, test "${ac_cv_my_have_vga}" = "yes")
    226228
     229if test "${enable_plugins}" = "yes"; then
     230  ac_cv_my_have_plugins="yes"
     231  AC_DEFINE(USE_PLUGINS, 1, Define to 1 to activate plugins)
     232  CACA_LIBS="${CACA_LIBS} -ldl"
     233else
     234  CACA_LIBS="${CACA_LIBS} ${X11_LIBS} ${GL_LIBS}"
     235fi
     236AM_CONDITIONAL(USE_PLUGINS, test "${ac_cv_my_have_plugins}" = "yes")
     237
    227238AC_MSG_CHECKING(valid output drivers)
    228239if test -z "${CACA_DRIVERS}"; then
     
    238249AC_SUBST(GETOPT_LIBS)
    239250AC_SUBST(CACA_LIBS)
     251AC_SUBST(X11_LIBS)
     252AC_SUBST(GL_LIBS)
    240253
    241254# Optimizations
     
    262275if test "${enable_imlib2}" != "no"; then
    263276  IMLIB2="no"
    264   PKG_CHECK_MODULES(imlib2, imlib2, [IMLIB2="yes"], [AC_MSG_RESULT(no)])
     277  PKG_CHECK_MODULES(IMLIB2, imlib2, [IMLIB2="yes"], [AC_MSG_RESULT(no)])
    265278  if test "${IMLIB2}" = no; then
    266279    AC_MSG_ERROR([[cannot find Imlib2 development files. Without Imlib2, cacaview will only open BMP files; if this is really what you want, re-run configure with '--disable-imlib2'.]])
     
    270283# Build development tools?
    271284PANGOFT2="no"
    272 PKG_CHECK_MODULES(pangoft2, pangoft2, [PANGOFT2="yes"], [AC_MSG_RESULT(no)])
     285PKG_CHECK_MODULES(PANGOFT2, pangoft2, [PANGOFT2="yes"], [AC_MSG_RESULT(no)])
    273286AM_CONDITIONAL(USE_PANGO, test "${PANGOFT2}" != "no")
    274287
Note: See TracChangeset for help on using the changeset viewer.