wmc: allow building libwmc standalone
This commit is contained in:
0
libwmc/AUTHORS
Normal file
0
libwmc/AUTHORS
Normal file
0
libwmc/ChangeLog
Normal file
0
libwmc/ChangeLog
Normal file
0
libwmc/NEWS
Normal file
0
libwmc/NEWS
Normal file
0
libwmc/README
Normal file
0
libwmc/README
Normal file
22
libwmc/autogen.sh
Executable file
22
libwmc/autogen.sh
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Run this to generate all the initial makefiles, etc.
|
||||||
|
# NOTE
|
||||||
|
# This autogen.sh is only used when building libwmc separately from ModemManager
|
||||||
|
|
||||||
|
srcdir=`dirname $0`
|
||||||
|
test -z "$srcdir" && srcdir=.
|
||||||
|
REQUIRED_AUTOMAKE_VERSION=1.7
|
||||||
|
PKG_NAME=libwmc
|
||||||
|
|
||||||
|
(test -f $srcdir/configure.ac \
|
||||||
|
&& test -f $srcdir/src/com.c) || {
|
||||||
|
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||||
|
echo " top-level $PKG_NAME directory"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
(cd $srcdir;
|
||||||
|
autoreconf --install --symlink &&
|
||||||
|
autoreconf &&
|
||||||
|
./configure --enable-maintainer-mode $@
|
||||||
|
)
|
49
libwmc/configure.ac
Normal file
49
libwmc/configure.ac
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# NOTE
|
||||||
|
# This configure.ac is only used when building libqcdm separately from
|
||||||
|
# ModemManager.
|
||||||
|
#
|
||||||
|
|
||||||
|
AC_PREREQ(2.52)
|
||||||
|
|
||||||
|
AC_INIT(libwmc, 0.1, dcbw@redhat.com, libwmc)
|
||||||
|
AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2])
|
||||||
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||||
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
|
AC_CONFIG_HEADERS(config.h)
|
||||||
|
|
||||||
|
dnl Define _GNU_SOURCE for various things like strcasestr()
|
||||||
|
AC_GNU_SOURCE
|
||||||
|
|
||||||
|
dnl Required programs
|
||||||
|
AC_PROG_CC
|
||||||
|
AM_PROG_CC_C_O
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Tests
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(tests, AS_HELP_STRING([--with-tests], [Build libqcdm tests]))
|
||||||
|
AM_CONDITIONAL(WITH_TESTS, test "x$with_tests" = "xyes")
|
||||||
|
case $with_tests in
|
||||||
|
yes)
|
||||||
|
with_tests=yes
|
||||||
|
PKG_CHECK_MODULES(MM, glib-2.0 >= 2.20)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
with_tests=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AM_CONDITIONAL(STANDALONE, test "yes" = "yes")
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([
|
||||||
|
Makefile
|
||||||
|
src/Makefile
|
||||||
|
tests/Makefile
|
||||||
|
])
|
||||||
|
AC_OUTPUT
|
||||||
|
|
@@ -1,5 +1,6 @@
|
|||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
-I$(top_srcdir)/libwmc/src
|
-I$(top_srcdir)/libwmc/src \
|
||||||
|
-I$(top_srcdir)/src
|
||||||
|
|
||||||
noinst_PROGRAMS = test-wmc
|
noinst_PROGRAMS = test-wmc
|
||||||
|
|
||||||
@@ -17,9 +18,13 @@ test_wmc_SOURCES = \
|
|||||||
test_wmc_CPPFLAGS = \
|
test_wmc_CPPFLAGS = \
|
||||||
$(MM_CFLAGS)
|
$(MM_CFLAGS)
|
||||||
|
|
||||||
test_wmc_LDADD = \
|
test_wmc_LDADD = $(MM_LIBS)
|
||||||
$(top_builddir)/libwmc/src/libwmc.la \
|
|
||||||
$(MM_LIBS)
|
if STANDALONE
|
||||||
|
test_wmc_LDADD += $(top_builddir)/src/libwmc.la
|
||||||
|
else
|
||||||
|
test_wmc_LDADD += $(top_builddir)/libwmc/src/libwmc.la
|
||||||
|
endif
|
||||||
|
|
||||||
if WITH_TESTS
|
if WITH_TESTS
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user