Skip to content

Commit

Permalink
some delegates require C++
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Nov 23, 2023
1 parent e172d00 commit 6dc73c4
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
43 changes: 42 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -5137,7 +5137,7 @@ MAGICK_PATCHLEVEL_VERSION=0

MAGICK_VERSION=6.9.13-0

MAGICK_GIT_REVISION=0da597543:20231122
MAGICK_GIT_REVISION=e172d00e1:20231122


# Substitute library versioning
Expand Down Expand Up @@ -36775,6 +36775,47 @@ fi



#
# Need C++ for { FPX, JXL}.
#
if test "$have_jxl" != 'no' || test "$with_fpx" != 'no'; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -x option" >&5
printf %s "checking whether the compiler supports -x option... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */


#include <stdio.h>

int
main (void)
{

int main() {
return 0;
}

;
return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
CFLAGS="$CFLAGS -x c++"

else $as_nop

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

#
# Handle case where user doesn't want frozen paths
#
Expand Down
22 changes: 22 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3370,6 +3370,28 @@ AC_SUBST([windows_font_dir])

AC_SUBST([type_include_files])

#
# Need C++ for { FPX, JXL}.
#
if test "$have_jxl" != 'no' || test "$with_fpx" != 'no'; then
AC_MSG_CHECKING([whether the compiler supports -x option])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([
#include <stdio.h>
],
[
int main() {
return 0;
}
])
], [
AC_MSG_RESULT([yes])
CFLAGS="$CFLAGS -x c++"
], [
AC_MSG_RESULT([no])
])
fi

#
# Handle case where user doesn't want frozen paths
#
Expand Down

0 comments on commit 6dc73c4

Please sign in to comment.