From 3736b64b8d764c6835c7b4c05a0f2fcbe656e18d Mon Sep 17 00:00:00 2001 From: mickey Date: Thu, 7 Dec 2006 15:17:42 +0000 Subject: gsm: modernize autotool framework and pkgconfigize it git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@338 99fdad57-331a-0410-800a-d7fa5415bdb3 --- Makefile.am | 5 +++++ autogen.sh | 21 ++++----------------- configure.ac | 27 +++++++++++++++++++++++++++ configure.in | 19 ------------------- libgsmd.pc.in | 12 ++++++++++++ 5 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 configure.ac delete mode 100644 configure.in create mode 100644 libgsmd.pc.in diff --git a/Makefile.am b/Makefile.am index c06c7d6..5df8673 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) diff --git a/autogen.sh b/autogen.sh index ccce4f0..73b2179 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..163c0ca --- /dev/null +++ b/configure.ac @@ -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 +]) + diff --git a/configure.in b/configure.in deleted file mode 100644 index cbd1bbc..0000000 --- a/configure.in +++ /dev/null @@ -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) diff --git a/libgsmd.pc.in b/libgsmd.pc.in new file mode 100644 index 0000000..da636a8 --- /dev/null +++ b/libgsmd.pc.in @@ -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: + -- cgit v1.2.3