]> rtime.felk.cvut.cz Git - orte.git/blob - configure.in
3511eeed457664d7e2fa8c8a77913e98ec3d6fad
[orte.git] / configure.in
1 # Process this file with autoconf to produce a configure script.
2 #
3 # $Id: configure.in,v 1.1 2004/01/13 12:39:53 ppisa Exp $
4
5 # autoconf requirement
6 AC_PREREQ([2.57])
7
8 AC_INIT([orte],[0.2.0],[petr.smolik@wo.cz])
9 AC_CONFIG_AUX_DIR(admin)
10
11 #Check for CPU / vendor / OS
12 AC_CANONICAL_HOST
13 AC_CANONICAL_TARGET
14 AM_CONFIG_HEADER(orte/include/config.h)
15 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
16 # Activate maintainer mode
17 AM_MAINTAINER_MODE
18
19 DS_LINUX()
20
21 ###############################
22 # Package info
23 ORTE_MAJOR_VERSION=0
24 ORTE_MINOR_VERSION=2
25 ORTE_MICRO_VERSION=0
26 ORTE_VERSION=$ORTE_MAJOR_VERSION.$ORTE_MINOR_VERSION.$ORTE_MICRO_VERSION
27 AC_SUBST(ORTE_MAJOR_VERSION)
28 AC_SUBST(ORTE_MINOR_VERSION)
29 AC_SUBST(ORTE_MICRO_VERSION)
30 AC_SUBST(ORTE_VERSION)
31
32 ###############################
33 # includes
34 case "$target" in
35   *-cygwin* | *-mingw*)
36     INCLUDES='-I$(top_srcdir)/orte/include -I$(top_srcdir)/orte/include/win32'
37     WIN_LIB='yes'
38     ;;
39   *)
40     # Assume Unix.
41     if test ${USE_RTLINUX} == "yes" ; then
42       INCLUDES='-I$(top_srcdir)/orte/include -I$(top_srcdir)/orte/include/rtl -I$(top_srcdir)/RTL_UDP/include'
43     else
44       INCLUDES='-I$(top_srcdir)/orte/include'
45     fi
46     ;;
47 esac
48 AC_SUBST(INCLUDES)
49 AM_CONDITIONAL(CONFIG_ORTE_WIN, test x$WIN_LIB = xyes)
50
51 ###############################
52 # modules
53 moduledir="\$(libdir)/modules/\$(LINUX_KERNELRELEASE)/comedi"
54 modulePROGRAMS_INSTALL="\$(top_builddir)/modtool --install"
55 modulePROGRAMS_UNINSTALL="\$(top_builddir)/modtool --uninstall"
56 AC_SUBST(moduledir)
57 AC_SUBST(modulePROGRAMS_INSTALL)
58
59 ###############################
60 # Checks for programs.
61 AC_PROG_CC
62 AC_PROG_RANLIB
63
64 ###############################
65 # Checks for libraries (no for RT)
66 if test ${USE_RTLINUX} != "yes" ; then
67 AC_CHECK_LIB([ws2_32], [main])
68 AC_CHECK_LIB([pthread], [main])
69 fi
70
71 ###############################
72 # Checks for header files.
73 AC_HEADER_STDC
74 AC_CHECK_HEADERS(
75 [arpa/inet.h fcntl.h stdio.h netdb.h netinet/in.h stdlib.h \
76 string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h pthread.h \
77 stdarg.h getopt.h sys/types.h net/if.h byteswap.h signal.h errno.h \
78 ctype.h sys/stat.h winsock2.h ws2tcpip.h])
79
80 ###############################
81 # Checks for typedefs, structures, and compiler characteristics.
82 AC_C_BIGENDIAN
83 AC_C_CONST
84 AC_C_INLINE
85 AC_TYPE_PID_T
86 AC_TYPE_SIZE_T
87 AC_HEADER_TIME
88
89 ###############################
90 # Checks for library functions.
91 AC_PROG_GCC_TRADITIONAL
92 AC_FUNC_MALLOC
93 AC_CHECK_FUNCS([strdup])
94
95 ###############################
96 # Add obsolute directory for header files
97 CFLAGS="$CFLAGS -Wall"
98
99 AC_CONFIG_FILES([Makefile
100                  orte/Makefile
101                  RTL_UDP/Makefile
102                  RTL_UDP/udp/Makefile
103                  orte/liborte/Makefile
104                  orte/liborte/rtl/Makefile
105                  orte/examples/Makefile
106                  orte/examples/hello/Makefile
107                  orte/examples/reliable/Makefile
108                  orte/examples/ORTEPing/Makefile
109                  orte/examples/ORTESpy/Makefile
110                  orte/manager/Makefile])
111
112 AC_OUTPUT([
113 modtool
114 ])
115 chmod +x modtool
116
117 echo \
118 "------------------------------------------------------------------------
119 Configuration ORTE:
120
121   Source code location:       ${srcdir}
122   Compiler:                   ${CC}
123   Compiler flags:             ${CFLAGS}
124   Host System Type:           ${host}
125   
126   See config.h for further configuration information.
127 ------------------------------------------------------------------------"
128