File: configure.in

package info (click to toggle)
xbase64 3.1.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,844 kB
  • ctags: 2,180
  • sloc: cpp: 14,547; sh: 8,678; makefile: 112
file content (207 lines) | stat: -rwxr-xr-x 5,758 bytes parent folder | download | duplicates (3)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# $Id: configure.in,v 1.20 2003/08/22 14:27:20 gkunkel Exp $
# Created by Denis Pershin <dyp@inetlab.com>
#
# 8/10/03  Recreated by Gary Kunkel <gkunkel@zhsac.com> 
#          for  Redhat 8.0, autoheader 2.53, autoconf  2.53, automake  1.63
#          simplified, removed unused and obsolete macros, etc
# 
#          All configuration parms moved to this file - if you make updates
#          please add meaningful comments


AC_INIT(xbase64,3.1.2,xdb-devel@lists.sourceforge.net) 

# set variable XSUBVARS with a list of sub directories to process
XSUBDIRS="xbase64 examples bin html libtest"
AC_SUBST(XSUBDIRS)

# look for AIX and MINIX environments
AC_AIX
AC_MINIX

# build the following programs
AC_CONFIG_SRCDIR( examples/exfilter.cpp,
                  examples/sample1.cpp,
		  examples/sample2.cpp,
		  examples/sample3.cpp,
		  examples/sample4.cpp,
		  examples/sample5.cpp,
		  bin/checkndx.cpp,
		  bin/copydbf.cpp,
		  bin/dbfxtrct.cpp,
		  bin/dbfutil1.cpp,
		  bin/deletall.cpp,
		  bin/dumpdbt.cpp,
		  bin/dumphdr.cpp,
		  bin/dumprecs.cpp,
		  bin/packdbf.cpp,
		  bin/reindex.cpp,
		  bin/undelall.cpp,
		  bin/zap.cpp,
		  libtest/indextst.cpp,
		  libtest/exptest.cpp,
		  libtest/locktest.cpp,
		  libtest/testdate.cpp,
		  libtest/testhtml.cpp
		 )
		  
# init automake
AM_INIT_AUTOMAKE(xbase64, 3.1.2)

# create this header file
AM_CONFIG_HEADER(xbase64/xbconfig.h:xbase64/xbconfig.in)

#create a library
AM_PROG_LIBTOOL

# C++ Code
AC_PROG_CXX

# look for doxygen software
AC_CHECK_PROG(doxygen, doxygen, yes, no)
if test "$doxygen" = "yes"; then
  XSUBDIRS="$XSUBDIRS docs"
fi

# get RedHat release
if test -f /etc/redhat-release ; then
  RHREL=`cut -d " " -f 5 /etc/redhat-release`
  RHREL="rh${RHREL}"
else
  RHREL="X"
fi
AC_SUBST(RHREL)

# get G++ version
if test "$GXX" = "yes"; then
  GXXVER=`${CXX} -v 2>&1 | grep '^gcc version' | cut -d " " -f 3 -`
  GXXVER="gcc${GXXVER}"
else
  GXXVER=""
fi
AC_SUBST(GXXVER)

RELEASE="${RHREL}-${GXXVER}-2.1"
AC_SUBST(RELEASE)

# setup topdir
topdir=`pwd`
AC_SUBST(topdir)

# Checks for header files
AC_HEADER_STDC
AC_CHECK_HEADER(io.h)
AC_CHECK_HEADER(sys/locking.h)
AC_CHECK_HEADER(fcntl.h,
  [AC_DEFINE(HAVE_FCNTL_H,1,[Define to 1 if you have the <fcntl.h> header file.])])
AC_CHECK_HEADER(ctype.h)
AC_CHECK_HEADER(unistd.h)

# Checks for library functions. 
AC_CHECK_FUNCS(vsnprintf)
AC_CHECK_FUNCS(vsprintf)
AC_CHECK_FUNCS(strcasecmp)

# Checks for 64 bit file support
AC_SYS_LARGEFILE
AC_CHECK_FUNCS(ftello)
AC_CHECK_FUNCS(fseeko)


# compile support for ndx index logic
AC_ARG_WITH(index-ndx, 
    [  --without-index-ndx          turn off .ndx index support ], 
    enable_index_ndx="$withval", enable_index_ndx="yes")
