~vibhavp/ubuntu/saucy/urg/merge-from-debian

1 by Albert Huang
Import upstream version 0.8.11
1
#                                               -*- Autoconf -*-
2
# Process this file with autoconf to produce a configure script.
3
4
AC_PREREQ(2.59)
5
1.1.2 by Albert Huang
Import upstream version 0.8.18
6
AC_INIT(urg, 0.8.18, satofumi@users.sourceforge.jp)
1 by Albert Huang
Import upstream version 0.8.11
7
AM_INIT_AUTOMAKE
8
AC_CONFIG_SRCDIR([src/c/urg/urg_ctrl.c])
9
AM_CONFIG_HEADER([config.h])
10
11
MAJOR_VERSION=`echo $VERSION | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
12
MINOR_VERSION=`echo $VERSION | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
13
MICRO_VERSION=`echo $VERSION | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
14
AH_TEMPLATE(MAJOR_VERSION, [Major Version])
15
AH_TEMPLATE(MINOR_VERSION, [Minor Version])
16
AH_TEMPLATE(MICRO_VERSION, [Micro Version])
17
AC_DEFINE_UNQUOTED(MAJOR_VERSION, "$MAJOR_VERSION")
18
AC_DEFINE_UNQUOTED(MINOR_VERSION, "$MINOR_VERSION")
19
AC_DEFINE_UNQUOTED(MICRO_VERSION, "$MICRO_VERSION")
20
21
# Checks for programs.
22
AC_PROG_CXX
23
AC_PROG_CC
24
AC_PROG_LIBTOOL
25
AC_PROG_CPP
26
AC_PROG_INSTALL
27
AC_PROG_LN_S
28
AC_PROG_MAKE_SET
29
AC_PROG_RANLIB
30
31
# Checks for libraries.
32
SDL_VERSION=1.2.4
33
AH_TEMPLATE(HAVE_LIBSDL, [SDL Library])
34
AM_PATH_SDL($SDL_VERSION, [AC_DEFINE(HAVE_LIBSDL) HAVE_LIBSDL="yes"], AC_MSG_WARN([*** SDL $SDL_VERSION or higher is not found!]))
35
CXXFLAGS="$CFLAGS $SDL_CFLAGS"
36
LIBS="$LIBS $SDL_LIBS"
37
38
AH_TEMPLATE(HAVE_LIBSDL_NET, [SDL_net Library])
39
AC_CHECK_LIB(SDL_net, SDLNet_Init, [AC_DEFINE(HAVE_LIBSDL_NET) LIBS="$LIBS -lSDL_net" HAVE_LIBSDL_NET="yes"], AC_MSG_WARN([*** SDL_net not found! ***]))
40
41
INSTALL_LIBS="-lurg_monitor -lurg -lurg_coordinate -lurg_geometry -lurg_connection -lurg_connection_sdl -lurg_common -lurg_system"
42
C_INSTALL_LIBS="-lc_urg -lc_urg_connection -lc_urg_system"
1.1.2 by Albert Huang
Import upstream version 0.8.18
43
44
AC_CHECK_LIB(m, cos, [C_INSTALL_LIBS="$C_INSTALL_LIBS -lm" INSTALL_LIBS="$INSTALL_LIBS -lm" LIBS="$LIBS -lm"], AC_MSG_ERROR([unable to find the cos() function]))
45
1 by Albert Huang
Import upstream version 0.8.11
46
AC_SUBST(INSTALL_LIBS)
47
AC_SUBST(C_INSTALL_LIBS)
48
49
AM_CONDITIONAL(CPP_COMPILE_COND, test "x$HAVE_LIBSDL" = "xyes" -a "x$HAVE_LIBSDL_NET" = "xyes")
50
51
# Checks for header files.
52
AC_HEADER_DIRENT
53
AC_HEADER_STDC
54
AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h sys/time.h termios.h unistd.h])
55
AC_SUBST(C_INCLUDES, "-I\${top_srcdir}/src/c/system -I\${top_srcdir}/src/c/connection -I\${top_srcdir}/src/c/urg")
1.1.1 by Albert Huang
Import upstream version 0.8.12
56
AC_SUBST(CPP_INCLUDES, "-I\${top_srcdir}/include/cpp  -I\${top_srcdir}/src/cpp/system -I\${top_srcdir}/src/cpp/common -I\${top_srcdir}/src/cpp/connection -I\${top_srcdir}/src/cpp/geometry -I\${top_srcdir}/src/cpp/coordinate -I\${top_srcdir}/src/cpp/urg -I\${top_srcdir}/src/cpp/connection/sdl -I\${top_srcdir}/src/cpp/monitor")
1 by Albert Huang
Import upstream version 0.8.11
57
58
# Checks for typedefs, structures, and compiler characteristics.
59
AC_HEADER_STDBOOL
60
AC_C_CONST
61
AC_TYPE_SIZE_T
62
AC_HEADER_TIME
63
64
# Checks for library functions.
65
AC_FUNC_CLOSEDIR_VOID
66
AC_FUNC_MALLOC
67
AC_FUNC_SELECT_ARGTYPES
68
AC_FUNC_STRERROR_R
69
AC_FUNC_VPRINTF
1.1.2 by Albert Huang
Import upstream version 0.8.18
70
AC_FUNC_STAT
1 by Albert Huang
Import upstream version 0.8.11
71
AC_CHECK_FUNCS([atexit floor gettimeofday memmove select strerror strrchr strtol strstr])
72
AC_SUBST(SAMPLES_LIBS_PATH, "-L\${top_builddir}/src/c/urg -L\${top_builddir}/src/c/connection -L\${top_builddir}/src/c/system -L\${top_builddir}/src/cpp/urg -L\${top_builddir}/src/cpp/connection -L\${top_builddir}/src/cpp/common -L\${top_builddir}/src/cpp/system -L\${top_builddir}/src/cpp/monitor -L\${top_builddir}/src/cpp/coordinate -L\${top_builddir}/src/cpp/geometry -L\${top_builddir}/src/cpp/connection/sdl")
73
AC_CONFIG_FILES([Makefile
74
                 include/Makefile
75
                 include/c/Makefile
76
                 include/cpp/Makefile
77
                 src/Makefile
78
		 src/c/Makefile
79
                 src/c/system/Makefile
80
                 src/c/connection/Makefile
81
                 src/c/urg/Makefile
82
		 src/cpp/Makefile
83
                 src/cpp/system/Makefile
84
                 src/cpp/common/Makefile
85
                 src/cpp/connection/Makefile
86
                 src/cpp/connection/sdl/Makefile
87
                 src/cpp/coordinate/Makefile
88
                 src/cpp/geometry/Makefile
89
                 src/cpp/urg/Makefile
90
                 src/cpp/monitor/Makefile
91
                 samples/Makefile
92
                 samples/c/Makefile
93
                 samples/cpp/Makefile
94
                 samples/scip_samples/Makefile
95
                 samples/cpp_ethernet/Makefile
96
		 urg-config
97
		 c_urg-config])
98
99
AC_OUTPUT([], [chmod +x urg-config
100
	       chmod +x c_urg-config])