File: configure.in

package info (click to toggle)
isdnutils 1:3.25+dfsg1-3.5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 18,188 kB
  • ctags: 12,236
  • sloc: ansic: 98,041; sh: 19,044; perl: 4,948; makefile: 3,145; cpp: 2,708; tcl: 22
file content (219 lines) | stat: -rw-r--r-- 6,285 bytes parent folder | download | duplicates (3)
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
dnl     This file is an input file used by the GNU "autoconf" program to
dnl     generate the file "configure", which is run during vbox installation
dnl     to configure the system for the local environment.

dnl #------------------------------------------------------------------------#
dnl # Version of the vbox package. Theres no need to change this ;-)         #
dnl #------------------------------------------------------------------------#
AC_INIT(vbox,[2.0.0BETA5])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(src/config.h)
AC_CONFIG_SRCDIR(src/vboxgetty.h)

VERDATE="17-NOV-98"

dnl #------------------------------------------------------------------------#
dnl # Some defaults:                                                         #
dnl #------------------------------------------------------------------------#

AC_PREFIX_DEFAULT()

AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "${PACKAGE_VERSION}", [Version number of package])
AC_DEFINE_UNQUOTED(VERDATE, "${VERDATE}", [date the version was created])

AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(VERDATE)

CONFIG_BINDIR=`eval echo ${CONFIG_BINDIR:-"/usr/man"}`
CONFIG_MANDIR=`eval echo ${CONFIG_MANDIR:-"/usr/man"}`
CONFIG_SBINDIR=`eval echo ${CONFIG_SBINDIR:-"/sbin"}`
VBOX_DOCDIR=`eval echo ${VBOX_DOCDIR:-"/usr/share/doc/vbox"}`

dnl #------------------------------------------------------------------------#
dnl # Checks for programs:                                                   #
dnl #------------------------------------------------------------------------#

AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LN_S

AC_PATH_PROG(VBOX_RM, rm, "rm")
AC_PATH_PROG(VBOX_MV, mv, "mv")
AC_PATH_PROG(VBOX_SED, sed, "sed")
AC_PATH_PROG(VBOX_MAIL, mail, "mail")
AC_PATH_PROG(VBOX_AR, ar, "ar")
AC_PATH_PROG(VBOX_RANLIB, ranlib, "ranlib")

AC_SUBST(VBOX_RM)
AC_SUBST(VBOX_MV)
AC_SUBST(VBOX_SED)
AC_SUBST(VBOX_MAIL)
AC_SUBST(VBOX_AR)
AC_SUBST(VBOX_RANLIB)

dnl #------------------------------------------------------------------------#
dnl # Checks for header files:                                               #
dnl #------------------------------------------------------------------------#

AC_HEADER_TIME
AC_CHECK_HEADERS(sys/time.h)

dnl #------------------------------------------------------------------------#
dnl # Checks for typedefs, structures, and compiler characteristics:         #
dnl #------------------------------------------------------------------------#

AC_C_CONST
AC_C_INLINE

AC_CHECK_FUNCS(vsnprintf)

dnl #------------------------------------------------------------------------#
dnl # Checks for needed external packages:                                   #
dnl #------------------------------------------------------------------------#

GND_PACKAGE_NCURSES
GND_PACKAGE_TCL


   dnl #=================#
   dnl # --with-spooldir #
   dnl #=================#

AC_MSG_CHECKING(where the messages are stored)

VBOX_SPOOLDIR="`eval echo ${VBOX_SPOOLDIR:-"/var/spool/vbox"}`"

