summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am9
-rw-r--r--configure.ac1
-rw-r--r--main.c7
-rw-r--r--radsecproxy.c2
4 files changed, 16 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 839f6a9..7c8cefd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,8 +2,13 @@ AUTOMAKE_OPTIONS = foreign
sbin_PROGRAMS = radsecproxy
bin_PROGRAMS = catgconf
+noinst_LIBRARIES = librsp.a
-radsecproxy_SOURCES = radsecproxy.c \
+radsecproxy_SOURCES = main.c
+
+nodist_librsp_a_SOURCES = $(radsecproxy_SOURCES)
+
+librsp_a_SOURCES = radsecproxy.c \
tlscommon.c \
gconfig.c \
util.c \
@@ -42,7 +47,7 @@ catgconf_SOURCES = debug.c \
radsecproxy_CFLAGS = -g -Wall -Werror -fno-strict-aliasing \
@SSL_CFLAGS@ @TARGET_CFLAGS@
radsecproxy_LDFLAGS = @SSL_LDFLAGS@ @TARGET_LDFLAGS@
-radsecproxy_LDADD = @SSL_LIBS@
+radsecproxy_LDADD = librsp.a @SSL_LIBS@
catgconf_CFLAGS = -g -Wall -fno-strict-aliasing @TARGET_CFLAGS@
catgconf_LDFLAGS = @TARGET_LDFLAGS@
diff --git a/configure.ac b/configure.ac
index 973148f..25db07c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,6 +3,7 @@ AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AC_PROG_CC
AM_PROG_CC_C_O
+AC_PROG_RANLIB
udp=yes
AC_ARG_ENABLE(udp,
[ --enable-udp whether to enable UDP transport: yes/no; default yes ],
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..c3befc4
--- /dev/null
+++ b/main.c
@@ -0,0 +1,7 @@
+int radsecproxy_main(int argc, char **argv);
+
+int main(int argc, char **argv)
+{
+ return radsecproxy_main(argc, argv);
+}
+
diff --git a/radsecproxy.c b/radsecproxy.c
index 93cd4a2..e459cae 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -3195,7 +3195,7 @@ int createpidfile(const char *pidfile) {
return f && !fclose(f) && r >= 0;
}
-int main(int argc, char **argv) {
+int radsecproxy_main(int argc, char **argv) {
pthread_t sigth;
sigset_t sigset;
struct list_node *entry;