[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with smsd and mysql
From: |
paul . rogers |
Subject: |
Re: Problem with smsd and mysql |
Date: |
Fri, 20 Aug 2004 09:53:30 +0100 |
Jan
Thanks for the reply.
You wrote:
>There isn't option for linking with mysql. Please, show me output of
>"mysql_config --libs" command.
>Do you have this command in Makefile?
The output from mysql_config is:
-L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
Below is the Makefile. I have edited it as suggested by the README, but I may
have broken it :-(
Once again thanks for your help
Paul
#
# Makefile for the smsd.
#
# Copyright (C) 1999 Hugh Blemings & Pavel JanÃk ml. & Jan Derfinak
# 2000 Karel Zak
# $Id: Makefile,v 1.29 2004/06/27 21:26:30 pkot Exp $
#
GLIBCFLAGS = glib-config --cflags
GLIBLDLIBS = glib-config --libs
# Comment out above lines and uncomment below lines if you want compile smsd
# with glib2 instead of glib1.
#
#GLIBCFLAGS = pkg-config --cflags glib-2.0
#GLIBLDLIBS = pkg-config --libs glib-2.0
TOPDIR=..
include $(TOPDIR)/Makefile.global
SMSD_MAN=man/smsd.8
CFLAGS += -DMODULES_DIR=\"${libdir}/smsd\" $(PTHREAD_CFLAGS) \
$(shell $(GLIBCFLAGS))
LDLIBS += $(PTHREAD_LIBS) \
$(shell $(GLIBLDLIBS))
LDLIBS += -rdynamic $(TOPDIR)/common/libgnokii.la -ldl
# Some systems, eg. FreeBSD don't have libdl. Use this:
# LDLIBS += -s -rdynamic -L$(TOPDIR)/common -lgnokii
OBJS = smsd.lo \
lowlevel.lo
all: smsd
smsd: $(OBJS) $(TOPDIR)/common/libgnokii.la
$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
### DB Modules
# Change this according to your system
# FIXME: detect it in configure
# PostgreSQL support
pq.lo: smsd.h pq.c
$(LIBTOOL) --mode=compile $(CC) -o pq.lo $(CFLAGS) $(CPPFLAGS) \
-I../include -I/usr/include/pgsql -c pq.c
libpq.la: pq.lo
$(LIBTOOL) --mode=link $(CC) -o libpq.la pq.lo \
$(shell $(GLIBLDLIBS)) -lpq \
-export-dynamic -avoid-version -rpath ${libdir}/smsd
# MySQL support
mysql.lo: smsd.h mysql.c
$(LIBTOOL) --mode=compile $(CC) -o mysql.lo $(CFLAGS) $(CPPFLAGS) \
-I/usr/local/mysql/include/mysql -c mysql.c
libmysql.la: mysql.lo
$(LIBTOOL) --mode=link $(CC) -o libmysql.la mysql.lo \
$(shell $(GLIBLDLIBS)) /usr/local/mysql/lib/mysql \
-export-dynamic -avoid-version -rpath ${libdir}/smsd
# File support
file.lo: smsd.h file.c
$(LIBTOOL) --mode=compile $(CC) -o file.lo $(CFLAGS) $(CPPFLAGS) \
-I../include -c file.c
libfile.la: file.lo
$(LIBTOOL) --mode=link $(CC) -o libfile.la file.lo \
$(shell $(GLIBLDLIBS)) \
-export-dynamic -avoid-version -rpath ${libdir}/smsd
### End of DB Modules
$(TOPDIR)/common/libgnokii.la:
$(MAKE) -C $(TOPDIR)/common libgnokii.la
clean:
$(LIBTOOL) --mode=clean $(RM) smsd libpq.la libmysql.la libfile.la
$(OBJS)
$(RM) *~ depend *.so core*
install: all
$(INSTALL) -d $(DESTDIR)$(sbindir)
$(LIBTOOL) --mode=install $(INSTALL) -m 755 smsd $(DESTDIR)$(sbindir)
$(INSTALL) -d $(DESTDIR)${libdir}/smsd
for f in lib*.la ; do \
$(LIBTOOL) --mode=install $(INSTALL) $$f $(DESTDIR)${libdir}/smsd ; \
done
$(LIBTOOL) --mode=finish ${libdir}/smsd
$(INSTALL) -d $(DESTDIR)$(man8dir)
$(INSTALL_DATA) $(SMSD_MAN) $(DESTDIR)$(man8dir)
depend dep:
$(CC) $(CFLAGS) -MM *.c >depend
ifeq (depend,$(wildcard depend))
include depend
endif
.PHONY: all install clean dep depend
***********************************************************************
This email and any attachments transmitted with it are confidential
and intended solely for the use of the individual or entity to whom
they are addressed. If you have received this email in error please
notify the sender and do not store, copy or disclose the content
to any other person.
It is the responsibility of the recipient to ensure that opening this
message and/or any of its attachments will not adversely affect
its systems. No responsibility is accepted by the Company.
***********************************************************************