summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <johannes.hofmann@gmx.de>2005-03-17 17:46:19 +0000
committerJohannes Hofmann <johannes.hofmann@gmx.de>2005-03-17 17:46:19 +0000
commit57c758b640c7eba7fc8271722e51a19ef7da1d0a (patch)
tree515512446dd94c3b530475c3b7fef2e7bb024603
parentc7349d9ae89fea82cf7137da2a0322690ee6d80f (diff)
autoconf (by Peter Seiderer)
autoconf (by Peter Seiderer)
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac42
-rw-r--r--src/Makefile.am21
-rw-r--r--src/util.h14
4 files changed, 77 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..af437a6
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = src
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..e5f7f04
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,42 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT(flpsed, 0.3.3, Johannes.Hofmann@gmx.de)
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([src/GsWidget.H])
+AC_CONFIG_HEADER(config.h)
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+
+AC_LANG_CPLUSPLUS
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+
+# Checks for library functions.
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_TYPE_SIGNAL
+AC_CHECK_FUNCS([dup2 setenv strchr strdup strrchr strstr])
+
+# Check for fltk
+AC_ARG_WITH([fltk-dir], AS_HELP_STRING([--with-fltk-dir=DIR], [fltk is installed in DIR]), [CPPFLAGS="-I$withval/include ${_cppflags}" LDFLAGS="-L$withval/lib $LDFLAGS"], [CPPFLAGS="-I/usr/X11R6/include ${_cppflags}" LDFLAGS="-L/usr/X11R6/lib $LDFLAGS"])
+AC_CHECK_HEADERS([FL/Fl.H], [], [echo "Error: FL/Fl.H not found. Try './configure --with-fltk-dir=DIR'"; exit 1;])
+AC_CHECK_LIB([fltk], [open], [], [echo "Error: libfltk.so not found. Try './configure --with-fltk-dir=DIR'"; exit 1;])
+
+AC_CONFIG_FILES([Makefile src/Makefile])
+AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..62c767c
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,21 @@
+bin_PROGRAMS = flpsed
+
+flpsed_SOURCES = \
+ GsWidget.cxx \
+ PSEditWidget.cxx \
+ PSEditor.cxx \
+ PSEditText.cxx \
+ PSEditModel.cxx \
+ Postscript.cxx \
+ flpsed.cxx \
+ util.c
+
+noinst_HEADERS = \
+ GsWidget.H \
+ PSEditModel.H \
+ PSEditText.H \
+ Postscript.H \
+ PSEditor.H \
+ PSEditWidget.H \
+ util.h
+
diff --git a/src/util.h b/src/util.h
index ebe0e49..d5a71e1 100644
--- a/src/util.h
+++ b/src/util.h
@@ -1,5 +1,5 @@
/*
- * "$Id: util.h,v 1.1 2005/02/28 17:56:51 hofmann Exp $"
+ * "$Id: util.h,v 1.2 2005/03/17 18:46:20 hofmann Exp $"
*
* flpsed program.
*
@@ -20,8 +20,20 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*/
+#ifndef _UTIL_H_
+#define _UTIL_H_
#include <stdio.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
FILE *
pexecvp(const char *file, char *const argv[], pid_t *pid, char *type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif