ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/idar/configure.in
Revision: 1.1
Committed: Sat Mar 29 19:27:36 2003 UTC (21 years, 8 months ago) by tdb
Branch: MAIN
Log Message:
Initial stab at the autoconf/automake stuff for idar. Not sure it's
perfect, I've done a lot of this sort of stuff today ;)

File Contents

# Content
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3 #
4 # configure.in for i-scream idar
5 # $Id$
6 #
7
8 # Change these to change the package name and version
9 AC_INIT(idar, 1.0, dev@i-scream.org.uk)
10 AM_INIT_AUTOMAKE(idar, 1.0)
11
12 # Revision number (automatically updated)
13 AC_REVISION($Revision$)
14
15 # Might work with older autoconfs... but tested on 2.57
16 AC_PREREQ(2.57)
17
18 # The file we use to pass #define's to the source
19 AM_CONFIG_HEADER(config.h)
20
21 # Checks for programs
22 AC_PROG_CC
23 AC_PROG_INSTALL
24
25 # User specified libukcprog prefix
26 AC_ARG_WITH([libukcprog-prefix],
27 [ --with-libukcprog-prefix=PATH libukcprog is in PATH],
28 [
29 if test -d "$withval/lib"; then
30 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
31 fi
32 if test -d "$withval/include"; then
33 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
34 fi
35 ]
36 )
37
38 # Checks for header files
39 AC_HEADER_STDC
40 AC_CHECK_HEADERS(ukcprog.h,,[AC_MSG_ERROR([need ukcprog.h])])
41
42 # Checks for typedefs, structures, and compiler characteristics
43 AC_C_CONST
44
45 # Checks for library functions
46 AC_FUNC_MALLOC
47 AC_FUNC_REALLOC
48 AC_FUNC_FORK
49
50 # Figure out details about the host - we need the OS
51 AC_CANONICAL_HOST
52
53 # Set things up for different OS's
54 # We define the name of the OS so the code can act accordingly
55 # We also need to add the right LDFLAGS
56 case $host_os in
57 solaris2.*)
58 LIBS="$LIBS -lnsl -lsocket -Wl,-Bstatic -lukcprog -Wl,-Bdynamic"
59 ;;
60 freebsd4.*)
61 LIBS="$LIBS -lukcprog -static"
62 ;;
63 linux-gnu)
64 LIBS="$LIBS -lukcprog -static"
65 ;;
66 *)
67 AC_MSG_ERROR([Cannot build on unknown OS: $host_os])
68 ;;
69 esac
70
71 # Library checks that need to be done after the OS specific stuff
72 AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])])
73
74 # Need libxml2
75 AM_PATH_XML2
76 CFLAGS="$CFLAGS $XML_CFLAGS"
77 LIBS="$LIBS $XML_LIBS"
78
79 # And finish by changing these files
80 AC_CONFIG_FILES([Makefile])
81
82 AC_OUTPUT