Check-in [91d28f951a]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Convert build system to autotools
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 91d28f951a19f14f91fb2ab374045b1f48727edd
User & Date: bapt 2014-06-16 14:21:27
Context
2014-06-16
14:49
Finish all help output check-in: 527018c138 user: bapt tags: trunk
14:28
Improved help check-in: 3062feb4d1 user: bapt tags: improved_ui
14:21
Convert build system to autotools check-in: 91d28f951a user: bapt tags: trunk
14:20
Finish autotoolization Closed-Leaf check-in: eb4dab484b user: bapt tags: autoconf
2013-07-22
14:53
Provide tags to the hdf check-in: 8337ec35af user: bapt tags: trunk
Changes

Deleted Makefile.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
CC?=		gcc
INCLUDES=	-I/usr/local/include -I/usr/local/include/ClearSilver
LIBDIR=		-L/usr/local/lib
LIBS=		-lz -lneo_cs -lneo_utl -lneo_cgi -lexpat -lcurl -lsqlite3
LDFLAGS+=	${LIBDIR}
CFLAGS+=	-Wall -Werror -pipe -O0 -ggdb

PROG=		cplanet
SRCS=		cplanet.c
OBJS=		${SRCS:.c=.o}

PREFIX?=	/usr/local
BINDIR?=	${PREFIX}/bin
MANDIR?=	${PREFIX}/man/man1

all: ${PROG}

${PROG}: ${OBJS}
	${CC} ${LDFLAGS} ${INCLUDES} ${OBJS} -o $@ ${LIBS}

.c.o:
	${CC} -o $@ -c $< ${CFLAGS} ${INCLUDES}

install:
	install -o root -g wheel -m 755 ${PROG} ${BINDIR}
	install -o root -g wheel -m 755 ${PROG}.1 ${MANDIR}

deinstall:
	rm -f ${BINDIR}/${PROG}
	rm -f ${MANDIR}/${PROG}.1

clean:
	rm -f ${PROG} *.o *.core
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































Added Makefile.am.











>
>
>
>
>
1
2
3
4
5
bin_PROGRAMS=	cplanet
cplanet_SOURCES=	cplanet.c
cplanet_CFLAGS=		@SQLITE3_CFLAGS@ @CURL_CFLAGS@ @EXPAT_CFLAGS@
cplanet_LDFLAGS=	@SQLITE3_LIBS@ @CURL_LIBS@ @EXPAT_LIBS@ 

Added configure.ac.















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
AC_INIT([cplanet],[0.11],[https://fossil.etoilebsd.net/cplanet],[cplanet])
AC_CONFIG_SRCDIR([configure.ac])
AC_CANONICAL_TARGET

AM_INIT_AUTOMAKE([1.11 foreign subdir-objects no-dist-gzip dist-xz])
AM_SILENT_RULES([yes])

PKG_CHECK_MODULES([SQLITE3],[sqlite3])
PKG_CHECK_MODULES([CURL],[libcurl])
PKG_CHECK_MODULES([EXPAT],[expat])

AC_CHECK_HEADER([ClearSilver.h], [
	AC_CHECK_LIB([neo_utl], [hdf_init], [], [AC_MSG_ERROR([libneo_utl is needed but not found])])
	AC_CHECK_LIB([neo_cs], [cs_init], [], [AC_MSG_ERROR([libneo_cs is needed but not found])]) 
	AC_CHECK_LIB([z], [deflate], [], [AC_MSG_ERROR([libz is needed but not found])]) 
	AC_CHECK_LIB([neo_cgi], [cgi_register_strfuncs], [], [AC_MSG_ERROR([libneo_cgi is needed but not found])]) 
],[AC_MSG_ERROR([ClearSilver is needed but not found])])

AC_PROG_CC_STDC

AC_CONFIG_FILES([Makefile])
AC_CONFIG_HEADERS(cplanet_config.h)
AC_OUTPUT

Changes to cplanet.h.

30
31
32
33
34
35
36








37
38
39
40
41
42
43
44
#include <time.h>
#include <locale.h>
#include <unistd.h>

/* clearsilver */
#include <ClearSilver.h>









#define CPLANET_VERSION "0.10"

#define CP_NAME "CPlanet.Posts.%i.Name=%s"
#define CP_FEEDNAME "CPlanet.Posts.%i.FeedName=%s"
#define CP_AUTHOR "CPlanet.Posts.%i.Author=%s"
#define CP_TITLE "CPlanet.Posts.%i.Title=%s"
#define CP_LINK "CPlanet.Posts.%i.Link=%s"
#define CP_DATE "CPlanet.Posts.%i.Date=%lld"







>
>
>
>
>
>
>
>
|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <time.h>
#include <locale.h>
#include <unistd.h>

/* clearsilver */
#include <ClearSilver.h>

#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION

#include "cplanet_config.h"

#define CPLANET_VERSION PACKAGE_VERSION

#define CP_NAME "CPlanet.Posts.%i.Name=%s"
#define CP_FEEDNAME "CPlanet.Posts.%i.FeedName=%s"
#define CP_AUTHOR "CPlanet.Posts.%i.Author=%s"
#define CP_TITLE "CPlanet.Posts.%i.Title=%s"
#define CP_LINK "CPlanet.Posts.%i.Link=%s"
#define CP_DATE "CPlanet.Posts.%i.Date=%lld"