AC_ARG_WITH(spooldir,
	[  --with-spooldir=DIR     vbox's stores messages in DIR [/var/spool/vbox]],
	VBOX_SPOOLDIR=${withval}
)

AC_MSG_RESULT(${VBOX_SPOOLDIR})

AC_DEFINE_UNQUOTED(SPOOLDIR, "${VBOX_SPOOLDIR}", [vbox spool directory])
AC_SUBST(VBOX_SPOOLDIR)

   dnl #===============#
   dnl # --with-logdir #
   dnl #===============#

AC_MSG_CHECKING(where the logs are stored)

VBOX_LOGDIR="`eval echo ${VBOX_LOGDIR:-"/var/log/vbox"}`"

AC_ARG_WITH(logdir,
	[  --with-logdir=DIR       logs are stored in DIR [/var/log/vbox]],
	VBOX_LOGDIR=${withval}
)

AC_MSG_RESULT(${VBOX_LOGDIR})

AC_DEFINE_UNQUOTED(LOGFILEDIR, "${VBOX_LOGDIR}", [vbox log directory])
AC_SUBST(VBOX_LOGDIR)

   dnl #===============#
   dnl # --with-piddir #
   dnl #===============#

AC_MSG_CHECKING(where the pids are stored)

VBOX_PIDDIR="`eval echo ${VBOX_PIDDIR:-"/var/run"}`"

AC_ARG_WITH(piddir,
	[  --with-piddir=DIR       pids are stored in DIR [/var/run]],
	VBOX_PIDDIR=${withval}
)

AC_MSG_RESULT(${VBOX_PIDDIR})

AC_DEFINE_UNQUOTED(PIDFILEDIR, "${VBOX_PIDDIR}", [vbox pid file directory])
AC_SUBST(VBOX_PIDDIR)

   dnl #================#
   dnl # --with-lockdir #
   dnl #================#

AC_MSG_CHECKING(where the locks are made)

VBOX_LCKDIR="`eval echo ${VBOX_LOCKDIR:-"/var/lock"}`"

AC_ARG_WITH(lockdir,
	[  --with-lockdir=DIR      locks are made in DIR [/var/lock]],
	VBOX_LCKDIR=${withval}
)

AC_MSG_RESULT(${VBOX_LCKDIR})

AC_DEFINE_UNQUOTED(LCKFILEDIR, "${VBOX_LCKDIR}", [vbox lock directory])
AC_SUBST(VBOX_LCKDIR)

   dnl #===================#
   dnl # --with-i4lconfdir #
   dnl #===================#

AC_MSG_CHECKING(where the isdn configuration is stored)

ISDN_GLOBAL_CONFIG="`eval echo ${CONFIG_I4lCONFDIR:-"/etc/isdn"}`"

AC_ARG_WITH(confdir,
	[  --with-i4lconfdir=DIR   global isdn configuration directory [\$I4LCONFDIR] ],
	ISDN_GLOBAL_CONFIG=${withval}
)

AC_MSG_RESULT(${ISDN_GLOBAL_CONFIG})

AC_DEFINE_UNQUOTED(I4LCONFDIR, "${ISDN_GLOBAL_CONFIG}", [global i4l config directory])

dnl #------------------------------------------------------------------------#
dnl # Check and optimize compiler flags:                                     #
dnl #------------------------------------------------------------------------#

if (test "${ac_cv_prog_CC}" = "gcc")
then
   if (test "${CFLAGS}" != "")
   then
      FLAGOPMZ="no"
      FLAGWARN="no"

      for i in ${CFLAGS}
      do
         case "$i" in

            -O*) FLAGOPMZ="yes"
                 ;;
            -W*) FLAGWARN="yes"
                 ;;
         esac
      done

      if (test "${FLAGOPMZ}" = "no")
      then
         CFLAGS="-O2 ${CFLAGS}"
      fi

      if (test "${FLAGWARN}" = "no")
      then
         CFLAGS="-Wall ${CFLAGS}"
      fi
   else
      CFLAGS="-Wall -O2 ${CFLAGS}"
   fi
fi

dnl #------------------------------------------------------------------------#
dnl # Creates output files:                                                  #
dnl #------------------------------------------------------------------------#

AC_SUBST(ISDN_GLOBAL_CONFIG)
AC_SUBST(VERDATE)
AC_SUBST(CONFIG_BINDIR)
AC_SUBST(CONFIG_MANDIR)
AC_SUBST(CONFIG_SBINDIR)
AC_SUBST(CONFIG_I4LCONFDIR)
AC_SUBST(VBOX_LOCKDIR)
AC_SUBST(VBOX_DOCDIR)

AC_OUTPUT(Makefile src/Makefile doc/Makefile doc/de/Makefile utils/Makefile)