○ pfixcfg.sh

*postfixのMakefileを作成 (修正) するスクリプトです
*新規インストールした openssl を使っています
*OPT="-O2 -march=pentium3" (CPU最適化オプション)
*該当しない場合は指定しない
*リンクするライブラリは、各自の環境に合わせて下さい
*ターミナルで直接実行しても良いです

*opensslをリンクする場合

#!/bin/bash
#
make -f Makefile.init makefiles \
OPT="-O2 -march=pentium3" \
CCARGS="-DUSE_TLS" \
AUXLIBS="-lssl -lcrypto -ldl -lz"

*pcreをリンクする場合

#!/bin/bash
#
make -f Makefile.init makefiles \
OPT="-O2 -march=pentium3" \
CCARGS="-DHAS_PCRE" \
AUXLIBS="-lpcre"

*ldap、dovecot_sasl、cyrus_sasl、mysqlをリンクする場合

赤色文字 ldapの分
橙色文字 dovecot_saslの分
紫色文字 cyrus_saslの分
緑色文字 mysql(オリジナルソース)の分

#!/bin/bash
#
make -f Makefile.init makefiles \
OPT="-O2 -march=pentium3" \
CCARGS='-DHAS_PCRE -DUSE_TLS \
-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"' \
AUXLIBS="-lpcre -lssl -lcrypto -ldl -lz"

#!/bin/bash
#
make -f Makefile.init makefiles \
OPT="-O2 -march=pentium3" \
CCARGS='-DHAS_PCRE -DUSE_TLS -DHAS_LDAP \
-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"' \
AUXLIBS="-lpcre -lssl -lcrypto -ldl -lz -lldap -llber"

#!/bin/bash
#
make -f Makefile.init makefiles \
OPT="-O2 -march=pentium3" \
CCARGS="-DHAS_PCRE -DUSE_TLS -DHAS_LDAP \
-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
AUXLIBS="-lpcre -lssl -lcrypto -ldl -lz -lldap -llber -lsasl2"

#!/bin/bash
#
make -f Makefile.init makefiles \
OPT="-O2 -march=pentium3" \
CCARGS='-DHAS_PCRE -DUSE_TLS \
-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\" \
-DHAS_MYSQL -I/usr/local/include/mysql' \
AUXLIBS="-lpcre -lssl -lcrypto -ldl -lz \
-L/usr/local/lib/mysql -lmysqlclient -lm"

#!/bin/bash
#
make -f Makefile.init makefiles \
OPT="-O2 -march=pentium3" \
CCARGS="-DHAS_PCRE -DUSE_TLS \
-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl \
-DHAS_MYSQL -I/usr/local/include/mysql" \
AUXLIBS="-lpcre -lssl -lcrypto -ldl -lz -lsasl2 \
-L/usr/local/lib/mysql -lmysqlclient -lm"

○ Copyright(c) 528p.com All Rights Reserved.