~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Monty Taylor
  • Date: 2009-06-30 18:09:07 UTC
  • mto: This revision was merged to the branch mainline in revision 1083.
  • Revision ID: mordred@inaugust.com-20090630180907-r24363hlhgxg4cbw
Whole boat-load of build fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
 
20
20
AC_PREREQ(2.59)dnl              Minimum Autoconf version required.
21
 
 
22
 
m4_include(m4/bzr_version.m4)
23
 
 
 
21
AC_INIT([drizzle],[RELEASE_VERSION],[http://bugs.launchpad.net/drizzle])
24
22
AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
25
23
AC_CONFIG_AUX_DIR(config)
26
24
AC_CONFIG_HEADERS([config.h])
38
36
CXXFLAGS=${SAVE_CXXFLAGS}
39
37
 
40
38
AM_INIT_AUTOMAKE(nostdinc subdir-objects -Wall -Werror)
 
39
gl_EARLY
41
40
 
42
41
if test "x${enable_dependency_tracking}" = "x"
43
42
then
44
43
  enable_dependency_tracking=yes
45
44
fi
46
45
 
47
 
gl_EARLY
48
 
 
49
 
 
50
 
dnl Checks for programs.
 
46
if test -d "${srcdir}/.bzr"
 
47
then
 
48
  building_from_bzr=yes
 
49
else
 
50
  building_from_bzr=no
 
51
fi
 
52
 
51
53
AC_PROG_CXX
52
54
 
53
55
gl_USE_SYSTEM_EXTENSIONS
54
 
if test "$GCC" = "yes"
55
 
then
56
 
  # If you're on a Mac, and you didn't ask for a specific compiler
57
 
  # You're gonna get 4.2.
58
 
  if test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"
59
 
  then
60
 
    CPP="/usr/bin/gcc-4.2 -E"
61
 
    CC=/usr/bin/gcc-4.2
62
 
    CXX=/usr/bin/g++-4.2
63
 
  fi
64
 
  AC_CACHE_CHECK([if GCC is recent enough], [drizzle_cv_gcc_recent],
65
 
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
66
 
#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 1))
67
 
# error GCC is Too Old!
68
 
#endif
69
 
      ]])],
70
 
      [drizzle_cv_gcc_recent=yes],
71
 
      [drizzle_cv_gcc_recent=no])])
72
 
  if test "$drizzle_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"
73
 
  then
74
 
    AC_MSG_ERROR([Your version of GCC is too old. Drizzle requires at least version 4.2 on OSX. You may need to install a version of XCode >= 3.1.2])
75
 
  fi
76
 
  if test "$drizzle_cv_gcc_recent" = "no"
77
 
  then
78
 
    AC_MSG_ERROR([Your version of GCC is too old. Drizzle requires at least version 4.1])
79
 
  fi
80
 
fi
 
56
 
 
57
AC_PROG_CPP
 
58
AM_PROG_CC_C_O
 
59
 
 
60
CHECK_GCC_VERSION
 
61
dnl Once we can use a modern autoconf, we can use this
 
62
dnl AC_PROG_CC_C99
 
63
AC_CXX_CHECK_STANDARD
81
64
AC_CXX_HEADER_STDCXX_98
82
65
if test "$ac_cv_cxx_stdcxx_98" = "no"
83
66
then
84
67
  AC_MSG_ERROR([No working C++ Compiler has been found. Drizzle requires a C++ compiler that can handle C++98])
85
68
fi
86
 
AC_PROG_CPP
87
 
AM_PROG_CC_C_O
88
 
 
89
 
if test "$am_cv_prog_cc_stdc" = "no"
90
 
