Skip to content
Closed
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
12 changes: 12 additions & 0 deletions cnf/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ fi
AC_DEFINE_UNQUOTED([HAVE_ARITHRIGHTSHIFT],[$HAVE_ARITHRIGHTSHIFT],
[define as 1 if >> for long int behaves like an arithmetic right shift for negative numbers])

# autoconf may set CXX to g++ even if there is no working C++ compiler.
# So verify that CXX really is able to compile C++ code.
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <iostream>
#ifndef __cplusplus
#error "broken C++"
#endif]])],,
[CXX=;])
AC_LANG_POP([C++])

#
# Assume that cross-compiling is for 32 bit systems
# (alpha/NT will have to wait)
Expand Down Expand Up @@ -370,6 +381,7 @@ dnl ## generate a makefile
dnl ##

AC_SUBST(CC)
AC_SUBST(CXX)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
Expand Down
Loading