blob: 61f407a98892fbcf2bac50e3f8a228a21c67c5a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
#
# extension/CMakeLists.txt --- CMake input file for gawk
#
# Copyright (C) 2013
# the Free Software Foundation, Inc.
#
# This file is part of GAWK, the GNU implementation of the
# AWK Programming Language.
#
# GAWK is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# GAWK is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
## process this file with CMake to produce Makefile
remove_definitions(-DGAWK)
add_library (filefuncs SHARED filefuncs.c stack.c gawkfts.c)
target_link_libraries (filefuncs)
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)
add_library (inplace SHARED inplace.c)
target_link_libraries (inplace)
add_library (ordchr SHARED ordchr.c)
target_link_libraries (ordchr)
DefineHFileIfAvailable(dirent.h HAVE_DIRENT_H)
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)
add_library (revoutput SHARED revoutput.c)
target_link_libraries (revoutput)
DefineFunctionIfAvailable(getdtablesize HAVE_GETDTABLESIZE)
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)
add_library (time SHARED time.c)
target_link_libraries (time)
add_library (testext SHARED testext.c)
target_link_libraries (testext)
|