~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Brian Aker
  • Date: 2009-04-16 20:12:59 UTC
  • mfrom: (992.1.20 mordred)
  • Revision ID: brian@gaz-20090416201259-2x3czxb5hsdisr6h
Merge Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
 
184
184
AM_CONDITIONAL(HAVE_LCOV,[test "x$LCOV" != "x"])
185
185
 
186
 
dnl TODO: This needs to go away and be replaced with _ISOC99_SOURCE
187
 
if test "$ac_cv_c_compiler_gnu" = "yes" -o "$target_os" = "linux-gnu"
188
 
then
189
 
  AC_DEFINE([_GNU_SOURCE],[1],[Fix problem with S_ISLNK() on Linux])
190
 
fi
191
 
 
192
 
dnl C99 is illegal in C++... but these turn on extensions to the standard
193
 
dnl On Solars. This whole block is sort of silly atm, since we don't do 
194
 
dnl GCC on Solaris.
195
 
if test "$GCC" = "yes"
196
 
then
197
 
  case "$target_os" in
198
 
    *solaris*)
199
 
    AC_DEFINE([_XOPEN_SOURCE],[600],[Turn on XOpen 6.0 Features])
200
 
    AC_DEFINE([__C99FEATURES__],[1],[Turn on C99 Features for C++])
201
 
    AC_DEFINE([__XPG6],[1],[Turn on C99/XOpen Group 6 Extensions])
202
 
    ;;
203
 
  esac
204
 
fi
205
 
 
206
186
AC_SUBST(NM)dnl
207
187
 
208
188
AC_PROG_INSTALL
220
200
  AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
221
201
fi
222
202
 
 
203
  isainfo_b=`isainfo -b`
 
204
 
223
205
# Build optimized or debug version ?
224
206
# First check for gcc and g++
225
207
if test "$GCC" = "yes"
226
208
then
 
209
  if test "$isainfo_b" = "64"
 
210
  then
 
211
    IS_64="-m64"
 
212
  fi
 
213
  AC_DEFINE([_GNU_SOURCE],[1],[Fix problem with S_ISLNK() on Linux])
 
214
 
227
215
  dnl The following is required for portable results of floating point 
228
216
  dnl calculations on PowerPC. The same must also be done for IA-64, but 
229
217
  dnl this options is missing in the IA-64 gcc backend.
234
222
    ;;
235
223
  esac
236
224
 
237
 
  CFLAGS="-ggdb3 -std=gnu99 ${CFLAGS}"
238
 
  CXXFLAGS="-ggdb3 ${CXXFLAGS}"
 
225
  CFLAGS="-ggdb3 ${IS_64} -std=gnu99 ${CFLAGS}"
 
226
  CXXFLAGS="-ggdb3  ${IS_64} ${CXXFLAGS}"
239
227
  AC_CXX_CHECK_STANDARD
240
228
  
241
229
 
247
235
fi
248
236
if test "$SUNCC" = "yes"
249
237
then
 
238
  if test "$isainfo_b" = "64"
 
239
  then
 
240
    IS_64="-m64"
 
241
  fi
250
242
  dnl we put CPPFLAGS and LDFLAGS first here, because if the user has specified
251
243
  dnl command line CPPFLAGS or LDFLAGS, their -I or -L should come _first_
252
244
  if test "$target_cpu" = "sparc"
254
246
    MEMALIGN_FLAGS="-xmemalign=8s"
255
247
  fi
256
248
 
257
 
  isainfo_b=`isainfo -b`
258
 
  if test "$isainfo_b" = "64"
259
 
  then
260
 
    IS_64="-m64"
261
 
  fi
262
249
  if test "x$use_additional" != "xyes"
263
250
  then
264
251
    LDFLAGS="${LDFLAGS} -L/usr/local/lib/${isainfo_b} -L/usr/local/lib -L/opt/csw/lib/${isainfo_b} -L/opt/csw/lib"
344
331
AC_LIB_HAVE_LINKFLAGS(protobuf,,
345
332
[#include <google/protobuf/descriptor.h>
346
333
],
347
 
[google::protobuf::FileDescriptor* file;])
 
334
[google::protobuf::FileDescriptor* file;],system)
348
335
AS_IF([test x$ac_cv_libprotobuf = xno],
349
336
      AC_MSG_ERROR([protobuf is required for Drizzle. On Debian this can be found in libprotobuf-dev. On RedHat this can be found in protobuf-devel.]))
350
337
 
770
757
AC_SUBST(LIBDL_LIBS)
771
758
 
772
759
 
773
 
AC_ARG_WITH([fast-mutexes],
774
 
    [AS_HELP_STRING([--with-fast-mutexes],
775
 
            [Compile with fast mutexes  @<:@default=off@:>@])],
776
 
    [with_fast_mutexes=$withval],
777
 
    [with_fast_mutexes=no])
778
 
 
779
 
if test "$with_fast_mutexes" != "no"
780
 
then
781
 
        AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], 
782
 
                        [Define to 1 if you want to use fast mutexes])
783
 
fi
784
 
 
785
 
