bas configure.ac Makefile.am
需要指定目录:SUBDIRS = src cgi
bas spd Makefile.am
AUTOMAKE_OPTIONS=foreign
lib_LTLIBRARIES=libbas2plugin.la
libbas2plugin_la_SOURCES = basAffair.c\
basComment.c\
basDiscussion.c\
basPlugin.c\
basEgg.c\
basNews.c\
basPost.c\
basTopic.c\
basWord.c\
spdComment.c \
spdPostStorage.c\
spdPost.c
libbas2plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(glib_CFLAGS) -D_DATAPATH=\"$(prefix)/share/bas2plugin/\" -I/usr/local/include/spider2/
libbas2plugin_la_LIBADD=$(libxml_LIBS) -legg2 -llog4cxx -lglib-2.0 -lnewshive
#libbas2plugin_la_CFLAGS=$(AM_CFLAGS) "pkg-config glib-2.0 --cflags"
#libbas2plugin_la_CXXFLAGS=$(AM_CFLAGS) "pkg-config glib-2.0 --cflags"
includedir=${prefix}/include/bas2plugin/
nobase_include_HEADERS = basAffair.h\
basComment.h\
basDef.h\
basDiscussion.h\
basPlugin.h\
basEgg.h\
basNews.h\
basPost.h\
basTopic.h\
basWord.h\
spdPost.h\
spdPostStorage.h\
spdComment.h
bas2plugindatadir=$(datadir)/bas2plugin
bas2plugindata_DATA=init.xml \
admin.txt \
business.txt
bin_PROGRAMS = basPluginInsert basPluginquery postInsert
########################################
basPluginInsert_SOURCES = basPluginInsert.cpp \
TextExtraction.cpp \
spdDateConvert.cpp \
spdMetadataExtract.cpp
basPluginInsert_CXXFLAGS = ${AM_CPPFLAGS} ${glib_CFLAGS} -I/usr/local/include/spider2 -I/usr/local/include/bas
basPluginInsert_CFLAGS = ${AM_CPPFLAGS} ${glib_CFLAGS} -I/usr/local/include/spider2 -I/usr/local/include/bas
basPluginInsert_LDADD = ${AM_LDFLAGS} $(glib_LIBS) -lscholar -llog4cxx -lxml2 -legg2 ./libbas2plugin.la -lnewshive -lbas -lboost_regex
#########################################
basPluginquery_SOURCES = basPluginQuery.c
basPluginquery_CXXFLAGS = ${AM_CPPFLAGS} ${glib_CFLAGS} -I/usr/local/include/spider2 -I/usr/local/include/bas
basPluginquery_CFLAGS = ${AM_CPPFLAGS} ${glib_CFLAGS} -I/usr/local/include/spider2 -I/usr/local/include/bas
basPluginquery_LDADD = ${AM_LDFLAGS} $(glib_LIBS) -lscholar -lxml2 -legg2 ./libbas2plugin.la -lnewshive -lbas -lboost_regex
########################################
#bpbbsInsert_SOURCES = bpbbsInsert.c \
# spdDateConvert.c
#bpbbsInsert_CXXFLAGS = ${AM_CPPFLAGS} ${glib_CFLAGS} -I/usr/local/include/spider2 -I/usr/local/include/bas2plugin/
#bpbbsInsert_CFLAGS = ${AM_CPPFLAGS} ${glib_CFLAGS} -I/usr/local/include/spider2 -I/usr/local/include/bas2plugin/
#bpbbsInsert_LDADD = ${AM_LDFLAGS} $(glib_LIBS) -lxml2 -lspider2 -llog4cxx -lcurl -ltidy -lbas2plugin -lnewshive
########################################
postInsert_SOURCES = basPostInsert.c \
spdDateConvert.c
postInsert_CXXFLAGS = ${AM_CPPFLAGS} ${glib_CFLAGS} -I/usr/local/include/spider2 -I/usr/local/include/bas2plugin/
postInsert_CFLAGS = ${AM_CPPFLAGS} ${glib_CFLAGS} -I/usr/local/include/spider2 -I/usr/local/include/bas2plugin/
postInsert_LDADD = ${AM_LDFLAGS} $(glib_LIBS) -lscholar -llog4cxx -lxml2 -legg2 ./libbas2plugin.la -lnewshive -lbas -lboost_regex -lspider2
#bin_PROGRAMS = parseTest
#parseTest_SOURCES = parseTest.cpp \
#bin_PROGRAMS = parseTest
#parseTest_SOURCES = parseTest.cpp \
# TextExtraction.cpp
#parseTest_CXXFLAGS = ${AM_CPPFLAGS} ${glib_CFLAGS} -I/usr/local/include/spider2
#parseTest_CFLAGS = ${AM_CPPFLAGS} ${glib_CFLAGS} -I/usr/local/include/spider2
#parseTest_LDADD = ${AM_LDFLAGS} $(glib_LIBS) -legg2 -lscholar -llog4cxx -lxml2 ./libbas2plugin.la -lnewshive
bas configure.ac (configure.in)
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(bas, 1.0, qingdong.meng@ape-tech.com)
AC_PROG_CXX
AC_CONFIG_SRCDIR([lib/Dictionary.h])
#AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE()
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
Checks for libraries.
PKG_CHECK_EXISTS([glib-2.0], [], [
AC_MSG_ERROR(["Error! You need to have libglib2.0 installed."])
])
PKG_CHECK_MODULES([glib],[glib-2.0],[],[AC_MSG_ERROR(["Error! You need to have glib2.0 installed!"])])
PKG_CHECK_MODULES([libxml],[libxml-2.0],[],[AC_MSG_ERROR(["Error! You need to have libxml-2.0 installed!"])])
PKG_CHECK_MODULES([cppunit], [cppunit],[],[AC_MSG_ERROR(["Error! You need to have libcppunit installed!"])])
AC_CHECK_LIB([egg2],[eggDirectory_open],[],[AC_MSG_ERROR(["Error! You need to have libegg installed!"])])
#PKG_CHECK_MODULES([glib],[glib-2.0],[],[AC_MSG_ERROR(["Error! You need to have glib2.0 installed!"])])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
libwww_cflags=`libwww-config --cflags`
libwww_libs=`libwww-config --libs`
glib_cflags=`pkg-config --cflags glib-2.0`
glib_libs=`pkg-config --libs glib-2.0`
AM_CFLAGS="$libwww_cflags -I/usr/local/include/egg2 -I/usr/local/include/scholar -I/usr/local/include/bigfile $glib_cflags"
AM_LDFLAGS="$libwww_libs $glib_libs"
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_STRUCT_TM
AC_HEADER_STDBOOL
# Checks for library functions.
#AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_CHECK_FUNCS([localtime_r memset regcomp tzset])
AC_CONFIG_FILES([Makefile
dao/Makefile
utest/Makefile
plugin/Makefile
plugin/utest/Makefile
lib/Makefile
lib/cluster/Makefile
lib/test/Makefile
src/Makefile
cgi/Makefile
data/mysql_cgi/Makefile])
AC_SUBST(AM_CFLAGS)
AC_SUBST(AM_LDFLAGS)
AC_DEFINE([_GNU_SOURCE])
AC_OUTPUT