diff --git a/configure.ac b/configure.ac index b926870..aef05e6 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,8 @@ AM_CONFIG_HEADER(config.h) AC_PROG_CC AM_PROG_CC_C_O +AC_PROG_CXX +AM_CONDITIONAL(HAVE_CXX, test -n "$CXX") AC_PROG_LIBTOOL AC_STDC_HEADERS @@ -18,6 +20,8 @@ AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T +AC_CHECK_HEADERS(stdint.h inttypes.h sys/_inttypes.h) + # $system should contain the name of this file. It may be used by some # of the build scripts to do things that are specific to one single # type of system. diff --git a/lib/misc/Makefile.am b/lib/misc/Makefile.am index c94c06b..680c5a5 100644 --- a/lib/misc/Makefile.am +++ b/lib/misc/Makefile.am @@ -4,13 +4,13 @@ pkglib_LTLIBRARIES = \ bitstring.la \ elk-eval.la \ hack.la \ - newhandler.la \ regexp.la \ debug.la \ gdbm.la \ monitor.la \ record.la \ struct.la \ + $(newhandler_la) \ $(NULL) bitstring_la_SOURCES = bitstring.c @@ -25,10 +25,6 @@ hack_la_SOURCES = hack.c hack_la_LDFLAGS = -module -avoid-version hack_la_LIBADD = $(top_builddir)/src/libelk.la -newhandler_la_SOURCES = newhandler.cpp -newhandler_la_LDFLAGS = -module -avoid-version -newhandler_la_LIBADD = $(top_builddir)/src/libelk.la - regexp_la_SOURCES = regexp.c regexp_la_LDFLAGS = -module -avoid-version regexp_la_LIBADD = $(top_builddir)/src/libelk.la @@ -53,3 +49,10 @@ struct_la_SOURCES = struct.c struct_la_LDFLAGS = -module -avoid-version struct_la_LIBADD = $(top_builddir)/src/libelk.la +if HAVE_CXX +newhandler_la = newhandler.la +newhandler_la_SOURCES = newhandler.cpp +newhandler_la_LDFLAGS = -module -avoid-version +newhandler_la_LIBADD = $(top_builddir)/src/libelk.la +endif +