Revision a1de4e94

View differences:

Makefile.in
47 47
AUTOHEADER = @AUTOHEADER@
48 48
AUTOMAKE = @AUTOMAKE@
49 49
AWK = @AWK@
50
BUILTIN_LIBSYLPH_FALSE = @BUILTIN_LIBSYLPH_FALSE@
51
BUILTIN_LIBSYLPH_TRUE = @BUILTIN_LIBSYLPH_TRUE@
50 52
CC = @CC@
51 53
CCDEPMODE = @CCDEPMODE@
52 54
CFLAGS = @CFLAGS@
......
83 85
LIBICONV = @LIBICONV@
84 86
LIBOBJS = @LIBOBJS@
85 87
LIBS = @LIBS@
88
LIBSYLPH_LIBS = @LIBSYLPH_LIBS@
86 89
LIBTOOL = @LIBTOOL@
87 90
LN_S = @LN_S@
88 91
LTLIBICONV = @LTLIBICONV@
......
143 146
install_sh = @install_sh@
144 147
libdir = @libdir@
145 148
libexecdir = @libexecdir@
149
libsylph_type = @libsylph_type@
146 150
localedir = @localedir@
147 151
localstatedir = @localstatedir@
148 152
mandir = @mandir@
config.h.in
1 1
/* config.h.in.  Generated from configure.ac by autoheader.  */
2 2

  
3
/* Define if you use built-in LibSylph. */
4
#undef BUILTIN_LIBSYLPH
5

  
3 6
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
4 7
   */
5 8
#undef HAVE_DIRENT_H
configure
886 886
QDBM_CFLAGS
887 887
QDBM_LIBS
888 888
GDBM_LIBS
889
libsylph_type
890
LIBSYLPH_LIBS
891
BUILTIN_LIBSYLPH_TRUE
892
BUILTIN_LIBSYLPH_FALSE
889 893
LIBICONV
890 894
LTLIBICONV
891 895
LIBOBJS
......
1510 1514
  --with-pic              try to use only PIC/non-PIC objects [default=use
1511 1515
                          both]
1512 1516
  --with-tags[=TAGS]      include additional configurations [automatic]
1517
  --with-libsylph=[builtin/standalone/sylpheed]  select LibSylph to use
1518
  --with-libsylph-dir=DIR search for LibSylph in DIR/include and DIR/lib
1513 1519
  --with-gnu-ld           assume the C compiler uses GNU ld default=no
1514 1520
  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
1515 1521
  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
......
4408 4414
  ;;
4409 4415
*-*-irix6*)
4410 4416
  # Find out which ABI we are using.
4411
  echo '#line 4411 "configure"' > conftest.$ac_ext
4417
  echo '#line 4417 "configure"' > conftest.$ac_ext
4412 4418
  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4413 4419
  (eval $ac_compile) 2>&5
4414 4420
  ac_status=$?
......
7454 7460
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7455 7461
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7456 7462
   -e 's:$: $lt_compiler_flag:'`
7457
   (eval echo "\"\$as_me:7457: $lt_compile\"" >&5)
7463
   (eval echo "\"\$as_me:7463: $lt_compile\"" >&5)
7458 7464
   (eval "$lt_compile" 2>conftest.err)
7459 7465
   ac_status=$?
7460 7466
   cat conftest.err >&5
7461
   echo "$as_me:7461: \$? = $ac_status" >&5
7467
   echo "$as_me:7467: \$? = $ac_status" >&5
7462 7468
   if (exit $ac_status) && test -s "$ac_outfile"; then
7463 7469
     # The compiler can only warn and ignore the option if not recognized
7464 7470
     # So say no if there are warnings other than the usual output.
......
7744 7750
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7745 7751
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7746 7752
   -e 's:$: $lt_compiler_flag:'`
7747
   (eval echo "\"\$as_me:7747: $lt_compile\"" >&5)
7753
   (eval echo "\"\$as_me:7753: $lt_compile\"" >&5)
7748 7754
   (eval "$lt_compile" 2>conftest.err)
7749 7755
   ac_status=$?
7750 7756
   cat conftest.err >&5
7751
   echo "$as_me:7751: \$? = $ac_status" >&5
7757
   echo "$as_me:7757: \$? = $ac_status" >&5
7752 7758
   if (exit $ac_status) && test -s "$ac_outfile"; then
7753 7759
     # The compiler can only warn and ignore the option if not recognized
7754 7760
     # So say no if there are warnings other than the usual output.
