aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/configure.ac
diff options
context:
space:
mode:
authordan miller2007-10-20 02:49:29 +0000
committerdan miller2007-10-20 02:49:29 +0000
commite36d23a85ebff914d74bb541558c2b6082b78edb (patch)
tree54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/configure.ac
parent* Fixed an issue whereby avatar chat distances were being calculated against ... (diff)
downloadopensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.zip
opensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz
opensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2
opensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz
sqlite source (unix build) added to libraries
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/configure.ac')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/configure.ac582
1 files changed, 582 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/configure.ac b/libraries/sqlite/unix/sqlite-3.5.1/configure.ac
new file mode 100644
index 0000000..311459a
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/configure.ac
@@ -0,0 +1,582 @@
1#
2# The build process allows for using a cross-compiler. But the default
3# action is to target the same platform that we are running on. The
4# configure script needs to discover the following properties of the
5# build and target systems:
6#
7# srcdir
8#
9# The is the name of the directory that contains the
10# "configure" shell script. All source files are
11# located relative to this directory.
12#
13# bindir
14#
15# The name of the directory where executables should be
16# written by the "install" target of the makefile.
17#
18# program_prefix
19#
20# Add this prefix to the names of all executables that run
21# on the target machine. Default: ""
22#
23# ENABLE_SHARED
24#
25# True if shared libraries should be generated.
26#
27# BUILD_CC
28#
29# The name of a command that is used to convert C
30# source files into executables that run on the build
31# platform.
32#
33# BUILD_CFLAGS
34#
35# Switches that the build compiler needs in order to construct
36# command-line programs.
37#
38# BUILD_LIBS
39#
40# Libraries that the build compiler needs in order to construct
41# command-line programs.
42#
43# BUILD_EXEEXT
44#
45# The filename extension for executables on the build
46# platform. "" for Unix and ".exe" for Windows.
47#
48# TCL_*
49#
50# Lots of values are read in from the tclConfig.sh script,
51# if that script is available. This values are used for
52# constructing and installing the TCL extension.
53#
54# TARGET_READLINE_LIBS
55#
56# This is the library directives passed to the target linker
57# that cause the executable to link against the readline library.
58# This might be a switch like "-lreadline" or pathnames of library
59# file like "../../src/libreadline.a".
60#
61# TARGET_READLINE_INC
62#
63# This variables define the directory that contain header
64# files for the readline library. If the compiler is able
65# to find <readline.h> on its own, then this can be blank.
66#
67# TARGET_EXEEXT
68#
69# The filename extension for executables on the
70# target platform. "" for Unix and ".exe" for windows.
71#
72# The generated configure script will make an attempt to guess
73# at all of the above parameters. You can override any of
74# the guesses by setting the environment variable named
75# "config_AAAA" where "AAAA" is the name of the parameter
76# described above. (Exception: srcdir cannot be set this way.)
77# If you have a file that sets one or more of these environment
78# variables, you can invoke configure as follows:
79#
80# configure --with-hints=FILE
81#
82# where FILE is the name of the file that sets the environment
83# variables. FILE should be an absolute pathname.
84#
85# This configure.in file is easy to reuse on other projects. Just
86# change the argument to AC_INIT(). And disable any features that
87# you don't need (for example BLT) by erasing or commenting out
88# the corresponding code.
89#
90AC_INIT(src/sqlite.h.in)
91
92dnl Put the RCS revision string after AC_INIT so that it will also
93dnl show in in configure.
94# The following RCS revision string applies to configure.in
95# $Revision: 1.30 $
96
97#########
98# Programs needed
99#
100AC_PROG_LIBTOOL
101AC_PROG_INSTALL
102AC_PROG_AWK
103
104#########
105# Set up an appropriate program prefix
106#
107if test "$program_prefix" = "NONE"; then
108 program_prefix=""
109fi
110AC_SUBST(program_prefix)
111
112VERSION=[`cat $srcdir/VERSION | sed 's/^\([0-9]*\.*[0-9]*\).*/\1/'`]
113echo "Version set to $VERSION"
114AC_SUBST(VERSION)
115RELEASE=`cat $srcdir/VERSION`
116echo "Release set to $RELEASE"
117AC_SUBST(RELEASE)
118VERSION_NUMBER=[`cat $srcdir/VERSION \
119 | sed 's/[^0-9]/ /g' \
120 | awk '{printf "%d%03d%03d",$1,$2,$3}'`]
121echo "Version number set to $VERSION_NUMBER"
122AC_SUBST(VERSION_NUMBER)
123
124#########
125# Check to see if the --with-hints=FILE option is used. If there is none,
126# then check for a files named "$host.hints" and ../$hosts.hints where
127# $host is the hostname of the build system. If still no hints are
128# found, try looking in $system.hints and ../$system.hints where
129# $system is the result of uname -s.
130#
131AC_ARG_WITH(hints,
132 AC_HELP_STRING([--with-hints=FILE],[Read configuration options from FILE]),
133 hints=$withval)
134if test "$hints" = ""; then
135 host=`hostname | sed 's/\..*//'`
136 if test -r $host.hints; then
137 hints=$host.hints
138 else
139 if test -r ../$host.hints; then
140 hints=../$host.hints
141 fi
142 fi
143fi
144if test "$hints" = ""; then
145 sys=`uname -s`
146 if test -r $sys.hints; then
147 hints=$sys.hints
148 else
149 if test -r ../$sys.hints; then
150 hints=../$sys.hints
151 fi
152 fi
153fi
154if test "$hints" != ""; then
155 AC_MSG_RESULT(reading hints from $hints)
156 . $hints
157fi
158
159#########
160# Locate a compiler for the build machine. This compiler should
161# generate command-line programs that run on the build machine.
162#
163if test x"$cross_compiling" = xno; then
164 BUILD_CC=$CC
165 BUILD_CFLAGS=$CFLAGS
166else
167 if test "${BUILD_CC+set}" != set; then
168 AC_CHECK_PROGS(BUILD_CC, gcc cc cl)
169 fi
170 if test "${BUILD_CFLAGS+set}" != set; then
171 BUILD_CFLAGS="-g"
172 fi
173fi
174AC_SUBST(BUILD_CC)
175AC_SUBST(BUILD_CFLAGS)
176
177##########
178# Do we want to support multithreaded use of sqlite
179#
180AC_ARG_ENABLE(threadsafe,
181AC_HELP_STRING([--enable-threadsafe],[Support threadsafe operation]),,enable_threadsafe=yes)
182AC_MSG_CHECKING([whether to support threadsafe operation])
183if test "$enable_threadsafe" = "no"; then
184 SQLITE_THREADSAFE=0
185 AC_MSG_RESULT([no])
186else
187 SQLITE_THREADSAFE=1
188 AC_MSG_RESULT([yes])
189fi
190AC_SUBST(SQLITE_THREADSAFE)
191
192if test "$SQLITE_THREADSAFE" = "1"; then
193 LIBS=""
194 AC_CHECK_LIB(pthread, pthread_create)
195 TARGET_THREAD_LIB="$LIBS"
196 LIBS=""
197else
198 TARGET_THREAD_LIB=""
199fi
200AC_SUBST(TARGET_THREAD_LIB)
201
202##########
203# Do we want to allow a connection created in one thread to be used
204# in another thread. This does not work on many Linux systems (ex: RedHat 9)
205# due to bugs in the threading implementations. This is thus off by default.
206#
207AC_ARG_ENABLE(cross-thread-connections,
208AC_HELP_STRING([--enable-cross-thread-connections],[Allow connection sharing across threads]),,enable_xthreadconnect=no)
209AC_MSG_CHECKING([whether to allow connections to be shared across threads])
210if test "$enable_xthreadconnect" = "no"; then
211 XTHREADCONNECT=''
212 AC_MSG_RESULT([no])
213else
214 XTHREADCONNECT='-DSQLITE_ALLOW_XTHREAD_CONNECT=1'
215 AC_MSG_RESULT([yes])
216fi
217AC_SUBST(XTHREADCONNECT)
218
219##########
220# Do we want to set threadsOverrideEachOthersLocks variable to be 1 (true) by
221# default. Normally, a test at runtime is performed to determine the
222# appropriate value of this variable. Use this option only if you're sure that
223# threads can safely override each others locks in all runtime situations.
224#
225AC_ARG_ENABLE(threads-override-locks,
226AC_HELP_STRING([--enable-threads-override-locks],[Threads can override each others locks]),,enable_threads_override_locks=no)
227AC_MSG_CHECKING([whether threads can override each others locks])
228if test "$enable_threads_override_locks" = "no"; then
229 THREADSOVERRIDELOCKS='-1'
230 AC_MSG_RESULT([no])
231else
232 THREADSOVERRIDELOCKS='1'
233 AC_MSG_RESULT([yes])
234fi
235AC_SUBST(THREADSOVERRIDELOCKS)
236
237##########
238# Do we want to support release
239#
240AC_ARG_ENABLE(releasemode,
241AC_HELP_STRING([--enable-releasemode],[Support libtool link to release mode]),,enable_releasemode=no)
242AC_MSG_CHECKING([whether to support shared library linked as release mode or not])
243if test "$enable_releasemode" = "no"; then
244 ALLOWRELEASE=""
245 AC_MSG_RESULT([no])
246else
247 ALLOWRELEASE="-release `cat VERSION`"
248 AC_MSG_RESULT([yes])
249fi
250AC_SUBST(ALLOWRELEASE)
251
252##########
253# Do we want temporary databases in memory
254#
255AC_ARG_ENABLE(tempstore,
256AC_HELP_STRING([--enable-tempstore],[Use an in-ram database for temporary tables (never,no,yes,always)]),,enable_tempstore=no)
257AC_MSG_CHECKING([whether to use an in-ram database for temporary tables])
258case "$enable_tempstore" in
259 never )
260 TEMP_STORE=0
261 AC_MSG_RESULT([never])
262 ;;
263 no )
264 TEMP_STORE=1
265 AC_MSG_RESULT([no])
266 ;;
267 always )
268 TEMP_STORE=3
269 AC_MSG_RESULT([always])
270 ;;
271 yes )
272 TEMP_STORE=3
273 AC_MSG_RESULT([always])
274 ;;
275 * )
276 TEMP_STORE=1
277 AC_MSG_RESULT([yes])
278 ;;
279esac
280
281AC_SUBST(TEMP_STORE)
282
283###########
284# Lots of things are different if we are compiling for Windows using
285# the CYGWIN environment. So check for that special case and handle
286# things accordingly.
287#
288AC_MSG_CHECKING([if executables have the .exe suffix])
289if test "$config_BUILD_EXEEXT" = ".exe"; then
290 CYGWIN=yes
291 AC_MSG_RESULT(yes)
292else
293 AC_MSG_RESULT(unknown)
294fi
295if test "$CYGWIN" != "yes"; then
296 AC_CYGWIN
297fi
298if test "$CYGWIN" = "yes"; then
299 BUILD_EXEEXT=.exe
300else
301 BUILD_EXEEXT=$EXEEXT
302fi
303if test x"$cross_compiling" = xno; then
304 TARGET_EXEEXT=$BUILD_EXEEXT
305else
306 TARGET_EXEEXT=$config_TARGET_EXEEXT
307fi
308if test "$TARGET_EXEEXT" = ".exe"; then
309 if test $OS2_SHELL ; then
310 OS_UNIX=0
311 OS_WIN=0
312 OS_OS2=1
313 TARGET_CFLAGS="$TARGET_CFLAGS -DOS_OS2=1"
314 if test "$ac_compiler_gnu" == "yes" ; then
315 TARGET_CFLAGS="$TARGET_CFLAGS -Zomf -Zexe -Zmap"
316 BUILD_CFLAGS="$BUILD_CFLAGS -Zomf -Zexe"
317 fi
318 else
319 OS_UNIX=0
320 OS_WIN=1
321 OS_OS2=0
322 tclsubdir=win
323 TARGET_CFLAGS="$TARGET_CFLAGS -DOS_WIN=1"
324 fi
325else
326 OS_UNIX=1
327 OS_WIN=0
328 OS_OS2=0
329 tclsubdir=unix
330 TARGET_CFLAGS="$TARGET_CFLAGS -DOS_UNIX=1"
331fi
332
333AC_SUBST(BUILD_EXEEXT)
334AC_SUBST(OS_UNIX)
335AC_SUBST(OS_WIN)
336AC_SUBST(OS_OS2)
337AC_SUBST(TARGET_EXEEXT)
338
339##########
340# Figure out all the parameters needed to compile against Tcl.
341#
342# This code is derived from the SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG
343# macros in the in the tcl.m4 file of the standard TCL distribution.
344# Those macros could not be used directly since we have to make some
345# minor changes to accomodate systems that do not have TCL installed.
346#
347AC_ARG_ENABLE(tcl, AC_HELP_STRING([--disable-tcl],[do not build TCL extension]),
348 [use_tcl=$enableval],[use_tcl=yes])
349if test "${use_tcl}" = "yes" ; then
350 AC_ARG_WITH(tcl, AC_HELP_STRING([--with-tcl=DIR],[directory containing tcl configuration (tclConfig.sh)]), with_tclconfig=${withval})
351 AC_MSG_CHECKING([for Tcl configuration])
352 AC_CACHE_VAL(ac_cv_c_tclconfig,[
353 # First check to see if --with-tcl was specified.
354 if test x"${with_tclconfig}" != x ; then
355 if test -f "${with_tclconfig}/tclConfig.sh" ; then
356 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
357 else
358 AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
359 fi
360 fi
361 # then check for a private Tcl installation
362 if test x"${ac_cv_c_tclconfig}" = x ; then
363 for i in \
364 ../tcl \
365 `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
366 `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \
367 `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
368 ../../tcl \
369 `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
370 `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
371 `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
372 ../../../tcl \
373 `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
374 `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
375 `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null`
376 do
377 if test -f "$i/unix/tclConfig.sh" ; then
378 ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
379 break
380 fi
381 done
382 fi
383
384 # check in a few common install locations
385 if test x"${ac_cv_c_tclconfig}" = x ; then
386 for i in \
387 `ls -d ${libdir} 2>/dev/null` \
388 `ls -d /usr/local/lib 2>/dev/null` \
389 `ls -d /usr/contrib/lib 2>/dev/null` \
390 `ls -d /usr/lib 2>/dev/null`
391 do
392 if test -f "$i/tclConfig.sh" ; then
393 ac_cv_c_tclconfig=`(cd $i; pwd)`
394 break
395 fi
396 done
397 fi
398
399 # check in a few other private locations
400 if test x"${ac_cv_c_tclconfig}" = x ; then
401 for i in \
402 ${srcdir}/../tcl \
403 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
404 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \
405 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null`
406 do
407 if test -f "$i/unix/tclConfig.sh" ; then
408 ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
409 break
410 fi
411 done
412 fi
413 ])
414
415 if test x"${ac_cv_c_tclconfig}" = x ; then
416 use_tcl=no
417 AC_MSG_WARN(Can't find Tcl configuration definitions)
418 AC_MSG_WARN(*** Without Tcl the regression tests cannot be executed ***)
419 AC_MSG_WARN(*** Consider using --with-tcl=... to define location of Tcl ***)
420 else
421 TCL_BIN_DIR=${ac_cv_c_tclconfig}
422 AC_MSG_RESULT(found $TCL_BIN_DIR/tclConfig.sh)
423
424 AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
425 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
426 AC_MSG_RESULT([loading])
427 . $TCL_BIN_DIR/tclConfig.sh
428 else
429 AC_MSG_RESULT([file not found])
430 fi
431
432 #
433 # If the TCL_BIN_DIR is the build directory (not the install directory),
434 # then set the common variable name to the value of the build variables.
435 # For example, the variable TCL_LIB_SPEC will be set to the value
436 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
437 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
438 # installed and uninstalled version of Tcl.
439 #
440
441 if test -f $TCL_BIN_DIR/Makefile ; then
442 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
443 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
444 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
445 fi
446
447 #
448 # eval is required to do the TCL_DBGX substitution
449 #
450
451 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
452 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
453 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
454
455 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
456 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
457 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
458
459 AC_SUBST(TCL_VERSION)
460 AC_SUBST(TCL_BIN_DIR)
461 AC_SUBST(TCL_SRC_DIR)
462 AC_SUBST(TCL_LIBS)
463 AC_SUBST(TCL_INCLUDE_SPEC)
464
465 AC_SUBST(TCL_LIB_FILE)
466 AC_SUBST(TCL_LIB_FLAG)
467 AC_SUBST(TCL_LIB_SPEC)
468
469 AC_SUBST(TCL_STUB_LIB_FILE)
470 AC_SUBST(TCL_STUB_LIB_FLAG)
471 AC_SUBST(TCL_STUB_LIB_SPEC)
472 fi
473fi
474if test "${use_tcl}" = "no" ; then
475 HAVE_TCL=""
476else
477 HAVE_TCL=1
478fi
479AC_SUBST(HAVE_TCL)
480
481##########
482# Figure out what C libraries are required to compile programs
483# that use "readline()" library.
484#
485TARGET_READLINE_LIBS=""
486TARGET_READLINE_INC=""
487TARGET_HAVE_READLINE=0
488AC_ARG_ENABLE([readline],
489 [AC_HELP_STRING([--disable-readline],[disable readline support [default=detect]])],
490 [with_readline=$enableval],
491 [with_readline=auto])
492
493if test x"$with_readline" != xno; then
494 found="yes"
495
496 AC_ARG_WITH([readline-lib],
497 [AC_HELP_STRING([--with-readline-lib],[specify readline library])],
498 [with_readline_lib=$withval],
499 [with_readline_lib="auto"])
500 if test "x$with_readline_lib" = xauto; then
501 save_LIBS="$LIBS"
502 LIBS=""
503 AC_SEARCH_LIBS(tgetent, [readline ncurses curses termcap], [term_LIBS="$LIBS"], [term_LIBS=""])
504 AC_CHECK_LIB([readline], [readline], [TARGET_READLINE_LIBS="-lreadline"], [found="no"])
505 TARGET_READLINE_LIBS="$TARGET_READLINE_LIBS $term_LIBS"
506 LIBS="$save_LIBS"
507 else
508 TARGET_READLINE_LIBS="$with_readline_lib"
509 fi
510
511 AC_ARG_WITH([readline-inc],
512 [AC_HELP_STRING([--with-readline-inc],[specify readline include paths])],
513 [with_readline_inc=$withval],
514 [with_readline_inc="auto"])
515 if test "x$with_readline_inc" = xauto; then
516 AC_CHECK_HEADER(readline.h, [found="yes"], [
517 found="no"
518 if test "$cross_compiling" != yes; then
519 for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
520 for subdir in include include/readline; do
521 AC_CHECK_FILE($dir/$subdir/readline.h, found=yes)
522 if test "$found" = "yes"; then
523 TARGET_READLINE_INC="-I$dir/$subdir"
524 break
525 fi
526 done
527 test "$found" = "yes" && break
528 done
529 fi
530 ])
531 else
532 TARGET_READLINE_INC="$with_readline_inc"
533 fi
534
535 if test x"$found" = xno; then
536 TARGET_READLINE_LIBS=""
537 TARGET_READLINE_INC=""
538 TARGET_HAVE_READLINE=0
539 else
540 TARGET_HAVE_READLINE=1
541 fi
542fi
543
544AC_SUBST(TARGET_READLINE_LIBS)
545AC_SUBST(TARGET_READLINE_INC)
546AC_SUBST(TARGET_HAVE_READLINE)
547
548##########
549# Figure out what C libraries are required to compile programs
550# that use "fdatasync()" function.
551#
552AC_SEARCH_LIBS(fdatasync, [rt])
553
554#########
555# check for debug enabled
556AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[enable debugging & verbose explain]),
557 [use_debug=$enableval],[use_debug=no])
558if test "${use_debug}" = "yes" ; then
559 TARGET_DEBUG="-DSQLITE_DEBUG=1"
560else
561 TARGET_DEBUG="-DNDEBUG"
562fi
563AC_SUBST(TARGET_DEBUG)
564
565#########
566# Figure out whether or not we have a "usleep()" function.
567#
568AC_CHECK_FUNC(usleep, [TARGET_CFLAGS="$TARGET_CFLAGS -DHAVE_USLEEP=1"])
569
570#--------------------------------------------------------------------
571# Redefine fdatasync as fsync on systems that lack fdatasync
572#--------------------------------------------------------------------
573
574AC_CHECK_FUNC(fdatasync, [TARGET_CFLAGS="$TARGET_CFLAGS -DHAVE_FDATASYNC=1"])
575
576#########
577# Generate the output files.
578#
579AC_OUTPUT([
580Makefile
581sqlite3.pc
582])