/ Check-in [9817b433]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:punt custom handling of cross-compile logic and move towards the standard autotool way of things (CVS 3647)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9817b433da36c78513ca278ae28e8ca8ce1cf00b
User & Date: vapier 2007-02-17 14:31:55
Context
2007-02-17
14:46
regenerate (CVS 3648) check-in: 20ac0f36 user: vapier tags: trunk
14:31
punt custom handling of cross-compile logic and move towards the standard autotool way of things (CVS 3647) check-in: 9817b433 user: vapier tags: trunk
14:28
make the readline checks more flexible and handle cross-compiling logic (CVS 3646) check-in: 4626c84b user: vapier tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to configure.ac.

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
..
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
...
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
...
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
...
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
...
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
...
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
#        command-line programs.
#
#    BUILD_EXEEXT
#
#        The filename extension for executables on the build
#        platform.  "" for Unix and ".exe" for Windows.
#
#    TARGET_CC
#
#        The name of a command that runs on the build platform
#        and converts C source files into *.o files for the
#        target platform.  In other words, the cross-compiler.
#
#    TARGET_CFLAGS
#
#        Switches that the target compiler needs to turn C source files
#        into *.o files.  Do not include TARGET_TCL_INC in this list.
#        Makefiles might add additional switches such as "-I.".
#
#    TCL_*
#
#        Lots of values are read in from the tclConfig.sh script,
#        if that script is available.  This values are used for
#        constructing and installing the TCL extension.
#
#    TARGET_READLINE_LIBS
................................................................................
#
#    TARGET_READLINE_INC
#
#        This variables define the directory that contain header
#        files for the readline library.  If the compiler is able 
#        to find <readline.h> on its own, then this can be blank.
#
#    TARGET_LINK
#
#        The name of the linker that combines *.o files generated
#        by TARGET_CC into executables for the target platform.
#
#    TARGET_LIBS
#
#        Additional libraries or other switch that the target linker needs
#        to build an executable on the target.  Do not include
#        on this list any libraries in TARGET_TCL_LIBS and
#        TARGET_READLINE_LIBS, etc.
#
#    TARGET_EXEEXT
#
#        The filename extension for executables on the
#        target platform.  "" for Unix and ".exe" for windows.
#
# The generated configure script will make an attempt to guess
# at all of the above parameters.  You can override any of
................................................................................
# the corresponding code.
#
AC_INIT(src/sqlite.h.in)

dnl Put the RCS revision string after AC_INIT so that it will also
dnl show in in configure.
# The following RCS revision string applies to configure.in
# $Revision: 1.27 $

#########
# Programs needed
#
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_AWK
................................................................................
  . $hints
fi

#########
# Locate a compiler for the build machine.  This compiler should
# generate command-line programs that run on the build machine.
#
default_build_cflags="-g"
if test "$config_BUILD_CC" = ""; then
  AC_PROG_CC
  if test "$cross_compiling" = "yes"; then
    AC_MSG_ERROR([unable to find a compiler for building build tools])
  fi
  BUILD_CC=$CC
  default_build_cflags=$CFLAGS

else
  BUILD_CC=$config_BUILD_CC
  AC_MSG_CHECKING([host compiler])
  CC=$BUILD_CC
  AC_MSG_RESULT($BUILD_CC)


fi
AC_MSG_CHECKING([switches for the host compiler])
if test "$config_BUILD_CFLAGS" != ""; then

  CFLAGS=$config_BUILD_CFLAGS
  BUILD_CFLAGS=$config_BUILD_CFLAGS
else
  BUILD_CFLAGS=$default_build_cflags
fi
AC_MSG_RESULT($BUILD_CFLAGS)
if test "$config_BUILD_LIBS" != ""; then
  BUILD_LIBS=$config_BUILD_LIBS
fi
AC_SUBST(BUILD_CC)
AC_SUBST(BUILD_CFLAGS)
AC_SUBST(BUILD_LIBS)

##########
# Locate a compiler that converts C code into *.o files that run on
# the target machine.
#
AC_MSG_CHECKING([target compiler])
if test "$config_TARGET_CC" != ""; then
  TARGET_CC=$config_TARGET_CC
