File: configure.in

package info (click to toggle)
gengetopt 2.6-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,048 kB
  • ctags: 473
  • sloc: ansic: 3,614; sh: 431; makefile: 193; yacc: 84; lex: 73; cpp: 32
file content (104 lines) | stat: -rw-r--r-- 3,211 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Copyright (C) 1999, 2000, 2001  Free Software Foundation, Inc.
#  
# This file is part of GNU gengetopt 
#
# GNU gengetopt is free software; you can redistribute it and/or modify 
# it under the terms of the GNU General Public License as published by 
# the Free Software Foundation; either version 2, or (at your option) 
# any later version. 
#
# GNU gengetopt is distributed in the hope that it will be useful, but 
# WITHOUT ANY WARRANTY; without even the implied warranty of 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details. 
#
# You should have received a copy of the GNU General Public License along 
# with gengetopt; see the file COPYING. If not, write to the Free Software 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 

dnl Process this file with autoconf to produce a configure script.
AC_INIT(reconf)

AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(gengetopt,2.6)

dnl directory for docs (html)
AC_SUBST(gengetoptdocdir)
gengetoptdocdir=$datadir/doc/gengetopt

dnl directory for examples
AC_SUBST(gengetoptexamplesdir)
gengetoptexamplesdir=$gengetoptdocdir/examples

dnl Checks for C compiler.
AC_PROG_CC

dnl add options for non GNU compilers
AC_NONGNU_FLAGS

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T

dnl Checks for C++ compiler.
AC_PROG_CXX

dnl test for --enable-warnings command line option
AC_ARG_ENABLE( warnings, [  --enable-warnings       enable compiler warnings], AC_COMPILE_WARNINGS )

dnl for executable extensions
AC_EXEEXT

dnl for txtc (Text-to-C compiler)
AC_PROG_AWK
LF_PROG_TXTC

dnl for yacc or bison
AC_PROG_YACC

dnl set some flags for yacc to generate header file
AC_SUBST(YFLAGS)dnl
YFLAGS="$YFLAGS -d"

dnl for lex or flex
AM_PROG_LEX

dnl Checks for libraries.
dnl Replace `main' with a function in -lfl:
AC_CHECK_LIB(fl, main)

dnl if (f)lex library is not present (yywrap won't be found) we provide
dnl a simple implementation (see yywrap.cc) which will be included in
dnl LIBOBJS and linked against the program (see src/Makefile.am)
dnl this works with flex generated files (I don't know about others)
AC_REPLACE_FUNCS(yywrap)

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(malloc.h strings.h unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

dnl Checks for library functions.
AC_REPLACE_FUNCS(strdup)

dnl check for getopt in standard library
AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] ) 

AC_PATH_PROGS(TAR, tar gtar)

dnl this is only for developers who change doc/sample1.ggo file
dnl GNU cpp2html can be found at http://www.gnu.org/software/cpp2html
AC_PATH_PROGS(CPP2HTML, cpp2html)

AM_CONDITIONAL(NO_GETOPTLONG, test "$ac_cv_func_getopt_long" = no  )
AM_CONDITIONAL(NO_STRDUP, test "$ac_cv_func_strdup" = no )
AM_CONDITIONAL(NO_CPP2HTML, test -z "$ac_cv_path_CPP2HTML" )

AC_OUTPUT([Makefile txtc.sh src/Makefile doc/Makefile doc/gengetopt.1 
           doc/gengetopt.html tests/Makefile tests/no_optgiven.sh
           tests/more_than_once.sh],
          [chmod +x tests/no_optgiven.sh
           chmod +x tests/more_than_once.sh])