~mterry/ubuntu/natty/libofx/libofx.new-upstream-benoit-sru

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Saïvann Carignan
  • Date: 2008-02-06 17:25:16 UTC
  • mto: (3.1.2 lenny)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20080206172516-bnzxb29igye8um9h
Tags: upstream-0.9.0
Import upstream version 0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
# FUNCTION:
9
9
# implements checks for a variety of system-specific functions
10
10
 
11
 
AC_INIT(inc/libofx.h)
 
11
AC_INIT(inc/libofx.h.in)
12
12
AM_CONFIG_HEADER(config.h)
13
13
AC_CONFIG_AUX_DIR(config)
14
14
AC_PROG_CC
18
18
m4_include([libcurl.m4])
19
19
 
20
20
LIBOFX_MAJOR_VERSION=0
21
 
LIBOFX_MINOR_VERSION=8
22
 
LIBOFX_MICRO_VERSION=2
 
21
LIBOFX_MINOR_VERSION=9
 
22
LIBOFX_MICRO_VERSION=0
 
23
# this number is just incremented for every major change in CVS, also across
 
24
# releases to emulate the Revision variable of SVN (which isn't available
 
25
# with CVS)
 
26
LIBOFX_BUILD_VERSION=0
 
27
LIBOFX_TAG_VERSION="stable"
 
28
 
 
29
case "$LIBOFX_TAG_VERSION" in
 
30
  cvs|svn)
 
31
     LIBOFX_VERSION_RELEASE_STRING="$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION.r${LIBOFX_BUILD_VERSION}"
 
32
     ;;
 
33
  stable)
 
34
     LIBOFX_VERSION_RELEASE_STRING="$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION"
 
35
     ;;
 
36
  *)
 
37
     LIBOFX_VERSION_RELEASE_STRING="$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION"
 
38
     
 
39
     # add TAG
 
40
     LIBOFX_VERSION_RELEASE_STRING="${LIBOFX_VERSION_RELEASE_STRING}${GWENHYWFAR_VERSION_TAG}"
 
41
     ;;
 
42
esac
 
43
 
 
44
 
23
45
LIBOFX_VERSION=$LIBOFX_MAJOR_VERSION.$LIBOFX_MINOR_VERSION.$LIBOFX_MICRO_VERSION
24
46
 
25
47
AC_SUBST(LIBOFX_MAJOR_VERSION)
26
48
AC_SUBST(LIBOFX_MINOR_VERSION)
27
49
AC_SUBST(LIBOFX_MICRO_VERSION)
 
50
AC_SUBST(LIBOFX_BUILD_VERSION)
 
51
AC_SUBST(LIBOFX_VERSION_RELEASE_STRING)
28
52
AC_SUBST(LIBOFX_VERSION)
29
 
AM_INIT_AUTOMAKE(libofx,$LIBOFX_VERSION)
 
53
AM_INIT_AUTOMAKE(libofx,$LIBOFX_VERSION_RELEASE_STRING)
30
54
 
31
 
LIBOFX_SO_CURRENT=3
 
55
LIBOFX_SO_CURRENT=4
32
56
LIBOFX_SO_REVISION=0
33
57
LIBOFX_SO_AGE=0
34
58
LIBOFX_SO_EFFECTIVE="`echo \$(($LIBOFX_SO_CURRENT-$LIBOFX_SO_AGE))`"
41
65
AC_PROG_INSTALL
42
66
 
43
67
AC_LIBTOOL_DLOPEN
 
68
AC_LIBTOOL_WIN32_DLL
 
69
AC_LIBTOOL_RC
44
70
AM_PROG_LIBTOOL
45
71
 
46
72
AC_ISC_POSIX
48
74
AC_PROG_MAKE_SET
49
75
AC_HEADER_STDC
50
76
 
 
77
AQ_CHECK_OS
 
78
 
 
79
 
51
80
AC_ARG_WITH(opensp-includes, 
52
81
[  --with-opensp-includes=PATH     specify where to look for OpenSP includes  
53
82
                                  - default is /usr/include/OpenSP)],
72
101
    fi
73
102
done
74
103
 
75
 
 
76
104
##Detect if OpenSP was compiled with SP_MULTI_BYTE, and put the result in config.h
77
105
##
78
106
 
273
301
        fi
274
302
fi
275
303
AM_CONDITIONAL([BUILD_OFXCONNECT], [test "$build_ofxconnect" = yes])
 
304
 
 
305
# check for iconv
 
306
# ----------------------------------------------------------------------------
 
307
 
 
308
AC_ARG_WITH(iconv,
 
309
[  --with-iconv[[=DIR]]      add ICONV support (on)])
 
310
 
 
311
WITH_ICONV=0
 
312
if test "$with_iconv" = "no" ; then
 
313
    echo Disabling ICONV support
 
314
else
 
315
    if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then
 
316
        CPPFLAGS="${CPPFLAGS} -I$with_iconv/include"
 
317
        # Export this since our headers include iconv.h
 
318
        XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include"
 
319
        ICONV_LIBS="-L$with_iconv/lib"
 
320
    fi
 
321
 
 
322
    AC_CHECK_HEADER(iconv.h,
 
323
        AC_MSG_CHECKING(for iconv)
 
324
        AC_TRY_LINK([#include <stdlib.h>
 
325
#include <iconv.h>],[
 
326
iconv_t cd = iconv_open ("","");
 
327
iconv (cd, NULL, NULL, NULL, NULL);],[
 
328
            AC_MSG_RESULT(yes)
 
329
            WITH_ICONV=1],[
 
330
            AC_MSG_RESULT(no)
 
331
            AC_MSG_CHECKING(for iconv in -liconv)
 
332
 
 
333
            _ldflags="${LDFLAGS}"
 
334
            _libs="${LIBS}"
 
335
            LDFLAGS="${LDFLAGS} ${ICONV_LIBS}"
 
336
            LIBS="${LIBS} -liconv"
 
337
 
 
338
            AC_TRY_LINK([#include <stdlib.h>
 
339
#include <iconv.h>],[
 
340
iconv_t cd = iconv_open ("","");
 
341
iconv (cd, NULL, NULL, NULL, NULL);],[
 
342
                AC_MSG_RESULT(yes)
 
343
                WITH_ICONV=1
 
344
                ICONV_LIBS="${ICONV_LIBS} -liconv"
 
345
                LIBS="${_libs}"
 
346
                LDFLAGS="${_ldflags}"],[
 
347
                AC_MSG_RESULT(no)
 
348
                LIBS="${_libs}"
 
349
                LDFLAGS="${_ldflags}"])]))
 
350
fi
 
351
AC_DEFINE_UNQUOTED(HAVE_ICONV, $WITH_ICONV, [Defined if libxml++ is available])
 
352
 
 
353
AC_SUBST(WITH_ICONV)
 
354
AC_SUBST(ICONV_LIBS)
276
355
AC_SUBST(ofxconnect)
277
356
AC_SUBST(OPENSPINCLUDES)
278
357
AC_SUBST(OPENSPLIBS)
288
367
AC_OUTPUT(              
289
368
                        libofx.spec
290
369
                        libofx.pc
 
370
                        m4/Makefile
291
371
                        lib/Makefile
292
372
                        inc/Makefile
 
373
                        inc/libofx.h
293
374
                        dtd/Makefile
294
375
                        doc/Makefile
295
376
                        ofx2qif/Makefile