1 # Process this file with autoconf to produce a configure script
2 AC_INIT(libopkg/libopkg.c)
3 AM_INIT_AUTOMAKE([opkg], [0.99.163])
4 AM_CONFIG_HEADER(libopkg/config.h)
9 for top_builddir in . .. ../.. $ac_auxdir $ac_auxdir/..; do
10 test -f $top_builddir/configure && break
22 # Checks for libraries
25 PKG_CHECK_MODULES(CURL, libcurl)
34 AC_HELP_STRING([--enable-gpg], [Enable signature checking with gpgme
36 [want_gpgme="$enableval"], [want_gpgme="yes"])
38 if test "x$want_gpgme" = "xyes"; then
40 min_gpgme_version=1.0.0
41 AC_PATH_PROG(GPGME_CONFIG, gpgme-config, "failed")
42 if test $GPGME_CONFIG != "failed" ; then
43 AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
44 req_major=`echo $min_gpgme_version | \
45 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
46 req_minor=`echo $min_gpgme_version | \
47 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
48 req_micro=`echo $min_gpgme_version | \
49 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
50 gpgme_config_version=`$GPGME_CONFIG --version`
51 major=`echo $gpgme_config_version | \
52 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
53 minor=`echo $gpgme_config_version | \
54 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
55 micro=`echo $gpgme_config_version | \
56 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
58 if test "$major" -eq "$req_major"; then
59 if test "$minor" -ge "$req_minor"; then
60 if test "$micro" -ge "$req_micro"; then
67 if test $ok = "yes"; then
68 GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
69 GPGME_LIBS=`$GPGME_CONFIG --libs`
71 AC_DEFINE(HAVE_GPGME, 1, [Define if you want GPG support])
73 AC_MSG_ERROR(GPGME $min_gpgme_version or later needed)
77 AC_SUBST(GPGME_CFLAGS)
81 # Checks for header files
85 AC_CHECK_HEADERS([errno.h fcntl.h memory.h regex.h stddef.h stdlib.h string.h strings.h unistd.h utime.h])
87 # Checks for typedefs, structures, and compiler characteristics.
94 AC_CHECK_MEMBERS([struct stat.st_rdev])
96 # Don't do annoying tests that don't work when cross-compiling, just trust them.
97 # The AC_FUNC_MEMCMP test doesn't work during a cross-compile, disable.
99 # The AC_FUNC_STAT test doesn't work during a cross-compile, disable.
102 # Checks for library functions
108 AC_CHECK_FUNCS([memmove memset mkdir regcomp strchr strcspn strdup strerror strndup strrchr strstr strtol strtoul sysinfo utime])
111 AC_ARG_WITH(opkglibdir,
112 [ --with-opkglibdir=DIR specifies directory to put status and info files.
113 "/opkg" is always added so if you want your files
114 to be in /usr/lib/opkg you should indicate
115 --with-opkglibdir=/usr/lib ],
116 [case "${withval}" in
117 yes) AC_MSG_ERROR(bad value ${withval} given for opkg libs directories ) ;;
119 *) opkglibdir=$with_opkglibdir ;;
122 # Default local prefix if it is empty
123 if test x$opkglibdir = x; then
136 familiar/control-unstripped
137 familiar/libopkg-control
138 familiar/libopkg-dev-control