File: configure.ac

package info (click to toggle)
twclock 2.7-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 840 kB
  • ctags: 208
  • sloc: sh: 6,130; ansic: 2,068; makefile: 66
file content (76 lines) | stat: -rw-r--r-- 2,235 bytes parent folder | download | duplicates (2)
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
# Copyright (C) 1999 - 2007 Ted Williams (wa0eir) <wa0eir@mchsi.com>
#  
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without 
# modifications, as long as this notice is preserved.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

AC_INIT([twclock], [2.7], [wa0eir@mchsi.com])
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE()
##AM_INIT_AUTOMAKE([twclock], [2.7])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CC

# Checks for header files.
###TJW AC_PATH_X
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h strings.h sys/ioctl.h sys/time.h unistd.h math.h sys/param.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_TIME
AC_STRUCT_TM
AC_C_VOLATILE

# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_FUNC_STRFTIME
AC_CHECK_LIB([m], [sin])
AC_CHECK_LIB([Xpm], [XpmCreatePixmapFromData])
AC_CHECK_FUNCS([floor gettimeofday putenv sqrt strtoul])
AC_CHECK_LIB([pthread], [pthread_create])
AC_TYPE_SIGNAL


AC_DEFINE([HAVE_LIB_XP], [], [got xp])
AC_DEFINE([HAVE_MOTIF], [], [got motif/lesstif])

AC_PATH_XTRA             # sets X_CFLAGS, X_LIBS, X_EXTRA_LIBS and X_PRE_LIBS
if test "$have_x" = "no"
then
   echo "Can not find X on your system"
   exit 1
fi

AC_FIND_MOTIF            # sets MOTIF_LIBS and MOTIF_CFLAGS
if test "$with_motif" = "no"
then
   echo "Can't find Motif on your system"
   exit 1
else
   am_cflags="$X_CFLAGS $MOTIF_CFLAGS"
   AC_SUBST(AM_CFLAGS,$[am_cflags])
fi

#am_ldflags="$X_LIBS $X_PRE_LIBS $link_motif -lXt -lX11 $X_EXTRA_LIBS"
#AC_SUBST(AM_LDFLAGS, $[am_ldflags])

##########################################
CFLAGS="$XBAE_CFLAGS $CFLAGS $X_CFLAGS $MOTIF_CFLAGS"
LIBS="$X_LIBS $XBAE_LIBS $MOTIF_LIBS -lXt -lX11 $X_PRE_LIBS $X_EXTRA_LIBS $LIBS"##########################################

AC_PATH_X_APP_DEFAULTS()
APP_DEFAULTS_PATH=$ac_x_app_defaults
AC_SUBST(APP_DEFAULTS_PATH)

AC_CONFIG_FILES([ Makefile src/Makefile ])

AC_OUTPUT