[oe-commits] org.oe.dev site-conf/mysql.m4: filled with some tests from mysql 4.1.18

hrw commit openembedded-commits at lists.openembedded.org
Sun Jan 7 00:19:39 UTC 2007


site-conf/mysql.m4: filled with some tests from mysql 4.1.18

Author: hrw at openembedded.org
Branch: org.openembedded.dev
Revision: 1fa25c4ed2c76f537724929745c0f65656880cc7
ViewMTN: http://monotone.openembedded.org/revision.psp?id=1fa25c4ed2c76f537724929745c0f65656880cc7
Files:
1
contrib/site-conf/m4/mysql.m4
Diffs:

#
# mt diff -rd857a7c23753e46be0aaa0c6ac549c8c13264ecf -r1fa25c4ed2c76f537724929745c0f65656880cc7
#
# 
# 
# patch "contrib/site-conf/m4/mysql.m4"
#  from [2c0d3a1c2cd144d71aca5f82cfb1b4c0717b4ddb]
#    to [c227a19c457c394303b926d5438382ff9584a922]
# 
============================================================
--- contrib/site-conf/m4/mysql.m4	2c0d3a1c2cd144d71aca5f82cfb1b4c0717b4ddb
+++ contrib/site-conf/m4/mysql.m4	c227a19c457c394303b926d5438382ff9584a922
@@ -1 +1,101 @@
 # Tests for mysql
+
+# A local version of AC_CHECK_SIZEOF that includes sys/types.h
+dnl MYSQL_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
+AC_DEFUN([MYSQL_CHECK_SIZEOF],
+[changequote(<<, >>)dnl
+dnl The name to #define.
+define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
+dnl The cache variable name.
+define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
+changequote([, ])dnl
+AC_MSG_CHECKING(size of $1)
+AC_CACHE_VAL(AC_CV_NAME,
+[AC_TRY_RUN([#include <stdio.h>
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof($1));
+  exit(0);
+}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
+AC_MSG_RESULT($AC_CV_NAME)
+AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [ ])
+undefine([AC_TYPE_NAME])dnl
+undefine([AC_CV_NAME])dnl
+])
+
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_OFF_T
+AC_TYPE_SIZE_T
+AC_STRUCT_ST_RDEV
+AC_HEADER_TIME
+AC_STRUCT_TM
+
+AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
+AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
+AC_CHECK_TYPES([u_int32_t])
+
+dnl Checks for header files.
+AC_CHECK_HEADERS(malloc.h sys/cdefs.h)
+
+dnl Checks for library functions.
+AC_FUNC_ALLOCA
+AC_PROG_GCC_TRADITIONAL
+AC_TYPE_SIGNAL
+
+AC_CHECK_FUNCS(re_comp regcomp strdup)
+AC_CHECK_FUNCS(strlcat strlcpy)
+AC_CHECK_FUNCS(issetugid)
+AC_CHECK_FUNCS(fgetln)
+AC_CHECK_FUNCS(getline flockfile)
+AC_CHECK_FUNCS(lstat putenv select setenv setlocale strcoll tcgetattr)
+
+AC_FUNC_MMAP
+AC_TYPE_SIGNAL
+AC_FUNC_UTIME_NULL
+AC_FUNC_VPRINTF
+
+# AC_CHECK_SIZEOF return 0 when it does not find the size of a
+# type. We want a error instead.
+AC_CHECK_SIZEOF(char, 1)
+if test "$ac_cv_sizeof_char" -eq 0
+then
+  AC_MSG_ERROR([No size for char type.
+A likely cause for this could be that there isn't any
+static libraries installed. You can verify this by checking if you have libm.a
+in /lib, /usr/lib or some other standard place.  If this is the problem,
+install the static libraries and try again.  If this isn't the problem,
+examine config.log for possible errors.  If you want to report this, use
+'scripts/mysqlbug' and include at least the last 20 rows from config.log!])
+fi
+AC_CHECK_SIZEOF(char*, 4)
+AC_CHECK_SIZEOF(int, 4)
+if test "$ac_cv_sizeof_int" -eq 0
+then
+  AC_MSG_ERROR("No size for int type.")
+fi
+AC_CHECK_SIZEOF(long, 4)
+if test "$ac_cv_sizeof_long" -eq 0
+then
+  AC_MSG_ERROR("No size for long type.")
+fi
+AC_CHECK_SIZEOF(long long, 8)
+if test "$ac_cv_sizeof_long_long" -eq 0
+then
+  AC_MSG_ERROR("MySQL needs a long long type.")
+fi
+# off_t is not a builtin type
+MYSQL_CHECK_SIZEOF(off_t, 4)
+if test "$ac_cv_sizeof_off_t" -eq 0
+then
+  AC_MSG_ERROR("MySQL needs a off_t type.")
+fi






More information about the Openembedded-commits mailing list