summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2007-05-24 09:48:59 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-05-24 09:48:59 +0000
commit79651977517e254035141de0468cf87aa1d20e23 (patch)
treeae3a556c463a73fc9e8f0742d05d4bcef5616e4e
parent7894295a7eb782307a1188b68f90a3d30bae9c96 (diff)
initial autoconf support
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@106 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--AUTHORS1
-rw-r--r--COPYING5
-rw-r--r--ChangeLog0
-rw-r--r--Makefile.am11
-rw-r--r--README14
-rw-r--r--acinclude.m447
-rw-r--r--autogen.sh3
-rw-r--r--configure.ac6
8 files changed, 85 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..810b3f9
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Stig Venaas <venaas@uninett.no>
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..680d891
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,5 @@
+Copyright (C) 2006, 2007 Stig Venaas <venaas@uninett.no>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ChangeLog
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..19a8a0a
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,11 @@
+bin_PROGRAMS = radsecproxy
+
+radsecproxy_SOURCES = radsecproxy.c \
+ util.c \
+ debug.c \
+ radsecproxy.h \
+ debug.h
+
+radsecproxy_CFLAGS = -g -Wall -pedantic -pthread @SSL_CFLAGS@
+radsecproxy_LDFLAGS = @SSL_LDFLAGS@
+radsecproxy_LDADD = @SSL_LIBS@
diff --git a/README b/README
index dce3195..788ee5a 100644
--- a/README
+++ b/README
@@ -2,7 +2,9 @@ This is a beta version of a generic RADIUS proxy that can support
various RADIUS clients over UDP or TLS (RadSec).
It should build on most Linux and BSD platforms by simply typing
-"make". To use it you need to create a config file called
+"make". You may also try to use autoconf if you like.
+
+To use it you need to create a config file called
"radsecproxy.conf" which must be in /etc/radsecproxy (unless
you alter it in the header file), the current directory, or
you can specify the location with the "-c" command line
@@ -16,6 +18,14 @@ detailed; and "-f" to run the proxy in the foreground with logging
to stderr. Without "-f" the default is to detach as a daemon and
log to syslog.
+Thanks to Stefan Winter and Andreas Solberg for making me do this,
+and the funding from GEANT2. Stefan as well as Kolbjørn Barmen
+and Maja Wolniewicz have helped with early testing of the code.
+All of the above plus Milan Sova have provided good feedback on
+several implementation choices. Finally thanks to Hans Zandbelt
+for providing the autoconf stuff. I may have forgotten someone,
+let me know if you feel left out.
+
For more information, feedback etc. contact <venaas@uninett.no>.
-Stig Venaas, 2007.05.15
+Stig Venaas, 2007.05.24
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..f854b0e
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,47 @@
+dnl Based on the one from the Boinc project by Reinhard
+
+AC_DEFUN([AX_CHECK_SSL],
+[AC_MSG_CHECKING(for OpenSSL)
+SSL_DIR=
+found_ssl="no"
+AC_ARG_WITH(ssl,
+ AC_HELP_STRING([--with-ssl],
+ [Use SSL (in specified installation directory)]),
+ [check_ssl_dir="$withval"],
+ [check_ssl_dir=])
+for dir in $check_ssl_dir /usr /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local ; do
+ ssldir="$dir"
+ if test -f "$dir/include/openssl/ssl.h"; then
+ found_ssl="yes";
+ SSL_DIR="${ssldir}"
+ SSL_CFLAGS="-I$ssldir/include -I$ssldir/include/openssl";
+ break;
+ fi
+ if test -f "$dir/include/ssl.h"; then
+ found_ssl="yes";
+ SSL_DIR="${ssldir}"
+ SSL_CFLAGS="-I$ssldir/include/";
+ break
+ fi
+done
+AC_MSG_RESULT($found_ssl)
+if test x_$found_ssl != x_yes; then
+ AC_MSG_ERROR([
+----------------------------------------------------------------------
+ Cannot find SSL libraries.
+
+ Please install OpenSSL or specify installation directory with
+ --with-ssl=(dir).
+----------------------------------------------------------------------
+])
+else
+ printf "OpenSSL found in $ssldir\n";
+ SSL_LIBS="-lssl -lcrypto";
+ SSL_LDFLAGS="-L$ssldir/lib";
+ AC_DEFINE_UNQUOTED([USE_OPENSSL],[1],
+ ["Define to 1 if you want to use the OpenSSL crypto library"])
+ AC_SUBST(SSL_CFLAGS)
+ AC_SUBST(SSL_LDFLAGS)
+ AC_SUBST(SSL_LIBS)
+fi
+])dnl
diff --git a/autogen.sh b/autogen.sh
new file mode 100644
index 0000000..25bf74f
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+touch NEWS
+autoreconf --force --install
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..c5ea60d
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,6 @@
+AC_INIT(radsecproxy, 0.1, venaas@uninett.no)
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AM_PROG_CC_C_O
+AX_CHECK_SSL
+AC_OUTPUT(Makefile)