Debian Codegraph @

debian/patches/libtoolize

raw
1 Use libtool to have both shared and static lib.
2 diff --git a/Makefile.inc b/Makefile.inc
3 index 3178d7c..cc6f09a 100644
4 --- a/Makefile.inc
5 +++ b/Makefile.inc
6 @@ -1,7 +1,7 @@
7 pkgdocdir=$(pkgdatadir)/doc
8 AM_CPPFLAGS =
9 if !TARGET_WIN32CE
10 -CFLAGS += -shared
11 +#CFLAGS += -shared
12 AM_CPPFLAGS += -fPIC
13 endif
14 if DEBUG
15 diff --git a/autosh.sh b/autosh.sh
16 index fb522d6..216459e 100755
17 --- a/autosh.sh
18 +++ b/autosh.sh
19 @@ -1,2 +1,2 @@
20 #! /bin/bash
21 -aclocal && autoheader && automake --add-missing && autoreconf && ./configure
22 +autoreconf --force --install
23 diff --git a/configure.ac b/configure.ac
24 index af94cad..c0eb11c 100644
25 --- a/configure.ac
26 +++ b/configure.ac
27 @@ -12,7 +12,14 @@ if eval "test x$GCC = xyes"; then
28 CFLAGS="$CFLAGS -Wall -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type"
29 fi
30
31 -AC_PROG_RANLIB
32 +AC_PROG_LIBTOOL
33 +LT_LIBGARMIN_CURRENT=0
34 +LT_LIBGARMIN_REVISION=0
35 +LT_LIBGARMIN_AGE=0
36 +AC_SUBST(LT_LIBGARMIN_CURRENT)
37 +AC_SUBST(LT_LIBGARMIN_REVISION)
38 +AC_SUBST(LT_LIBGARMIN_AGE)
39 +
40 # Checks for libraries.
41 # FIXME: Replace `main' with a function in `-lgarmin':
42 #AC_CHECK_LIB([garmin], [main])
43 diff --git a/src/Makefile.am b/src/Makefile.am
44 index e8ae308..27ffdc9 100644
45 --- a/src/Makefile.am
46 +++ b/src/Makefile.am
47 @@ -2,9 +2,12 @@ include $(top_srcdir)/Makefile.inc
48
49 AM_CPPFLAGS += -DDATAPREFIX=\"@datarootdir@\"
50
51 -lib_LIBRARIES = libgarmin.a
52 +lib_LTLIBRARIES = libgarmin.la
53
54 -libgarmin_a_SOURCES = GarminTypedef.h garmin_fat.c garmin_rgn.h \
55 +libgarmin_la_LDFLAGS = -version-info \
56 + @LT_LIBGARMIN_CURRENT@:@LT_LIBGARMIN_REVISION@:@LT_LIBGARMIN_AGE@
57 +
58 +libgarmin_la_SOURCES = GarminTypedef.h garmin_fat.c garmin_rgn.h \
59 bsp.c garmin_fat.h garmin_subdiv.c libgarmin_priv.h \
60 bsp.h garmin_lbl.c garmin_subdiv.h \
61 garmin_lbl.h garmin_typ.c list.c \
62 @@ -18,9 +21,9 @@ libgarmin_a_SOURCES = GarminTypedef.h garmin_fat.c garmin_rgn.h \
63 garmin_mdr.c garmin_mdr.h \
64 garmin_route.c align.h extras.h
65
66 -nodist_libgarmin_a_SOURCES=
67 +nodist_libgarmin_la_SOURCES=
68 if HAVEEXTRAS
69 -nodist_libgarmin_a_SOURCES+=extras.c
70 +nodist_libgarmin_la_SOURCES+=extras.c
71 endif
72
73 include_HEADERS = libgarmin.h