AM_CONDITIONAL(BUILD_FAST_MUTEX,[test "$with_fast_mutexes" != "no"])
786
 
 
787
760
AC_ARG_WITH([atomic-ops],
788
761
    [AS_HELP_STRING([--with-atomic-ops=rwlocks|smp|up],
789
762
       [Implement atomic operations using pthread rwlocks or atomic CPU
1308
1281
    
1309
1282
    GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
1310
1283
    GXX_PEDANTIC="-pedantic -Wundef -Woverloaded-virtual  -Wnon-virtual-dtor -Wctor-dtor-privacy ${GXX_W_REDUNDANT_DECLS} ${W_LONGLONG} ${W_STRICT_ALIASING}"
1311
 
 
1312
 
    AC_CACHE_CHECK([whether __attribute__ visibility "hidden" is supported],
1313
 
      [ac_cv_can_use_hidden_],
1314
 
      [AC_LANG_PUSH(C++)
1315
 
       AC_COMPILE_IFELSE(
1316
 
         [AC_LANG_PROGRAM([
1317
 
          AC_INCLUDES_DEFAULT
1318
 
__attribute__((visibility ("hidden")))
1319
 
void testme() {  };],[
1320
 
     testme();])],  
1321
 
         [ac_cv_can_use_hidden_=yes],
1322
 
         [ac_cv_can_use_hidden_=no])
1323
 
       AC_LANG_POP()])
1324
 
    if test "$ac_cv_can_use_hidden_" = "yes"
1325
 
    then
1326
 
      AC_DEFINE(HAVE_ATTR_HIDDEN, 1,
1327
 
                [Define to 1 if you have support for __attribute__((visibility("hidden")))])
1328
 
    fi
1329
1284
  fi
1330
1285
 
1331
1286
  if test "$ac_warn_unreachable" = "yes"
1392
1347
 
1393
1348
if test "$ac_cv_func_timegm" = "no" -o "$gl_cv_func_gnu_getopt" = "no"
1394
1349
then
1395
 
  CPPFLAGS="-I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib ${CPPFLAGS}"
 
1350
  if test "$GCC" = "yes"
 
1351
  then
 
1352
    CPPFLAGS="-isystem \$(top_srcdir)/gnulib -isystem \$(top_builddir)/gnulib ${CPPFLAGS}"
 
1353
  else
 
1354
    CPPFLAGS="-I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib ${CPPFLAGS}"
 
1355
  fi
1396
1356
fi
 
1357
 
1397
1358
CPPFLAGS="-I\$(top_srcdir) -I\$(top_builddir) ${CPPFLAGS}"
 
1359
CFLAGS="${CC_WARNINGS} ${CFLAGS}"
 
1360
CXXFLAGS="${CXX_WARNINGS} ${W_EXCEPTIONS} ${CXXFLAGS}"
 
1361
 
 
1362
dnl Must be done once we turn on warnings and such
 
1363
AC_CACHE_CHECK(
 
1364
  [whether __attribute__ visibility "hidden" is supported],
 
1365
  [ac_cv_can_use_hidden_],[
 
1366
    AC_LANG_PUSH(C++)
 
1367
    AC_LINK_IFELSE([
 
1368
      AC_LANG_PROGRAM(
 
1369
        [[
 
1370
__attribute__((visibility ("hidden")))
 
1371
void testme() {  };
 
1372
        ]],[[testme()]]
 
1373
      )],  
 
1374
      [ac_cv_can_use_hidden_=yes],
 
1375
      [ac_cv_can_use_hidden_=no])
 
1376
    AC_LANG_POP()])
 
1377
if test "$ac_cv_can_use_hidden_" = "yes"
 
1378
then
 
1379
  AC_DEFINE(HAVE_ATTR_HIDDEN, 1,
 
1380
  [Define to 1 if you have support for __attribute__((visibility("hidden")))])
 
1381
fi
1398
1382
 
1399
1383
AM_CPPFLAGS="${CPPFLAGS}"
1400
 
AM_CFLAGS="${CC_WARNINGS} ${CFLAGS}"
1401
 
AM_CXXFLAGS="${CXX_WARNINGS} ${W_EXCEPTIONS} ${CXXFLAGS}"
 
1384
AM_CFLAGS="${CFLAGS}"
 
1385
AM_CXXFLAGS="${CXXFLAGS}"
1402
1386
 
1403
1387
AC_SUBST([AM_CPPFLAGS])
1404
1388
AC_SUBST([AM_CFLAGS])
1416
1400
dnl AM_CONDITIONAL([BUILD_GCC_PCH],[test "$GCC" = "yes"])
1417
1401
AM_CONDITIONAL([BUILD_GCC_PCH],[test "no" = "yes"])
1418
1402
 
1419
 
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
 
1403
AC_CONFIG_FILES(Makefile dnl
1420
1404
 gnulib/Makefile dnl
1421
 
 mystrings/Makefile storage/Makefile dnl
 
1405
 storage/Makefile dnl
1422
1406
 po/Makefile.in dnl
1423
 
 client/Makefile dnl
1424
1407
 drizzled/Makefile dnl
1425
1408
 drizzled/message/Makefile dnl
1426
1409
 drizzled/sql_builtin.cc dnl