Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r4097723 rc08a725  
    11dnl $Id$
    22dnl Process this file with autoconf to produce a configure script.
    3 AC_INIT(owl.c)
     3AC_INIT([BarnOwl],[1.1.2],[bug-barnowl@mit.edu])
     4AM_INIT_AUTOMAKE([-Wall foreign])
    45
    5 AC_CONFIG_HEADER(config.h)
     6AC_CONFIG_HEADER([config.h])
    67
    78AC_PROG_CC
    8 
    9 dnl If we're using GCC, enable all warnings
    10 if test "$GCC" = yes; then
    11      CFLAGS="$CFLAGS -Wall -g";
    12 fi
    139
    1410dnl Check for Athena
     
    4642        AC_MSG_RESULT(no)
    4743fi
     44PROTECT_CFLAGS=${PROTECT_CFLAGS-"-fstack-protector"}
     45SAVE_CFLAGS=$CFLAGS
     46CFLAGS="$CFLAGS $PROTECT_CFLAGS"
     47AC_MSG_CHECKING(whether protection cflags work)
     48AC_COMPILE_IFELSE(int i;,
     49    [AC_MSG_RESULT(yes)],
     50    [AC_MSG_RESULT(no)
     51    CFLAGS=$SAVE_CFLAGS])
    4852
    49 AC_ARG_WITH([stack-protector],
    50   [AS_HELP_STRING([--with-stack-protector],
    51     [Enable gcc -fstack-protector])],
    52   [],
    53   [with_stack_protector=check])
    5453
    55 AS_IF([test "x$with_stack_protector" != xno],
    56   [
    57     SAVE_CFLAGS=$CFLAGS
    58     CFLAGS="$CFLAGS -fstack-protector"
    59     AC_MSG_CHECKING(whether protection cflags work)
    60     AC_COMPILE_IFELSE(int i;,
    61         [AC_MSG_RESULT(yes)],
    62         [AC_MSG_RESULT(no)
    63         CFLAGS=$SAVE_CFLAGS
    64         if test "x$with_stack_protector" != xcheck; then
    65           AC_MSG_FAILURE([--with-stack-protector selected, but gcc does support it.])
    66         fi])
    67     AC_CHECK_LIB(ssp, __stack_chk_guard)
    68   ])
    69 
     54AC_CHECK_LIB(ssp, __stack_chk_guard)
    7055AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
    7156AC_CHECK_LIB(com_err, com_err)
     
    7560AC_CHECK_LIB(des425, des_cbc_encrypt,,AC_CHECK_LIB(crypto,DES_cbc_encrypt))
    7661AC_CHECK_LIB(resolv, res_search)
    77 
    78 AC_ARG_WITH([zephyr],
    79   [AS_HELP_STRING([--with-libzephyr],
    80     [Disable Zephyr support])],
    81   [],
    82   [with_zephyr=check])
    83 
    84 AS_IF([test "x$with_zephyr" != xno],
    85   [AC_CHECK_LIB([zephyr], [ZGetSender],
    86    [LIBS="$LIBS -lzephyr"
    87     AC_DEFINE([HAVE_LIBZEPHYR], [1],
    88                 [Define if you have libzephyr])
    89     AC_CHECK_LIB([zephyr], [ZInitLocationInfo],
    90       AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [1],
    91                 [Have ZInitLocationInfo]),)
    92    ],
    93    [if test "x$with_zephyr" != xcheck; then
    94       AC_MSG_FAILURE(
    95         [--with-libzephyr was given, but libzephyr does not seem to be available.])
    96     fi
    97    ])])
    98 
    99 AC_ARG_ENABLE([athstatic], AS_HELP_STRING([--enable-athstatic],
    100                                           [Statically link libraries in /usr/athena/lib]),
    101                                           [ATHSTATIC=./athstatic],
    102                                           [ATHSTATIC=])
     62dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
     63AC_CHECK_LIB(zephyr, ZGetSender)
     64AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
    10365
    10466AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
     
    143105dnl Add LDFLAGS for embedded perl
    144106FOO=`perl -MExtUtils::Embed -e ldopts`
    145 AC_MSG_NOTICE([Adding perl LDFLAGS ${FOO}])
    146 LDFLAGS=${LDFLAGS}\ ${FOO}
     107AC_MSG_NOTICE([Adding perl LIBS ${FOO}])
     108LIBS=${LIBS}\ ${FOO}
    147109
    148110dnl Add CFLAGS and LDFLAGS for glib-2.0
     
    154116LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
    155117
     118if test "x${prefix}" = "xNONE"; then
     119   prefix="${ac_default_prefix}"
     120fi
     121
     122AC_DEFINE_UNQUOTED([DATADIR],["${prefix}/share/${PACKAGE}"],
     123                   [Package data directory])
     124
    156125dnl Checks for typedefs, structures, and compiler characteristics.
    157 
    158 dnl Support --program-{prefix,suffix,transform}
    159 AC_ARG_PROGRAM
    160126
    161127AC_SUBST(XSUBPPDIR)
    162128AC_SUBST(XSUBPPFLAGS)
    163 AC_SUBST(ATHSTATIC)
    164129
    165130AC_PROG_INSTALL
     131AC_PROG_RANLIB
    166132
    167 AC_CONFIG_SUBDIRS(libfaim)
    168 
    169 AC_OUTPUT(Makefile)
     133AC_CONFIG_FILES([Makefile libfaim/Makefile])
     134AC_OUTPUT([perl/modules/Makefile])
Note: See TracChangeset for help on using the changeset viewer.