null+****@clear*****
null+****@clear*****
2012年 5月 20日 (日) 16:24:31 JST
Kouhei Sutou 2012-05-20 16:24:31 +0900 (Sun, 20 May 2012) New Revision: 20ab561c887f469a29026e11e85833b01dfdea47 Log: Add missing include directory Modified files: CMakeLists.txt Makefile.am configure.ac Modified: CMakeLists.txt (+1 -0) =================================================================== --- CMakeLists.txt 2012-05-20 00:38:41 +0900 (e2305a3) +++ CMakeLists.txt 2012-05-20 16:24:31 +0900 (1eb72ae) @@ -43,6 +43,7 @@ string(REGEX REPLACE "([^;]+)" "lib/\\1" set(MYSQL_SOURCE_DIR "PATH" CACHE PATH "MySQL source directory") set(MYSQL_INCLUDE_DIRS + "${MYSQL_BUILD_DIR}/include" "${MYSQL_SOURCE_DIR}/sql" "${MYSQL_SOURCE_DIR}/include" "${MYSQL_SOURCE_DIR}/regex" Modified: Makefile.am (+1 -1) =================================================================== --- Makefile.am 2012-05-20 00:38:41 +0900 (16abac2) +++ Makefile.am 2012-05-20 16:24:31 +0900 (e660015) @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = 1.9.7 LOCALES = ja -AM_CPPFLAGS = $(MYSQL_INC) $(GROONGA_CFLAGS) -I$(top_srcdir)/lib +AM_CPPFLAGS = $(MYSQL_INCLUDES) $(GROONGA_CFLAGS) -I$(top_srcdir)/lib ACLOCAL_AMFLAGS = $$ACLOCAL_ARGS include sources.am Modified: configure.ac (+19 -8) =================================================================== --- configure.ac 2012-05-20 00:38:41 +0900 (435527a) +++ configure.ac 2012-05-20 16:24:31 +0900 (094906e) @@ -110,11 +110,6 @@ AC_DEFUN([CONFIG_OPTION_MYSQL],[ ac_mysql_source_dir="$ac_pwd/$ac_mysql_source_dir" ;; esac - MYSQL_INC="-I$ac_mysql_source_dir/sql" - MYSQL_INC="$MYSQL_INC -I$ac_mysql_source_dir/include" - MYSQL_INC="$MYSQL_INC -I$ac_mysql_source_dir/regex" - MYSQL_INC="$MYSQL_INC -I$ac_mysql_source_dir" - AC_SUBST(MYSQL_INC) AC_MSG_RESULT([yes]) else AC_MSG_ERROR([invalid MySQL source directory]) @@ -131,9 +126,25 @@ AC_DEFUN([CONFIG_OPTION_MYSQL],[ [ac_mysql_build_dir="$withval"], [ac_mysql_build_dir="$ac_mysql_source_dir"] ) + case "$ac_mysql_build_dir" in + /*) + : + ;; + *) + ac_mysql_build_dir="$ac_pwd/$ac_mysql_build_dir" + ;; + esac MYSQL_BUILD_DIR="$ac_mysql_build_dir" AC_SUBST(MYSQL_BUILD_DIR) + MYSQL_INCLUDES="" + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_build_dir/include" + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/sql" + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/include" + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/regex" + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir" + AC_SUBST(MYSQL_INCLUDES) + AC_MSG_CHECKING([mysql_config]) AC_ARG_WITH([mysql-config], [AS_HELP_STRING([--with-mysql-config=PATH], @@ -152,7 +163,7 @@ AC_DEFUN([CONFIG_OPTION_MYSQL],[ AC_MSG_ERROR([failed to run "$ac_mysql_config": $plugindir]) fi MYSQL_CFLAGS="$MYSQL_CFLAGS $($ac_mysql_config --cflags)" - MYSQL_INC="$MYSQL_INC $($ac_mysql_config --include)" + MYSQL_INCLUDES="$MYSQL_INCLUDES $($ac_mysql_config --include)" MYSQL_VERSION="$($ac_mysql_config --version)" AC_MSG_CHECKING([for InnoDB FTS]) @@ -210,10 +221,10 @@ CONFIG_OPTION_PLUGINS if test "$standalone_build" = "yes"; then CONFIG_OPTION_MYSQL else - MYSQL_INC="-I../../sql -I../../include -I../../regex -I../.." + MYSQL_INCLUDES="-I../../sql -I../../include -I../../regex -I../.." plugindir="\$(pkglibdir)/plugin" fi -AC_SUBST(MYSQL_INC) +AC_SUBST(MYSQL_INCLUDES) AC_SUBST(MYSQL_CFLAGS) AC_SUBST(MYSQL_VERSION) AC_SUBST(plugindir)