Print an error in the case of a broken control.tar.gz file within the archive.
[oweals/opkg-lede.git] / configure.ac
index c238e1ba4750749708fd7f5e80f60c20c025e039..3a4000491d2c11a4c2d4930f46ebf42daab6779f 100644 (file)
@@ -1,15 +1,21 @@
 # Process this file with autoconf to produce a configure script
-AC_INIT(libopkg/libopkg.c)
+AC_INIT([opkg], [0.1.7])
+AC_CONFIG_SRCDIR([libopkg/pkg.c])
 
 AC_CONFIG_AUX_DIR([conf])
 AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_MACRO_DIR([shave])
 
-AM_INIT_AUTOMAKE([opkg], [0.1.6])
+AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER(libopkg/config.h)
 
 AC_CANONICAL_HOST
 AC_GNU_SOURCE 
 
+# Disable C++/Fortran checks
+define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])
+define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
+
 
 for top_builddir in . .. ../.. $ac_auxdir $ac_auxdir/..; do
   test -f $top_builddir/configure && break
@@ -237,6 +243,22 @@ if test x$opkgetcdir = x; then
         opkgetcdir=/etc
 fi
 
+opkglockfile=
+AC_ARG_WITH(opkglockfile,
+[  --with-opkglockfile=FILE specifies the file used to make sure there is only
+                           one instance of opkg runnning.
+                           Defaults to ${opkglibdir}/opkg/lock, i.e.
+                           /usr/lib/opkg/lock ],
+[case "${withval}" in
+yes)    AC_MSG_ERROR(bad value ${withval} given for opkg lock file ) ;;
+no)     ;;
+*)      opkglockfile=$with_opkglockfile ;;
+esac])
+
+# Default if empty
+if test x$opkglockfile = x; then
+        opkglockfile=${opkglibdir}/opkg/lock
+fi
 
 dnl Some special cases for the wow64 build
 if test "x$want_gpgme" = "xyes"
@@ -252,6 +274,10 @@ fi
 
 AC_SUBST(opkglibdir)
 AC_SUBST(opkgetcdir)
+AC_SUBST(opkglockfile)
+
+# Setup output beautifier.
+SHAVE_INIT([shave], [enable])
 
 AC_OUTPUT(
     Makefile
@@ -260,5 +286,8 @@ AC_OUTPUT(
     src/Makefile
     libbb/Makefile
     utils/Makefile
+    utils/update-alternatives
     libopkg.pc
+    shave/shave
+    shave/shave-libtool
     )