......
7848 7854
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7849 7855
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7850 7856
   -e 's:$: $lt_compiler_flag:'`
7851
   (eval echo "\"\$as_me:7851: $lt_compile\"" >&5)
7857
   (eval echo "\"\$as_me:7857: $lt_compile\"" >&5)
7852 7858
   (eval "$lt_compile" 2>out/conftest.err)
7853 7859
   ac_status=$?
7854 7860
   cat out/conftest.err >&5
7855
   echo "$as_me:7855: \$? = $ac_status" >&5
7861
   echo "$as_me:7861: \$? = $ac_status" >&5
7856 7862
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
7857 7863
   then
7858 7864
     # The compiler can only warn and ignore the option if not recognized
......
10225 10231
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10226 10232
  lt_status=$lt_dlunknown
10227 10233
  cat > conftest.$ac_ext <<EOF
10228
#line 10228 "configure"
10234
#line 10234 "configure"
10229 10235
#include "confdefs.h"
10230 10236

  
10231 10237
#if HAVE_DLFCN_H
......
10325 10331
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10326 10332
  lt_status=$lt_dlunknown
10327 10333
  cat > conftest.$ac_ext <<EOF
10328
#line 10328 "configure"
10334
#line 10334 "configure"
10329 10335
#include "confdefs.h"
10330 10336

  
10331 10337
#if HAVE_DLFCN_H
......
12726 12732
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12727 12733
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12728 12734
   -e 's:$: $lt_compiler_flag:'`
12729
   (eval echo "\"\$as_me:12729: $lt_compile\"" >&5)
12735
   (eval echo "\"\$as_me:12735: $lt_compile\"" >&5)
12730 12736
   (eval "$lt_compile" 2>conftest.err)
12731 12737
   ac_status=$?
12732 12738
   cat conftest.err >&5
12733
   echo "$as_me:12733: \$? = $ac_status" >&5
12739
   echo "$as_me:12739: \$? = $ac_status" >&5
12734 12740
   if (exit $ac_status) && test -s "$ac_outfile"; then
12735 12741
     # The compiler can only warn and ignore the option if not recognized
12736 12742
     # So say no if there are warnings other than the usual output.
......
12830 12836
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12831 12837
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12832 12838
   -e 's:$: $lt_compiler_flag:'`
12833
   (eval echo "\"\$as_me:12833: $lt_compile\"" >&5)
12839
   (eval echo "\"\$as_me:12839: $lt_compile\"" >&5)
12834 12840
   (eval "$lt_compile" 2>out/conftest.err)
12835 12841
   ac_status=$?
12836 12842
   cat out/conftest.err >&5
12837
   echo "$as_me:12837: \$? = $ac_status" >&5
12843
   echo "$as_me:12843: \$? = $ac_status" >&5
12838 12844
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
12839 12845
   then
12840 12846
     # The compiler can only warn and ignore the option if not recognized
......
14428 14434
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14429 14435
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14430 14436
   -e 's:$: $lt_compiler_flag:'`
14431
   (eval echo "\"\$as_me:14431: $lt_compile\"" >&5)
14437
   (eval echo "\"\$as_me:14437: $lt_compile\"" >&5)
14432 14438
   (eval "$lt_compile" 2>conftest.err)
14433 14439
   ac_status=$?
14434 14440
   cat conftest.err >&5
14435
   echo "$as_me:14435: \$? = $ac_status" >&5
14441
   echo "$as_me:14441: \$? = $ac_status" >&5
14436 14442
   if (exit $ac_status) && test -s "$ac_outfile"; then
14437 14443
     # The compiler can only warn and ignore the option if not recognized
14438 14444
     # So say no if there are warnings other than the usual output.
......
14532 14538
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14533 14539
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14534 14540
   -e 's:$: $lt_compiler_flag:'`
14535
   (eval echo "\"\$as_me:14535: $lt_compile\"" >&5)
14541
   (eval echo "\"\$as_me:14541: $lt_compile\"" >&5)
14536 14542
   (eval "$lt_compile" 2>out/conftest.err)
14537 14543
   ac_status=$?
14538 14544
   cat out/conftest.err >&5
14539
   echo "$as_me:14539: \$? = $ac_status" >&5
14545
   echo "$as_me:14545: \$? = $ac_status" >&5
14540 14546
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
14541 14547
   then
14542 14548
     # The compiler can only warn and ignore the option if not recognized
......
16752 16758
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16753 16759
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16754 16760
   -e 's:$: $lt_compiler_flag:'`
16755
   (eval echo "\"\$as_me:16755: $lt_compile\"" >&5)
16761
   (eval echo "\"\$as_me:16761: $lt_compile\"" >&5)
16756 16762
   (eval "$lt_compile" 2>conftest.err)
16757 16763
   ac_status=$?
16758 16764
   cat conftest.err >&5
16759
   echo "$as_me:16759: \$? = $ac_status" >&5
