diff options
author | Andreas Scherer <andreas_tex@freenet.de> | 2023-09-05 20:05:12 +0000 |
---|---|---|
committer | Andreas Scherer <andreas_tex@freenet.de> | 2023-09-05 20:05:12 +0000 |
commit | 90b8a6f489a730ada3083c57469226436f5518ac (patch) | |
tree | d3d8f33ff4f53514d12fe54f07129fc274c7bd5a /Build/source/texk/lcdf-typetools/configure | |
parent | f886123ec8e5ba2e4ffe6ce9cd57a88a803ae502 (diff) |
[lcdf-typetools] Accommodate 'nullptr' for older compilers.
Code from
https://github.com/kohler/lcdf-typetools/commit/6ddfef2450171f26aae5d0969930a871c88545b0
plus 'autoupdate'.
git-svn-id: svn://tug.org/texlive/trunk@68180 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/lcdf-typetools/configure')
-rwxr-xr-x | Build/source/texk/lcdf-typetools/configure | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Build/source/texk/lcdf-typetools/configure b/Build/source/texk/lcdf-typetools/configure index eb64e47b3e5..7126ca5f191 100755 --- a/Build/source/texk/lcdf-typetools/configure +++ b/Build/source/texk/lcdf-typetools/configure @@ -19729,6 +19729,62 @@ fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nullptr" >&5 +printf %s "checking for nullptr... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + int* x = nullptr; + return !!x; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: supported" >&5 +printf "%s\n" "supported" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not supported" >&5 +printf "%s\n" "not supported" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nullptr with -std=gnu++11" >&5 +printf %s "checking for nullptr with -std=gnu++11... " >&6; } + OLD_CXX="$CXX" + CXX="$CXX -std=gnu++11" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + int* x = nullptr; + return !!x; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: supported" >&5 +printf "%s\n" "supported" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not supported" >&5 +printf "%s\n" "not supported" >&6; } + as_fn_error $? "The $OLD_CXX compiler does not support the C++11 \`nullptr\` keyword." "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + + printf "%s\n" "#define WORDS_BIGENDIAN_SET 1" >>confdefs.h |