diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-08 03:08:37 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-08 03:08:37 +0000 |
commit | 27364ac890a39d1b387013b20451f414c9db9289 (patch) | |
tree | d593ed93639772bbb79038d1ef0a9aca07ac13f3 | |
parent | dd7d2d4cf0f27f35dc7c27b0f9a527dfead2ca6e (diff) |
Added the --with-mysqlpp option to configure to tell it where mysql++ is installed at
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2804 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Makefile.in | 1 | ||||
-rwxr-xr-x | configure | 27 | ||||
-rw-r--r-- | configure.in | 17 | ||||
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/modules/Makefile | 5 |
5 files changed, 35 insertions, 17 deletions
diff --git a/Makefile.in b/Makefile.in index ec73b009f..cbc72d7fa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -7,6 +7,7 @@ LDPROFILE= SHELL=/bin/sh INSTDIR=@INSTDIR@ MAKEBIN=@MAKEBIN@ +MYSQLDIR=@MYSQLDIR@ INSTALL=@INSTALL@ RM=@RM@ CP=@CP@ @@ -637,6 +637,7 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +MYSQLDIR MAKEBIN INSTDIR RUNGROUP @@ -701,6 +702,7 @@ with_rungroup with_permissions with_instdir with_makebin +with_mysqlpp with_optimization with_debugsym ' @@ -1331,12 +1333,13 @@ if test -n "$ac_init_help"; then Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-rungroup=group Specify the rungroup for anope - --with-permissions=permissions Specify the default permissions for anope - --with-instdir=instdir Specify the default install dir for anope ---with-makebin=run-cc.pl Specify the default make binary to use - --with-optimization=1|2|3|4|5 Specify the optimization level - --with-debugsym Include debugging symbols + --with-rungroup=group Specify the rungroup for anope + --with-permissions=permissions Specify the default permissions for anope + --with-instdir=instdir Specify the default install dir for anope + --with-makebin=run-cc.pl Specify the default make binary to use + --with-mysqlpp=/usr/local/ The base directory of the MySQL++ installation + --with-optimization=1|2|3|4|5 Specify the optimization level + --with-debugsym Include debugging symbols Some influential environment variables: CC C compiler command @@ -3315,7 +3318,6 @@ else $as_echo "no" >&6; } fi - { $as_echo "$as_me:$LINENO: checking whether this is a bit or little endian system" >&5 $as_echo_n "checking whether this is a bit or little endian system... " >&6; } if test "$cross_compiling" = yes; then @@ -6757,11 +6759,22 @@ if test "${with_makebin+set}" = set; then withval=$with_makebin; MAKEBIN=$withval fi + # If we're using run-cc.pl suppress the make process (run-cc.pl does it for us) if test "$MAKEBIN"; then MAKEBIN="@$MAKEBIN" fi +MYSQLDIR=/usr/local/ + +# Check whether --with-mysqlpp was given. +if test "${with_mysqlpp+set}" = set; then + withval=$with_mysqlpp; MYSQLDIR=$withval +fi + + + + diff --git a/configure.in b/configure.in index e907e4c0f..4fb762d66 100644 --- a/configure.in +++ b/configure.in @@ -76,7 +76,6 @@ else AC_MSG_RESULT(no) fi - AC_MSG_CHECKING(whether this is a bit or little endian system) AC_TRY_RUN([ int main() @@ -193,7 +192,7 @@ AC_CHECK_FUNCS(gethostbyname_r,AC_DEFINE(HAVE_GETHOSTBYNAME_R,1)) AC_CHECK_FUNCS(strlcpy,AC_DEFINE(HAVE_STRLCPY,1)) AC_CHECK_FUNCS(strlcat,AC_DEFINE(HAVE_STRLCAT,1)) -AC_ARG_WITH(rungroup, [ --with-rungroup=group Specify the rungroup for anope], [ +AC_ARG_WITH(rungroup, [ --with-rungroup=group Specify the rungroup for anope], [ AC_DEFINE_UNQUOTED(RUNGROUP,"$withval","Run group") RUNGROUP=$withval ]) @@ -202,24 +201,28 @@ AC_SUBST(RUNGROUP) dnl AC_DEFINE_UNQUOTED(MYOSNAME,"`uname -a`","uname") -AC_ARG_WITH(permissions, [ --with-permissions=permissions Specify the default permissions for anope], AC_DEFINE_UNQUOTED(DEFUMASK,$withval,"Default umask permissions"), AC_DEFINE(DEFUMASK, 007,"Default umask Permissions")) +AC_ARG_WITH(permissions, [ --with-permissions=permissions Specify the default permissions for anope], AC_DEFINE_UNQUOTED(DEFUMASK,$withval,"Default umask permissions"), AC_DEFINE(DEFUMASK, 007,"Default umask Permissions")) -AC_ARG_WITH(instdir, [ --with-instdir=instdir Specify the default install dir for anope], [ +AC_ARG_WITH(instdir, [ --with-instdir=instdir Specify the default install dir for anope], [ INSTDIR=$withval ]) MAKEBIN=`pwd`/run-cc.pl -AC_ARG_WITH(makebin, [--with-makebin=run-cc.pl Specify the default make binary to use],[MAKEBIN=$withval]) +AC_ARG_WITH(makebin, [ --with-makebin=run-cc.pl Specify the default make binary to use],[MAKEBIN=$withval]) + +MYSQLDIR=/usr/local/ +AC_ARG_WITH(mysqlpp, [ --with-mysqlpp=/usr/local/ The base directory of the MySQL++ installation],[MYSQLDIR=$withval]) AC_SUBST(INSTDIR) AC_SUBST(MAKEBIN) +AC_SUBST(MYSQLDIR) -AC_ARG_WITH(optimization, [ --with-optimization=1|2|3|4|5 Specify the optimization level], [ +AC_ARG_WITH(optimization, [ --with-optimization=1|2|3|4|5 Specify the optimization level], [ CFLAGS="$CFLAGS -O$withval" ]) -AC_ARG_WITH(debugsym, [ --with-debugsym Include debugging symbols], [ +AC_ARG_WITH(debugsym, [ --with-debugsym Include debugging symbols], [ CFLAGS="$CFLAGS -g" ]) diff --git a/src/Makefile b/src/Makefile index 08ca50c13..4c1dc7de0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,7 +16,7 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \ 'TOUCH=${TOUCH}' 'SHELL=${SHELL}' \ 'RUNGROUP=${RUNGROUP}' \ 'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}' \ - 'MAKEBIN=${MAKEBIN}' + 'MAKEBIN=${MAKEBIN}' 'MYSQLDIR=${MYSQLDIR}' .c.o: $(MAKEBIN) $(CC) $(CFLAGS) -I../include/ -c $< diff --git a/src/modules/Makefile b/src/modules/Makefile index b2686ae84..723e24494 100644 --- a/src/modules/Makefile +++ b/src/modules/Makefile @@ -11,6 +11,7 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \ OBJECTS= $(SRCS:.c=.so) OBJECTS+= $(SRCS:.cpp=.so) CDEFS= -rdynamic -Wall +MYSQL_ARGS = -I$(MYSQLDIR)/include/ -L$(MYSQLDIR)/lib/ -Wl,-rpath -Wl,$(MYSQLDIR)/lib/ -lmysqlpp all: modules subs @@ -28,12 +29,12 @@ distclean: spotless .c.so: $(MAKEBIN) $(CC) ${CFLAGS} ${CDEFS} ${MODULEFLAGS} \ - $(if $(shell grep RequiredLibraries $< | grep mysqlpp),-lmysqlpp) \ + $(if $(shell grep RequiredLibraries $< | grep mysqlpp), $(MYSQL_ARGS)) \ -I../${INCLUDEDIR} -o $@ $< .cpp.so: $(MAKEBIN) $(CC) ${CFLAGS} ${CDEFS} ${MODULEFLAGS} \ - $(if $(shell grep RequiredLibraries $< | grep mysqlpp),-lmysqlpp) \ + $(if $(shell grep RequiredLibraries $< | grep mysqlpp), $(MYSQL_ARGS)) \ -I../${INCLUDEDIR} -o $@ $< subs: |