else
  TARGET_CC=$BUILD_CC
fi
AC_MSG_RESULT($TARGET_CC)
AC_MSG_CHECKING([switches on the target compiler])
if test "$config_TARGET_CFLAGS" != ""; then
  TARGET_CFLAGS=$config_TARGET_CFLAGS
else
  TARGET_CFLAGS=$BUILD_CFLAGS
fi
AC_MSG_RESULT($TARGET_CFLAGS)
AC_MSG_CHECKING([target linker])
if test "$config_TARGET_LINK" = ""; then
  TARGET_LINK=$TARGET_CC
else
  TARGET_LINK=$config_TARGET_LINK
fi
AC_MSG_RESULT($TARGET_LINK)
AC_MSG_CHECKING([switches on the target compiler])
if test "$config_TARGET_TFLAGS" != ""; then
  TARGET_TFLAGS=$config_TARGET_TFLAGS
else
  TARGET_TFLAGS=$BUILD_CFLAGS
fi
if test "$config_TARGET_RANLIB" != ""; then
  TARGET_RANLIB=$config_TARGET_RANLIB
else
  AC_PROG_RANLIB
  TARGET_RANLIB=$RANLIB
fi
if test "$config_TARGET_AR" != ""; then
  TARGET_AR=$config_TARGET_AR
else
  TARGET_AR='ar cr'
fi
AC_MSG_RESULT($TARGET_TFLAGS)
AC_SUBST(TARGET_CC)
AC_SUBST(TARGET_CFLAGS)
AC_SUBST(TARGET_LINK)
AC_SUBST(TARGET_LFLAGS)
AC_SUBST(TARGET_RANLIB)
AC_SUBST(TARGET_AR)

# Set the $cross variable if we are cross-compiling.  Make
# it 0 if we are not.
#
AC_MSG_CHECKING([if host and target compilers are the same])
if test "$BUILD_CC" = "$TARGET_CC"; then
  cross=0
  AC_MSG_RESULT(yes)
else
  cross=1
  AC_MSG_RESULT(no)
fi

##########
# Do we want to support multithreaded use of sqlite
#
AC_ARG_ENABLE(threadsafe, 
AC_HELP_STRING([--enable-threadsafe],[Support threadsafe operation]),,enable_threadsafe=no)
AC_MSG_CHECKING([whether to support threadsafe operation])
................................................................................
  AC_CYGWIN
fi
if test "$CYGWIN" = "yes"; then
  BUILD_EXEEXT=.exe
else
  BUILD_EXEEXT=$EXEEXT
fi
if test "$cross" = "0"; then
  TARGET_EXEEXT=$BUILD_EXEEXT
else
  TARGET_EXEEXT=$config_TARGET_EXEEXT
fi
if test "$TARGET_EXEEXT" = ".exe"; then
  if test $OS2_SHELL ; then
    OS_UNIX=0
................................................................................

AC_SUBST(BUILD_EXEEXT)
AC_SUBST(OS_UNIX)
AC_SUBST(OS_WIN)
AC_SUBST(OS_OS2)
AC_SUBST(TARGET_EXEEXT)

##########
# Extract generic linker options from the environment.
#
if test "$config_TARGET_LIBS" != ""; then
  TARGET_LIBS=$config_TARGET_LIBS
else
  TARGET_LIBS=""
fi

##########
# Figure out all the parameters needed to compile against Tcl.
#
# This code is derived from the SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG
# macros in the in the tcl.m4 file of the standard TCL distribution.
# Those macros could not be used directly since we have to make some
# minor changes to accomodate systems that do not have TCL installed.
................................................................................

#--------------------------------------------------------------------
# Redefine fdatasync as fsync on systems that lack fdatasync
#--------------------------------------------------------------------

AC_CHECK_FUNC(fdatasync, [TARGET_CFLAGS="$TARGET_CFLAGS -DHAVE_FDATASYNC=1"])

#########
# Put out accumulated miscellaneous LIBRARIES
#
AC_SUBST(TARGET_LIBS)

