Anonymous - 2004-08-25

I just want to install sendmail + mysql on my freebsd 4.9 box

Downloaded the following packages:
sendmail.8.12.11.tar.gz
sendmail+mysql-8.12.11-7.patch
sendmail-sql-Makefile-8.12.11-7.patch

Install:
# tar -zxvf sendmail.8.12.11.tar.gz
# cd sendmail-8.12.11
# touch devtools/Site/site.config.m4
# patch -p1 < ../sendmail+mysql-8.12.11-7.patch
# patch -p1 < ../sendmail-sql-Makefile-8.12.11-7.patch
# vi devtools/Site/site.config.m4
change:
APPENDDEF(`confENVDEF', `-DUDBMYSQL -DMYSQLMAP -DPGSQLMAP -DMILTER')
APPENDDEF(`confINCDIRS',`-I/usr/local/mysql/include/mysql -I/usr/include/mysql')
APPENDDEF(`confLIBSEARCH', `mysqlclient')
APPENDDEF(`confLIBDIRS', `-L/usr/lib/mysql/ -L/usr/local/mysql/lib/mysql/')
APPENDDEF(`confLIBS',   `-lmysqlclient -lz -lpq')

to:
APPENDDEF(`confENVDEF', `-DMYSQLMAP')
APPENDDEF(`confINCDIRS',`-I/usr/local/mysql/include/mysql')
APPENDDEF(`confLIBSEARCH', `mysqlclient')
APPENDDEF(`confLIBDIRS', `-L/usr/local/mysql/lib/mysql/')
APPENDDEF(`confLIBS',   `-lmysqlclient')

# ./Buid

it told me:
map.c:7409: mysql/mysql.h: No such file or directory
mysql_sendmail.c:4: mysql/mysql.h: No such file or directory

After delete "mysql/" in map.c mysql_sendmail.c, continue to make.

Anyway, it stopped and showed the following message:

In file included from mysql_local.c:5:
mysql_local.h:6: redefinition of `struct mysql_sendmail_struct'
mysql_local.c: In function `get_mysql_conf':
mysql_local.c:113: `portnum' undeclared (first use in this function)
mysql_local.c:113: (Each undeclared identifier is reported only once
mysql_local.c:113: for each function it appears in.)
mysql_local.c: In function `get_mysql_pwd':
mysql_local.c:182: `ml_mysql' undeclared (first use in this function)
mysql_local.c: In function `get_mysql_uid':
mysql_local.c:238: `ml_mysql' undeclared (first use in this function)
mysql_local.c:286: syntax error at end of input
*** Error code 1

Stop in /usr/tmp/sendmail-8.12.11/obj.FreeBSD.4.9-RELEASE.i386/mail.local.
*** Error code 1

Stop in /usr/tmp/sendmail-8.12.11.