summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-25 11:41:39 -0400
committerStefan Schmidt <s.schmidt@samsung.com>2018-09-14 10:58:42 +0200
commit84973cbbba86b27513a8511bdc55642b445c33d7 (patch)
tree37436cc81866afa02998db1d71c479863a84e398 /configure.ac
parent298b97b0b5b102b8ad6e8a3f9e388c49b6b4c4b4 (diff)
build: make configure not error if cxx compiler is not found when not needed
a cxx compiler is not required unless physics, poppler, or ddraw support are enabled, so don't fail configure unless one of those cases is true ref T2838 Differential Revision: https://phab.enlightenment.org/D6683
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac57
1 files changed, 44 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 3280ee9ac1..8685d7cc8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -287,7 +287,15 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
287LT_INIT([win32-dll disable-static pic-only]) 287LT_INIT([win32-dll disable-static pic-only])
288EFL_INIT 288EFL_INIT
289 289
290if ! test "x${have_win32}" = "xyes" ; then 290if test "x${have_win32}" = "xyes" ; then
291 # We should be using ${CXX} here, but there is a bug in
292 # autotools macro and CXX is always set to g++ even if
293 # it's not found. So we are using an internal variable
294 # that does the work for now, may get broken in the future.
295 if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
296 AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
297 fi
298else
291 CXXFLAGS="${CXXFLAGS} -fPIC -DPIC" 299 CXXFLAGS="${CXXFLAGS} -fPIC -DPIC"
292 LDFLAGS="${LDFLAGS} -fPIC -DPIC" 300 LDFLAGS="${LDFLAGS} -fPIC -DPIC"
293fi 301fi
@@ -338,13 +346,6 @@ AM_CONDITIONAL([BUILD_EFL_NATIVE], [test "x${cross_compiling}" = "xno"])
338if test "x${ac_cv_prog_cc_c99}" = "xno" ; then 346if test "x${ac_cv_prog_cc_c99}" = "xno" ; then
339 AC_MSG_ERROR([efl requires a c99-capable compiler]) 347 AC_MSG_ERROR([efl requires a c99-capable compiler])
340fi 348fi
341# We should be using ${CXX} here, but there is a bug in
342# autotools macro and CXX is always set to g++ even if
343# it's not found. So we are using an internal variable
344# that does the work for now, may get broken in the future.
345if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
346 AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
347fi
348 349
349AC_SYS_LARGEFILE 350AC_SYS_LARGEFILE
350 351
@@ -1129,15 +1130,25 @@ EFL_LIB_END([Eina])
1129#### Eina CXX 1130#### Eina CXX
1130EFL_LIB_START([Eina_Cxx]) 1131EFL_LIB_START([Eina_Cxx])
1131 1132
1132EFL_CXX_COMPILE_STDCXX_11([ext])
1133AC_ARG_ENABLE([cxx-bindings], 1133AC_ARG_ENABLE([cxx-bindings],
1134 [AS_HELP_STRING([--disable-cxx-bindings],[disable C++11 bindings. @<:@default=enabled@:>@])], 1134 [AS_HELP_STRING([--disable-cxx-bindings],[disable C++11 bindings. @<:@default=enabled@:>@])],
1135 [want_cxx11="${enableval}"], [want_cxx11="yes"]) 1135 [want_cxx11="${enableval}"], [want_cxx11="yes"])
1136 1136
1137if test "x${HAVE_CXX11}" = "x1" -a "x${want_cxx11}" = "xyes"; then 1137have_cxx11="no"
1138 have_cxx11="yes" 1138if test "x${want_cxx11}" = "xyes"; then
1139else 1139 EFL_CXX_COMPILE_STDCXX_11([ext])
1140 have_cxx11="no" 1140 if test "x${HAVE_CXX11}" = "x1" ; then
1141
1142 # We should be using ${CXX} here, but there is a bug in
1143 # autotools macro and CXX is always set to g++ even if
1144 # it's not found. So we are using an internal variable
1145 # that does the work for now, may get broken in the future.
1146 if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
1147 AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
1148 fi
1149
1150 have_cxx11="yes"
1151 fi
1141fi 1152fi
1142 1153
1143AM_CONDITIONAL([HAVE_CXX], [test "x${have_cxx11}" = "xyes"]) 1154AM_CONDITIONAL([HAVE_CXX], [test "x${have_cxx11}" = "xyes"])
@@ -3062,6 +3073,16 @@ if test "x${want_poppler}" = "xyes"; then
3062 PKG_CHECK_MODULES([POPPLER], [poppler-cpp >= 0.12], [have_poppler="yes"]) 3073 PKG_CHECK_MODULES([POPPLER], [poppler-cpp >= 0.12], [have_poppler="yes"])
3063fi 3074fi
3064 3075
3076if test "x${have_poppler}" = "xyes" ; then
3077 # We should be using ${CXX} here, but there is a bug in
3078 # autotools macro and CXX is always set to g++ even if
3079 # it's not found. So we are using an internal variable
3080 # that does the work for now, may get broken in the future.
3081 if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
3082 AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
3083 fi
3084fi
3085
3065if test "x${want_spectre}" = "xyes"; then 3086if test "x${want_spectre}" = "xyes"; then
3066 PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_spectre="yes"]) 3087 PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_spectre="yes"])
3067fi 3088fi
@@ -4785,6 +4806,16 @@ AC_ARG_ENABLE([physics],
4785 ], 4806 ],
4786 [want_physics="yes"]) 4807 [want_physics="yes"])
4787 4808
4809if test "x${want_physics}" = "xyes" ; then
4810 # We should be using ${CXX} here, but there is a bug in
4811 # autotools macro and CXX is always set to g++ even if
4812 # it's not found. So we are using an internal variable
4813 # that does the work for now, may get broken in the future.
4814 if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
4815 AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
4816 fi
4817fi
4818
4788EFL_LIB_START_OPTIONAL([EPhysics], [test "${want_physics}" = "yes"]) 4819EFL_LIB_START_OPTIONAL([EPhysics], [test "${want_physics}" = "yes"])
4789 4820
4790### Additional options to configure 4821### Additional options to configure