~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Jay Pipes
  • Date: 2009-02-04 15:44:25 UTC
  • mfrom: (829 drizzle)
  • mto: This revision was merged to the branch mainline in revision 830.
  • Revision ID: jpipes@serialcoder-20090204154425-th8xfk2ujz2y8xwg
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
CFLAGS=${SAVE_CFLAGS}
20
20
CXXFLAGS=${SAVE_CXXFLAGS}
21
21
 
22
 
AM_INIT_AUTOMAKE(nostdinc -Wall -Werror)
 
22
AM_INIT_AUTOMAKE(nostdinc subdir-objects -Wall -Werror)
 
23
 
23
24
if test "x${enable_dependency_tracking}" = "x"
24
25
then
25
26
  enable_dependency_tracking=yes
26
27
fi
27
28
 
 
29
gl_EARLY
28
30
 
29
31
# See the libtool docs for information on how to do shared lib versions.
30
32
SHARED_LIB_MAJOR_VERSION=1
37
39
AC_PROG_CC
38
40
AC_PROG_CXX
39
41
 
40
 
ACX_USE_SYSTEM_EXTENSIONS
 
42
gl_USE_SYSTEM_EXTENSIONS
41
43
AC_CXX_HEADER_STDCXX_98
42
44
if test "$ac_cv_cxx_stdcxx_98" = "no"
43
45
then
45
47
fi
46
48
AC_PROG_CPP
47
49
AM_PROG_CC_C_O
48
 
# We need an ANSI C compiler
49
 
AM_PROG_CC_STDC
50
50
 
 
51
gl_INIT
51
52
 
52
53
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
53
54
ifdef([AC_PROG_CC_C99],[
62
63
  C99_SUPPORT_HACK="-xc99"
63
64
fi
64
65
])
65
 
 
66
 
 
67
 
# We need an assembler, too
68
 
AM_PROG_AS
69
 
CCASFLAGS="$CCASFLAGS $ASFLAGS"
 
66
AC_PROG_GCC_TRADITIONAL
70
67
 
71
68
 
72
69
# Set all version vars based on $VERSION. How do we do this more elegant ?
140
137
  i?86) BASE_MACHINE_TYPE=i386 ;;
141
138
esac
142
139
 
143
 
AM_SANITY_CHECK
144
 
# This is needed is SUBDIRS is set
145
 
AC_PROG_MAKE_SET
146
 
 
147
140
 
148
141
case "$target_os" in
149
142
  *linux*)
165
158
    ;;
166
159
esac
167
160
 
168
 
dnl AC_CANONICAL_HOST thinks it's a good idea to just set CFLAGS to 
169
 
dnl -g -O2 if you're running gcc. We would like to use something else, thanks.
170
 
if test "x${CFLAGS}" = "x-g -O2"
171
 
then
172
 
  CFLAGS=
173
 
fi
174
 
if test "x${CXXFLAGS}" = "x-g -O2"
175
 
then
176
 
  CXXFLAGS=
177
 
fi
178
 
 
179
161
DRIZZLE_CHECK_C_VERSION
180
162
DRIZZLE_CHECK_CXX_VERSION
181
163
 
183
165
 
184
166
AC_PROG_AWK
185
167
 
186
 
if test "$ac_cv_c_compiler_gnu" = "yes"
 
168
 
 
169
AC_PATH_PROG(GPERF, gperf, gperf)
 
170
if test "$ac_cv_prog_gperf" = "no"
187
171
then
188
 
  AS="$CC -c"
189
 
  AC_SUBST(AS)
190
 
else
191
 
  AC_PATH_PROG(AS, as, as)
 
172
  AC_MSG_ERROR("Drizzle requires gperf to build. Please install it.")
192
173
fi
193
174
 
194
175
AC_PATH_PROG(LCOV, lcov, lcov)
231
212
  esac
232
213
fi
233
214
 
234
 
# We use libtool
235
 
AC_PROG_LIBTOOL
236
 
 
237
215
AC_SUBST(NM)dnl
238
216
 
239
217
AC_PROG_INSTALL
288
266
  then
289
267
    MEMALIGN_FLAGS="-xmemalign=8s"
