~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Brian Aker
  • Date: 2008-08-03 22:27:54 UTC
  • mfrom: (236.1.66 codestyle)
  • Revision ID: brian@tangent.org-20080803222754-yhkw8plul06oqvhe
Merge from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
MYSQL_TCP_PORT_DEFAULT=4427
39
39
 
40
40
dnl Include m4 
41
 
sinclude(config/ac-macros/alloca.m4)
42
 
sinclude(config/ac-macros/check_cpu.m4)
43
 
sinclude(config/ac-macros/character_sets.m4)
44
 
sinclude(config/ac-macros/compiler_flag.m4)
45
 
sinclude(config/ac-macros/dtrace.m4)
46
 
sinclude(config/ac-macros/plugins.m4)
47
 
sinclude(config/ac-macros/large_file.m4)
48
 
sinclude(config/ac-macros/misc.m4)
49
 
sinclude(config/ac-macros/readline.m4)
50
 
sinclude(config/ac-macros/ssl.m4)
51
 
sinclude(config/ac-macros/pkg.m4)
52
 
sinclude(config/ac-macros/ac_cxx_header_stdcxx_98.m4)
53
 
 
54
 
# Remember to add a directory drizzled/share/LANGUAGE
55
 
AVAILABLE_LANGUAGES="\
56
 
czech danish dutch english estonian french german greek hungarian \
57
 
italian japanese korean norwegian norwegian-ny polish portuguese \
58
 
romanian russian serbian slovak spanish swedish ukrainian"
59
 
 
60
 
#####
61
 
#####
 
41
sinclude(m4/alloca.m4)
 
42
sinclude(m4/check_cpu.m4)
 
43
sinclude(m4/character_sets.m4)
 
44
sinclude(m4/compiler_flag.m4)
 
45
sinclude(m4/dtrace.m4)
 
46
sinclude(m4/plugins.m4)
 
47
sinclude(m4/large_file.m4)
 
48
sinclude(m4/misc.m4)
 
49
sinclude(m4/readline.m4)
 
50
sinclude(m4/ssl.m4)
 
51
sinclude(m4/pkg.m4)
 
52
sinclude(m4/lib-link.m4)
 
53
sinclude(m4/lib-prefix.m4)
 
54
sinclude(m4/gettext.m4)
 
55
sinclude(m4/progtest.m4)
 
56
sinclude(m4/po.m4)
 
57
sinclude(m4/nls.m4)
 
58
sinclude(m4/iconv.m4)
 
59
sinclude(m4/lib-ld.m4)
 
60
sinclude(m4/ac_cxx_header_stdcxx_98.m4)
 
61
 
 
62
AM_GNU_GETTEXT([external])
62
63
 
63
64
AC_SUBST(MYSQL_NO_DASH_VERSION)
64
65
AC_SUBST(MYSQL_BASE_VERSION)
329
330
       LIBEVENT_CFLAGS="-I$withval/include"
330
331
       LIBEVENT_LIBS="-L$withval/lib -levent"
331
332
    else
332
 
       AC_ERROR(event.h or libevent.a not found in $withval)
 
333
       AC_MSG_ERROR([event.h or libevent.a not found in $withval])
333
334
    fi
334
335
fi
335
336
 
562
563
      ;;
563
564
    *)
564
565
      AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
 
566
      ;;
565
567
  esac
566
568
fi
567
569
AC_SUBST(FIND_PROC)
734
736
AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
735
737
AC_CHECK_FUNCS(log2)
736
738
 
737
 
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
738
 
AC_CHECK_FUNC(yp_get_default_domain, ,
739
 
  AC_CHECK_LIB(nsl, yp_get_default_domain))
740
 
AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
 
739
AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
 
740
AC_CHECK_FUNC(yp_get_default_domain, [],
 
741
  [AC_CHECK_LIB(nsl, yp_get_default_domain)])
 
