diff options
author | Juergen Kahrs <Juergen.Kahrs@googlemail.com> | 2013-02-20 19:07:10 +0100 |
---|---|---|
committer | Juergen Kahrs <Juergen.Kahrs@googlemail.com> | 2013-02-20 19:07:10 +0100 |
commit | f778f620480f476fd4a61fa43cd3349f95afaf48 (patch) | |
tree | 2e998dec2e1194f85b3dc0396c8f6a5cafd251bc | |
parent | 2b2bcaaa614db05c72ce1c4d213e7a4eaab27937 (diff) | |
download | egawk-f778f620480f476fd4a61fa43cd3349f95afaf48.tar.gz egawk-f778f620480f476fd4a61fa43cd3349f95afaf48.tar.bz2 egawk-f778f620480f476fd4a61fa43cd3349f95afaf48.zip |
Some extension can now be built with MinGW.
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | extension/CMakeLists.txt | 32 |
2 files changed, 27 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d4eeed2f..76387fb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,10 +84,10 @@ target_link_libraries (gawk m ${EXTRA_LIBS}) install(PROGRAMS ${CMAKE_BINARY_DIR}/gawk${CMAKE_EXECUTABLE_SUFFIX} DESTINATION bin) if (CMAKE_HOST_UNIX) - if(NOT ${CMAKE_CROSSCOMPILING} STREQUAL "TRUE") - # Beware: before building the extension, -DGAWK gets undefined. - add_subdirectory(extension) + # Beware: before building the extension, -DGAWK gets undefined. + add_subdirectory(extension) + if(NOT ${CMAKE_CROSSCOMPILING} STREQUAL "TRUE") enable_testing() add_subdirectory(test) if (LATEX_COMPILER) diff --git a/extension/CMakeLists.txt b/extension/CMakeLists.txt index 31ae4fad..bb4d4e5c 100644 --- a/extension/CMakeLists.txt +++ b/extension/CMakeLists.txt @@ -33,24 +33,36 @@ MACRO(BuildExtension name sources) install(PROGRAMS ${CMAKE_BINARY_DIR}/extension/${name}${CMAKE_SHARED_LIBRARY_SUFFIX} DESTINATION lib) ENDMACRO(BuildExtension) -BuildExtension(filefuncs filefuncs.c stack.c gawkfts.c) +if (${HAVE_STRUCT_STAT_ST_BLKSIZE}) + BuildExtension(filefuncs filefuncs.c stack.c gawkfts.c) +else() + message(STATUS "extension filefuncs cannot be built because HAVE_STRUCT_STAT_ST_BLKSIZE is missing") +endif() if (${HAVE_FNMATCH} AND ${HAVE_FNMATCH_H}) BuildExtension(fnmatch fnmatch.c) else() - message(WARNING "extension fnmatch cannot be built because function fnmatch or fnmatch.h is missing") + message(STATUS "extension fnmatch cannot be built because function fnmatch or fnmatch.h is missing") endif() -BuildExtension(fork fork.c) +if (${HAVE_SYS_WAIT_H}) + BuildExtension(fork fork.c) +else() + message(STATUS "extension fork cannot be built because HAVE_SYS_WAIT_H is missing") +endif() -BuildExtension(inplace inplace.c) +if (${HAVE_MKSTEMP}) + BuildExtension(inplace inplace.c) +else() + message(STATUS "extension inplace cannot be built because HAVE_MKSTEMP is missing") +endif() BuildExtension(ordchr ordchr.c) -if (${HAVE_DIRENT_H}) +if (HAVE_DIRENT_H AND HAVE_DIRFD) BuildExtension(readdir readdir.c) else() - message(WARNING "extension readdir cannot be built because function readdir is missing") + message(STATUS "extension readdir cannot be built because function readdir is missing") endif() BuildExtension(readfile readfile.c) @@ -60,10 +72,14 @@ BuildExtension(revoutput revoutput.c) if (${HAVE_GETDTABLESIZE}) BuildExtension(revtwoway revtwoway.c) else() - message(WARNING "extension revtwoway cannot be built because function getdtablesize is missing") + message(STATUS "extension revtwoway cannot be built because function getdtablesize is missing") endif() -BuildExtension(rwarray rwarray.c) +if (${HAVE_ARPA_INET_H}) + BuildExtension(rwarray rwarray.c) +else() + message(STATUS "extension rwarray cannot be built because HAVE_ARPA_INET_H is missing") +endif() BuildExtension(time time.c) |