290
268
  fi
291
 
  CXXFLAGS="${CXXFLAGS} -compat=5 -library=stlport4 -xlang=c99 ${MEMALIGN_FLAGS}"
 
269
  CXXFLAGS="${CXXFLAGS} -compat=5 -library=stlport4 -template=no%extdef ${MEMALIGN_FLAGS}"
292
270
  CFLAGS="${CFLAGS} -xstrconst ${MEMALIGN_FLAGS}"
293
271
  SYMBOLS_FLAGS="-g"
294
272
  OPTIMIZE_FLAGS="-xO4 -xlibmil -xdepend"
297
275
  DEBUG_OPTIMIZE_CXX=""
298
276
fi
299
277
 
 
278
# We use libtool
 
279
AC_PROG_LIBTOOL
 
280
 
300
281
dnl TODO: Remove this define once we are using 2.61 across the board.
301
282
# AX_HEADER_ASSERT
302
283
# ----------------
356
337
then
357
338
  if test "$lt_cv_prog_gnu_ld" = "yes" -a $LD --version 2>/dev/null|${EGREP} -q GNU
358
339
  then
359
 
    LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libdrizzle/libdrizzle.ver"
 
340
    LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libdrizzleclient/libdrizzleclient.ver"
360
341
  fi
361
342
fi
362
343
AC_SUBST(LD_VERSION_SCRIPT)
911
892
  AC_MSG_ERROR("Drizzle requires fcntl.")
912
893
fi
913
894
 
914
 
AC_CONFIG_LIBOBJ_DIR([mystrings])
 
895
AC_CONFIG_LIBOBJ_DIR([gnulib])
915
896
 
916
897
AC_CHECK_FUNCS( \
917
898
  cuserid fchmod \
1112
1093
#--------------------------------------------------------------------
1113
1094
 
1114
1095
DRIZZLE_CHECK_MAX_INDEXES
1115
 
DRIZZLE_CHECK_VIO
1116
1096
 
1117
1097
#--------------------------------------------------------------------
1118
1098
# Declare our plugin modules
1331
1311
  # drizzled doesn't use run-time-type-checking, so we disable it.
1332
1312
  AM_CXXFLAGS="${AM_CXXFLAGS} -fno-rtti"
1333
1313
  CPPFLAGS="${CPPFLAGS} -fpch-deps"
 
1314
  PROTOSKIP_WARNINGS="${NO_SHADOW}"
1334
1315
fi
1335
1316
if test "$SUNCC" = "yes"
1336
1317
then
1339
1320
    CFLAGS="${CFLAGS} -xinstrument=datarace"
1340
1321
    CXXFLAGS="${CXXFLAGS} -xinstrument=datarace"
1341
1322
  fi
1342
 
  CC_WARNINGS="-v -xc99=all -errtags=yes"
 
1323
  #CC_WARNINGS="-v -xc99=all -errtags=yes -errwarn=%all -erroff=E_ATTRIBUTE_NOT_VAR"
 
1324
  #CXX_WARNINGS="+w +w2 -xport64 -errtags=yes -errwarn=%all -erroff=attrskipunsup,doubunder -compat=5"
 
1325
  CC_WARNINGS="-v -xc99=all -errtags=yes -erroff=E_ATTRIBUTE_NOT_VAR"
1343
1326
  CXX_WARNINGS="+w +w2 -xport64 -errtags=yes -erroff=attrskipunsup,doubunder -compat=5"
 
1327
  PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl"
 
1328
  NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED"
1344
1329
  if test "$ac_exceptions" = "no"
1345
1330
  then
1346
1331
    NO_EXCEPTIONS="-features=no%except"
1355
1340
AC_SUBST(NO_SHADOW)
1356
1341
AC_SUBST(W_SHADOW)
1357
1342
AC_SUBST(NO_REDUNDANT_DECLS)
 
1343
AC_SUBST(PROTOSKIP_WARNINGS)
 
1344
AC_SUBST(NO_UNREACHED)
1358
1345
 
1359
 
AC_SUBST([GLOBAL_CPPFLAGS],['-I$(top_srcdir) -I$(top_builddir)'])
 
1346
GLOBAL_CPPFLAGS='-I$(top_srcdir) -I$(top_builddir)'
 
1347
if test "$ac_cv_func_timegm" = "no" -o "$gl_cv_func_gnu_getopt" = "no"
 
1348
then
 
1349
  GLOBAL_CPPFLAGS="${GLOBAL_CPPFLAGS} -I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib"
 
1350
fi
 
1351
AC_SUBST([GLOBAL_CPPFLAGS])
1360
1352
AC_SUBST([AM_CPPFLAGS],['${GLOBAL_CPPFLAGS}'])
1361
1353
AC_SUBST([GLOBAL_CXXFLAGS],[${AM_CXXFLAGS}])
1362
1354
AC_SUBST([AM_CFLAGS])
1386
1378
AM_CONDITIONAL([BUILD_GCC_PCH],[test "no" = "yes"])
1387
1379
 
1388
1380
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
 
1381
 gnulib/Makefile dnl
1389
1382
 mystrings/Makefile storage/Makefile dnl
1390
1383
 po/Makefile.in dnl
1391
 
 libdrizzle/Makefile client/Makefile dnl
 
1384
 libdrizzleclient/Makefile client/Makefile dnl
1392
1385
 drizzled/Makefile dnl
1393
1386
 drizzled/serialize/Makefile dnl
1394
1387
 drizzled/sql_builtin.cc dnl
1395
1388
 support-files/Makefile dnl
1396
1389
 tests/Makefile tests/install_test_db dnl
1397
1390
 plugin/Makefile dnl
1398
 
 drizzled/drizzled_safe support-files/libdrizzle.pc dnl
 
1391
 drizzled/drizzled_safe support-files/libdrizzleclient.pc dnl
1399
1392
 support-files/drizzle.server support-files/drizzle-log-rotate)
