source: configure.ac @ 6aa4611

release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 6aa4611 was 438009c, checked in by Anders Kaseorg <andersk@mit.edu>, 12 years ago
Correct the --with-libzephyr help string to --with-zephyr. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100644
File size: 3.9 KB
RevLine 
[7d4fbcd]1dnl Process this file with autoconf to produce a configure script.
[30b634a]2AC_INIT([BarnOwl],[1.5pre1],[bug-barnowl@mit.edu])
[37f27bc]3AM_INIT_AUTOMAKE([-Wall foreign])
[636de2a]4m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
[7d4fbcd]5
[8073852]6AC_CONFIG_MACRO_DIR([m4])
[37f27bc]7AC_CONFIG_HEADER([config.h])
[7d4fbcd]8
9AC_PROG_CC
10
[4097723]11AC_ARG_WITH([stack-protector],
12  [AS_HELP_STRING([--with-stack-protector],
13    [Enable gcc -fstack-protector])],
14  [],
15  [with_stack_protector=check])
16
17AS_IF([test "x$with_stack_protector" != xno],
[ce27cc1]18  [AX_C_CHECK_FLAG([-fstack-protector],[],[],
19    [CFLAGS="$CFLAGS -fstack-protector"],
20    [if test "x$with_stack_protector" != xcheck; then
21       AC_MSG_FAILURE([--with-stack-protector selected, but gcc does support it.])
22     fi
23    ])])
[87afe92]24
[d54035d]25AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
[363eb9d]26AC_SEARCH_LIBS([gethostbyname], [nsl])
27AC_SEARCH_LIBS([socket], [socket])
28AC_SEARCH_LIBS([res_search], [resolv])
[2c270e6]29
30AC_ARG_WITH([zephyr],
[438009c]31  [AS_HELP_STRING([--with-zephyr],
[ec21c62]32    [Enable Zephyr support])],
[2c270e6]33  [],
34  [with_zephyr=check])
35
36AS_IF([test "x$with_zephyr" != xno],
[806f769]37  [AC_MSG_CHECKING([for Kerberos IV])
38   AS_IF([krb5-config krb4 --libs >/dev/null 2>&1],
39     [AC_MSG_RESULT([yes])
40      AC_DEFINE([HAVE_KERBEROS_IV], [1], [Define if you have kerberos IV])
41      CFLAGS="${CFLAGS} `krb5-config krb4 --cflags`"
42      LIBS="${LIBS} `krb5-config krb4 --libs`"
43     ],
44     [AC_MSG_RESULT([no])
45      PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto])
46      CFLAGS="${CFLAGS} ${LIBCRYPTO_CFLAGS}"
47      LIBS="${LIBS} ${LIBCRYPTO_LIBS}"
48     ])
49   AC_CHECK_LIB([zephyr], [ZGetSender],
[16c0416]50   [LIBS="$LIBS -lzephyr"
51    AC_DEFINE([HAVE_LIBZEPHYR], [1],
[2c270e6]52                [Define if you have libzephyr])
53    AC_CHECK_LIB([zephyr], [ZInitLocationInfo],
54      AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [1],
55                [Have ZInitLocationInfo]),)
[cc1eeac]56    AC_CHECK_LIB([com_err], [com_err])
57    AC_CHECK_HEADERS([com_err.h])
[2c270e6]58   ],
59   [if test "x$with_zephyr" != xcheck; then
60      AC_MSG_FAILURE(
[438009c]61        [--with-zephyr was given, but libzephyr does not seem to be available.])
[2c270e6]62    fi
63   ])])
[ac70242]64
[d193e28]65AC_CHECK_FUNCS([use_default_colors resizeterm])
66AC_CHECK_FUNCS([des_string_to_key des_key_sched des_ecb_encrypt])
67AC_CHECK_FUNCS([DES_string_to_key DES_ecb_encrypt DES_key_sched])
[e51b410]68
[7d4fbcd]69dnl Checks for header files.
70AC_HEADER_STDC
71AC_HEADER_SYS_WAIT
[cc1eeac]72AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h)
[7d4fbcd]73
74dnl Add CFLAGS for embeded perl
[1c89df8]75PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
76AC_MSG_NOTICE([Adding perl CFLAGS ${PERL_CFLAGS}])
77CFLAGS="${CFLAGS} ${PERL_CFLAGS}"
[7d4fbcd]78
[e51b410]79dnl Find the location of perl XSUBPP
[8ee73f8d]80AC_MSG_CHECKING(for the perl xsubpp precompiler)
[6794f72]81XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
[8ee73f8d]82if test -n "${XSUBPPDIR}"; then
83   AC_MSG_RESULT(${XSUBPPDIR})
84else
85   AC_MSG_ERROR(not found)
86fi
87
[4ad3480]88if test -f "${XSUBPPDIR}/typemap"; then
89   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
90else
91   XSUBPPFLAGS=""
92fi
93
[18e28a4]94dnl Add LDFLAGS for embedded perl
[3f21b8e]95FOO=`perl -MExtUtils::Embed -e ldopts`
[c08a725]96AC_MSG_NOTICE([Adding perl LIBS ${FOO}])
97LIBS=${LIBS}\ ${FOO}
[7d4fbcd]98
[34509d5]99dnl Add CFLAGS and LDFLAGS for glib-2.0
100PKG_CHECK_MODULES(GLIB,glib-2.0)
101
[7c09b21]102AC_MSG_NOTICE([Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}])
[d9337637]103CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
[7c09b21]104AC_MSG_NOTICE([Adding glib-2.0 LDFLAGS ${GLIB_LIBS}])
[d9337637]105LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
[34509d5]106
[37f27bc]107if test "x${prefix}" = "xNONE"; then
108   prefix="${ac_default_prefix}"
109fi
[7d4fbcd]110
[37f27bc]111AC_DEFINE_UNQUOTED([DATADIR],["${prefix}/share/${PACKAGE}"],
112                   [Package data directory])
[7d4fbcd]113
[37f27bc]114dnl Checks for typedefs, structures, and compiler characteristics.
[c50f589]115
[79245bc]116AX_CFLAGS_WARN_ALL
[de8945b]117AX_CFLAGS_STRICT_PROTOTYPES
[79245bc]118
[215c119]119AX_C_CHECK_FLAG([-Wno-pointer-sign],[],[],
120  [LIBFAIM_CFLAGS="$LIBFAIM_CFLAGS -Wno-pointer-sign"])
121
122AC_SUBST([LIBFAIM_CFLAGS])
123
[15bd5ef]124AC_SUBST(XSUBPPDIR)
[4ad3480]125AC_SUBST(XSUBPPFLAGS)
[8ee73f8d]126
[ac70242]127AC_PROG_INSTALL
[37f27bc]128AC_PROG_RANLIB
[ac70242]129
[b9c8d28]130AC_CONFIG_FILES([Makefile libfaim/Makefile perl/modules/Makefile])
131AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.