then
91
 
  AC_MSG_ERROR([Drizzle requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
92
 
fi
93
 
 
94
69
 
95
70
 
96
71
gl_INIT
97
72
 
 
73
AC_C_BIGENDIAN
 
74
AC_C_CONST
 
75
AC_C_INLINE
 
76
AC_C_VOLATILE
 
77
AC_HEADER_TIME
 
78
AC_FUNC_MALLOC
 
79
AC_FUNC_REALLOC
 
80
 
98
81
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
99
82
 
100
 
AC_PROG_GCC_TRADITIONAL
101
 
 
102
 
 
103
 
# Set all version vars based on $VERSION. How do we do this more elegant ?
104
 
# Remember that regexps needs to quote [ and ] since this is run through m4
105
 
# We take some made up examples
106
 
#
107
 
#  VERSION                  5.1.40sp1-alpha     5.0.34a
108
 
#  DRIZZLE_NO_DASH_VERSION    5.1.40sp1           5.0.34a
109
 
#  DRIZZLE_NUMERIC_VERSION    5.1.40              5.0.34
110
 
#  DRIZZLE_BASE_VERSION       5.1                 5.0
111
 
#  DRIZZLE_VERSION_ID         50140               50034
112
 
#
113
 
DRIZZLE_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
114
 
DRIZZLE_NUMERIC_VERSION=`echo $DRIZZLE_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
115
 
DRIZZLE_BASE_VERSION=`echo $DRIZZLE_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
116
 
DRIZZLE_VERSION_ID=`echo $DRIZZLE_NUMERIC_VERSION | \
117
 
    awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
118
 
AC_DEFINE_UNQUOTED(DRIZZLE_BASE_VERSION,["$DRIZZLE_BASE_VERSION"],
119
 
                   [Major and minor version])
120
 
AC_DEFINE_UNQUOTED([DRIZZLE_VERSION_ID],[$DRIZZLE_VERSION_ID],
121
 
                   [Version ID that can be easily used for numeric comparison])
 
83
# Version with no dots
 
84
AC_DEFINE([DRIZZLE_VERSION_ID],[RELEASE_ID],
 
85
          [Version ID that can be easily used for numeric comparison])
122
86
 
123
87
AC_DEFINE([_BACKWARD_BACKWARD_WARNING_H],[1],[Hack to disable deprecation warning in gcc])
124
88
 
137
101
 
138
102
# Canonicalize the configuration name.
139
103
 
140
 
# Check whether --with-system-type or --without-system-type was given.
141
 
AC_ARG_WITH([system-type],
142
 
    [AS_HELP_STRING([--with-system-type],
143
 
       [Set the system type, like "sun-solaris10"])],
144
 
    [SYSTEM_TYPE="$withval"],
145
 
    [SYSTEM_TYPE="$host_vendor-$host_os"])
146
 
AC_ARG_WITH([machine-type],
147
 
    [AS_HELP_STRING([--with-machine-type],
148
 
       [Set the machine type, like "sparc"])],
149
 
    [MACHINE_TYPE="$withval"],
150
 
    [MACHINE_TYPE="$host_cpu"])
151
 
AC_SUBST(SYSTEM_TYPE)
152
 
AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"],
153
 
                   [Name of system, eg sun-solaris])
154
 
AC_SUBST(MACHINE_TYPE)
155
 
AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"],
156
 
                   [Machine type name, eg sparc])
 
104
AC_DEFINE_UNQUOTED([HOST_VENDOR], ["$host_vendor"],[Vendor of Build System])
 
105
AC_DEFINE_UNQUOTED([HOST_OS], ["$host_os"], [OS of Build System])
 
106
AC_DEFINE_UNQUOTED([HOST_CPU], ["$host_cpu"], [CPU of Build System])
157
107
 
158
 
# Detect intel x86 like processor
159
 
BASE_MACHINE_TYPE=$MACHINE_TYPE
160
 
case $MACHINE_TYPE in
161
 
  i?86) BASE_MACHINE_TYPE=i386 ;;
162
 
esac
 
108
AC_DEFINE_UNQUOTED([TARGET_VENDOR], ["$target_vendor"],[Vendor of Target System])
 
109
AC_DEFINE_UNQUOTED([TARGET_OS], ["$target_os"], [OS of Target System])
 
110
AC_DEFINE_UNQUOTED([TARGET_CPU], ["$target_cpu"], [CPU of Target System])
163
111
 
164
112
 
165
113
case "$target_os" in
187
135
 
188
136
AC_SYS_LARGEFILE
189
137
 
190
 
AC_PROG_AWK
191
 
 
192
 
 
193
138
AC_PATH_PROG(GPERF, gperf)
194
139
AS_IF([test "x$GPERF" = "x"],
195
140
      AC_MSG_ERROR("Drizzle requires gperf to build."))
199
144
 
200
145
AM_CONDITIONAL(HAVE_LCOV,[test "x$LCOV" != "x"])
201
146
 
202
 
AC_SUBST(NM)dnl
203
 
 
204
 
AC_PROG_INSTALL
205
 
 
206
 
dnl Not critical since the generated file is distributed
207
147
AC_CHECK_PROGS(YACC, ['bison -y'])
208
 
if test -z "$YACC" && test -d "$srcdir/.bzr"
 
148
if test -z "$YACC" && test "$building_from_bzr" = "yes"
209
149
then
210
150
  AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
211
151
fi
212
152
 
213
 
AC_CHECK_PROGS(ISAINFO, [isainfo], [no])
214
 
AS_IF([test "x$ISAINFO" != "xno"],
215
 
      [isainfo_b=`isainfo -b`],
216
 
      [isainfo_b="x"])
217
153
 
218
154
# Build optimized or debug version ?
219
155
# First check for gcc and g++
220
156
if test "$GCC" = "yes"
221
157
then
222
 
  if test "$isainfo_b" = "64"
223
 
  then
224
 
    IS_64="-m64"
225
 
  fi
 
158
 
226
159
  AC_DEFINE([_GNU_SOURCE],[1],[Fix problem with S_ISLNK() on Linux])
227
160
 
228
161
  dnl The following is required for portable results of floating point 
229
162
  dnl calculations on PowerPC. The same must also be done for IA-64, but 
230
163
  dnl this options is missing in the IA-64 gcc backend.
231
 
  case "$host_cpu" in
 
164
  case "$target_cpu" in
232
165
    *ppc* | *powerpc*)
233
 
      CFLAGS="-mno-fused-madd ${CFLAGS}"
234
 
      CXXFLAGS="-mno-fused-madd ${CXXFLAGS}"
 
166
      AM_CFLAGS="-mno-fused-madd ${AM_CFLAGS}"
 
167
      AM_CXXFLAGS="-mno-fused-madd ${AM_CXXFLAGS}"
235
168
    ;;
236
169
  esac
237
170
 
238
 
  CFLAGS="-ggdb3 ${IS_64} -std=gnu99 ${CFLAGS}"
239
 
  CXXFLAGS="-ggdb3  ${IS_64} ${CXXFLAGS}"
240
 
  AC_CXX_CHECK_STANDARD
 
171
  dnl Once we can use a modern autoconf, we can replace the std=gnu99 here
 
172
  dnl with using AC_CC_STD_C99 above
 
173
  CC="${CC} -std=gnu99"
 
174
 
 
175
  AM_CFLAGS="-ggdb3 ${AM_CFLAGS}"
 
176
  AM_CXXFLAGS="-ggdb3 ${AM_CXXFLAGS}"
241
177
  
242
 
 
243
178
  DEBUG_CFLAGS="-O0"
244
179
  DEBUG_CXXFLAGS="-O0"
245
180
 
248
183
fi
249
184
if test "$SUNCC" = "yes"
250
185
then
251
 
  if test "$isainfo_b" = "64"
252
 
  then
253
 
    IS_64="-m64"
254
 
  fi
255
 
  dnl we put CPPFLAGS and LDFLAGS first here, because if the user has specified
256
 
  dnl command line CPPFLAGS or LDFLAGS, their -I or -L should come _first_
257
 
  if test "$target_cpu" = "sparc"
258
 
  then
259
 
    MEMALIGN_FLAGS="-xmemalign=8s"
260
 
  fi
261
 
 
262
 
  if test "x$use_additional" != "xyes"
263
 
  then
264
 
    AS_IF([test "$isainfo_b" != "none"],[
265
 
      LDFLAGS="${LDFLAGS} -L/usr/local/lib/${isainfo_b} -L/usr/local/lib -L/opt/csw/lib/${isainfo_b} -L/opt/csw/lib"
266
 
      ],[
267
 
      LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/opt/csw/lib"
268
 
      ])
269
 
      CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/opt/csw/include"
270
 
  fi
271
 
  AS_IF([test "$isainfo_b" != "none"],
272
 
        [LDFLAGS="${LDFLAGS} -L/usr/lib/${isainfo_b}"])
273
 
 
274
 
  CXXFLAGS="-xlang=c99 -g -mt -compat=5 -library=stlport4 -template=no%extdef ${IS_64} ${MEMALIGN_FLAGS} ${CXXFLAGS}"
275
 
  CFLAGS="-g -mt -xc99=all ${IS_64} ${MEMALIGN_FLAGS} ${CFLAGS}"
276
 
  DEBUG_CFLAGS="-xO0"
277
 
  DEBUG_CXXFLAGS="-xO0" 
278
 
 
279
 
  dnl TODO: -xO4 causes a Sun Studio failure in innodb... let's check back
280
 
  dnl       in on this one.
281
 
  OPTIMIZE_FLAGS="-xO3 -xlibmil -xdepend"
 
186
  dnl Once we can use a modern autoconf, we can replace the -xc99=all here
 
187
  dnl with using AC_CC_STD_C99 above
 
188
  CC="${CC} -xc99=all"
 
189
 
 
190
  AM_CFLAGS="-g -mt ${AM_CFLAGS}"
 
191
  AM_CXXFLAGS="-xlang=c99 -g -mt -compat=5 -library=stlport4 -template=no%extdef ${AM_CXXFLAGS}"
 
192
 
 
193
  OPTIMIZE_FLAGS="-xO3 -xlibmil -xdepend -xbuiltin -lmopt"
282
194
  OPTIMIZE_CFLAGS="${OPTIMIZE_FLAGS} -Xa -xstrconst"
283
195
  OPTIMIZE_CXXFLAGS="${OPTIMIZE_FLAGS}"
284
196
 
285
197
fi
 
198
ENABLE_64BIT
286
199
 
287
 
m4_include(m4/gettext.m4)
288
200
AM_GNU_GETTEXT(external, need-formatstring-macros)
289
201
if test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"
290
202
then
323
235
if test "$with_debug" = "yes"
324
236
then
325
237
  # Debuging. No optimization.
326
 
  CFLAGS="${DEBUG_CFLAGS} ${CFLAGS}"
327
 
  CXXFLAGS="${DEBUG_CXXFLAGS} ${CXXFLAGS}"
 
238
  AM_CFLAGS="${DEBUG_CFLAGS} ${AM_CFLAGS}"
 
239
  AM_CXXFLAGS="${DEBUG_CXXFLAGS} ${AM_CXXFLAGS}"
328
240
else
329
241
  # Optimized version. No debug
330
 
  CFLAGS="${OPTIMIZE_CFLAGS} ${CFLAGS}"
331
 
  CXXFLAGS="${OPTIMIZE_CXXFLAGS} ${CXXFLAGS}"
 
242
  AM_CFLAGS="${OPTIMIZE_CFLAGS} ${AM_CFLAGS}"
 
243
  AM_CXXFLAGS="${OPTIMIZE_CXXFLAGS} ${AM_CXXFLAGS}"
332
244
fi
333
245
 
334
246
 
337
249
AC_CXX_CINTTYPES
338
250
AC_CXX_SHARED_PTR
339
251
 
340
 
DRIZZLE_PROG_AR
341
 
 
342
252
AC_LIB_PREFIX
343
253
 
344
254
#--------------------------------------------------------------------
347
257
 
348
258
ACX_PTHREAD(,AC_MSG_ERROR(could not find libpthread))
349
259
LIBS="${PTHREAD_LIBS} ${LIBS}"
350
 
CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}"
 
260
AM_CFLAGS="${PTHREAD_CFLAGS} ${AM_CFLAGS}"
351
261
CC="$PTHREAD_CC"
352
262
 
353
263
#--------------------------------------------------------------------
450
360
# Check for libdrizzle
451
361
#--------------------------------------------------------------------
452
362
 
 
363
AC_LANG_PUSH(C++)
453
364
AC_LIB_HAVE_LINKFLAGS(drizzle,,
454
365
[#include <libdrizzle/drizzle.h>],
455
366
[
457
368
])
458
369
AS_IF([test x$ac_cv_libdrizzle = xno],
459
370
      AC_MSG_ERROR([libdrizzle is required for Drizzle]))
 
371
AC_LANG_POP
460
372
 
461
373
 
462
374
#--------------------------------------------------------------------
539
451
])
540
452
 
541
453
 
542
 
dnl Find paths to some shell programs
543
 
AC_PATH_PROG(LN, ln, ln)
544
 
# This must be able to take a -f flag like normal unix ln.
545
 
AC_PATH_PROG(LN_CP_F, ln, ln)
546
 
 
547
 
AC_PATH_PROG(MV, mv, mv)
548
 
AC_PATH_PROG(RM, rm, rm)
549
 
AC_PATH_PROG(CP, cp, cp)
550
 
AC_PATH_PROG(SED, sed, sed)
551
 
AC_PATH_PROG(CMP, cmp, cmp)
552
 
AC_PATH_PROG(CHMOD, chmod, chmod)
553
 
AC_PATH_PROG(HOSTNAME, hostname, hostname)
554
 
# Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and
555
 
# fall back to 'tar' otherwise and hope that it's a GNU tar as well
556
 
AC_CHECK_PROGS(TAR, gnutar gtar tar)
557
 
 
558
 
dnl We use a path for perl so the script startup works
559
 
dnl We make sure to use perl, not perl5, in hopes that the RPMs will
560
 
dnl not depend on the perl5 binary being installed (probably a bug in RPM)
561
454
AC_PATH_PROG(PERL, perl, no)
562
 
if test "$PERL" != "no" && $PERL -e 'require 5' > /dev/null 2>&1
563
 
then
564
 
  PERL5=$PERL
565
 
else
566
 
  AC_PATH_PROG(PERL5, perl5, no)
567
 
  if test "$PERL5" != no
568
 
  then
569
 
    PERL=$PERL5
570
 
    ac_cv_path_PERL=$ac_cv_path_PERL5
571
 
  fi
572
 
fi
573
 
 
574
 
AC_SUBST(HOSTNAME)
575
 
AC_SUBST(PERL)
576
 
AC_SUBST(PERL5)
577
 
 
578
 
# icheck, used for ABI check
579
 
AC_PATH_PROG(ICHECK, icheck, no)
580
 
# "icheck" is also the name of a file system check program on Tru64.
581
 
# Verify the program found is really the interface checker.
582
 
if test "x$ICHECK" != "xno"
583
 
then
584
 
  AC_MSG_CHECKING(if $ICHECK works as expected)
585
 
  echo "int foo;" > conftest.h
586
 
  $ICHECK --canonify -o conftest.ic conftest.h 2>/dev/null
587
 
  if test -f "conftest.ic"
588
 
  then
589
 
    AC_MSG_RESULT(yes)
590
 
  else
591
 
    AC_MSG_RESULT(no)
592
 
    ICHECK=no
593
 
  fi
594
 
  rm -f conftest.ic conftest.h
595
 
fi
596
 
AC_SUBST(ICHECK)
597
 
 
598
 
# Lock for PS
599
 
AC_PATH_PROG(PS, ps, ps)
600
 
AC_MSG_CHECKING("how to check if pid exists")
601
 
PS=$ac_cv_path_PS
602
 
# Linux style
603
 
if $PS p $$ 2> /dev/null | grep `echo $0 | sed s/\-//` > /dev/null
604
 
then
605
 
  FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
606
 
# Solaris
607
 
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
608
 
then
609
 
  FIND_PROC="$PS -p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
610
 
# BSD style
611
 
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
612
 
then
613
 
  FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
614
 
# SysV style
615
 
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
616
 
then
617
 
  FIND_PROC="$PS -ef | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
618
 
# Do anybody use this?
619
 
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
620
 
then
621
 
  FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
622
 
else
623
 
  case $SYSTEM_TYPE in
624
 
    *freebsd*|*dragonfly*|*cygwin*)
625
 
      FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
626
 
      ;;
627
 
    *darwin*)