742
AC_CHECK_FUNC(p2open, [], [AC_CHECK_LIB(gen, p2open)])
741
743
# This may get things to compile even if bind-8 is installed
742
 
AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
 
744
AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
743
745
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
744
746
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
745
747
 
747
749
AC_CHECK_LIB(rt, aio_read)
748
750
 
749
751
# For the sched_yield() function on Solaris
750
 
AC_CHECK_FUNC(sched_yield, , AC_CHECK_LIB(posix4, sched_yield,
751
 
[AC_DEFINE(HAVE_SCHED_YIELD) LIBS="$LIBS -lposix4"]))
 
752
AC_CHECK_FUNC(sched_yield, [],
 
753
  [AC_CHECK_LIB(posix4, [sched_yield],
 
754
    [AC_DEFINE(HAVE_SCHED_YIELD) LIBS="$LIBS -lposix4"])])
752
755
 
753
756
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
754
757
then
755
 
  AC_CHECK_FUNC(gtty, , AC_CHECK_LIB(compat, gtty))
 
758
  AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
756
759
fi
757
760
 
758
761
AC_CHECK_TYPES([int8, uint8, int16, uint16, int32, uint32, int64, uint64,
818
821
# AC_HEADER_ASSERT
819
822
# ----------------
820
823
# Check whether to enable assertions.
821
 
ifdef([AC_HEADER_ASSERT],[],AC_DEFUN([AC_HEADER_ASSERT],
 
824
ifdef([AC_HEADER_ASSERT], [], [AC_DEFUN([AC_HEADER_ASSERT],
822
825
[
823
826
  AC_MSG_CHECKING([whether to enable assertions])
824
827
  AC_ARG_ENABLE([assert],
826
829
    [AC_MSG_RESULT([no])
827
830
     AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])],
828
831
    [AC_MSG_RESULT(yes)])
829
 
]))
 
832
])])
830
833
 
831
834
AC_HEADER_ASSERT
832
835
 
862
865
                        [Define to 1 if you want to use fast mutexes])
863
866
fi
864
867
 
 
868
AM_CONDITIONAL(BUILD_FAST_MUTEX,[test "$with_fast_mutexes" != "no"])
 
869
 
865
870
AC_ARG_WITH([comment],
866
871
    [AS_HELP_STRING([--with-comment],
867
872
            [Comment about compilation environment. @<:@default=off@:>@])],
889
894
AC_TYPE_OFF_T
890
895
AC_HEADER_TIME
891
896
AC_STRUCT_TM
892
 
MYSQL_NEEDS_MYSYS_NEW
893
897
# AC_CHECK_SIZEOF return 0 when it does not find the size of a
894
898
# type. We want a error instead.
895
899
AC_CHECK_SIZEOF(char, 1)
1056
1060
  AC_MSG_ERROR("Drizzle requires fcntl.")
1057
1061
fi
1058
1062
 
 
1063
AC_CONFIG_LIBOBJ_DIR([mystrings])
 
1064
AC_REPLACE_FUNCS([strtoll strstr strtoull strmov getpagesize])
 
1065
 
1059
1066
AC_CHECK_FUNCS(bsearch \
1060
1067
  cuserid fchmod \
1061
1068
  fdatasync finite fpresetsticky fpsetmask fsync ftruncate \
1064
1071
  localtime_r gethrtime gmtime_r \
1065
1072
  locking longjmp lrand48 madvise mallinfo \
1066
1073
  memmove \
1067
 
  mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 getpagesize \
 
1074
  mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 \
1068
1075
  pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
1069
1076
  pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
1070
1077
  pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
1072
1079
  realpath rename rint rwlock_init setupterm \
1073
1080
  shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
1074
1081
  sighold sigset sigthreadmask port_create sleep \
1075
 
  snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
1076
 
  strtol strtoll strtoul strtoull tell tempnam vidattr \
 
1082
  snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk \
 
1083
  tell tempnam vidattr \
1077
1084
  posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
1078
1085
 
 
1086
AM_CONDITIONAL(BUILD_THR_RWLOCK,[test "$ac_cv_func_rwlock_init" -a "$ac_cv_funn_pthread_rwlock_rdlock"])
 
1087
 
1079
1088
# Check that isinf() is available in math.h and can be used in both C and C++
1080
1089
# code
1081
1090
AC_MSG_CHECKING(for isinf in math.h)
1114
1123
)
1115
1124
 
1116
1125
# Check definition of pthread_getspecific
1117
 
AC_CACHE_CHECK("args to pthread_getspecific", mysql_cv_getspecific_args,
1118
 
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if !defined(_REENTRANT)
 
1126
AC_CACHE_CHECK([args to pthread_getspecific], [mysql_cv_getspecific_args],
 
1127
  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if !defined(_REENTRANT)
1119
1128
#define _REENTRANT
1120
1129
#endif
1121
1130
#define _POSIX_PTHREAD_SEMANTICS 
1122
1131
#include <pthread.h> ]], [[ void *pthread_getspecific(pthread_key_t key);
1123
 
pthread_getspecific((pthread_key_t) NULL); ]])],[mysql_cv_getspecific_args=POSIX],[mysql_cv_getspecific_args=other]))
 