16765
   echo "$as_me:16765: \$? = $ac_status" >&5
16760 16766
   if (exit $ac_status) && test -s "$ac_outfile"; then
16761 16767
     # The compiler can only warn and ignore the option if not recognized
16762 16768
     # So say no if there are warnings other than the usual output.
......
17042 17048
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17043 17049
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17044 17050
   -e 's:$: $lt_compiler_flag:'`
17045
   (eval echo "\"\$as_me:17045: $lt_compile\"" >&5)
17051
   (eval echo "\"\$as_me:17051: $lt_compile\"" >&5)
17046 17052
   (eval "$lt_compile" 2>conftest.err)
17047 17053
   ac_status=$?
17048 17054
   cat conftest.err >&5
17049
   echo "$as_me:17049: \$? = $ac_status" >&5
17055
   echo "$as_me:17055: \$? = $ac_status" >&5
17050 17056
   if (exit $ac_status) && test -s "$ac_outfile"; then
17051 17057
     # The compiler can only warn and ignore the option if not recognized
17052 17058
     # So say no if there are warnings other than the usual output.
......
17146 17152
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17147 17153
   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17148 17154
   -e 's:$: $lt_compiler_flag:'`
17149
   (eval echo "\"\$as_me:17149: $lt_compile\"" >&5)
17155
   (eval echo "\"\$as_me:17155: $lt_compile\"" >&5)
17150 17156
   (eval "$lt_compile" 2>out/conftest.err)
17151 17157
   ac_status=$?
17152 17158
   cat out/conftest.err >&5
17153
   echo "$as_me:17153: \$? = $ac_status" >&5
17159
   echo "$as_me:17159: \$? = $ac_status" >&5
17154 17160
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
17155 17161
   then
17156 17162
     # The compiler can only warn and ignore the option if not recognized
......
20577 20583
	fi
20578 20584
fi
20579 20585

  
20586
# LibSylph type
20587
libsylph_type=builtin
20588

  
20589

  
20590
# Check whether --with-libsylph was given.
20591
if test "${with_libsylph+set}" = set; then
20592
  withval=$with_libsylph; libsylph_type=$with_libsylph
20593
fi
20594

  
20595

  
20596

  
20597
# Check whether --with-libsylph-dir was given.
20598
if test "${with_libsylph_dir+set}" = set; then
20599
  withval=$with_libsylph_dir; if test "x$with_libsylph_dir" != x; then
20600
	    LDFLAGS="$LDFLAGS -L$with_libsylph_dir/lib"
20601
	fi
20602
fi
20603

  
20604

  
20605

  
20606

  
20607
case $libsylph_type in
20608
builtin)
20609

  
20610
cat >>confdefs.h <<\_ACEOF
20611
#define BUILTIN_LIBSYLPH 1
20612
_ACEOF
20613

  
20614
	;;
20615
standalone)
20616
	{ echo "$as_me:$LINENO: checking for syl_init in -lsylph" >&5
20617
echo $ECHO_N "checking for syl_init in -lsylph... $ECHO_C" >&6; }
20618
if test "${ac_cv_lib_sylph_syl_init+set}" = set; then
20619
  echo $ECHO_N "(cached) $ECHO_C" >&6
20620
else
20621
  ac_check_lib_save_LIBS=$LIBS
20622
LIBS="-lsylph  $LIBS"
20623
cat >conftest.$ac_ext <<_ACEOF
20624
/* confdefs.h.  */
20625
_ACEOF
20626
cat confdefs.h >>conftest.$ac_ext
20627
cat >>conftest.$ac_ext <<_ACEOF
20628
/* end confdefs.h.  */
20629

  
20630
/* Override any GCC internal prototype to avoid an error.
20631
   Use char because int might match the return type of a GCC
20632
   builtin and then its argument prototype would still apply.  */
20633
#ifdef __cplusplus
20634
extern "C"
20635
#endif
20636
char syl_init ();
20637
int
20638
main ()
20639
{
20640
return syl_init ();
20641
  ;
20642
  return 0;
20643
}
20644
_ACEOF
20645
rm -f conftest.$ac_objext conftest$ac_exeext
20646
if { (ac_try="$ac_link"
20647
case "(($ac_try" in
20648
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20649
  *) ac_try_echo=$ac_try;;
20650
esac
20651
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20652
  (eval "$ac_link") 2>conftest.er1
20653
  ac_status=$?
20654
  grep -v '^ *+' conftest.er1 >conftest.err
20655
  rm -f conftest.er1
20656
  cat conftest.err >&5
20657
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
20658
  (exit $ac_status); } && {
20659
	 test -z "$ac_c_werror_flag" ||
20660
	 test ! -s conftest.err
20661
       } && test -s conftest$ac_exeext &&