1400
1393
 
1401
 
AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
 
1394
scheduling_plugins_available="
 
1395
  pool_of_threads 
 
1396
  single_thread
 
1397
"
 
1398
 
 
1399
for sched_plugin in $scheduling_plugins_available
 
1400
do
 
1401
  varname="\${with_plugin_${sched_plugin}}"
 
1402
  result=`eval "echo $varname"`
 
1403
  if test "x$result" = "xyes"
 
1404
  then
 
1405
    scheduling_plugins="$sched_plugin $scheduling_plugins"
 
1406
  fi
 
1407
done
 
1408
 
 
1409
AC_CONFIG_COMMANDS([timestamp-h], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
 
1410
 
 
1411
AC_CONFIG_COMMANDS([po/POTFILES.in],[
 
1412
if test "x$EGREP" != "x"
 
1413
then
 
1414
  echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.in
 
1415
  for f in `find . | ${EGREP} '\.(cc|c|h|yy)$' | cut -c3- | sort`
 
1416
  do
 
1417
    if grep gettext.h "$f" | grep include >/dev/null 2>&1
 
1418
    then
 
1419
      echo "$f" >> po/POTFILES.in.in
 
1420
    fi
 
1421
  done
 
1422
  if ! diff po/POTFILES.in.in po/POTFILES.in >/dev/null 2>&1
 
1423
  then
 
1424
    mv po/POTFILES.in.in po/POTFILES.in
 
1425
  else
 
1426
    rm po/POTFILES.in.in
 
1427
  fi
 
1428
fi
 
1429
])
1402
1430
 
1403
1431
# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
1404
1432
AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS' AM_CFLAGS='$AM_CFLAGS' AM_CXXFLAGS='$AM_CXXFLAGS'")
1419
1447
echo "   * Profiling enabled:         $ac_profiling"
1420
1448
echo "   * Coverage enabled:          $ac_coverage"
1421
1449
echo "   * Warnings as failure:       $ac_warn_fail"
 
1450
echo "   * Scheduling Plugins:        $scheduling_plugins"
1422
1451
echo "   * C++ cstdint location:      $ac_cv_cxx_cstdint"
1423
1452
echo "   * C++ hash_map location:     $ac_cv_cxx_hash_map"
1424
1453
echo "   * C++ hash namespace:        $ac_cv_cxx_hash_namespace"