/rusxmms/librcc

To get this branch, use:
bzr branch http://suren.me/webbzr/rusxmms/librcc

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Suren A. Chilingaryan
  • Date: 2005-06-28 23:44:19 UTC
  • Revision ID: Arch-1:ds@dside.dyndns.org--darksoft-2004%librcc--main--0.1--patch-2
29.06.2005

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl Process this file with autoconf to produce a configure script.
2
2
AC_INIT(src/librcc.c)
 
3
AC_CONFIG_HEADERS(config.h)
3
4
 
4
5
PACKAGE=librcc
5
 
LIBRCC_VERSION_MAJOR=0
6
 
LIBRCC_VERSION_MINOR=1
7
 
LIBRCC_VERSION_SUBMINOR=0
 
6
LIBRCC_VERSION_MAJOR=`cat VERSION | sed -e s/CVS// | cut -d . -f 1 | sed -e s/^$/0/`
 
7
LIBRCC_VERSION_MINOR=`cat VERSION | sed -e s/CVS// | cut -d . -f 2 | sed -e s/^$/0/`
 
8
LIBRCC_VERSION_SUBMINOR=`cat VERSION | sed -e s/CVS// | cut -d . -f 3 | sed -e s/^$/0/`
8
9
LIBRCC_VERSION=$LIBRCC_VERSION_MAJOR.$LIBRCC_VERSION_MINOR.$LIBRCC_VERSION_SUBMINOR
9
10
VERSION=$LIBRCC_VERSION
10
11
LIBRCC_VERSION_INFO=`echo $LIBRCC_VERSION | awk -F. '{ printf "%d:%d:%d", $1+$2, $3, $2 }'`
27
28
 
28
29
dnl Checks for programs.
29
30
 
 
31
dnl Checks for header files.
 
32
AC_CHECK_HEADERS(iconv.h,, [AC_MSG_ERROR(Missing iconv header)])
 
33
AC_CHECK_HEADERS(mntent.h)
 
34
 
30
35
dnl Checks for libraries.
31
36
 
32
 
XML_LIBS=error
33
 
AC_CHECK_LIB(xml2, xmlDocDumpMemory, [
34
 
        XML_LIBS=`xml2-config --libs`
35
 
        XML_INCLUDES=`xml-config --cflags`
36
 
    ])
37
 
if test "x$XML_LIBS" = xerror; then
38
 
        AC_MSG_ERROR(*** Unable to locate LibXML2 ***)
 
37
AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
 
38
if test $XML2_CONFIG = no; then
 
39
    AC_MSG_ERROR(LibXML2 is required)
39
40
fi
 
41
XML_LIBS="\`xml2-config --libs\`"
 
42
XML_INCLUDES="\`xml-config --cflags\`"
40
43
AC_SUBST(XML_LIBS)
41
44
AC_SUBST(XML_INCLUDES)
42
45
 
43
 
dnl Checks for header files.
 
46
AC_CHECK_HEADER(librcd.h, [AC_CHECK_LIB(rcd, rcdGetRussianCharset, [
 
47
        RCD_LIBS="-lrcd"
 
48
        RCD_INCLUDES=""
 
49
], AC_MSG_ERROR(LibRCD is required))], [AC_MSG_ERROR(LibRCD is required)])
 
50
AC_SUBST(RCD_LIBS)
 
51
AC_SUBST(RCD_INCLUDES)
 
52
 
 
53
AC_CHECK_HEADER(enca.h, [AC_CHECK_LIB(enca, enca_analyse, [ 
 
54
    AC_DEFINE(HAVE_ENCA,1,[Defines if enca is available])
 
55
    ENCA_LIBS="-lenca"
 
56
    ENCA_INCLUDES=""
 
57
])])
 
58
 
 
59
if test "x$ENCA_LIBS" = "x"; then
 
60
    AC_CHECK_HEADER(dlfcn.h, [AC_CHECK_LIB(dl, dlopen, [
 
61
        AC_DEFINE(HAVE_DLOPEN,1,[Defines if dlopen is available])
 
62
        ENCA_LIBS="-ldl"
 
63
        ENCA_INCLUDES=""
 
64
    ],[
 
65
        ENCA_LIBS=""
 
66
        ENCA_INCLUDES=""
 
67
    ])])
 
68
fi
 
69
AC_SUBST(ENCA_LIBS)
 
70
AC_SUBST(ENCA_INCLUDES)
44
71
 
45
72
dnl Checks for typedefs, structures, and compiler characteristics.
46
73
AC_C_CONST
47
74
 
48
75
dnl Checks for library functions.
 
76
AC_CHECK_FUNCS(strcasecmp strncasecmp strdup)
49
77
 
50
 
AC_OUTPUT(src/Makefile example/Makefile librcc.spec)
 
78
AC_OUTPUT(src/Makefile examples/Makefile librcc.spec)