apparently some systems may have ncurses that doesn't provide backwards compat
[asterisk/asterisk.git] / configure.ac
1 # Process this file with autoconf to produce a configure script.
2
3 AC_PREREQ(2.59)
4
5 m4_define([PBX_VERSION],
6           m4_bpatsubst(m4_esyscmd([build_tools/make_version .]),
7                        [\([0-9.]*\)\(\w\|\W\)*],
8                        [\1]))
9 AC_INIT(asterisk, PBX_VERSION, www.asterisk.org)
10
11 # cross-compile macros
12 AC_CANONICAL_BUILD
13 AC_CANONICAL_HOST
14 AC_CANONICAL_TARGET
15
16 # check existence of the package
17 AC_CONFIG_SRCDIR([asterisk.c])
18
19 # specify output header file
20 AC_CONFIG_HEADER(include/autoconfig.h)
21
22 AC_COPYRIGHT("Asterisk")
23 AC_REVISION($Revision$)
24
25 AC_PREFIX_DEFAULT()
26
27 ### ** Platform.
28 AC_DEFINE_UNQUOTED(PBX_PLATFORM, "${host}",
29 [Define this to be the canonical name (cpu-vendor-os) of your system.])
30 AC_DEFINE_UNQUOTED(PBX_CPU, "${host_cpu}",
31 [Define this to be the name of the CPU of your system.])
32 AC_DEFINE_UNQUOTED(PBX_VENDOR, "${host_vendor}",
33 [Define this to be the name of the vendor of your system.])
34 AC_DEFINE_UNQUOTED(PBX_OS, "${host_os}",
35 [Define this to be the name of the OS of your system.])
36
37 # export some useful defines
38 PBX_PLATFORM=${host}
39 PBX_CPU=${host_cpu}
40 PBX_VENDOR=${host_vendor}
41 PBX_OS=${host_os}
42 AC_SUBST(PBX_PLATFORM)
43 AC_SUBST(PBX_CPU)
44 AC_SUBST(PBX_VENDOR)
45 AC_SUBST(PBX_OS)
46
47 #  check for uname
48 AC_PATH_TOOL([UNAME], [uname], No)
49 if test ! x"${UNAME}" = xNo; then
50    PBX_OSREV=$(${UNAME} -r)
51 fi
52 AC_SUBST(PBX_OSREV)
53
54 # guest OS type
55 case "${host}" in
56   cygwin*|mingw*|windows*|winnt)
57     AC_DEFINE(Win32, 1,
58               [Define according to your operating system type.])
59     PBX_OSTYPE="CYGWIN"
60 # this is ugly - KPF
61   OSISWIN32=1
62   AC_SUBST(OSISWIN32)
63     ;;
64   *linux*)
65     AC_DEFINE(Linux, 1,
66               [Define according to your operating system type.])
67     PBX_OSTYPE="Linux"
68     ;;
69   *netbsd*)
70     AC_DEFINE(NetBSD, 1,
71               [Define according to your operating system type.])
72     PBX_OSTYPE="NetBSD"
73     ;;
74   *freebsd*)
75     AC_DEFINE(FreeBSD, 1,
76               [Define according to your operating system type.])
77     PBX_OSTYPE="FreeBSD"
78     ;;
79   *openbsd*)
80     AC_DEFINE(OpenBSD, 1,
81               [Define according to your operating system type.])
82     PBX_OSTYPE="OpenBSD"
83     ;;
84   *sun*)
85     AC_DEFINE(SunOS, 1,
86               [Define according to your operating system type.])
87     PBX_OSTYPE="SunOS"
88     ;;
89   *darwin*)
90     AC_DEFINE(Darwin, 1,
91               [Define according to your operating system type.])
92     PBX_OSTYPE="Darwin"
93     ;;
94   *)
95     AC_DEFINE(Unix, 1,
96               [Define according to your operating system type.])
97     PBX_OSTYPE="Unix"
98    ;;
99 esac
100 AC_SUBST(PBX_OSTYPE)
101
102 # This needs to be before any macros that use the C compiler
103 AC_GNU_SOURCE
104
105 AH_TOP(
106 #ifndef _REENTRANT
107 #define _REENTRANT
108 #endif
109 )
110
111 # cross-compile checks
112 if test x"${build}" != x"${host}"; 
113 then
114    AC_CHECK_TOOL(CC, gcc, :)
115    AC_CHECK_TOOL(CXX, g++, :)
116    AC_CHECK_TOOL(RANLIB, ranlib, :)
117    AC_CHECK_TOOL(AR, ar, :)
118
119    if test x"${PBX_OSTYPE}" = xWin32;
120    then
121       AC_CHECK_TOOL(NM, nm, :)
122       AC_CHECK_TOOL(WINDRES, windres, :)
123       AC_CHECK_TOOL(DLLWRAP, dllwrap, :)
124    fi
125    crossCompile="Yes"
126 fi
127
128 # Checks for programs.
129 AC_PROG_CC
130 AC_PROG_CXX
131 AC_PROG_CPP
132 AC_PROG_CXXCPP
133 AC_PROG_AWK
134 AC_PROG_INSTALL
135 AC_PROG_LN_S
136 AC_PROG_RANLIB
137 AST_CHECK_GNU_MAKE
138
139 AC_PATH_PROG([GREP], [grep], :)
140 AC_PATH_PROG([AR], [ar], :)
141 AC_PATH_PROG([FIND], [find], :)
142 AC_PATH_PROG([COMPRESS], [compress], :)
143 AC_PATH_PROG([BASENAME], [basename], :)
144 AC_PATH_PROG([DIRNAME], [dirname], :)
145 AC_PATH_PROG([SHELL], [sh], :)
146 AC_PATH_PROG([LN], [ln], :)
147 AC_PATH_PROG([DOT], [dot], :)
148
149 AC_LANG(C)
150
151 AC_ARG_ENABLE(dev-mode,
152         [  --enable-dev-mode    Turn on developer mode],
153         [case "${enableval}" in
154               y|ye|yes) AST_DEVMODE=yes ;;
155               n|no)  AST_DEVMODE=no ;;
156               *) AC_MSG_ERROR(bad value ${enableval} for --enable-dev-mode)  ;;
157         esac])
158 AC_SUBST(AST_DEVMODE)
159
160 AST_EXT_LIB([asound], [snd_spcm_init], [alsa/asoundlib.h], [ALSA], [Advanced Linux Sound Architecture], [-lm -ldl])
161 AST_EXT_LIB([curses], [initscr], [curses.h], [CURSES], [curses], [])
162 AST_EXT_LIB([mfcr2], [mfcr2_MakeCall], [libmfcr2.h], [MFCR2], [MFCR2])
163 AST_EXT_LIB([nbs], [nbs_setup], [nbs.h], [NBS], [Network Broadcast Sound])
164 AST_EXT_LIB([ncurses], [initscr], [curses.h], [NCURSES], [ncurses], [])
165 AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt])
166 AST_EXT_LIB([odbc], [SQLConnect], [sql.h], [UNIXODBC], [unixODBC])
167 AST_EXT_LIB([ogg], [ogg_sync_init], [], [OGG], [OGG])
168 AST_EXT_LIB([osptk], [OSPPCryptoDecrypt], [osp/osp.h], [OSPTK], [OSP Toolkit], [-lcrypto -lssl])
169 AST_EXT_LIB([popt], [poptStrerror], [popt.h], [POPT], [popt])
170 AST_EXT_LIB([pri], [pri_call], [libpri.h], [LIBPRI], [ISDN PRI])
171 AST_EXT_LIB([speex], [speex_encode], [speex/speex.h], [SPEEX], [Speex], [-lm])
172 AST_EXT_LIB([sqlite], [sqlite_exec], [sqlite.h], [SQLITE], [SQLite])
173 AST_EXT_LIB([ssl], [ssl2_connect], [openssl/ssl.h], [OPENSSL], [OpenSSL], [-lcrypto])
174 AST_EXT_LIB([tds], [tds_version], [tds.h], [FREETDS], [FreeTDS])
175 AST_EXT_LIB([vorbis], [vorbis_info_init], [vorbis/codec.h], [VORBIS], [Vorbis], [-lm -lvorbisenc])
176 AST_EXT_LIB([z], [compress], [zlib.h], [ZLIB], [zlib])
177
178 if test "x${PBX_OSTYPE}" = "xLinux" ; then
179    AST_EXT_LIB([ossaudio], [oss_ioctl_mixer], [linux/soundcard.h], [OSS], [Open Sound System])
180 elif test "x${PBX_OSTYPE}" = "xFreeBSD" ; then
181    AST_EXT_LIB([ossaudio], [oss_ioctl_mixer], [sys/soundcard.h], [OSS], [Open Sound System])
182 else
183    AST_EXT_LIB([ossaudio], [oss_ioctl_mixer], [soundcard.h], [OSS], [Open Sound System])
184 fi
185
186 if test "x${PBX_OSTYPE}" = "xLinux" ; then
187    AST_EXT_LIB([tonezone], [tone_zone_find], [linux/zaptel.h], [ZAPTEL], [Zaptel])
188 else
189    AST_EXT_LIB([tonezone], [tone_zone_find], [zaptel.h], [ZAPTEL], [Zaptel])
190 fi
191
192 GSM_INTERNAL="yes"
193 GSM_SYSTEM="yes"
194 AC_ARG_WITH([gsm], AC_HELP_STRING([--with-gsm=PATH], [use libgsm files in PATH, or 'internal']), [
195 case ${withval} in
196      n|no)
197      USE_GSM=no
198      ;;
199      y|ye|yes)
200      ;;
201      internal)
202      GSM_SYSTEM="no"
203      ;;
204      *)
205      GSM_DIR="${withval}"
206      GSM_INTERNAL="no"
207      ;;
208 esac
209 ])
210
211 PBX_LIBgsm=0
212
213 if test "${USE_GSM}" != "no"; then
214    if test "${GSM_SYSTEM}" = "yes"; then
215       AC_CHECK_LIB([gsm], [gsm_create], AC_DEFINE_UNQUOTED([HAVE_GSM], 1,
216       [Define to indicate the GSM library]), [], -L${GSM_DIR}/lib)
217       if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then
218          gsm_LIB="-lgsm"
219          if test "x${GSM_DIR}" != "x"; then
220             gsm_LIB="-L${GSM_DIR}/lib ${gsm_LIB}"
221             gsm_INCLUDE="-I${GSM_DIR}/include"
222          fi
223          PBX_LIBgsm=1
224          GSM_INTERNAL="no"
225       fi
226    fi
227    if test "${GSM_INTERNAL}" = "yes"; then
228       gsm_LIB="internal"
229       PBX_LIBgsm=1
230    fi
231    if test "x${PBX_LIBgsm}" = "x0"; then
232       echo "***"
233       echo "*** The GSM installation on this system appears to be broken."
234       echo "*** Either correct the installation, or run configure"
235       echo "*** including --without-gsm"
236       exit 1
237    fi
238 fi
239
240 AC_SUBST([gsm_LIB])
241 AC_SUBST([gsm_INCLUDE])
242 AC_SUBST([PBX_LIBgsm])
243
244 AC_ARG_WITH([pq], AC_HELP_STRING([--with-pq=PATH],[use PostgreSQL files in PATH]),[
245 case ${withval} in
246      n|no)
247      USE_PQ=no
248      ;;
249      y|ye|yes)
250      PQ_MANDATORY="yes"
251      ;;
252      *)
253      PQ_DIR="${withval}"
254      PQ_MANDATORY="yes"
255      ;;
256 esac
257 ])
258
259 PBX_LIBpq=0
260 PG_CONFIG=No
261 if test "${USE_PQ}" != "no"; then       
262    if test "x${PQ_DIR}" != "x"; then
263       AC_PATH_TOOL([PG_CONFIG], [pg_config], No, [${PQ_DIR}/bin])
264       if test x"${PG_CONFIG}" = xNo; then
265          echo "***"
266          echo "*** pg_config was not found in the path you specified:"
267          echo "*** ${PQ_DIR}/bin"
268          echo "*** Either correct the installation, or run configure"
269          echo "*** including --without-pq"
270          exit 1
271       fi
272    else
273       AC_PATH_TOOL([PG_CONFIG], [pg_config], No)
274    fi
275 fi
276
277 if test x"${PG_CONFIG}" != xNo; then
278    PQ_libdir=`pg_config --libdir`
279    PQ_includedir=`pg_config --includedir`
280    
281    AC_CHECK_LIB([pq], [PQexec], AC_DEFINE_UNQUOTED([HAVE_PQ], 1,
282    [Define to indicate the PostgreSQL library]), [], -L${PQ_libdir} -lz)
283
284    if test "${ac_cv_lib_pq_PQexec}" = "yes"; then
285       pq_LIB="-L${PQ_libdir} -lpq -lz"
286       pq_INCLUDE="-I${PQ_includedir}"
287       PBX_LIBpq=1
288    elif test ! -z "${PQ_MANDATORY}";
289    then
290       echo "***"
291       echo "*** The PostgreSQL installation on this system appears to be broken."
292       echo "*** Either correct the installation, or run configure"
293       echo "*** including --without-pq"
294       exit 1
295    fi
296 fi
297 AC_SUBST([pq_INCLUDE])
298 AC_SUBST([pq_LIB])
299 AC_SUBST([PBX_LIBpq])
300
301 PBX_H323=0
302 AC_CHECK_HEADER([h323.h], [PBX_H323=1], [])
303 AC_SUBST(PBX_H323)
304
305 HAVE_QUICKNET=0
306 AC_CHECK_HEADER([ixjuser.h], [HAVE_QUICKNET=1],[])
307 AC_SUBST(HAVE_QUICKNET)
308
309 AC_ARG_WITH([vpb], AC_HELP_STRING([--with-vpb=PATH],[use vpb files in PATH]),[
310 case ${withval} in
311      n|no)
312      USE_VPB=no
313      VPB_MANDATORY="yes"
314      ;;
315      y|ye|yes)
316      ;;
317      *)
318      VPB_DIR="${withval}"
319      VPB_MANDATORY="yes"
320      ;;
321 esac
322 ])
323 if test "${USE_VPB}" != "no"; then
324    echo -n "checking for vpb_open in -lvpb..."
325    saved_ldflags="${LDFLAGS}"
326    LDFLAGS="${LDFLAGS} -L${VPB_DIR} -lvpb"
327    AC_LINK_IFELSE(
328         [
329         AC_LANG_PROGRAM(
330         [#include "${VPB_DIR}vpbapi.h"],
331         [int q = vpb_open(0,0);])
332         ],
333         [       AC_MSG_RESULT(yes) 
334                 ac_cv_lib_vpb_vpb_open="yes" 
335         ],
336         [       AC_MSG_RESULT(no) 
337                 ac_cv_lib_vpb_vpb_open="no" 
338         ]
339         )
340         LDFLAGS="${saved_ldflags}"
341
342         PBX_LIBvpb=0
343         if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
344         VPB_LIB="-lvpb"
345         if test "${VPB_DIR}" != ""; then
346         VPB_LIB="-L${VPB_DIR}/lib ${VPB_LIB}"
347         VPB_INCLUDE="-I${VPB_DIR}/include"
348         AC_SUBST([VPB_INCLUDE])
349         fi
350         AC_SUBST([VPB_LIB])
351         PBX_LIBvpb=1
352         AC_DEFINE([HAVE_LIBVPB], 1, [Define if your system has the VoiceTronix (vpb) libraries.])
353    elif test ! -z "${VPB_MANDATORY}"; 
354    then
355       echo "***"
356       echo "*** The VoiceTronix (vpb) installation on this system appears to be broken."
357       echo "*** Either correct the installation, or run configure"
358       echo "*** including --without-vpb."
359       exit 1
360    fi
361 fi
362 AC_SUBST([PBX_LIBvpb])
363
364
365 AC_LANG_PUSH(C++)
366
367 AC_ARG_WITH([qt], AC_HELP_STRING([--with-qt=PATH],[use Qt files in PATH]),[
368 case ${withval} in
369      n|no)
370      USE_QT=no
371      QT_MANDATORY="yes"
372      ;;
373      y|ye|yes)
374      ;;
375      *)
376      QT_DIR="${withval}"
377      QT_MANDATORY="yes"
378      ;;
379 esac
380 ])
381
382 PBX_QT=0
383 if test "${USE_QT}" != "no"; then
384    echo -n "checking for QDate in -lqt..."
385    saved_ldflags="${LDFLAGS}"
386    LDFLAGS="${LDFLAGS} -L${QT_DIR}/lib -lqt"
387    qtlib="qt"
388         AC_LINK_IFELSE(
389         [
390                 AC_LANG_PROGRAM(
391                 [#include "${QT_DIR}include/qdatetime.h"],
392                 [QDate date();])
393         ],
394         [ac_cv_lib_qt_qt_date="yes"],
395         [ac_cv_lib_qt_qt_date="no"])
396                 
397         if test "${ac_cv_lib_qt_qt_date}" = "no"; then
398                 qtlib="qt-mt"   
399         LDFLAGS="${saved_ldflags} -L${QT_DIR}/lib -lqt-mt"
400                 AC_LINK_IFELSE(
401                 [
402                         AC_LANG_PROGRAM(
403                         [#include "${QT_DIR}include/qdatetime.h"],
404                         [QDate date();])
405                 ],
406                 [ac_cv_lib_qt_qt_date="yes"],
407                 [ac_cv_lib_qt_qt_date="no"])
408         fi      
409         
410         LDFLAGS="${saved_ldflags}"
411         
412         if test "${ac_cv_lib_qt_qt_date}" = "yes"; then
413                 AC_MSG_RESULT(yes) 
414         else
415                 AC_MSG_RESULT(no) 
416         fi
417         
418         if test "${ac_cv_lib_qt_qt_date}" = "yes"; then
419                 QT_LIB="-l${qtlib}"
420                 if test "${QT_DIR}" != ""; then
421                         QT_LIB="-L${QT_DIR}/lib ${QT_LIB}"
422                         QT_INCLUDE="-I${QT_DIR}/include"
423                         AC_SUBST([QT_INCLUDE])
424                 fi
425                 AC_SUBST([QT_LIB])
426                 PBX_QT=1
427                 AC_DEFINE([HAVE_LIBQT], 1, [Define if your system has the Qt library])
428                 AC_PATH_TOOL(QTMOC, moc, No)
429    elif test ! -z "${QT_MANDATORY}"; 
430    then
431       echo "***"
432       echo "*** The Qt installation on this system appears to be broken."
433       echo "*** Either correct the installation, or run configure"
434       echo "*** including --without-qt."
435       exit 1
436    fi
437 fi
438 AC_SUBST([PBX_QT])
439
440
441
442
443 AC_ARG_WITH([kde], AC_HELP_STRING([--with-kde=PATH],[use KDE files in PATH]),[
444 case ${withval} in
445      n|no)
446      USE_KDE=no
447      KDE_MANDATORY="yes"
448      ;;
449      y|ye|yes)
450      ;;
451      *)
452      KDE_DIR="${withval}"
453      KDE_MANDATORY="yes"
454      ;;
455 esac
456 ])
457
458 PBX_KDE=0
459 if test "${USE_KDE}" != "no"; then
460    echo -n "checking for crashHandler in -lkdecore..."
461    saved_ldflags="${LDFLAGS}"
462    LDFLAGS="-I${KDE_DIR}/include ${LDFLAGS} -L${KDE_DIR}/lib -lkdecore"
463         AC_LINK_IFELSE(
464         [
465                 AC_LANG_PROGRAM(
466                 [#include "kcrash.h"],
467                 [KCrash::defaultCrashHandler(1);])
468         ],
469         [ac_cv_lib_kde_crash="yes"],
470         [ac_cv_lib_kde_crash="no"])
471                 
472         LDFLAGS="${saved_ldflags}"
473         
474         if test "${ac_cv_lib_kde_crash}" = "yes"; then
475                 AC_MSG_RESULT(yes) 
476         else
477                 AC_MSG_RESULT(no) 
478         fi
479         
480         if test "${ac_cv_lib_kde_crash}" = "yes"; then
481                 KDE_LIBS="-lkdecore -lkdeui"
482                 if test "${KDE_DIR}" != ""; then
483                         KDE_LIBS="-L${KDE_DIR}/lib ${KDE_LIBS}"
484                         KDE_INCLUDE="-I${KDE_DIR}/include"
485                         AC_SUBST([KDE_INCLUDE])
486                 fi
487                 AC_SUBST([KDE_LIBS])
488                 PBX_KDE=1
489                 AC_DEFINE([HAVE_LIBKDE], 1, [Define if your system has the KDE library])
490    elif test ! -z "${KDE_MANDATORY}"; 
491    then
492       echo "***"
493       echo "*** The KDE installation on this system appears to be broken."
494       echo "*** Either correct the installation, or run configure"
495       echo "*** including --without-kde."
496       exit 1
497    fi
498 fi
499 AC_SUBST([PBX_KDE])
500
501 if test x"${PBX_KDE}" = x1; then
502         AC_PATH_TOOL(KDEINIT, kdeinit, No)
503         if test ! x"${KDEINIT}" = xNo; then
504         KDEDIR=$(${DIRNAME} ${KDEINIT})
505         KDEDIR=$(${DIRNAME} ${KDEDIR})
506         fi
507         AC_SUBST([KDEDIR])
508 fi
509
510 AC_LANG_POP
511
512 PBX_GTK=0
513 AC_CHECK_TOOL(GTKCONFIG, gtk-config, No)
514 if test ! "x${GTKCONFIG}" = xNo; then
515    GTK_INCLUDE=$(${GTKCONFIG} --cflags gthread)
516    GTK_LIBS=$(${GTKCONFIG} --libs gthread)
517    PBX_GTK=1
518    AC_DEFINE([HAVE_GTK], 1, [Define if your system has the GTK libraries.])
519 fi
520 AC_SUBST(PBX_GTK)
521 AC_SUBST(GTK_INCLUDE)
522 AC_SUBST(GTK_LIBS)
523
524 PLATFORM_PTLIB="ptlib_${OSTYPE}_${MACHTYPE}_r"
525
526 AC_ARG_WITH([pwlib], AC_HELP_STRING([--with-pwlib=PATH],[use PWLib files in PATH]),[
527 case ${withval} in
528      n|no)
529      USE_PWLIB=no
530      ;;
531      y|ye|yes)
532      ;;
533      *)
534      PWLIB_DIR="${withval}"
535      ;;
536 esac
537 ])
538 if test "${USE_PWLIB}" != "no"; then
539         echo -n "checking for existence of pwlib..."
540         
541         saved_ldflags="${LDFLAGS}"
542         LDFLAGS="${LDFLAGS} -L${PWLIB_DIR} -l${PLATFORM_PTLIB}"
543         
544         AC_LINK_IFELSE(
545         [
546         AC_LANG_PROGRAM(
547         [#include "${PWDIR_DIR}ptime.h"],
548         [int q = PTime::IsDaylightSaving();])
549         ],
550         [       AC_MSG_RESULT(yes) 
551                 ac_cv_lib_pwlib="yes" 
552         ],
553         [       AC_MSG_RESULT(no) 
554                 ac_cv_lib_pwlib="no" 
555         ]
556         )
557         LDFLAGS="${saved_ldflags}"
558
559         PBX_LIBPWLIB=0
560    
561    if test "${ac_cv_lib_pwlib}" = "yes"; then
562       PWLIB_LIB="-l{PLATFORM_PWLIB}"
563       if test "${PWLIB_DIR}" != ""; then
564          PWLIB_LIB="-L${PWLIB_DIR}/lib ${PWLIB_LIB}"
565                         PWLIB_INCLUDE="-I${PWLIB_DIR}/include"
566                         AC_SUBST([PWLIB_INCLUDE])
567       fi
568         AC_SUBST([PWLIB_LIB])
569         PBX_LIBPWLIB=1
570         AC_DEFINE([HAVE_LIBPWLIB], 1, [Define if your system has the pwlib libraries.])
571    elif test ! -z "${PWLIB_DIR}"; 
572    then
573       echo "***"
574       echo "*** The PWLIB installation on this system appears to be broken."
575       echo "*** Either correct the installation, or run configure"
576       echo "*** including --without-pwlib"
577       exit 1
578    fi
579 fi
580 AC_SUBST([PBX_LIBPWLIB])
581
582 PBX_CURL=0
583 AC_PATH_TOOL([CURL], [curl-config], No)
584 if test ! x"${CURL}" = xNo; then
585 # check for version
586    CURLLIBS=$(${CURL} --libs)
587    PBX_CURL=1
588    AC_DEFINE([HAVE_CURL], 1, [Define if your system has the curl libraries.])
589 fi
590 AC_SUBST(PBX_CURL)
591 AC_SUBST(CURLLIBS)
592
593 AC_FUNC_ALLOCA
594 AC_HEADER_DIRENT
595 AC_HEADER_STDC
596 AC_HEADER_SYS_WAIT
597 AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h])
598
599 AC_SYS_LARGEFILE
600
601 # Checks for typedefs, structures, and compiler characteristics.
602 AC_HEADER_STDBOOL
603 AC_C_CONST
604 AC_TYPE_UID_T
605 AC_C_INLINE
606 AC_TYPE_MODE_T
607 AC_TYPE_OFF_T
608 AC_TYPE_PID_T
609 AC_TYPE_SIZE_T
610 AC_CHECK_MEMBERS([struct stat.st_blksize])
611 AC_HEADER_TIME
612 AC_STRUCT_TM
613 AC_C_VOLATILE
614 AC_CHECK_TYPES([ptrdiff_t])
615
616 # Checks for library functions.
617 AC_FUNC_CHOWN
618 AC_FUNC_CLOSEDIR_VOID
619 AC_FUNC_ERROR_AT_LINE
620 AC_FUNC_FORK
621 AC_FUNC_FSEEKO
622 AC_PROG_GCC_TRADITIONAL
623 AC_FUNC_MALLOC
624 AC_FUNC_MEMCMP
625 AC_FUNC_MKTIME
626 AC_FUNC_MMAP
627 AC_FUNC_REALLOC
628 AC_FUNC_SELECT_ARGTYPES
629 AC_FUNC_SETVBUF_REVERSED
630 AC_TYPE_SIGNAL
631 AC_FUNC_STAT
632 AC_FUNC_STRCOLL
633 AC_FUNC_STRFTIME
634 AC_FUNC_STRNLEN
635 AC_FUNC_STRTOD
636 AC_FUNC_UTIME_NULL
637 AC_FUNC_VPRINTF
638 AC_CHECK_FUNCS([atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strndup strrchr strsep strspn strstr strtol unsetenv utime strtoq strcasestr asprintf vasprintf])
639
640 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
641 AC_OUTPUT
642
643 echo
644 echo "               .\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$=..      "
645 echo "            .\$7\$7..          .7\$\$7:.    "
646 echo "          .\$\$:.                 ,\$7.7   "
647 echo "        .\$7.     7\$\$\$\$           .\$\$77  "
648 echo "     ..\$\$.       \$\$\$\$\$            .\$\$\$7 "
649 echo "    ..7\$   .?.   \$\$\$\$\$   .?.       7\$\$\$."
650 echo "   \$.\$.   .\$\$\$7. \$\$\$\$7 .7\$\$\$.      .\$\$\$."
651 echo " .777.   .\$\$\$\$\$\$77\$\$\$77\$\$\$\$\$7.      \$\$\$,"
652 echo " \$\$\$~      .7\$\$\$\$\$\$\$\$\$\$\$\$\$7.       .\$\$\$."
653 echo ".\$\$7          .7\$\$\$\$\$\$\$7:          ?\$\$\$."
654 echo "\$\$\$          ?7\$\$\$\$\$\$\$\$\$\$I        .\$\$\$7 "
655 echo "\$\$\$       .7\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$      :\$\$\$. "
656 echo "\$\$\$       \$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$\$\$\$    .\$\$\$.  "
657 echo "\$\$\$        \$\$\$   7\$\$\$7  .\$\$\$    .\$\$\$.   "
658 echo "\$\$\$\$             \$\$\$\$7         .\$\$\$.    "
659 echo "7\$\$\$7            7\$\$\$\$        7\$\$\$      "
660 echo " \$\$\$\$\$                        \$\$\$       "
661 echo "  \$\$\$\$7.                       \$\$  (TM)     "
662 echo "   \$\$\$\$\$\$\$.           .7\$\$\$\$\$\$  \$\$      "
663 echo "     \$\$\$\$\$\$\$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$.\$\$\$\$\$\$      "
664 echo "       \$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$.                "
665 echo
666
667 echo "Package configured for: "
668 echo " OS type  : $PBX_OSTYPE"
669 echo " host cpu : $host_cpu"
670 if test "x${crossCompile}" = xYes; then
671    echo ""
672    echo " Cross Compilation = YES"
673    echo " Target            = ${host}"
674 fi
675