Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

configure.ac: fix build without C++ #426

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ gumbo_test_DEPENDENCIES += check-local
gumbo_test_LDADD += gtest/lib/libgtest.la gtest/lib/libgtest_main.la
endif

if HAVE_EXAMPLES
noinst_PROGRAMS = clean_text find_links get_title positions_of_class benchmark serialize prettyprint
endif
LDADD = libgumbo.la
AM_CPPFLAGS = -I"$(srcdir)/src"

Expand Down
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ AC_CONFIG_SRCDIR([src/parser.c])
AC_CONFIG_FILES([Makefile gumbo.pc])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC_C99
AC_PROG_CXX

# Checks for libraries.

Expand All @@ -27,6 +27,10 @@ AC_CHECK_LIB([gtest_main],
AM_CONDITIONAL(HAVE_SHARED_LIBGTEST, [true]),
AM_CONDITIONAL(HAVE_SHARED_LIBGTEST, [false]))

AC_ARG_ENABLE([examples],
AS_HELP_STRING([--disable-examples], [Disable examples]))
AM_CONDITIONAL([HAVE_EXAMPLES], [test "x$enable_examples" != "xno"])

# Init Automake & libtool
AM_INIT_AUTOMAKE([foreign subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
Expand Down