1 # Process this file with autoconf to produce a configure script.
3 # $Id: configure.in,v 1.2 2004/01/17 18:16:35 ppisa Exp $
8 AC_INIT([orte],[0.2.0],[petr.smolik@wo.cz])
9 AC_CONFIG_AUX_DIR(admin)
11 #Check for CPU / vendor / OS
14 AM_CONFIG_HEADER(orte/include/config.h)
15 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
16 # Activate maintainer mode
21 ###############################
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)
33 ###############################
35 moduledir="\$(libdir)/modules/\$(LINUX_KERNELRELEASE)/orte"
36 modulePROGRAMS_INSTALL="\$(top_builddir)/modtool --install"
37 modulePROGRAMS_UNINSTALL="\$(top_builddir)/modtool --uninstall"
39 AC_SUBST(modulePROGRAMS_INSTALL)
41 ###############################
42 # Checks for programs.
46 ###############################
47 # Checks for libraries (no for RT)
48 if test -z ${CONFIG_ORTE_RT} ; then
49 AC_CHECK_LIB([ws2_32], [main])
50 AC_CHECK_LIB([pthread], [main])
53 ###############################
54 # Checks for header files.
55 if test -z ${CONFIG_ORTE_RT} ; then
58 [arpa/inet.h fcntl.h stdio.h netdb.h netinet/in.h stdlib.h \
59 string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h pthread.h \
60 stdarg.h getopt.h sys/types.h net/if.h byteswap.h signal.h errno.h \
61 ctype.h sys/stat.h winsock2.h ws2tcpip.h])
63 ###############################
67 INCLUDES='-I$(top_srcdir)/orte/include -I$(top_srcdir)/orte/include/win32'
69 AC_DEFINE([CONFIG_ORTE_WIN],[1],[Define if is target windows])
73 if test ${USE_RTLINUX} == "yes" ; then
74 INCLUDES='-I$(top_srcdir)/orte/include -I$(top_srcdir)/orte/include/rtl -I$(top_srcdir)/orte/contrib/RTL_UDP/include'
75 elif test ${USE_RTAI} == "yes" ; then
76 INCLUDES='-I$(top_srcdir)/orte/include -I$(top_srcdir)/orte/include/rtai'
78 INCLUDES='-I$(top_srcdir)/orte/include'
80 AC_DEFINE([CONFIG_ORTE_UNIX],[1],[Define if is target a unix system])
85 AM_CONDITIONAL(CONFIG_ORTE_WIN, test x$WIN = xyes)
86 AM_CONDITIONAL(CONFIG_ORTE_UNIX, test x$UNIX = xyes)
88 ###############################
89 # Checks for typedefs, structures, and compiler characteristics.
96 ###############################
97 # Checks for library functions.
98 AC_PROG_GCC_TRADITIONAL
99 AC_CHECK_FUNCS([strdup])
101 ###############################
102 # Add obsolute directory for header files
103 CFLAGS="$CFLAGS -Wall"
105 AC_CONFIG_FILES([Makefile
107 orte/liborte/Makefile
108 orte/liborte/rtl/Makefile
109 orte/examples/Makefile
110 orte/examples/hello/Makefile
111 orte/examples/reliable/Makefile
112 orte/examples/ORTEPing/Makefile
113 orte/examples/ORTESpy/Makefile
114 orte/manager/Makefile])
124 # ======================================================================
125 # generate orte/include/orte_config.h
126 # ======================================================================
128 AC_MSG_NOTICE([creating orte/include/orte_config.h])
129 sed -e "s/ PACKAGE/ ORTE_PACKAGE/" -e "s/ VERSION/ ORTE_VERSION/" \
130 orte/include/config.h >orte/include/orte_config.h.new
131 if cmp -s orte/include/orte_config.h.new orte/include/orte_config.h; then
132 rm orte/include/orte_config.h.new
133 AC_MSG_NOTICE([orte/include/orte_config.h is unchanged])
135 mv orte/include/orte_config.h.new orte/include/orte_config.h
139 "------------------------------------------------------------------------
142 Source code location: ${srcdir}
144 Compiler flags: ${CFLAGS}
145 Host System Type: ${host}
147 See config.h for further configuration information.
148 ------------------------------------------------------------------------"