when doing the checks necessary for chan_phone, look for all of the linux
[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_connect], [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 PBX_IXJUSER=0
306 AC_CHECK_HEADER([linux/ixjuser.h], [
307    AC_CHECK_HEADER([linux/telephony.h], [
308       AC_CHECK_HEADER([linux/version.h], [PBX_IXJUSER=1])])])
309 AC_SUBST(PBX_IXJUSER)
310
311 AC_ARG_WITH([vpb], AC_HELP_STRING([--with-vpb=PATH],[use vpb files in PATH]),[
312 case ${withval} in
313      n|no)
314      USE_VPB=no
315      VPB_MANDATORY="yes"
316      ;;
317      y|ye|yes)
318      ;;
319      *)
320      VPB_DIR="${withval}"
321      VPB_MANDATORY="yes"
322      ;;
323 esac
324 ])
325 if test "${USE_VPB}" != "no"; then
326    echo -n "checking for vpb_open in -lvpb..."
327    saved_ldflags="${LDFLAGS}"
328    LDFLAGS="${LDFLAGS} -L${VPB_DIR} -lvpb"
329    AC_LINK_IFELSE(
330         [
331         AC_LANG_PROGRAM(
332         [#include "${VPB_DIR}vpbapi.h"],
333         [int q = vpb_open(0,0);])
334         ],
335         [       AC_MSG_RESULT(yes) 
336                 ac_cv_lib_vpb_vpb_open="yes" 
337         ],
338         [       AC_MSG_RESULT(no) 
339                 ac_cv_lib_vpb_vpb_open="no" 
340         ]
341         )
342         LDFLAGS="${saved_ldflags}"
343
344         PBX_LIBvpb=0
345         if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
346         VPB_LIB="-lvpb"
347         if test "${VPB_DIR}" != ""; then
348         VPB_LIB="-L${VPB_DIR}/lib ${VPB_LIB}"
349         VPB_INCLUDE="-I${VPB_DIR}/include"
350         AC_SUBST([VPB_INCLUDE])
351         fi
352         AC_SUBST([VPB_LIB])
353         PBX_LIBvpb=1
354         AC_DEFINE([HAVE_LIBVPB], 1, [Define if your system has the VoiceTronix (vpb) libraries.])
355    elif test ! -z "${VPB_MANDATORY}"; 
356    then
357       echo "***"
358       echo "*** The VoiceTronix (vpb) installation on this system appears to be broken."
359       echo "*** Either correct the installation, or run configure"
360       echo "*** including --without-vpb."
361       exit 1
362    fi
363 fi
364 AC_SUBST([PBX_LIBvpb])
365
366
367 AC_LANG_PUSH(C++)
368
369 AC_ARG_WITH([qt], AC_HELP_STRING([--with-qt=PATH],[use Qt files in PATH]),[
370 case ${withval} in
371      n|no)
372      USE_QT=no
373      QT_MANDATORY="yes"
374      ;;
375      y|ye|yes)
376      ;;
377      *)
378      QT_DIR="${withval}"
379      QT_MANDATORY="yes"
380      ;;
381 esac
382 ])
383
384 PBX_QT=0
385 if test "${USE_QT}" != "no"; then
386    echo -n "checking for QDate in -lqt..."
387    saved_ldflags="${LDFLAGS}"
388    LDFLAGS="${LDFLAGS} -L${QT_DIR}/lib -lqt"
389    qtlib="qt"
390         AC_LINK_IFELSE(
391         [
392                 AC_LANG_PROGRAM(
393                 [#include "${QT_DIR}include/qdatetime.h"],
394                 [QDate date();])
395         ],
396         [ac_cv_lib_qt_qt_date="yes"],
397         [ac_cv_lib_qt_qt_date="no"])
398                 
399         if test "${ac_cv_lib_qt_qt_date}" = "no"; then
400                 qtlib="qt-mt"   
401         LDFLAGS="${saved_ldflags} -L${QT_DIR}/lib -lqt-mt"
402                 AC_LINK_IFELSE(
403                 [
404                         AC_LANG_PROGRAM(
405                         [#include "${QT_DIR}include/qdatetime.h"],
406                         [QDate date();])
407                 ],
408                 [ac_cv_lib_qt_qt_date="yes"],
409                 [ac_cv_lib_qt_qt_date="no"])
410         fi      
411         
412         LDFLAGS="${saved_ldflags}"
413         
414         if test "${ac_cv_lib_qt_qt_date}" = "yes"; then
415                 AC_MSG_RESULT(yes) 
416         else
417                 AC_MSG_RESULT(no) 
418         fi
419         
420         if test "${ac_cv_lib_qt_qt_date}" = "yes"; then
421                 QT_LIB="-l${qtlib}"
422                 if test "${QT_DIR}" != ""; then
423                         QT_LIB="-L${QT_DIR}/lib ${QT_LIB}"
424                         QT_INCLUDE="-I${QT_DIR}/include"
425                         AC_SUBST([QT_INCLUDE])
426                 fi
427                 AC_SUBST([QT_LIB])
428                 PBX_QT=1
429                 AC_DEFINE([HAVE_LIBQT], 1, [Define if your system has the Qt library])
430                 AC_PATH_TOOL(QTMOC, moc, No)
431    elif test ! -z "${QT_MANDATORY}"; 
432    then
433       echo "***"
434       echo "*** The Qt installation on this system appears to be broken."
435       echo "*** Either correct the installation, or run configure"
436       echo "*** including --without-qt."
437       exit 1
438    fi
439 fi
440 AC_SUBST([PBX_QT])
441
442
443
444
445 AC_ARG_WITH([kde], AC_HELP_STRING([--with-kde=PATH],[use KDE files in PATH]),[
446 case ${withval} in
447      n|no)
448      USE_KDE=no
449      KDE_MANDATORY="yes"
450      ;;
451      y|ye|yes)
452      ;;
453      *)
454      KDE_DIR="${withval}"
455      KDE_MANDATORY="yes"
456      ;;
457 esac
458 ])
459
460 PBX_KDE=0
461 if test "${USE_KDE}" != "no"; then
462    echo -n "checking for crashHandler in -lkdecore..."
463    saved_ldflags="${LDFLAGS}"
464    LDFLAGS="-I${KDE_DIR}/include ${LDFLAGS} -L${KDE_DIR}/lib -lkdecore"
465         AC_LINK_IFELSE(
466         [
467                 AC_LANG_PROGRAM(
468                 [#include "kcrash.h"],
469                 [KCrash::defaultCrashHandler(1);])
470         ],
471         [ac_cv_lib_kde_crash="yes"],
472         [ac_cv_lib_kde_crash="no"])
473                 
474         LDFLAGS="${saved_ldflags}"
475         
476         if test "${ac_cv_lib_kde_crash}" = "yes"; then
477                 AC_MSG_RESULT(yes) 
478         else
479                 AC_MSG_RESULT(no) 
480         fi
481         
482         if test "${ac_cv_lib_kde_crash}" = "yes"; then
483                 KDE_LIBS="-lkdecore -lkdeui"
484                 if test "${KDE_DIR}" != ""; then
485                         KDE_LIBS="-L${KDE_DIR}/lib ${KDE_LIBS}"
486                         KDE_INCLUDE="-I${KDE_DIR}/include"
487                         AC_SUBST([KDE_INCLUDE])
488                 fi
489                 AC_SUBST([KDE_LIBS])
490                 PBX_KDE=1
491                 AC_DEFINE([HAVE_LIBKDE], 1, [Define if your system has the KDE library])
492    elif test ! -z "${KDE_MANDATORY}"; 
493    then
494       echo "***"
495       echo "*** The KDE installation on this system appears to be broken."
496       echo "*** Either correct the installation, or run configure"
497       echo "*** including --without-kde."
498       exit 1
499    fi
500 fi
501 AC_SUBST([PBX_KDE])
502
503 if test x"${PBX_KDE}" = x1; then
504         AC_PATH_TOOL(KDEINIT, kdeinit, No)
505         if test ! x"${KDEINIT}" = xNo; then
506         KDEDIR=$(${DIRNAME} ${KDEINIT})
507         KDEDIR=$(${DIRNAME} ${KDEDIR})
508         fi
509         AC_SUBST([KDEDIR])
510 fi
511
512 AC_LANG_POP
513
514 PBX_GTK=0
515 AC_CHECK_TOOL(GTKCONFIG, gtk-config, No)
516 if test ! "x${GTKCONFIG}" = xNo; then
517    GTK_INCLUDE=$(${GTKCONFIG} --cflags gthread)
518    GTK_LIBS=$(${GTKCONFIG} --libs gthread)
519    PBX_GTK=1
520    AC_DEFINE([HAVE_GTK], 1, [Define if your system has the GTK libraries.])
521 fi
522 AC_SUBST(PBX_GTK)
523 AC_SUBST(GTK_INCLUDE)
524 AC_SUBST(GTK_LIBS)
525
526 PLATFORM_PTLIB="ptlib_${OSTYPE}_${MACHTYPE}_r"
527
528 AC_ARG_WITH([pwlib], AC_HELP_STRING([--with-pwlib=PATH],[use PWLib files in PATH]),[
529 case ${withval} in
530      n|no)
531      USE_PWLIB=no
532      ;;
533      y|ye|yes)
534      ;;
535      *)
536      PWLIB_DIR="${withval}"
537      ;;
538 esac
539 ])
540 if test "${USE_PWLIB}" != "no"; then
541         echo -n "checking for existence of pwlib..."
542         
543         saved_ldflags="${LDFLAGS}"
544         LDFLAGS="${LDFLAGS} -L${PWLIB_DIR} -l${PLATFORM_PTLIB}"
545         
546         AC_LINK_IFELSE(
547         [
548         AC_LANG_PROGRAM(
549         [#include "${PWDIR_DIR}ptime.h"],
550         [int q = PTime::IsDaylightSaving();])
551         ],
552         [       AC_MSG_RESULT(yes) 
553                 ac_cv_lib_pwlib="yes" 
554         ],
555         [       AC_MSG_RESULT(no) 
556                 ac_cv_lib_pwlib="no" 
557         ]
558         )
559         LDFLAGS="${saved_ldflags}"
560
561         PBX_LIBPWLIB=0
562    
563    if test "${ac_cv_lib_pwlib}" = "yes"; then
564       PWLIB_LIB="-l{PLATFORM_PWLIB}"
565       if test "${PWLIB_DIR}" != ""; then
566          PWLIB_LIB="-L${PWLIB_DIR}/lib ${PWLIB_LIB}"
567                         PWLIB_INCLUDE="-I${PWLIB_DIR}/include"
568                         AC_SUBST([PWLIB_INCLUDE])
569       fi
570         AC_SUBST([PWLIB_LIB])
571         PBX_LIBPWLIB=1
572         AC_DEFINE([HAVE_LIBPWLIB], 1, [Define if your system has the pwlib libraries.])
573    elif test ! -z "${PWLIB_DIR}"; 
574    then
575       echo "***"
576       echo "*** The PWLIB installation on this system appears to be broken."
577       echo "*** Either correct the installation, or run configure"
578       echo "*** including --without-pwlib"
579       exit 1
580    fi
581 fi
582 AC_SUBST([PBX_LIBPWLIB])
583
584 PBX_CURL=0
585 AC_PATH_TOOL([CURL], [curl-config], No)
586 if test ! x"${CURL}" = xNo; then
587 # check for version
588    CURLLIBS=$(${CURL} --libs)
589    PBX_CURL=1
590    AC_DEFINE([HAVE_CURL], 1, [Define if your system has the curl libraries.])
591 fi
592 AC_SUBST(PBX_CURL)
593 AC_SUBST(CURLLIBS)
594
595 AC_FUNC_ALLOCA
596 AC_HEADER_DIRENT
597 AC_HEADER_STDC
598 AC_HEADER_SYS_WAIT
599 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])
600
601 AC_SYS_LARGEFILE
602
603 # Checks for typedefs, structures, and compiler characteristics.
604 AC_HEADER_STDBOOL
605 AC_C_CONST
606 AC_TYPE_UID_T
607 AC_C_INLINE
608 AC_TYPE_MODE_T
609 AC_TYPE_OFF_T
610 AC_TYPE_PID_T
611 AC_TYPE_SIZE_T
612 AC_CHECK_MEMBERS([struct stat.st_blksize])
613 AC_HEADER_TIME
614 AC_STRUCT_TM
615 AC_C_VOLATILE
616 AC_CHECK_TYPES([ptrdiff_t])
617
618 # Checks for library functions.
619 AC_FUNC_CHOWN
620 AC_FUNC_CLOSEDIR_VOID
621 AC_FUNC_ERROR_AT_LINE
622 AC_FUNC_FORK
623 AC_FUNC_FSEEKO
624 AC_PROG_GCC_TRADITIONAL
625 AC_FUNC_MALLOC
626 AC_FUNC_MEMCMP
627 AC_FUNC_MKTIME
628 AC_FUNC_MMAP
629 AC_FUNC_REALLOC
630 AC_FUNC_SELECT_ARGTYPES
631 AC_FUNC_SETVBUF_REVERSED
632 AC_TYPE_SIGNAL
633 AC_FUNC_STAT
634 AC_FUNC_STRCOLL
635 AC_FUNC_STRFTIME
636 AC_FUNC_STRNLEN
637 AC_FUNC_STRTOD
638 AC_FUNC_UTIME_NULL
639 AC_FUNC_VPRINTF
640 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])
641
642 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
643 AC_OUTPUT
644
645 echo
646 echo "               .\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$=..      "
647 echo "            .\$7\$7..          .7\$\$7:.    "
648 echo "          .\$\$:.                 ,\$7.7   "
649 echo "        .\$7.     7\$\$\$\$           .\$\$77  "
650 echo "     ..\$\$.       \$\$\$\$\$            .\$\$\$7 "
651 echo "    ..7\$   .?.   \$\$\$\$\$   .?.       7\$\$\$."
652 echo "   \$.\$.   .\$\$\$7. \$\$\$\$7 .7\$\$\$.      .\$\$\$."
653 echo " .777.   .\$\$\$\$\$\$77\$\$\$77\$\$\$\$\$7.      \$\$\$,"
654 echo " \$\$\$~      .7\$\$\$\$\$\$\$\$\$\$\$\$\$7.       .\$\$\$."
655 echo ".\$\$7          .7\$\$\$\$\$\$\$7:          ?\$\$\$."
656 echo "\$\$\$          ?7\$\$\$\$\$\$\$\$\$\$I        .\$\$\$7 "
657 echo "\$\$\$       .7\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$      :\$\$\$. "
658 echo "\$\$\$       \$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$\$\$\$    .\$\$\$.  "
659 echo "\$\$\$        \$\$\$   7\$\$\$7  .\$\$\$    .\$\$\$.   "
660 echo "\$\$\$\$             \$\$\$\$7         .\$\$\$.    "
661 echo "7\$\$\$7            7\$\$\$\$        7\$\$\$      "
662 echo " \$\$\$\$\$                        \$\$\$       "
663 echo "  \$\$\$\$7.                       \$\$  (TM)     "
664 echo "   \$\$\$\$\$\$\$.           .7\$\$\$\$\$\$  \$\$      "
665 echo "     \$\$\$\$\$\$\$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$.\$\$\$\$\$\$      "
666 echo "       \$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$.                "
667 echo
668
669 echo "Package configured for: "
670 echo " OS type  : $PBX_OSTYPE"
671 echo " host cpu : $host_cpu"
672 if test "x${crossCompile}" = xYes; then
673    echo ""
674    echo " Cross Compilation = YES"
675    echo " Target            = ${host}"
676 fi
677