This repository has been archived by the owner on Aug 14, 2022. It is now read-only.
forked from blitzed-org/libopm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
101 lines (80 loc) · 2.91 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
dnl Process this file with autoconf to produce a configure script.
AC_INIT(libopm, [0.1])
AC_CONFIG_SRCDIR(src/libopm.h)
AM_CONFIG_HEADER(src/setup.h)
AM_INIT_AUTOMAKE()
AC_PREFIX_DEFAULT([/usr/local/libopm])
AM_MAINTAINER_MODE
# for documentation purposes
DOX_DIR_HTML=api
DOX_DIR_LATEX=latex
DOX_DIR_MAN=man
AC_SUBST(DOX_DIR_HTML)
AC_SUBST(DOX_DIR_LATEX)
AC_SUBST(DOX_DIR_MAN)
AC_ARG_WITH(extra-fascism,
AC_HELP_STRING([--with-extra-fascism],
[add extra gcc3-specific warning flags]),
[CFLAGS="$CFLAGS -g -O0 -W -Wall -Wfloat-equal -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs"])
dnl AC_ARG_WITH(faldo,
dnl AC_HELP_STRING([--with-faldo],
dnl [make some use of Nick Faldo]))
dnl Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
dnl check if we need -lsocket or -lnsl
ETR_SOCKET_NSL
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no)
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_FUNC_SNPRINTF
dnl if they want select() or they don't have poll() then we need to check
dnl that we actually have select()
if test "$have_sys_poll_h" = "no"; then
AC_CHECK_FUNCS(select, have_select=yes, have_select=no)
if test "$have_select" = "no"; then
AC_MSG_ERROR([No select() implementation found])
fi
fi
AC_CHECK_FUNCS(inet_aton inet_pton)
dnl Check if we can use gethostbyname2 for ipv6
AC_CHECK_FUNCS(gethostbyname gethostbyname2)
dnl AIX fun
AC_C_BIGENDIAN
dnl Solaris has to be weird doesn't it...
AC_CHECK_LIB(socket, socket, AC_SUBST(LSOCKET, [-lsocket]))
AC_CHECK_LIB(nsl, gethostbyname, AC_SUBST(LNSL, [-lnsl]))
dnl teehee - taken from MRTG / Tobias Oetiker
dnl if test "$with_faldo" != "no"; then
dnl echo $ECHO_N "checking for Nick Faldo $ECHO_C"
dnl for bleh in 1 2 3; do
dnl echo $ECHO_N "."
dnl sleep 1
dnl done
dnl AC_MSG_RESULT([ http://blitzed.org/advocacy/enjoy.jpg])
dnl fi
LTLIBOBJS=`echo "$LIB@&t@OBJS" |
sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
AC_SUBST(LTLIBOBJS)
dnl This comes last because configure won't actually work with -Werror in
dnl the CFLAGS
AC_ARG_WITH(werror,
AC_HELP_STRING([--with-werror],
[use -Werror to abort compilation on any warning]),
[CFLAGS="$CFLAGS -Werror"])
AC_OUTPUT(Makefile src/Makefile doc/Makefile doc/Doxyfile)
echo "##############################################################################"
echo "Everything is now configured. To compile libopm now, just type make. It"
echo "requires GNU Make, which may be installed as gmake on your system."
echo
echo "libopm will be installed in ${prefix}. To change this, run:"
echo " ./configure --prefix=DIRECTORY"
echo
echo "##############################################################################"
echo