[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, cmake, updated. 30826905fb5989599ee4313e
From: |
Juergen Kahrs |
Subject: |
[gawk-diffs] [SCM] gawk branch, cmake, updated. 30826905fb5989599ee4313e1d4af584ac478fb4 |
Date: |
Tue, 30 Apr 2013 17:56:32 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, cmake has been updated
via 30826905fb5989599ee4313e1d4af584ac478fb4 (commit)
from 5c5a827839987b36fc8f0fc3003d745d0923814b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=30826905fb5989599ee4313e1d4af584ac478fb4
commit 30826905fb5989599ee4313e1d4af584ac478fb4
Author: Juergen Kahrs <address@hidden>
Date: Tue Apr 30 19:56:19 2013 +0200
New macro DefineIfSourceCompiles helps in auto-detection of wint_t.
diff --git a/cmake/configure.cmake b/cmake/configure.cmake
index 642b15e..2f0823e 100644
--- a/cmake/configure.cmake
+++ b/cmake/configure.cmake
@@ -43,6 +43,7 @@ include(CheckFunctionExists)
include(CheckLibraryExists)
include(CheckTypeSize)
include(CheckStructHasMember)
+INCLUDE(CheckCSourceCompiles)
MACRO(DefineConfigH feature)
# message(STATUS feature=${feature}=${${feature}})
@@ -91,6 +92,11 @@ MACRO(DefineLibraryIfAvailable lib func location feature)
DefineConfigH(${feature})
ENDMACRO(DefineLibraryIfAvailable)
+MACRO(DefineIfSourceCompiles source feature)
+ check_c_source_compiles( "${source}" "${feature}")
+ DefineConfigH(${feature})
+ENDMACRO(DefineIfSourceCompiles)
+
FILE( READ configure.ac CONFIG_AUTOMAKE )
STRING( REGEX MATCH "AC_INIT\\(\\[GNU Awk\\], ([0-9]+\\.[0-9]+\\.[0-9]+)"
GAWK_AUTOMAKE_LINE_VERSION "${CONFIG_AUTOMAKE}")
STRING( REGEX REPLACE ".*([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1"
GAWK_MAJOR_VERSION "${GAWK_AUTOMAKE_LINE_VERSION}")
@@ -187,8 +193,16 @@ DefineTypeIfAvailable(uintmax_t UINTMAX_T)
# Some of these dont work, maybe CheckCSourceCompiles would be better.
DefineTypeIfAvailable("time_t" TIME_T_IN_SYS_TYPES_H)
DefineTypeIfAvailable("wctype_t" WCTYPE_T)
-#add_definitions(-D WINT_T)
-DefineTypeIfAvailable("wint_t" WINT_T)
+# Detection of wint_t works but in an unsatisfying way.
+DefineIfSourceCompiles(
+ "#include \"wchar.h\"
+ static void testcb(wint_t w) { }
+ int main() {
+ wint_t w = 0;
+ testcb(w);
+ return 0;
+ }"
+ HAVE_WINT_T)
DefineStructHasMemberIfAvailable("struct sockaddr_storage" ss_family
sys/socket.h HAVE_SOCKADDR_STORAGE)
DefineStructHasMemberIfAvailable("struct stat" st_blksize sys/stat.h
HAVE_STRUCT_STAT_ST_BLKSIZE)
DefineStructHasMemberIfAvailable("struct stat" st_blksize sys/stat.h
HAVE_ST_BLKSIZE)
-----------------------------------------------------------------------
Summary of changes:
cmake/configure.cmake | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, cmake, updated. 30826905fb5989599ee4313e1d4af584ac478fb4,
Juergen Kahrs <=