1 # Process this file with autoconf to produce a configure script
3 AM_INIT_AUTOMAKE([opkg], [0.99.163])
4 AM_CONFIG_HEADER(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 min_gpgme_version=1.0.0
35 AC_PATH_PROG(GPGME_CONFIG, gpgme-config, "failed")
36 if test $GPGME_CONFIG != "failed" ; then
37 AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
38 req_major=`echo $min_gpgme_version | \
39 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
40 req_minor=`echo $min_gpgme_version | \
41 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
42 req_micro=`echo $min_gpgme_version | \
43 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
44 gpgme_config_version=`$GPGME_CONFIG --version`
45 major=`echo $gpgme_config_version | \
46 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
47 minor=`echo $gpgme_config_version | \
48 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
49 micro=`echo $gpgme_config_version | \
50 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
52 if test "$major" -eq "$req_major"; then
53 if test "$minor" -ge "$req_minor"; then
54 if test "$micro" -ge "$req_micro"; then
61 if test $ok = "yes"; then
62 GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
63 GPGME_LIBS=`$GPGME_CONFIG --libs`
66 AC_MSG_ERROR(GPGME $min_gpgme_version or later needed)
69 AC_SUBST(GPGME_CFLAGS)
73 # Checks for header files
77 AC_CHECK_HEADERS([errno.h fcntl.h memory.h regex.h stddef.h stdlib.h string.h strings.h unistd.h utime.h])
79 # Checks for typedefs, structures, and compiler characteristics.
86 AC_CHECK_MEMBERS([struct stat.st_rdev])
88 # Don't do annoying tests that don't work when cross-compiling, just trust them.
89 # The AC_FUNC_MEMCMP test doesn't work during a cross-compile, disable.
91 # The AC_FUNC_STAT test doesn't work during a cross-compile, disable.
94 # Checks for library functions
100 AC_CHECK_FUNCS([memmove memset mkdir regcomp strchr strcspn strdup strerror strndup strrchr strstr strtol strtoul sysinfo utime])
103 AC_ARG_WITH(opkglibdir,
104 [ --with-opkglibdir=DIR specifies directory to put status and info files.
105 "/opkg" is always added so if you want your files
106 to be in /usr/lib/opkg you should indicate
107 --with-opkglibdir=/usr/lib ],
108 [case "${withval}" in
109 yes) AC_MSG_ERROR(bad value ${withval} given for opkg libs directories ) ;;
111 *) opkglibdir=$with_opkglibdir ;;
114 # Default local prefix if it is empty
115 if test x$opkglibdir = x; then
121 AC_OUTPUT(Makefile etc/Makefile familiar/Makefile familiar/control familiar/control-unstripped familiar/libopkg-control familiar/libopkg-dev-control libbb/Makefile libopkg.pc opkg.h)