~kentokushiba/spiderformysql/spider-1.0-src

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Kentoku SHIBA
  • Date: 2010-01-04 03:06:41 UTC
  • Revision ID: kentokushiba@gmail.com-20100104030641-y91fagyp7iswtsua
separate from doc files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_INIT([spider_engine], [1.0], [kentokushiba@gmail.com])
 
2
AC_CONFIG_HEADERS([config.h])
 
3
AM_INIT_AUTOMAKE
 
4
 
 
5
AC_PROG_CC
 
6
AC_PROG_CXX
 
7
AC_PROG_LIBTOOL
 
8
 
 
9
AC_TYPE_SIZE_T
 
10
 
 
11
AC_DEFUN([MYSQL_PATH_TEST],[
 
12
  AC_MSG_CHECKING([mysql source path])
 
13
  AC_ARG_WITH([mysql],
 
14
    [AS_HELP_STRING([--with-mysql=PATH],[mysql source directory PATH])],
 
15
    [
 
16
      if test \
 
17
        -f $withval/include/mysql/plugin.h -a \
 
18
        -f $withval/include/mysql.h -a \
 
19
        -f $withval/include/errmsg.h -a \
 
20
        -f $withval/sql/mysql_priv.h ;
 
21
      then
 
22
        MYSQL_INC="$withval/"
 
23
        AC_MSG_RESULT([yes])
 
24
        plugin_spider_shared_target=""
 
25
        AC_SUBST(plugin_spider_shared_target)
 
26
        plugin_spider_static_target=""
 
27
        AC_SUBST(plugin_spider_static_target)
 
28
        PLUGIN_SPIDER_LTLIBRARIES_TARGET="ha_spider.la"
 
29
        AC_SUBST(PLUGIN_SPIDER_LTLIBRARIES_TARGET)
 
30
        PLUGIN_SPIDER_LIBRARIES_TARGET="libspider.a"
 
31
        AC_SUBST(PLUGIN_SPIDER_LIBRARIES_TARGET)
 
32
        LIBTOOL="$LIBTOOL --preserve-dup-deps"
 
33
        AC_SUBST(LIBTOOL)
 
34
      else
 
35
        AC_MSG_ERROR([Can't find header files. Please check --with-mysql=PATH option])
 
36
      fi
 
37
    ],
 
38
    [
 
39
      if test \
 
40
        -f ../../include/mysql/plugin.h -a \
 
41
        -f ../../include/mysql.h -a \
 
42
        -f ../../include/errmsg.h -a \
 
43
        -f ../../sql/mysql_priv.h ;
 
44
      then
 
45
        MYSQL_INC="../../"
 
46
        AC_MSG_RESULT([no])
 
47
      else
 
48
        AC_MSG_ERROR([Can't find header files. Please set --with-mysql=PATH option])
 
49
      fi
 
50
    ]
 
51
  )
 
52
])
 
53
 
 
54
MYSQL_PATH_TEST
 
55
AC_SUBST(MYSQL_INC)
 
56
 
 
57
CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"
 
58
 
 
59
 
 
60
AC_CHECK_FUNCS([memset strchr strncasecmp])
 
61
 
 
62
AC_CONFIG_FILES([Makefile])
 
63
AC_OUTPUT