1132
pthread_getspecific((pthread_key_t) NULL); ]])],
 
1133
    [mysql_cv_getspecific_args=POSIX],
 
1134
    [mysql_cv_getspecific_args=other])])
1124
1135
  if test "$mysql_cv_getspecific_args" = "other"
1125
1136
  then
1126
1137
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1],
1128
1139
  fi
1129
1140
 
1130
1141
  # Check definition of pthread_mutex_init
1131
 
  AC_CACHE_CHECK("args to pthread_mutex_init", mysql_cv_mutex_init_args,
1132
 
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
 
1142
  AC_CACHE_CHECK([args to pthread_mutex_init], [mysql_cv_mutex_init_args],
 
1143
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1133
1144
#define _POSIX_PTHREAD_SEMANTICS 
1134
1145
#include <pthread.h> ]], [[ 
1135
1146
  pthread_mutexattr_t attr;
1136
1147
  pthread_mutex_t mp;
1137
 
  pthread_mutex_init(&mp,&attr); ]])],[mysql_cv_mutex_init_args=POSIX],[mysql_cv_mutex_init_args=other]))
 
1148
  pthread_mutex_init(&mp,&attr); ]])],
 
1149
      [mysql_cv_mutex_init_args=POSIX],
 
1150
      [mysql_cv_mutex_init_args=other])])
1138
1151
  if test "$mysql_cv_mutex_init_args" = "other"
1139
1152
  then
1140
1153
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1],
1144
1157
 
1145
1158
#---START: Used in for client configure
1146
1159
# Check definition of readdir_r
1147
 
AC_CACHE_CHECK("args to readdir_r", mysql_cv_readdir_r,
1148
 
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
 
1160
AC_CACHE_CHECK([args to readdir_r], [mysql_cv_readdir_r],
 
1161
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1149
1162
#define _POSIX_PTHREAD_SEMANTICS 
1150
1163
#include <pthread.h>
1151
1164
#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
1152
 
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],[mysql_cv_readdir_r=POSIX],[mysql_cv_readdir_r=other]))
 
1165
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],
 
1166
    [mysql_cv_readdir_r=POSIX],
 
1167
    [mysql_cv_readdir_r=other])])
1153
1168
if test "$mysql_cv_readdir_r" = "POSIX"
1154
1169
then
1155
1170
  AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r])
1156
1171
fi
1157
1172
 
1158
1173
# Check definition of posix sigwait()
1159
 
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
1160
 
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
 
1174
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
 
