gsm: modernize autotool framework and pkgconfigize it

git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@338 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
mickey 2006-12-07 15:17:42 +00:00
parent 3f2fd42ce7
commit 3736b64b8d
5 changed files with 48 additions and 36 deletions

View File

@ -8,3 +8,8 @@ AM_CFLAGS = -std=gnu99
$(OBJECTS): libtool
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
pcdata_DATA= libgsmd.pc
pcdatadir= $(libdir)/pkgconfig
EXTRA_DIST= $(pcdata_DATA)

View File

@ -1,18 +1,5 @@
#!/bin/sh
#! /bin/sh
autoreconf -v --install || exit 1
glib-gettextize --force --copy || exit 1
./configure --enable-maintainer-mode "$@"
run ()
{
echo "running: $*"
eval $*
if test $? != 0 ; then
echo "error: while running '$*'"
exit 1
fi
}
run aclocal
#run autoheader
run libtoolize -f
run automake -a
run autoconf

27
configure.ac Normal file
View File

@ -0,0 +1,27 @@
AC_PREREQ(2.53)
AC_INIT(gsmd, 0.0.1, http://www.openmoko.org/)
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR(src/gsmd/gsmd.c)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_PROG_LIBTOOL
# base deps
# output stuff
AC_OUTPUT([
Makefile
libgsmd.pc
src/Makefile
src/gsmd/Makefile
src/libgsmd/Makefile
src/util/Makefile
include/Makefile
include/gsmd/Makefile
include/libgsmd/Makefile
])

View File

@ -1,19 +0,0 @@
dnl Process this file with autoconf to create configure.
AC_INIT
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(gsmd, 0.0.1)
AC_PROG_CC
AC_EXEEXT
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AC_ARG_WITH()
dnl Output the makefiles
AC_OUTPUT(Makefile src/Makefile src/gsmd/Makefile src/libgsmd/Makefile src/util/Makefile
include/Makefile include/gsmd/Makefile include/libgsmd/Makefile)

12
libgsmd.pc.in Normal file
View File

@ -0,0 +1,12 @@
prefix=@prefix@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libgsmd
Description: GSM 07.10 Multiplexer Library
Version: @VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -lgsmd
Requires: