ashkang / jcal

Jalali Calendar Library
http://nongnu.org/jcal
139 stars 24 forks source link

Automake integration #13

Closed 183amir closed 9 years ago

183amir commented 9 years ago

Hi, I was wondering how can I include libjalali in my Makefile.am and/or configure.ac file.

Right now I am doing something like:

gahshomar_LDADD = $(GAHSHOMAR_LIBS) /usr/lib/libjalali.la

Is there a better way to do this?

reith commented 9 years ago

On Mon, 12 Jan 2015 03:24:50 -0800 Amir notifications@github.com wrote:

Right now I am doing something like:

gahshomar_LDADD = $(GAHSHOMAR_LIBS) /usr/lib/libjalali.la

Just include libjalali for linking stage, by something like this:

gahshomar_LDADD = $(GAHSHOMAR_LIBS) -ljalali

You may want to use autoconf AC_CHECK_LIB macro to check libjalali before making object files. Put something like this in your configure.ac:

AC_CHECK_LIB([jalali], [jstrftime], [], [ echo "*** ERROR: libjalali is
not functional"; exit -1])
183amir commented 9 years ago

Thanks a million.