20662
       $as_test_x conftest$ac_exeext; then
20663
  ac_cv_lib_sylph_syl_init=yes
20664
else
20665
  echo "$as_me: failed program was:" >&5
20666
sed 's/^/| /' conftest.$ac_ext >&5
20667

  
20668
	ac_cv_lib_sylph_syl_init=no
20669
fi
20670

  
20671
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20672
      conftest$ac_exeext conftest.$ac_ext
20673
LIBS=$ac_check_lib_save_LIBS
20674
fi
20675
{ echo "$as_me:$LINENO: result: $ac_cv_lib_sylph_syl_init" >&5
20676
echo "${ECHO_T}$ac_cv_lib_sylph_syl_init" >&6; }
20677
if test $ac_cv_lib_sylph_syl_init = yes; then
20678
  LIBSYLPH_LIBS="-lsylph"
20679
else
20680
  { { echo "$as_me:$LINENO: error: Test for LibSylph (standalone) failed." >&5
20681
echo "$as_me: error: Test for LibSylph (standalone) failed." >&2;}
20682
   { (exit 1); exit 1; }; }
20683
fi
20684

  
20685
	if test "x$with_libsylph_dir" != x; then
20686
		CPPFLAGS="$CPPFLAGS -I$with_libsylph_dir/include"
20687
	fi
20688
	;;
20689
sylpheed)
20690
	{ echo "$as_me:$LINENO: checking for syl_init in -lsylph-0" >&5
20691
echo $ECHO_N "checking for syl_init in -lsylph-0... $ECHO_C" >&6; }
20692
if test "${ac_cv_lib_sylph_0_syl_init+set}" = set; then
20693
  echo $ECHO_N "(cached) $ECHO_C" >&6
20694
else
20695
  ac_check_lib_save_LIBS=$LIBS
20696
LIBS="-lsylph-0  $LIBS"
20697
cat >conftest.$ac_ext <<_ACEOF
20698
/* confdefs.h.  */
20699
_ACEOF
20700
cat confdefs.h >>conftest.$ac_ext
20701
cat >>conftest.$ac_ext <<_ACEOF
20702
/* end confdefs.h.  */
20703

  
20704
/* Override any GCC internal prototype to avoid an error.
20705
   Use char because int might match the return type of a GCC
20706
   builtin and then its argument prototype would still apply.  */
20707
#ifdef __cplusplus
20708
extern "C"
20709
#endif
20710
char syl_init ();
20711
int
20712
main ()
20713
{
20714
return syl_init ();
20715
  ;
20716
  return 0;
20717
}
20718
_ACEOF
20719
rm -f conftest.$ac_objext conftest$ac_exeext
20720
if { (ac_try="$ac_link"
20721
case "(($ac_try" in
20722
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20723
  *) ac_try_echo=$ac_try;;
20724
esac
20725
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20726
  (eval "$ac_link") 2>conftest.er1
20727
  ac_status=$?
20728
  grep -v '^ *+' conftest.er1 >conftest.err
20729
  rm -f conftest.er1
20730
  cat conftest.err >&5
20731
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
20732
  (exit $ac_status); } && {
20733
	 test -z "$ac_c_werror_flag" ||
20734
	 test ! -s conftest.err
20735
       } && test -s conftest$ac_exeext &&
20736
       $as_test_x conftest$ac_exeext; then
20737
  ac_cv_lib_sylph_0_syl_init=yes
20738
else
20739
  echo "$as_me: failed program was:" >&5
20740
sed 's/^/| /' conftest.$ac_ext >&5
20741

  
20742
	ac_cv_lib_sylph_0_syl_init=no
20743
fi
20744

  
20745
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20746
      conftest$ac_exeext conftest.$ac_ext
20747
LIBS=$ac_check_lib_save_LIBS
20748
fi
20749
{ echo "$as_me:$LINENO: result: $ac_cv_lib_sylph_0_syl_init" >&5
20750
echo "${ECHO_T}$ac_cv_lib_sylph_0_syl_init" >&6; }
20751
if test $ac_cv_lib_sylph_0_syl_init = yes; then
20752
  LIBSYLPH_LIBS="-lsylph-0"
20753
else
20754
  { { echo "$as_me:$LINENO: error: Test for LibSylph (Sylpheed-included) failed." >&5
20755
echo "$as_me: error: Test for LibSylph (Sylpheed-included) failed." >&2;}
20756
   { (exit 1); exit 1; }; }
20757
fi
20758

  
20759
	if test "x$with_libsylph_dir" != x; then
20760
		CPPFLAGS="$CPPFLAGS -I$with_libsylph_dir/include/sylpheed"