1175
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 
1176
#define _REENTRANT
1161
1177
#define _POSIX_PTHREAD_SEMANTICS 
1162
1178
#include <pthread.h>
1163
 
#include <signal.h>]], [[#ifndef _AIX
 
1179
#include <signal.h>
 
1180
      ]], [[
 
1181
#ifndef _AIX
1164
1182
sigset_t set;
1165
1183
int sig;
1166
1184
sigwait(&set,&sig);
1167
 
#endif]])],[mysql_cv_sigwait=POSIX],[mysql_cv_sigwait=other]))
 
1185
#endif
 
1186
      ]])],
 
1187
    [mysql_cv_sigwait=POSIX],
 
1188
    [mysql_cv_sigwait=other])])
1168
1189
if test "$mysql_cv_sigwait" = "POSIX"
1169
1190
then
1170
1191
  AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait])
1174
1195
then
1175
1196
unset mysql_cv_sigwait
1176
1197
# Check definition of posix sigwait()
1177
 
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
1178
 
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
 
1198
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
 
1199
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 
1200
#define _REENTRANT
1179
1201
#define _POSIX_PTHREAD_SEMANTICS 
1180
1202
#include <pthread.h>
1181
 
#include <signal.h>]], [[sigset_t set;
 
1203
#include <signal.h>
 
1204
      ]], [[
 
1205
sigset_t set;
1182
1206
int sig;
1183
 
sigwait(&set);]])],[mysql_cv_sigwait=NONPOSIX],[mysql_cv_sigwait=other]))
 
1207
sigwait(&set);
 
1208
      ]])],
 
1209
    [mysql_cv_sigwait=NONPOSIX],
 
1210
    [mysql_cv_sigwait=other])])
1184
1211
if test "$mysql_cv_sigwait" = "NONPOSIX"
1185
1212
then
1186
1213
  AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument])
1189
1216
#---END:
1190
1217
 
1191
1218
# Check if pthread_attr_setscope() exists
1192
 
AC_CACHE_CHECK("for pthread_attr_setscope", mysql_cv_pthread_attr_setscope,
1193
 
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
 
1219
AC_CACHE_CHECK([for pthread_attr_setscope], [mysql_cv_pthread_attr_setscope],
 
1220
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 
1221
#define _REENTRANT
1194
1222
#define _POSIX_PTHREAD_SEMANTICS 
1195
 
#include <pthread.h>]], [[pthread_attr_t thr_attr;
1196
 
pthread_attr_setscope(&thr_attr,0);]])],[mysql_cv_pthread_attr_setscope=yes],[mysql_cv_pthread_attr_setscope=no]))
 
1223
#include <pthread.h>
 
1224
      ]], [[
 
1225
pthread_attr_t thr_attr;
 
1226
pthread_attr_setscope(&thr_attr,0);
 
1227
      ]])],
 
1228
    [mysql_cv_pthread_attr_setscope=yes],
 
1229
    [mysql_cv_pthread_attr_setscope=no])])
1197
1230
if test "$mysql_cv_pthread_attr_setscope" = "yes"
1198
1231
then
1199
1232
  AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
1365
1398
 
1366
1399
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile mysys/tests/Makefile dnl
1367
1400
 mystrings/Makefile mystrings/tests/Makefile storage/Makefile dnl
1368
 
 vio/Makefile dnl
 
1401
 vio/Makefile po/Makefile.in dnl
1369
1402
 libdrizzle/Makefile client/Makefile dnl
1370
1403
 drizzled/Makefile dnl
1371
1404
 drizzled/field/Makefile dnl
 
1405
 drizzled/sql_builtin.cc dnl
1372
1406
 drizzled/share/Makefile dnl
1373
 
 drizzled/sql_builtin.cc dnl
1374
1407
 support-files/Makefile dnl
1375
1408
 tests/Makefile tests/install_test_db dnl
1376
1409
 drizzled/version.h plugin/Makefile dnl