osmocom-bb/src/host/layer23/src/misc
Kevin Redon ca05975c8f Fix linking with GNU ld 2.22 and libgps
Error:
gcc -Wall -I/home/kevredon/osmocom-bb/src/shared/libosmocore/include -I/home/kevredon/osmocom-bb/src/shared/libosmocore/include -g -O2 -D_HAVE_GPSD  -lgps -o cell_log main.o app_cell_log.o cell_log.o geo.o ../common/liblayer23.a /home/kevredon/osmocom-bb/src/shared/libosmocore/build-host/src/.libs/libosmocore.a /home/kevredon/osmocom-bb/src/shared/libosmocore/build-host/src/gsm/.libs/libosmogsm.a /home/kevredon/osmocom-bb/src/shared/libosmocore/build-host/src/codec/.libs/libosmocodec.a -lm
../common/liblayer23.a(gps.o): In function `osmo_gpsd_cb':
/home/kevredon/osmocom-bb/src/host/layer23/src/common/gps.c:79: undefined reference to `gps_waiting'

Fix:
Holger told me to do so (he knows better then me about autoconf)
- set CFLAGS and LIBS for LIBGPS in layer23
- add libgps CFLAGS and LIBS in Makefile.am for common, misc, mobile
I would have done the following (which also works):
-AC_CHECK_LIB(gps, gps_waiting, CFLAGS+=" -D_HAVE_GPSD" LDFLAGS+=" -lgps",,)
+AC_CHECK_LIB(gps, gps_waiting, CFLAGS+=" -D_HAVE_GPSD" LDFLAGS+=" -lgps" LIBS+=" -lgps",,)
2012-09-17 08:40:44 +02:00
..
Makefile.am Fix linking with GNU ld 2.22 and libgps 2012-09-17 08:40:44 +02:00
app_bcch_scan.c host/layer23: Removed local copy of LAPDm, using libosmocore instad 2011-11-13 20:25:19 +01:00
app_cbch_sniff.c host/layer23: Removed local copy of LAPDm, using libosmocore instad 2011-11-13 20:25:19 +01:00
app_ccch_scan.c layer23/ccch_scan: Replace fprintf() with LOGP() and print SI-id 2011-11-22 18:34:58 +01:00
app_cell_log.c add l1ctl_proto.h #includes to lots of files 2011-06-22 23:08:55 +02:00
app_echo_test.c host/layer23: Removed local copy of LAPDm, using libosmocore instad 2011-11-13 20:25:19 +01:00
bcch_scan.c layer23/bcch_scan: bscan_sig_cb() should return something in all cases 2011-11-21 00:42:43 +01:00
cell_log.c host/layer23: Removed local copy of LAPDm, using libosmocore instad 2011-11-13 20:25:19 +01:00
rslms.c host/layer23: Removed local copy of LAPDm, using libosmocore instad 2011-11-13 20:25:19 +01:00