20761
	fi
20762
	;;
20763
*) { { echo "$as_me:$LINENO: error: Invalid type for LibSylph: use builtin, standalone, or sylpheed." >&5
20764
echo "$as_me: error: Invalid type for LibSylph: use builtin, standalone, or sylpheed." >&2;}
20765
   { (exit 1); exit 1; }; } ;;
20766
esac
20767

  
20768

  
20769

  
20770

  
20771

  
20772
if test "$libsylph_type" = "builtin"; then
20773
  BUILTIN_LIBSYLPH_TRUE=
20774
  BUILTIN_LIBSYLPH_FALSE='#'
20775
else
20776
  BUILTIN_LIBSYLPH_TRUE='#'
20777
  BUILTIN_LIBSYLPH_FALSE=
20778
fi
20779

  
20780

  
20580 20781
# Checks for iconv
20581 20782

  
20582 20783
      if test "X$prefix" = "XNONE"; then
......
22273 22474
Usually this means the macro was only invoked conditionally." >&2;}
22274 22475
   { (exit 1); exit 1; }; }
22275 22476
fi
22477
if test -z "${BUILTIN_LIBSYLPH_TRUE}" && test -z "${BUILTIN_LIBSYLPH_FALSE}"; then
22478
  { { echo "$as_me:$LINENO: error: conditional \"BUILTIN_LIBSYLPH\" was never defined.
22479
Usually this means the macro was only invoked conditionally." >&5
22480
echo "$as_me: error: conditional \"BUILTIN_LIBSYLPH\" was never defined.
22481
Usually this means the macro was only invoked conditionally." >&2;}
22482
   { (exit 1); exit 1; }; }
22483
fi
22276 22484

  
22277 22485
: ${CONFIG_STATUS=./config.status}
22278 22486
ac_clean_files_save=$ac_clean_files
......
22968 23176
QDBM_CFLAGS!$QDBM_CFLAGS$ac_delim
22969 23177
QDBM_LIBS!$QDBM_LIBS$ac_delim
22970 23178
GDBM_LIBS!$GDBM_LIBS$ac_delim
23179
libsylph_type!$libsylph_type$ac_delim
23180
LIBSYLPH_LIBS!$LIBSYLPH_LIBS$ac_delim
23181
BUILTIN_LIBSYLPH_TRUE!$BUILTIN_LIBSYLPH_TRUE$ac_delim
23182
BUILTIN_LIBSYLPH_FALSE!$BUILTIN_LIBSYLPH_FALSE$ac_delim
22971 23183
LIBICONV!$LIBICONV$ac_delim
22972 23184
LTLIBICONV!$LTLIBICONV$ac_delim
22973 23185
LIBOBJS!$LIBOBJS$ac_delim
22974 23186
LTLIBOBJS!$LTLIBOBJS$ac_delim
22975 23187
_ACEOF
22976 23188

  
22977
  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then
23189
  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then
22978 23190
    break
22979 23191
  elif $ac_last_try; then
22980 23192
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
configure.ac
95 95
	fi
96 96
fi
97 97

  
98
# LibSylph type
99
libsylph_type=builtin
100

  
101
AC_ARG_WITH(libsylph,
102
	[  --with-libsylph=[[builtin/standalone/sylpheed]]  select LibSylph to use],
103
	libsylph_type=$with_libsylph)
104

  
105
AC_ARG_WITH(libsylph-dir,
106
	[AC_HELP_STRING([--with-libsylph-dir=DIR], [search for LibSylph in DIR/include and DIR/lib])],
107
	[if test "x$with_libsylph_dir" != x; then
108
	    LDFLAGS="$LDFLAGS -L$with_libsylph_dir/lib"
109
	fi])
110

  
111
AC_SUBST(libsylph_type)
112

  
113
case $libsylph_type in
114
builtin)
115
	AC_DEFINE(BUILTIN_LIBSYLPH, 1, Define if you use built-in LibSylph.)
116
	;;
117
standalone)
118
	AC_CHECK_LIB(sylph, syl_init, LIBSYLPH_LIBS="-lsylph", AC_MSG_ERROR(Test for LibSylph (standalone) failed.))
119
	if test "x$with_libsylph_dir" != x; then
120
		CPPFLAGS="$CPPFLAGS -I$with_libsylph_dir/include"
121
	fi
122
	;;
123
sylpheed)
124
	AC_CHECK_LIB(sylph-0, syl_init, LIBSYLPH_LIBS="-lsylph-0", AC_MSG_ERROR(Test for LibSylph (Sylpheed-included) failed.))
125
	if test "x$with_libsylph_dir" != x; then