if test "$enable_index_ndx" = "yes"; then
  AC_DEFINE(XB_INDEX_NDX, 1, XB_INDEX_NDX)
  AC_DEFINE(XB_EXPRESSIONS, 1, XB_EXPRESSIONS)
  AC_DEFINE(XB_INDEX_ANY, 1, XB_INDEX_ANY)
fi

# compile support for ntx index logic
AC_ARG_WITH(index-ntx, 
    [  --without-index-ntx          turn off .ntx index support ], 
    enable_index_ntx="$withval", enable_index_ntx="yes")
if test "$enable_index_ntx" = "yes"; then
  AC_DEFINE(XB_INDEX_NTX, 1, XB_INDEX_NTX)
  AC_DEFINE(XB_EXPRESSIONS, 1, XB_EXPRESSIONS)
  AC_DEFINE(XB_INDEX_ANY, 1, XB_INDEX_ANY)
fi

# compile support for memo fields
AC_ARG_WITH(memo-fields, 
    [  --without-memo-fields        turn off memo fields support ], 
    enable_memo_fields="$withval", enable_memo_fields="yes")
if test "$enable_memo_fields" = "yes"; then
  AC_DEFINE(XB_MEMO_FIELDS, 1, XB_MEMO_FIELDS)
fi

# compile support for expressions
# index logic requires this be enabled
AC_ARG_WITH(expressions, 
    [  --without-expressions        turn off expressions support ], 
    enable_expressions="$withval", enable_expressions="yes")
if test "$enable_expressions" = "yes"; then
  AC_DEFINE(XB_EXPRESSIONS, 1, XB_EXPRESSIONS)
fi
    
# compile support for record locking
AC_ARG_WITH(xbase-locking, 
    [  --without-xbase-locking      turn off XBase file locking ], 
    enable_xbase_locking="$withval", enable_xbase_locking="yes")
if test "$enable_xbase_locking" = "yes"; then
  AC_DEFINE(XB_LOCKING_ON, 1, XB_LOCKING_ON)
fi
    
# compile support for true record deletion
AC_ARG_WITH(realdelete, 
    [  --without-realdelete         turn off XBase record deletion ], 
    enable_realdelete="$withval", enable_realdelete="yes")
if test "$enable_realdelete" = "yes"; then
  AC_DEFINE(XB_REAL_DELETE, 1, XB_REAL_DELETE)
fi
    
# compile support for filters
AC_ARG_WITH(xbase-filters, 
    [  --without-xbase-filters      turn off XBase filter logic ],
    enable_xbase_filters="$withval", enable_xbase_filters="yes")
if test "$enable_xbase_filters" = "yes"; then
  AC_DEFINE(XB_FILTERS, 1, XB_FILTERS)
fi

# compile in debug logic
AC_ARG_WITH(xbase-debug, 
    [  --without-xbase-debug        turn off XBase specific debug ], 
    enable_xbase_debug="$withval", enable_xbase_debug="yes")
if test "$enable_xbase_debug" = "yes"; then
  AC_DEFINE(XBASE_DEBUG, 1, XB_DEBUG)
fi

# compile in largefile support 
AC_ARG_WITH(xbase-largefile, 
    [  --without-largefile-support  turn off Xbase 64 bit largefile support ], 
    enable_largefile_support="$withval", enable_largefile_support="yes")
if test "$enable_largefile_support" = "yes"; then
  AC_DEFINE(XB_LARGEFILE_SUPPORT, 1, XB_LARGEFILE_SUPPORT)
fi
    
# path separator
AH_VERBATIM([PATH_SEPARATOR],[#define PATH_SEPARATOR '/'])

# default memo file block size
AH_VERBATIM([XB_DBT_BLOCK_SIZE],[#define XB_DBT_BLOCK_SIZE 512])

# build the following Makefiles 
AC_OUTPUT(
	    Makefile
	    xbase64/Makefile
	    examples/Makefile
    	    bin/Makefile
            html/Makefile
    	    libtest/Makefile
	    xbase64-config
	    xbase64.spec
	    docs/doxygen.cfg
	    docs/Makefile
)