[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, cmake, updated. fb189c40596609a4026bedaa
From: |
Juergen Kahrs |
Subject: |
[gawk-diffs] [SCM] gawk branch, cmake, updated. fb189c40596609a4026bedaaca2a344b177d905a |
Date: |
Sun, 10 Feb 2013 15:09:53 +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 fb189c40596609a4026bedaaca2a344b177d905a (commit)
from 478c3f9f2f8f0d3a3e3e8ac4ea412a6ee7e54b86 (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=fb189c40596609a4026bedaaca2a344b177d905a
commit fb189c40596609a4026bedaaca2a344b177d905a
Author: Juergen Kahrs <address@hidden>
Date: Sun Feb 10 16:09:40 2013 +0100
Made building of extensions a bit more robust.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 410c020..ba43a61 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -99,8 +99,10 @@ add_definitions(-D
PACKAGE_URL=\\"http://www.gnu.org/software/gawk/\\")
add_definitions(-D PACKAGE_VERSION=\\"${GAWK_VERSION}\\")
add_definitions(-D DEFPATH=\\"${CMAKE_BINARY_DIR}/awk\\")
add_definitions(-D DEFLIBPATH=\\"${CMAKE_BINARY_DIR}/lib\\")
-#add_definitions(-D EXTLIB_SUFFIX=\\"lib\\")
-add_definitions(-D SHLIBEXT=\\".so\\")
+#DefineFunctionIfAvailable(dlopen DYNAMIC)
+DefineHFileIfAvailable(dlfcn.h DYNAMIC)
+#add_definitions(-D SHLIBEXT=\\"${CMAKE_SHARED_LIBRARY_SUFFIX}\\")
+add_definitions(-D SHLIBEXT=\\"so\\")
DefineTypeIfAvailable("unsigned int" SIZEOF_UNSIGNED_INT)
DefineTypeIfAvailable("unsigned long" SIZEOF_UNSIGNED_LONG)
#/* Define to 1 if *printf supports %F format */
@@ -224,6 +226,10 @@ DefineLibraryIfAvailable(c socket "" HAVE_SOCKETS)
if (${HAVE_MPFR})
set (EXTRA_LIBS ${EXTRA_LIBS} mpfr gmp)
endif ()
+if (${DYNAMIC})
+ set (EXTRA_LIBS ${EXTRA_LIBS} ${CMAKE_DL_LIBS} )
+endif ()
+
include_directories(${CMAKE_SOURCE_DIR})
diff --git a/cmake/README.txt b/cmake/README.txt
index d6e693b..4e24cc1 100644
--- a/cmake/README.txt
+++ b/cmake/README.txt
@@ -17,6 +17,7 @@ should do this, read
cmake ..
make
./gawk --version
+ make test
Notice that this git-checkout allows you to read the source code,
track the cmake branch and get updates. You will not be able to
commit anything.
diff --git a/cmake/basictest b/cmake/basictest
index 6fe5db5..86f6ff6 100755
--- a/cmake/basictest
+++ b/cmake/basictest
@@ -2,6 +2,7 @@
TESTHOME=$(dirname ${0})/../test
export AWKPATH=${TESTHOME}
+export AWKLIBPATH=${TESTHOME}/../build/extension/
export LANG=C
if test -r ${TESTHOME}/${2}.in
then
diff --git a/extension/CMakeLists.txt b/extension/CMakeLists.txt
index a730d8b..61f407a 100644
--- a/extension/CMakeLists.txt
+++ b/extension/CMakeLists.txt
@@ -29,9 +29,14 @@ remove_definitions(-DGAWK)
add_library (filefuncs SHARED filefuncs.c stack.c gawkfts.c)
target_link_libraries (filefuncs)
-DefineFunctionIfAvailable(fnmatch HAVE_FNMATCH_H)
-add_library (fnmatch SHARED fnmatch.c)
-target_link_libraries (fnmatch)
+DefineFunctionIfAvailable(fnmatch HAVE_FNMATCH)
+DefineHFileIfAvailable(fnmatch.h HAVE_FNMATCH_H)
+if (${HAVE_FNMATCH} AND ${HAVE_FNMATCH_H})
+ add_library (fnmatch SHARED fnmatch.c)
+ target_link_libraries (fnmatch)
+else()
+ message(WARNING "extension fnmatch cannot be built because function fnmatch
or fnmatch.h is missing")
+endif()
add_library (fork SHARED fork.c)
target_link_libraries (fork)
@@ -43,8 +48,12 @@ add_library (ordchr SHARED ordchr.c)
target_link_libraries (ordchr)
DefineHFileIfAvailable(dirent.h HAVE_DIRENT_H)
-add_library (readdir SHARED readdir.c)
-target_link_libraries (readdir)
+if (${HAVE_DIRENT_H})
+ add_library (readdir SHARED readdir.c)
+ target_link_libraries (readdir)
+else()
+ message(WARNING "extension readdir cannot be built because function readdir
is missing")
+endif()
add_library (readfile SHARED readfile.c)
target_link_libraries (readfile)
@@ -53,8 +62,12 @@ add_library (revoutput SHARED revoutput.c)
target_link_libraries (revoutput)
DefineFunctionIfAvailable(getdtablesize HAVE_GETDTABLESIZE)
-add_library (revtwoway SHARED revtwoway.c)
-target_link_libraries (revtwoway)
+if (${HAVE_GETDTABLESIZE})
+ add_library (revtwoway SHARED revtwoway.c)
+ target_link_libraries (revtwoway)
+else()
+ message(WARNING "extension revtwoway cannot be built because function
getdtablesize is missing")
+endif()
add_library (rwarray SHARED rwarray.c)
target_link_libraries (rwarray)
-----------------------------------------------------------------------
Summary of changes:
CMakeLists.txt | 10 ++++++++--
cmake/README.txt | 1 +
cmake/basictest | 1 +
extension/CMakeLists.txt | 27 ++++++++++++++++++++-------
4 files changed, 30 insertions(+), 9 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, cmake, updated. fb189c40596609a4026bedaaca2a344b177d905a,
Juergen Kahrs <=