A NOTE has been added to this issue. 
====================================================================== 
http://dbmail.org/mantis/view.php?id=331 
====================================================================== 
Reported By:                lkneschke
Assigned To:                
====================================================================== 
Project:                    DBMail
Issue ID:                   331
Category:                   General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             22-Apr-06 17:13 CEST
Last Modified:              24-Apr-06 00:36 CEST
====================================================================== 
Summary:                    Make DBMail compiling under Solaris
Description: 
DBMail is currently not compileable because of two easy fixeable problems.

First you need to include unistd.h instead of getopt.h. And there is no
strcasestr on Solaris available.

I have attached 2 patches. The getopt patch can be applied without
problems.

The strcasestr patch if more a prof of concept. I copied the code from
http://www.koders.com/c/fid798A0739421823ED85D3B691E2B8C20CA354D5C9.aspx .
I have not checked any license problems or if the code is really perfect.
But with this patch i'm able to compile DBMail under Solaris.
====================================================================== 

---------------------------------------------------------------------- 
 aaron - 23-Apr-06 23:12  
---------------------------------------------------------------------- 
We've managed to kill the replacement dm_getopt includes by leaving it out
of autoconf. We do, however, include unistd everywhere, so that confuses
me. Does the compile die with a complaint about getopt.h not found? Please
post the relevant messages.

I'll work on replacing strcasestr. I think the stupidest method might be
the best here: take the two strings, make them all-upper (or all-lower)
and run strstr as usual. 

---------------------------------------------------------------------- 
 lkneschke - 24-Apr-06 00:36  
---------------------------------------------------------------------- 
You were right. It simply complains about the missing file. It also
compiles if just comment out the the include statement. No need to include
unistd.h instead.

make[2]: Entering directory
`/m1/share/pkgbuild/MWdbmail/build/SunOS-5.9-sparc/dbmail-2.1.6/modules'
if /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I. -I.. -I..   -I/opt/local/include/mysql -fomit-frame-pointer
-DHAVE_CURSES_H -mcpu=ultrasparc   -I/usr/include -I/usr/local/include
-fomit-frame-pointer -O3 -Wall -I/opt/local/include -lresolv -Wl,--rpath
-Wl,opt/local/lib -DAUTHLDAP -DSIEVE -I/opt/local/include/glib-2.0
-I/opt/local/lib/glib-2.0/include   -I/opt/local/include/gmime-2.0
-I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include   -W -Wall
-Wpointer-arith -Wstrict-prototypes -MT sortnull.lo -MD -MP -MF
".deps/sortnull.Tpo" -c -o sortnull.lo sortnull.c; \
then mv -f ".deps/sortnull.Tpo" ".deps/sortnull.Plo"; else rm -f
".deps/sortnull.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/opt/local/include/mysql
-fomit-frame-pointer -DHAVE_CURSES_H -mcpu=ultrasparc -I/usr/include
-I/usr/local/include -fomit-frame-pointer -O3 -Wall -I/opt/local/include
-lresolv -Wl,--rpath -Wl,opt/local/lib -DAUTHLDAP -DSIEVE
-I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include
-I/opt/local/include/gmime-2.0 -I/opt/local/include/glib-2.0
-I/opt/local/lib/glib-2.0/include -W -Wall -Wpointer-arith
-Wstrict-prototypes -MT sortnull.lo -MD -MP -MF .deps/sortnull.Tpo -c
sortnull.c  -fPIC -DPIC -o .libs/sortnull.o
In file included from ../dbmail.h:99,
                 from sortnull.c:28:
../dm_getopt.h:31:22: getopt.h: No such file or directory
make[2]: *** [sortnull.lo] Error 1
make[2]: Leaving directory
`/m1/share/pkgbuild/MWdbmail/build/SunOS-5.9-sparc/dbmail-2.1.6/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/m1/share/pkgbuild/MWdbmail/build/SunOS-5.9-sparc/dbmail-2.1.6'
make: *** [all] Error 2 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
22-Apr-06 17:13 lkneschke      New Issue                                    
22-Apr-06 17:13 lkneschke      File Added: getopt_patch.diff                    
22-Apr-06 17:13 lkneschke      File Added: strcasestr_patch.diff                
   
23-Apr-06 23:12 aaron          Note Added: 0001093                          
24-Apr-06 00:36 lkneschke      Note Added: 0001096                          
======================================================================

Reply via email to