#########
# Generate the output files.
#
AC_OUTPUT([
Makefile
sqlite3.pc
])







<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







<
<
<
|
<
<
|
<
>

<
<
<
<
>
>
|
<
<
>
|
<
<
<
|
<
<
<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<
<







41
42
43
44
45
46
47












48
49
50
51
52
53
54
..
60
61
62
63
64
65
66












67
68
69
70
71
72
73
..
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
...
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
...
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
...
332
333
334
335
336
337
338









339
340
341
342
343
344
345
...
572
573
574
575
576
577
578





579
580
581
582
583
584
585
#        command-line programs.
#
#    BUILD_EXEEXT
#
#        The filename extension for executables on the build
#        platform.  "" for Unix and ".exe" for Windows.
#












#    TCL_*
#
#        Lots of values are read in from the tclConfig.sh script,
#        if that script is available.  This values are used for
#        constructing and installing the TCL extension.
#
#    TARGET_READLINE_LIBS
................................................................................
#
#    TARGET_READLINE_INC
#
#        This variables define the directory that contain header
#        files for the readline library.  If the compiler is able 
#        to find <readline.h> on its own, then this can be blank.
#












#    TARGET_EXEEXT
#
#        The filename extension for executables on the
#        target platform.  "" for Unix and ".exe" for windows.
#
# The generated configure script will make an attempt to guess
# at all of the above parameters.  You can override any of
................................................................................
# the corresponding code.
#
AC_INIT(src/sqlite.h.in)

dnl Put the RCS revision string after AC_INIT so that it will also
dnl show in in configure.
# The following RCS revision string applies to configure.in
# $Revision: 1.28 $

#########
# Programs needed
#
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_AWK
................................................................................
  . $hints
fi

#########
# Locate a compiler for the build machine.  This compiler should
# generate command-line programs that run on the build machine.
#



if test x"$cross_compiling" = xno; then


	BUILD_CC=$CC

	BUILD_CFLAGS=$CFLAGS
else




	if test "${BUILD_CC+set}" != set; then
		AC_CHECK_PROGS(BUILD_CC, gcc cc cl)
	fi


	if test "${BUILD_CFLAGS+set}" != set; then
		BUILD_CFLAGS="-g"



	fi



fi
AC_SUBST(BUILD_CC)
AC_SUBST(BUILD_CFLAGS)
































































##########
# Do we want to support multithreaded use of sqlite
#
AC_ARG_ENABLE(threadsafe, 
AC_HELP_STRING([--enable-threadsafe],[Support threadsafe operation]),,enable_threadsafe=no)
AC_MSG_CHECKING([whether to support threadsafe operation])
................................................................................
  AC_CYGWIN
fi
if test "$CYGWIN" = "yes"; then
  BUILD_EXEEXT=.exe
else
  BUILD_EXEEXT=$EXEEXT
fi
if test x"$cross_compiling" = xno; then
  TARGET_EXEEXT=$BUILD_EXEEXT
else
  TARGET_EXEEXT=$config_TARGET_EXEEXT
fi
if test "$TARGET_EXEEXT" = ".exe"; then
  if test $OS2_SHELL ; then
    OS_UNIX=0
................................................................................

AC_SUBST(BUILD_EXEEXT)
AC_SUBST(OS_UNIX)
AC_SUBST(OS_WIN)
AC_SUBST(OS_OS2)
AC_SUBST(TARGET_EXEEXT)










##########
# Figure out all the parameters needed to compile against Tcl.
#
# This code is derived from the SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG
# macros in the in the tcl.m4 file of the standard TCL distribution.
# Those macros could not be used directly since we have to make some
# minor changes to accomodate systems that do not have TCL installed.
................................................................................

#--------------------------------------------------------------------
# Redefine fdatasync as fsync on systems that lack fdatasync
#--------------------------------------------------------------------

AC_CHECK_FUNC(fdatasync, [TARGET_CFLAGS="$TARGET_CFLAGS -DHAVE_FDATASYNC=1"])






#########
# Generate the output files.
#
AC_OUTPUT([
Makefile
sqlite3.pc
])