aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am30
-rwxr-xr-xautogen.sh3
-rw-r--r--configure.ac7
-rw-r--r--include/libssh/Makefile.am2
l---------include/libssh/config.h1
5 files changed, 36 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am
index 9c065989..fc16150a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,10 +2,14 @@ SUBDIRS = libssh include
AM_CPPFLAGS = -I$(srcdir)/include
-LDADD = -lssh -L$(srcdir)/libssh
+LDADD = $(top_builddir)/libssh/libssh.la
+noinst_PROGRAMS = samplesshd samplessh
-bin_PROGRAMS = samplesshd samplessh samplesftp
+noinst_DATA = samplesftp doxygen
+
+libsshdir = $(includedir)/libssh
+libssh_HEADERS = config.h
samplessh_SOURCES = sample.c
@@ -14,6 +18,26 @@ samplesshd_SOURCES = samplesshd.c
samplesftp: samplessh
$(LN_S) samplessh samplesftp
-nodist_samplesftp_SOURCES = samplesftp.c
+if HAS_DOXYGEN
+install-doc: doxygen
+ $(INSTALL) -d $(DESTDIR)$(docdir)/html
+ $(INSTALL) --mode=644 doxygen/html/* $(DESTDIR)$(docdir)/html
+ $(INSTALL) -d $(DESTDIR)$(docdir)/examples
+ $(INSTALL) --mode=644 sample.c samplesshd.c $(DESTDIR)$(docdir)/examples
+ $(INSTALL) -d $(DESTDIR)$(mandir)/man3
+ $(INSTALL) --mode=644 doxygen/man/man3/* $(DESTDIR)$(mandir)/man3
+
+doxygen:
+ @echo "Running doxygen..."
+ doxygen $(srcdir)/Doxyfile
+else
+doxygen:
+install-doc: doxygen
+endif
+
+clean-local:
+ -rm -rf doxygen
EXTRA_DIST = Doxyfile
+
+CLEANFILES = samplesftp
diff --git a/autogen.sh b/autogen.sh
index 30e1712c..ae99bd3a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,7 +1,8 @@
#!/bin/sh -e
-libtoolize --force --copy
aclocal
+libtoolize --force --copy
autoheader
autoconf
automake --add-missing --copy --gnu
+./configure $@
diff --git a/configure.ac b/configure.ac
index 4c8bb299..0a65cb21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,10 +3,12 @@
AC_PREREQ(2.57)
AC_INIT([libssh], 0.2, [aris@0xbadc0de.be])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE(1.9)
AC_CONFIG_SRCDIR([sample.c])
AC_CONFIG_HEADER([config.h])
+AM_MAINTAINER_MODE
+
# LT Version numbers, remember to change them just *before* a release.
# (Interfaces removed: CURRENT++, AGE=0, REVISION=0)
# (Interfaces added: CURRENT++, AGE++, REVISION=0)
@@ -65,6 +67,9 @@ AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_C_BIGENDIAN
+AC_CHECK_PROG([DOXYGEN], [doxygen], [yes], [no])
+AM_CONDITIONAL([HAS_DOXYGEN], [test x"$DOXYGEN" = xyes])
+
# Checks for libraries.
with_gcrypt=${with_gcrypt:-"no"}
AC_ARG_WITH([libgcrypt],
diff --git a/include/libssh/Makefile.am b/include/libssh/Makefile.am
index 724ff75b..ea01f9d4 100644
--- a/include/libssh/Makefile.am
+++ b/include/libssh/Makefile.am
@@ -1,2 +1,2 @@
libsshdir = $(includedir)/libssh
-libssh_HEADERS = config.h crypto.h libssh.h priv.h server.h sftp.h ssh1.h ssh2.h
+libssh_HEADERS = crypto.h libssh.h priv.h server.h sftp.h ssh1.h ssh2.h
diff --git a/include/libssh/config.h b/include/libssh/config.h
deleted file mode 120000
index bce5bfdd..00000000
--- a/include/libssh/config.h
+++ /dev/null
@@ -1 +0,0 @@
-../../config.h \ No newline at end of file