628
 
      FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
629
 
      ;;
630
 
    *)
631
 
      AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
632
 
      ;;
633
 
  esac
634
 
fi
635
 
AC_SUBST(FIND_PROC)
636
 
AC_MSG_RESULT("$FIND_PROC")
637
 
 
638
 
# Check if a pid is valid
639
 
AC_PATH_PROG(KILL, kill, kill)
640
 
AC_MSG_CHECKING("for kill switches")
641
 
if $ac_cv_path_KILL -0 $$
642
 
then
643
 
  CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
644
 
elif kill -s 0 $$
645
 
then
646
 
  CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
647
 
else
648
 
  AC_MSG_WARN([kill -0 to check for pid seems to fail])
649
 
    CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
650
 
fi
651
 
AC_SUBST(CHECK_PID)
652
 
AC_MSG_RESULT("$CHECK_PID")
653
 
 
654
 
 
655
 
# Check if we need noexec stack for assembler
656
 
AC_CHECK_NOEXECSTACK
 
455
 
657
456
 
658
457
AC_ARG_WITH([server-suffix],
659
458
    [AS_HELP_STRING([--with-server-suffix],
741
540
  AC_MSG_RESULT([no])
742
541
fi
743
542
 
744
 
# Types that must be checked AFTER large file support is checked
745
 
AC_TYPE_SIZE_T
746
 
 
747
543
#--------------------------------------------------------------------
748
544
# Check for system header files
749
545
#--------------------------------------------------------------------
864
660
then
865
661
  COMPILATION_COMMENT=$with_comment
866
662
else
867
 
  COMPILATION_COMMENT="Source distribution"
 
663
  COMPILATION_COMMENT="Source distribution (RELEASE_COMMENT)"
868
664
fi
869
665
AC_DEFINE_UNQUOTED([COMPILATION_COMMENT],["$COMPILATION_COMMENT"],
870
666
                   [Comment about compilation environment])
871
667
 
872
668
dnl Checks for typedefs, structures, and compiler characteristics.
873
 
AC_C_CONST
874
 
AC_C_INLINE
875
 
AC_C_VOLATILE
876
 
AC_TYPE_OFF_T
877
 
AC_HEADER_TIME
 
669
 
878
670
AC_STRUCT_TM
879
671
# off_t is not a builtin type
880
672
AC_CHECK_SIZEOF(off_t, 4)
894
686
DRIZZLE_CHECK_TIME_T
895
687
 
896
688
 
897
 
# This always gives a warning. Ignore it unless you are cross compiling
898
 
AC_C_BIGENDIAN
899
 
 
900
 
# Find where the stack goes
901
 
DRIZZLE_STACK_DIRECTION
902
689
# We want to skip alloca on irix unconditionally. It may work on some version..
903
690
DRIZZLE_FUNC_ALLOCA
 
691
DRIZZLE_STACK_DIRECTION
904
692
 
905
693
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
906
694
AC_CHECK_TYPES([uint, ulong])
914
702
dnl Checks for library functions.
915
703
AC_FUNC_ALLOCA
916
704
AC_PROG_GCC_TRADITIONAL
917
 
AC_TYPE_SIGNAL
 
705
 
918
706
 
919
707
AC_CHECK_FUNCS(issetugid)
920
708
 
921
 
# from old readline settting:
922
 
 
923
 
MAKE_SHELL=/bin/sh
924
 
AC_SUBST(MAKE_SHELL)
925
 
 
926
709
# Already-done: stdlib.h string.h unistd.h termios.h
927
710
AC_CHECK_HEADERS(stdarg.h dirent.h locale.h ndir.h sys/dir.h \
928
711
 sys/ndir.h sys/select.h \
933
716
AC_CHECK_FUNCS(lstat select)
934
717
 
935
718
AC_HEADER_STAT
936
 
DRIZZLE_SIGNAL_CHECK
937
 
DRIZZLE_CHECK_GETPW_FUNCS
938
719
DRIZZLE_HAVE_TIOCGWINSZ
939
720
DRIZZLE_HAVE_TIOCSTAT
940
721
 
1382
1163
then
1383
1164
  if test "$ac_datarace" = "yes"
1384
1165
  then
1385
 
    CFLAGS="-xinstrument=datarace ${CFLAGS}"
1386
 
    CXXFLAGS="-xinstrument=datarace ${CXXFLAGS}"
 
1166
    AM_CFLAGS="-xinstrument=datarace ${AM_CFLAGS}"
 
1167
    AM_CXXFLAGS="-xinstrument=datarace ${AM_CXXFLAGS}"
1387
1168
  fi
1388
1169
 
1389
1170
  if test "$ac_warn_fail" = "yes"
1413
1194
then
1414
1195
  if test "$GCC" = "yes"
1415
1196
  then
1416
 
    CPPFLAGS="-isystem \$(top_srcdir)/gnulib -isystem \$(top_builddir)/gnulib ${CPPFLAGS}"
 
1197
    AM_CPPFLAGS="-isystem \$(top_srcdir)/gnulib -isystem \$(top_builddir)/gnulib ${AM_CPPFLAGS}"
1417
1198
  else
1418
 
    CPPFLAGS="-I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib ${CPPFLAGS}"
 
1199
    AM_CPPFLAGS="-I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib ${AM_CPPFLAGS}"
1419
1200
  fi
1420
1201
fi
1421
1202
 
1422
 
CPPFLAGS="-I\$(top_srcdir) -I\$(top_builddir) ${CPPFLAGS}"
1423
 
CFLAGS="${CC_WARNINGS} ${CFLAGS}"
1424
 
CXXFLAGS="${CXX_WARNINGS} ${W_EXCEPTIONS} ${CXXFLAGS}"
 
1203
AM_CPPFLAGS="-I\$(top_srcdir) -I\$(top_builddir) ${AM_CPPFLAGS}"
 
1204
AM_CFLAGS="${CC_WARNINGS} ${AM_CFLAGS}"
 
1205
AM_CXXFLAGS="${CXX_WARNINGS} ${W_EXCEPTIONS} ${AM_CXXFLAGS}"
1425
1206
 
1426
1207
dnl Must be done once we turn on warnings and such
1427
1208
AC_CACHE_CHECK(
1444
1225
  [Define to 1 if you have support for __attribute__((visibility("hidden")))])
1445
1226
fi
1446
1227
 
1447
 
AM_CPPFLAGS="${CPPFLAGS}"
1448
 
AM_CFLAGS="${CFLAGS}"
1449
 
AM_CXXFLAGS="${CXXFLAGS}"
1450
 
 
1451
1228
AC_SUBST([AM_CPPFLAGS])
1452
1229
AC_SUBST([AM_CFLAGS])
1453
1230
AC_SUBST([AM_CXXFLAGS])
1454
1231
 
1455
 
dnl We've collected the flags in AM_*FLAGS now, so blank these.
1456
 
CFLAGS=""
1457
 
CXXFLAGS=""
1458
 
CPPFLAGS=""
1459
1232
 
1460
1233
AC_SUBST(pkgplugindir,"\$(pkglibdir)/plugin")
1461
1234
 
1492
1265
  fi
1493
1266
done
1494
1267
 
1495
 
AC_CONFIG_COMMANDS([timestamp-h], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
1496
 
 
1497
 
AC_CONFIG_COMMANDS_PRE([
1498
 
if test "x$EGREP" != "x" -a -d po
1499
 
then
1500
 
  echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.in
1501
 
  # The grep -v 'drizzle-' is to exclude any distcheck leftovers
1502
 
  for f in `find . | grep -v 'drizzle-' | ${EGREP} '\.(cc|c|h|yy)$' | cut -c3- | sort`
1503
 
  do
1504
 
    if grep gettext.h "$f" | grep include >/dev/null 2>&1
1505
 
    then
1506
 
      echo "$f" >> po/POTFILES.in.in
1507
 
    fi
1508
 
  done
1509
 
  if ! diff po/POTFILES.in.in po/POTFILES.in >/dev/null 2>&1
1510
 
  then
1511
 
    mv po/POTFILES.in.in po/POTFILES.in
1512
 
  else
1513
 
    rm po/POTFILES.in.in
1514
 
  fi
1515
 
else
1516
 
  touch po/POTFILES.in
1517
 
fi
1518
 
])
1519
 
 
1520
 
# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
1521
 
AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS' AM_CFLAGS='$AM_CFLAGS' AM_CXXFLAGS='$AM_CXXFLAGS'")
1522
 
 
1523
1268
AC_OUTPUT
1524
1269
 
1525
1270
echo "---"
1526
 
echo "Configuration summary for $PACKAGE_NAME version $VERSION"
 
1271
echo "Configuration summary for $PACKAGE_NAME version $VERSION RELEASE_COMMENT"
1527
1272
echo ""
1528
1273
echo "   * Installation prefix:       $prefix"
1529
 
echo "   * System type:               $SYSTEM_TYPE"
 
1274
echo "   * System type:               $host_vendor-$host_os"
1530
1275
echo "   * Host CPU:                  $host_cpu"
1531
1276
echo "   * C Compiler:                $CC_VERSION"
1532
1277
echo "   * C++ Compiler:              $CXX_VERSION"