126
		CPPFLAGS="$CPPFLAGS -I$with_libsylph_dir/include/sylpheed"
127
	fi
128
	;;
129
*) AC_MSG_ERROR([Invalid type for LibSylph: use builtin, standalone, or sylpheed.]) ;;
130
esac
131

  
132
AC_SUBST(LIBSYLPH_LIBS)
133

  
134
AM_CONDITIONAL(BUILTIN_LIBSYLPH, test "$libsylph_type" = "builtin")
135

  
98 136
# Checks for iconv
99 137
AM_ICONV
100 138

  
lib/Makefile.am
31 31
	$(SQLITE_LIBS) \
32 32
	$(GDBM_LIBS) \
33 33
	$(MATH_LIB) \
34
	filters/libfilters.la $(top_builddir)/libsylph/libsylph-builtin.la
34
	filters/libfilters.la \
35
	$(top_builddir)/libsylph/libsylph-builtin.la
lib/Makefile.in
47 47
AUTOHEADER = @AUTOHEADER@
48 48
AUTOMAKE = @AUTOMAKE@
49 49
AWK = @AWK@
50
BUILTIN_LIBSYLPH_FALSE = @BUILTIN_LIBSYLPH_FALSE@
51
BUILTIN_LIBSYLPH_TRUE = @BUILTIN_LIBSYLPH_TRUE@
50 52
CC = @CC@
51 53
CCDEPMODE = @CCDEPMODE@
52 54
CFLAGS = @CFLAGS@
......
83 85
LIBICONV = @LIBICONV@
84 86
LIBOBJS = @LIBOBJS@
85 87
LIBS = @LIBS@
88
LIBSYLPH_LIBS = @LIBSYLPH_LIBS@
86 89
LIBTOOL = @LIBTOOL@
87 90
LN_S = @LN_S@
88 91
LTLIBICONV = @LTLIBICONV@
......
143 146
install_sh = @install_sh@
144 147
libdir = @libdir@
145 148
libexecdir = @libexecdir@
149
libsylph_type = @libsylph_type@
146 150
localedir = @localedir@
147 151
localstatedir = @localstatedir@
148 152
mandir = @mandir@
......
195 199
	$(SQLITE_LIBS) \
196 200
	$(GDBM_LIBS) \
197 201
	$(MATH_LIB) \
198
	filters/libfilters.la $(top_builddir)/libsylph/libsylph-builtin.la
202
	filters/libfilters.la \
203
	$(top_builddir)/libsylph/libsylph-builtin.la
