summaryrefslogtreecommitdiffstats
path: root/src/external/libini_config.m4
blob: 13be9c2f49c5dcc318e42712fd86d31fa1269e70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
PKG_CHECK_MODULES(INI_CONFIG_V1, [
    ini_config >= 1.0.0], [

        INI_CONFIG_CFLAGS="$INI_CONFIG_V1_CFLAGS"
        INI_CONFIG_LIBS="$INI_CONFIG_V1_LIBS"
        AC_DEFINE_UNQUOTED(HAVE_LIBINI_CONFIG_V1, 1, [libini_config version greater than 1.0.0])
    ], [
        AC_MSG_WARN([libini_config-devel >= 1.0.0 not available, trying older version])
        PKG_CHECK_MODULES(INI_CONFIG_V0, [
            ini_config >= 0.6.1], [

                INI_CONFIG_CFLAGS="$INI_CONFIG_V0_CFLAGS"
                INI_CONFIG_LIBS="$INI_CONFIG_V0_LIBS"
                AC_DEFINE_UNQUOTED(HAVE_LIBINI_CONFIG_V0, 1, [libini_config version lesser than 1.0.0])
            ], [
                AC_MSG_ERROR([Please install libini_config-devel])
            ]
        )
    ]
)

AC_SUBST(INI_CONFIG_CFLAGS)
AC_SUBST(INI_CONFIG_LIBS)