~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Brian Aker
  • Date: 2009-02-08 12:39:10 UTC
  • mfrom: (840.1.21 devel)
  • Revision ID: brian@tangent.org-20090208123910-gaodow8xvkw9ed4l
Merging Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
 
106
106
m4_include(m4/gettext.m4)
107
107
AM_GNU_GETTEXT(external, need-formatstring-macros)
 
108
if test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"
 
109
then
 
110
  AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge,
 
111
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
 
112
  MSGMERGE="${GMSGMERGE}"
 
113
fi
108
114
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
109
115
 
 
116
 
110
117
# Set this for plugins to use
111
118
ac_build_drizzle="yes"
112
119
 
166
173
AC_PROG_AWK
167
174
 
168
175
 
169
 
AC_PATH_PROG(GPERF, gperf, gperf)
170
 
if test "$ac_cv_prog_gperf" = "no"
171
 
then
172
 
  AC_MSG_ERROR("Drizzle requires gperf to build. Please install it.")
173
 
fi
 
176
AC_PATH_PROG(GPERF, gperf,
 
177
             AC_MSG_ERROR("Drizzle requires gperf to build. Please install it."))
174
178
 
175
 
AC_PATH_PROG(LCOV, lcov, lcov)
176
 
AC_PATH_PROG(GENHTML, genhtml, genhtml)
 
179
AC_PATH_PROG(LCOV, lcov)
 
180
AC_PATH_PROG(GENHTML, genhtml)
177
181
 
178
182
AM_CONDITIONAL(HAVE_LCOV,[test "$ac_cv_prog_lcov" != "no"])
179
183
 
792
796
 
793
797
AM_CONDITIONAL(BUILD_FAST_MUTEX,[test "$with_fast_mutexes" != "no"])
794
798
 
 
799
AC_ARG_WITH([atomic-ops],
 
800
    [AS_HELP_STRING([--with-atomic-ops=rwlocks|smp|up],
 
801
       [Implement atomic operations using pthread rwlocks or atomic CPU
 
802
        instructions for multi-processor or uniprocessor
 
803
        configuration. By default gcc built-in sync functions are used,
 
804
        if available and 'smp' configuration otherwise.])],
 
805
    [with_atomic_ops="$withval"],
 
806
    [with_atomic_ops=smp])
 
807
 
 
808
case "$with_atomic_ops" in
 
809
  "up") AC_DEFINE([MY_ATOMIC_MODE_DUMMY], [1],
 
810
                  [Assume single-CPU mode, no concurrency]) ;;
 
811
  "rwlocks") AC_DEFINE([MY_ATOMIC_MODE_RWLOCKS], [1],
 
812
                  [Use pthread rwlocks for atomic ops]) ;;
 
813
  "smp") ;;
 
814
  "")
 
815
    AC_CACHE_CHECK(
 
816
      [whether the compiler provides atomic builtins],
 
817
      [ac_cv_gcc_atomic_builtins],
 
818
      [AC_TRY_COMPILE([],
 
819
        [int main()
 
820
        {
 
821
          int foo= -10; int bar= 10;
 
822
          if (!__sync_fetch_and_add(&foo, bar) || foo)
 
823
            return -1;
 
824
          bar= __sync_lock_test_and_set(&foo, bar);
 
825
          if (bar || foo != 10)
 
826
            return -1;
 
827
          bar= __sync_val_compare_and_swap(&bar, foo, 15);
 
828
          if (bar)
 
829
            return -1;
 
830
          return 0;
 
831
        }],
 
832
       [ac_cv_gcc_atomic_builtins=yes],
 
833
       [ac_cv_gcc_atomic_builtins=no])])
 
834
 
 
835
    if test "x$ac_cv_gcc_atomic_builtins" = "xyes"; then
 
836
      AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1,
 
837
                [Define to 1 if compiler provides atomic builtins.])
 
838
    fi
 
839
   ;;
 
840
   *) AC_MSG_ERROR(["$with_atomic_ops" is not a valid value for --with-atomic-ops]) ;;
 
841
esac
 
842
 
 
843
 
795
844
AC_ARG_WITH([comment],
796
845
    [AS_HELP_STRING([--with-comment],
797
846
            [Comment about compilation environment. @<:@default=off@:>@])],