diff options
-rw-r--r-- | Makefile-solaris9 | 10 | ||||
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 13 |
3 files changed, 15 insertions, 12 deletions
diff --git a/Makefile-solaris9 b/Makefile-solaris9 deleted file mode 100644 index 09f266b..0000000 --- a/Makefile-solaris9 +++ /dev/null @@ -1,10 +0,0 @@ -CFLAGS = -g -Wall -pedantic -pthread -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_C_SOURCE -D__EXTENSIONS__ -D_XPG4_2 -DSYS_SOLARIS9 -LDFLAGS = -lssl -lsocket -OBJ = util.o debug.o list.o gconfig.o radsecproxy.o - -all: radsecproxy - -radsecproxy: $(OBJ) - $(CC) $(CFLAGS) $(OBJ) $(LDFLAGS) -o radsecproxy -clean: - rm -f $(OBJ) radsecproxy diff --git a/Makefile.am b/Makefile.am index acf4223..eb4b1d2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,8 +11,8 @@ radsecproxy_SOURCES = radsecproxy.c \ util.h \ list.h -radsecproxy_CFLAGS = -g -Wall -pedantic -pthread @SSL_CFLAGS@ -radsecproxy_LDFLAGS = @SSL_LDFLAGS@ +radsecproxy_CFLAGS = -g -Wall -pedantic -pthread @SSL_CFLAGS@ @TARGET_CFLAGS@ +radsecproxy_LDFLAGS = @SSL_LDFLAGS@ @TARGET_LDFLAGS@ radsecproxy_LDADD = @SSL_LIBS@ dist_sysconf_DATA = $(srcdir)/radsecproxy.conf-example diff --git a/configure.ac b/configure.ac index c339dd8..034e301 100644 --- a/configure.ac +++ b/configure.ac @@ -2,5 +2,18 @@ AC_INIT(radsecproxy, 1.1-alpha, venaas@uninett.no) AM_INIT_AUTOMAKE AC_PROG_CC AM_PROG_CC_C_O +dnl Check if we're on Solaris and set CFLAGS accordingly +AC_CANONICAL_SYSTEM +case "${target_os}" in + solaris*) + TARGET_CFLAGS="-DSYS_SOLARIS9" + TARGET_LDFLAGS="-lsocket" + ;; + *) + TARGET_CFLAGS="" + TARGET_LDFLAGS="" + esac +AC_SUBST(TARGET_CFLAGS) +AC_SUBST(TARGET_LDFLAGS) AX_CHECK_SSL AC_OUTPUT(Makefile) |