9b3639ee3d6fa0fc3d4d169ddb3f6f96ee01c85a
[packages.git] / net / gpsd / patches / 100-cross-compile.patch
1 Index: gpsd-2.94/configure.ac
2 ===================================================================
3 --- gpsd-2.94.orig/configure.ac 2010-04-20 19:55:08.000000000 +0200
4 +++ gpsd-2.94/configure.ac      2011-01-27 15:22:04.720000026 +0100
5 @@ -233,30 +233,9 @@
6         AC_DEFINE([HAVE_LIBPTHREAD], [], [pthread libraries are present])])
7  AC_SUBST(LIBPTHREAD)
8  
9 -#
10 -# We want libusb-1.x or later.  Checking for this is messy in 2010
11 -# since many Linux systems ship with .0,1.x versions and that's 
12 -# what you get if you check naively for -lusb.  
13 -#
14 -# We use the fact that the obsolete versions put their include file in
15 -# /usr/include/usb.h, while the newer ones have it in 
16 -# /usr/include/libusb-*/libusb.h
17 -#
18  AC_MSG_CHECKING([for libusb version >= 1.0.0])
19 -if test -f /usr/include/libusb-*/libusb.h ;
20 -then
21 -    usb=$(basename /usr/lib/libusb-*.so | sed -e s/\.so// -e s/^lib//)
22 -    AC_DEFINE([HAVE_LIBUSB], [], [will link with -l$usb; ])
23 -    LIBUSB=-l${usb}
24 -    INCUSB=-I/usr/include/lib${usb}
25 -    ac_libusb=yes
26 -    AC_MSG_RESULT([found.])
27 -else
28 -    ac_libusb=yes
29 -    AC_MSG_RESULT([not found.])
30 -fi
31 -AC_SUBST(LIBUSB)
32 -AC_SUBST(INCUSB)
33 +ac_libusb=yes
34 +AC_MSG_RESULT([OpenWRT: Crosscompile])
35  
36  AH_VERBATIM([_GNU_SOURCE],
37           [/* Some libc's don't have strlcat/strlcpy. Local copies are provided */
38 Index: gpsd-2.94/Makefile.am
39 ===================================================================
40 --- gpsd-2.94.orig/Makefile.am  2010-04-20 11:37:21.000000000 +0200
41 +++ gpsd-2.94/Makefile.am       2011-01-27 15:22:28.557999857 +0100
42 @@ -245,9 +245,9 @@
43  # Warning: This overrides autoconf's normal link-line generation process
44  if LIBGPSMM_ENABLE
45  libgps_la_SOURCES += libgpsmm.cpp
46 -libgps_la_LINK = /bin/sh ./libtool --tag=CXX --mode=link g++ $(libgps_la_LDFLAGS) -o $@
47 +libgps_la_LINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(libgps_la_LDFLAGS) -o $@
48  else
49 -libgps_la_LINK = /bin/sh ./libtool --tag=CC --mode=link gcc $(libgps_la_LDFLAGS) -o $@
50 +libgps_la_LINK = $(LIBTOOL) --tag=CC --mode=link $(CC) $(libgps_la_LDFLAGS) -o $@
51  endif
52  
53  nodist_libgpsd_la_SOURCES = packet_names.h ais_json.i