hi tom,

getting it built on osx 10.4.10 w/ an external openssl ...

cd /build/libdkim-1.0.15-tk/src

perl -pi -e 's/^LIBS.*=.*$/LIBS    = -L\/usr\/local\/ssl\/lib
-lcrypto/g' Makefile
perl -pi -e 's/^INCL.*=.*$/INCL    = -I\/usr\/local\/ssl\/include/g'
   Makefile

make clean
make
        g++ -c -c dkim.cpp
        g++ -c -c dns.cpp
        dns.cpp: In function 'int _DNSGetPolicy(const char*, char*, int)':
        dns.cpp:56: error: 'PACKETSZ' was not declared in this scope
        dns.cpp:66: error: 'C_IN' was not declared in this scope
        dns.cpp:66: error: 'T_TXT' was not declared in this scope
        dns.cpp:66: error: 'answer' was not declared in this scope
        dns.cpp:81: error: 'HFIXEDSZ' was not declared in this scope
        dns.cpp:89: error: 'QFIXEDSZ' was not declared in this scope
        dns.cpp:101: error: 'RRFIXEDSZ' was not declared in this scope
        dns.cpp:105: error: 'RRFIXEDSZ' was not declared in this scope
        dns.cpp: In function 'int _DNSGetKey(const char*, char*, int)':
        dns.cpp:143: error: 'PACKETSZ' was not declared in this scope
        dns.cpp:154: error: 'C_IN' was not declared in this scope
        dns.cpp:154: error: 'T_TXT' was not declared in this scope
        dns.cpp:154: error: 'answer' was not declared in this scope
        dns.cpp:169: error: 'HFIXEDSZ' was not declared in this scope
        dns.cpp:177: error: 'QFIXEDSZ' was not declared in this scope
        dns.cpp:189: error: 'RRFIXEDSZ' was not declared in this scope
        dns.cpp:193: error: 'RRFIXEDSZ' was not declared in this scope
        make: *** [dns.o] Error 1

# cref: http://en.wikipedia.org/wiki/OpenSSL#FIPS_140-2_compliance
perl -pi -e 's/^CFLAGS.*=.*$/CFLAGS  = -c -DBIND_8_COMPAT
-DOPENSSL_FIPS/g' Makefile

make clean
make
        g++ -c -DBIND_8_COMPAT -DOPENSSL_FIPS -c dkim.cpp
        g++ -c -DBIND_8_COMPAT -DOPENSSL_FIPS -c dns.cpp
        g++ -c -DBIND_8_COMPAT -DOPENSSL_FIPS -c dkimbase.cpp
        g++ -c -DBIND_8_COMPAT -DOPENSSL_FIPS -c dkimsign.cpp
        g++ -c -DBIND_8_COMPAT -DOPENSSL_FIPS -c dkimverify.cpp
        dkimverify.cpp: In member function 'int SelectorInfo::Parse(char*)':
        dkimverify.cpp:1202: error: invalid conversion from 'const unsigned
char**' to 'unsigned char**'
        dkimverify.cpp:1202: error:   initializing argument 2 of 'EVP_PKEY*
d2i_PUBKEY(EVP_PKEY**, unsigned char**, long int)'
        make: *** [dkimverify.o] Error 1

hm? aha ...

perl -pi -e 's/^.*g\+\+.*\$\(CFLAGS\).*$/\tg\+\+ \$\(CFLAGS\)
\$\(INCL\) -c \$\</g' Makefile

make clean
make
make install
ls -al ../lib/libdkim.a ../include/dkim.h
        -rw-r--r-- 1 root 1000   7762 Sep 28 08:09 ../include/dkim.h
        -rw-r--r-- 1 root 1000 360804 Sep 28 08:09 ../lib/libdkim.a


so, in summary,

diff -ur MakefileORIG Makefile
        ===================================================================
        --- MakefileORIG        2007-09-28 08:11:01.000000000 -0700
        +++ Makefile    2007-09-28 08:11:23.000000000 -0700
        @@ -1,11 +1,11 @@
         # libdkim makefile for UNIX
        
         #
        
        
        
        -CFLAGS  = -c
        
        +CFLAGS  = -c -DBIND_8_COMPAT -DOPENSSL_FIPS
         LFLAGS  =
        
        -LIBS    = -lcrypto -lresolv
        
        +LIBS    = -L/usr/local/ssl/lib -lcrypto
        
        
        -INCL   = -I /usr/include/openssl/
        
        +INCL    = -I/usr/local/ssl/include
        
        
         SRCS = dkim.cpp dns.cpp dkimbase.cpp dkimsign.cpp dkimverify.cpp
        
        
        
        @@ -21,7 +21,7 @@
                ranlib libdkim.a
        
        
        
         .cpp.o:
        
        -       g++ $(CFLAGS) -c $<
        
        +       g++ $(CFLAGS) $(INCL) -c $<
        
        
         clean:
        
                rm  *.o libdkim.a
        ===================================================================

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to