199 204

  
200 205
subdir = lib
201 206
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
lib/filter-utils.c
6 6

  
7 7
#include <glib.h>
8 8

  
9
#include "libsylph/utils.h"
9
#ifdef BUILTIN_LIBSYLPH
10
#  include "libsylph/utils.h"
11
#else
12
#  include <sylph/utils.h>
13
#endif
10 14

  
11 15
#ifdef G_OS_WIN32
12 16
#  include <windows.h>
lib/filters/Makefile.in
47 47
AUTOHEADER = @AUTOHEADER@
48 48
AUTOMAKE = @AUTOMAKE@
49 49
AWK = @AWK@
50
BUILTIN_LIBSYLPH_FALSE = @BUILTIN_LIBSYLPH_FALSE@
51
BUILTIN_LIBSYLPH_TRUE = @BUILTIN_LIBSYLPH_TRUE@
50 52
CC = @CC@
51 53
CCDEPMODE = @CCDEPMODE@
52 54
CFLAGS = @CFLAGS@
......
83 85
LIBICONV = @LIBICONV@
84 86
LIBOBJS = @LIBOBJS@
85 87
LIBS = @LIBS@
88
LIBSYLPH_LIBS = @LIBSYLPH_LIBS@
86 89
LIBTOOL = @LIBTOOL@
87 90
LN_S = @LN_S@
88 91
LTLIBICONV = @LTLIBICONV@
......
143 146
install_sh = @install_sh@
144 147
libdir = @libdir@
145 148
libexecdir = @libexecdir@
149
libsylph_type = @libsylph_type@
146 150
localedir = @localedir@
147 151
localstatedir = @localstatedir@
148 152
mandir = @mandir@
lib/filters/bayes-filter.c
16 16
#include "filter-utils.h"
17 17
#include "bayes-filter.h"
18 18

  
19
#include "libsylph/utils.h"
19
#ifdef BUILTIN_LIBSYLPH
20
#  include "libsylph/utils.h"
21
#else
22
#  include <sylph/utils.h>
23
#endif
20 24

  
21 25
#define N_TOKENS 15
22 26
#undef USE_STATUS_KVS
lib/filters/textcontent-filter.c
11 11
#include "filter.h"
12 12
#include "textcontent-filter.h"
13 13

  
14
#include "libsylph/procheader.h"
15
#include "libsylph/procmsg.h"
16
#include "libsylph/procmime.h"
17
#include "libsylph/utils.h"
14
#ifdef BUILTIN_LIBSYLPH
15
#  include "libsylph/procheader.h"
16
#  include "libsylph/procmsg.h"
17
#  include "libsylph/procmime.h"
18
#  include "libsylph/utils.h"
19
#else
20
#  include <sylph/procheader.h>
21
#  include <sylph/procmsg.h>
22
#  include <sylph/procmime.h>
23
#  include <sylph/utils.h>
24
#endif
18 25

  
19 26
#define IS_BASE64_CHR(c)			\
20 27
	((c >= '0' && c <= '9') ||		\
libsylph/Makefile.am
7 7

  
8 8
noinst_LTLIBRARIES = libsylph-builtin.la
9 9

  
10
if BUILTIN_LIBSYLPH
10 11
libsylph_builtin_la_SOURCES = \
11 12
	procheader.c procheader.h \
12 13
	procmsg.c procmsg.h \
......
19 20
	html.c html.h \
20 21
	utils.c utils.h \
21 22
	defs.h
23
else
24
libsylph_builtin_la_SOURCES =
25
endif
22 26

  
23
libsylph_builtin_la_LIBADD = $(GLIB_LIBS)
27
libsylph_builtin_la_LIBADD = $(GLIB_LIBS) $(LIBSYLPH_LIBS)
libsylph/Makefile.in
47 47
AUTOHEADER = @AUTOHEADER@
48 48
AUTOMAKE = @AUTOMAKE@
49 49
AWK = @AWK@
50
BUILTIN_LIBSYLPH_FALSE = @BUILTIN_LIBSYLPH_FALSE@
51
BUILTIN_LIBSYLPH_TRUE = @BUILTIN_LIBSYLPH_TRUE@
50 52
CC = @CC@
51 53
CCDEPMODE = @CCDEPMODE@
52 54
CFLAGS = @CFLAGS@
......
83 85
LIBICONV = @LIBICONV@
84 86
LIBOBJS = @LIBOBJS@
85 87
LIBS = @LIBS@
88
LIBSYLPH_LIBS = @LIBSYLPH_LIBS@
86 89
LIBTOOL = @LIBTOOL@
87 90
LN_S = @LN_S@
88 91
LTLIBICONV = @LTLIBICONV@
......
143 146
install_sh = @install_sh@
144 147
libdir = @libdir@
145 148
libexecdir = @libexecdir@
149
libsylph_type = @libsylph_type@
146 150
localedir = @localedir@
147 151
localstatedir = @localstatedir@
148 152
mandir = @mandir@
......
168 172
INCLUDES = $(GLIB_CFLAGS) -I$(top_srcdir) -I$(includedir)
169 173

  
170 174
noinst_LTLIBRARIES = libsylph-builtin.la
171

  
172
libsylph_builtin_la_SOURCES = \
173
	procheader.c procheader.h \
174
	procmsg.c procmsg.h \
175
	procmime.c procmime.h \
176
	codeconv.c codeconv.h \
177
	base64.c base64.h \
178
	quoted-printable.c quoted-printable.h \
179
	unmime.c unmime.h \
180
	uuencode.c uuencode.h \
181
	html.c html.h \
182
	utils.c utils.h \
183
	defs.h
184

  
185

  
186
libsylph_builtin_la_LIBADD = $(GLIB_LIBS)
175
@BUILTIN_LIBSYLPH_FALSE@libsylph_builtin_la_SOURCES = 
176

  
177
@BUILTIN_LIBSYLPH_TRUE@libsylph_builtin_la_SOURCES = \
178
@BUILTIN_LIBSYLPH_TRUE@	procheader.c procheader.h \
179
@BUILTIN_LIBSYLPH_TRUE@	procmsg.c procmsg.h \
180
@BUILTIN_LIBSYLPH_TRUE@	procmime.c procmime.h \
181
@BUILTIN_LIBSYLPH_TRUE@	codeconv.c codeconv.h \
182
@BUILTIN_LIBSYLPH_TRUE@	base64.c base64.h \
183
@BUILTIN_LIBSYLPH_TRUE@	quoted-printable.c quoted-printable.h \
184
@BUILTIN_LIBSYLPH_TRUE@	unmime.c unmime.h \
185
@BUILTIN_LIBSYLPH_TRUE@	uuencode.c uuencode.h \
186
@BUILTIN_LIBSYLPH_TRUE@	html.c html.h \
187
@BUILTIN_LIBSYLPH_TRUE@	utils.c utils.h \
188
@BUILTIN_LIBSYLPH_TRUE@	defs.h
189

  
190

  
191
libsylph_builtin_la_LIBADD = $(GLIB_LIBS) $(LIBSYLPH_LIBS)
187 192
subdir = libsylph
188 193
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
189 194
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
......
193 198

  
194 199
libsylph_builtin_la_LDFLAGS =
195 200
libsylph_builtin_la_DEPENDENCIES =
196
am_libsylph_builtin_la_OBJECTS = procheader.lo procmsg.lo procmime.lo \
197
	codeconv.lo base64.lo quoted-printable.lo unmime.lo uuencode.lo \
198
	html.lo utils.lo
201
am__libsylph_builtin_la_SOURCES_DIST = procheader.c procheader.h \
202
	procmsg.c procmsg.h procmime.c procmime.h codeconv.c codeconv.h \
203
	base64.c base64.h quoted-printable.c quoted-printable.h \
204
	unmime.c unmime.h uuencode.c uuencode.h html.c html.h utils.c \
205
	utils.h defs.h
206
@BUILTIN_LIBSYLPH_TRUE@am_libsylph_builtin_la_OBJECTS = procheader.lo \
207
@BUILTIN_LIBSYLPH_TRUE@	procmsg.lo procmime.lo codeconv.lo \
208
@BUILTIN_LIBSYLPH_TRUE@	base64.lo quoted-printable.lo unmime.lo \
209
@BUILTIN_LIBSYLPH_TRUE@	uuencode.lo html.lo utils.lo
210
@BUILTIN_LIBSYLPH_FALSE@am_libsylph_builtin_la_OBJECTS =
199 211
libsylph_builtin_la_OBJECTS = $(am_libsylph_builtin_la_OBJECTS)
200 212

  
201 213
DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
......
214 226
CCLD = $(CC)
215 227
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
216 228
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
217
DIST_SOURCES = $(libsylph_builtin_la_SOURCES)
229
DIST_SOURCES = $(am__libsylph_builtin_la_SOURCES_DIST)
218 230
DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
219 231
SOURCES = $(libsylph_builtin_la_SOURCES)
220 232

  
src/Makefile.in
47 47
AUTOHEADER = @AUTOHEADER@
48 48
AUTOMAKE = @AUTOMAKE@
49 49
AWK = @AWK@
50
BUILTIN_LIBSYLPH_FALSE = @BUILTIN_LIBSYLPH_FALSE@
51
BUILTIN_LIBSYLPH_TRUE = @BUILTIN_LIBSYLPH_TRUE@
50 52
CC = @CC@
51 53
CCDEPMODE = @CCDEPMODE@
52 54
CFLAGS = @CFLAGS@
......
83 85
LIBICONV = @LIBICONV@
84 86
LIBOBJS = @LIBOBJS@
85 87
LIBS = @LIBS@
88
LIBSYLPH_LIBS = @LIBSYLPH_LIBS@
86 89
LIBTOOL = @LIBTOOL@
87 90
LN_S = @LN_S@
88 91
LTLIBICONV = @LTLIBICONV@
......
143 146
install_sh = @install_sh@
144 147
libdir = @libdir@
145 148
libexecdir = @libexecdir@
149
libsylph_type = @libsylph_type@
146 150
localedir = @localedir@
147 151
localstatedir = @localstatedir@
148 152
mandir = @mandir@
test/Makefile.in
47 47
AUTOHEADER = @AUTOHEADER@
48 48
AUTOMAKE = @AUTOMAKE@
49 49
AWK = @AWK@
50
BUILTIN_LIBSYLPH_FALSE = @BUILTIN_LIBSYLPH_FALSE@
51
BUILTIN_LIBSYLPH_TRUE = @BUILTIN_LIBSYLPH_TRUE@
50 52
CC = @CC@
51 53
CCDEPMODE = @CCDEPMODE@
52 54
CFLAGS = @CFLAGS@
......
83 85
LIBICONV = @LIBICONV@
84 86
LIBOBJS = @LIBOBJS@
85 87
LIBS = @LIBS@
88
LIBSYLPH_LIBS = @LIBSYLPH_LIBS@
86 89
LIBTOOL = @LIBTOOL@
87 90
LN_S = @LN_S@
88 91
LTLIBICONV = @LTLIBICONV@
......
143 146
install_sh = @install_sh@
144 147
libdir = @libdir@
145 148
libexecdir = @libexecdir@
149
libsylph_type = @libsylph_type@
146 150
localedir = @localedir@
147 151
localstatedir = @localstatedir@
148 152
mandir = @mandir@

Also available in: Unified diff