File: configure.in

package info (click to toggle)
itools 0.6.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge
  • size: 324 kB
  • ctags: 85
  • sloc: ansic: 1,367; perl: 333; makefile: 120; sh: 14
file content (68 lines) | stat: -rw-r--r-- 1,670 bytes parent folder | download
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
# $Id: configure.in,v 1.5 2004/12/27 16:20:02 thamer Exp $

AC_PREREQ(2.57)
AC_INIT([itool],[0.6.1],[developer-at-arabeyes.org])

# Checks for Link/Compile options
SYSTEM=`uname -s`
if [ test "$SYSTEM" = "SunOS" ]; then
   LDFLAGS="$LDFLAGS -rpath-link /usr/include"
fi

# Checks for programs
AC_PROG_CC

# Checks for libraries
AC_HAVE_LIBRARY(m, , [AC_MSG_ERROR(library 'libm' is missing)])

#AC_CHECK_LIB(itl, getPrayerTimes, , [AC_MSG_ERROR(library 'itl' is missing)])

# Specify ITL specific lib (wish AC_CHECK_LIB did this !!)
if test "x${prefix}" = "xNONE"; then
  my_prefix=${ac_default_prefix}
else
  my_prefix=${prefix}
fi

ITL_LIB="$my_prefix/lib/itl /usr/lib/"

for i in $ITL_LIB; do
  echo -n "checking for -litl in $i... "
  ( [ test -e $i/libitl.so ] || [ test -e $i/libitl.a ] ) && ITL_LIB_FOUND=$i && break;
done;

if [ test "$ITL_LIB_FOUND" = "/usr/lib/" ]; then
  LIBS="$LIBS -litl"
  echo "yes"
elif [ test -n "$ITL_LIB_FOUND" ]; then
  LDFLAGS="$LDFLAGS -L$ITL_LIB_FOUND -Xlinker -rpath -Xlinker $ITL_LIB_FOUND"
  LIBS="$LIBS -litl"
  echo "yes"
else
  echo "no"	
  echo "library 'itl' is missing"
  exit;
fi

AC_CHECK_MEMBER(struct tm.tm_gmtoff, [AC_DEFINE(HAVE_TM_GMTOFF)], ,
                [#include <time.h>])
AC_PATH_PROG(LD, ld)
AC_SUBST(LD)

# Checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
AC_CHECK_HEADERS([itl/prayer.h itl/hijri.h], , [AC_MSG_ERROR(ITL header files missing)])

# Checks for typedefs and structures
AC_C_CONST
AC_TYPE_UID_T
AC_STRUCT_TM

# Checks for library functions
AC_CHECK_FUNCS([strcasecmp])

# Generate output
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT