Ignore:
Timestamp:
Nov 25, 2007, 12:39:33 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Check whether CXX can include <iostream> before compiling the C++ bindings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/configure.ac

    r2044 r2053  
    6464  [  --enable-csharp         C# bindings (autodetected)])
    6565AC_ARG_ENABLE(cxx,
    66   [  --enable-cxx            C++ bindings (default enabled)])
     66  [  --enable-cxx            C++ bindings (autodetected)])
    6767AC_ARG_ENABLE(ruby,
    6868  [  --enable-ruby           Ruby bindings (autodetected)])
     
    111111AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
    112112
    113 CACA_DRIVERS="" 
     113CACA_DRIVERS=""
    114114
    115115if test "${enable_conio}" != "no"; then
     
    301301fi
    302302
    303 
    304303AC_SUBST(MATH_LIBS)
    305304AC_SUBST(GETOPT_LIBS)
     
    315314CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
    316315
     316CACA_BINDINGS=""
     317
    317318# Build the C++ bindings?
    318319ac_cv_my_have_cxx="no"
    319320if test "${enable_cxx}" != "no"; then
    320   ac_cv_my_have_cxx="yes"
     321  AC_MSG_CHECKING([working <iostream>])
     322  AC_LANG_PUSH(C++)
     323  AC_TRY_COMPILE(
     324   [#include <iostream>],
     325   [],
     326   [ac_cv_my_have_cxx="yes"
     327    CACA_BINDINGS="${CACA_BINDINGS} C++"])
     328  AC_LANG_POP(C++)
     329  AC_MSG_RESULT([$ac_cv_my_have_cxx])
    321330fi
    322331AM_CONDITIONAL(USE_CXX, test "${ac_cv_my_have_cxx}" = "yes")
     
    328337  if test "${GMCS}" != "no"; then
    329338    ac_cv_my_have_csharp="yes"
     339    CACA_BINDINGS="${CACA_BINDINGS} C#"
    330340  fi
    331341fi
     
    347357    AC_SUBST(RUBY_LIBDIR)
    348358    AC_SUBST(RUBY_SO_NAME)
    349     AC_CHECK_HEADERS($RUBY_ARCHDIR/ruby.h, [ac_cv_my_have_ruby="yes"])
     359    AC_CHECK_HEADERS(
     360      $RUBY_ARCHDIR/ruby.h,
     361     [ac_cv_my_have_ruby="yes"
     362      CACA_BINDINGS="${CACA_BINDINGS} Ruby"])
    350363  fi
    351364fi
    352365AM_CONDITIONAL(USE_RUBY, test "${ac_cv_my_have_ruby}" = "yes")
     366
     367AC_MSG_CHECKING(available language bindings)
     368if test -z "${CACA_BINDINGS}"; then
     369  AC_MSG_RESULT(no)
     370else
     371  CACA_BINDINGS="${CACA_BINDINGS# *}"
     372  AC_MSG_RESULT([${CACA_BINDINGS}])
     373fi
    353374
    354375# Build cacaserver?
Note: See TracChangeset for help on using the changeset viewer.