annotate mcabber/macros/missing/gnutls.m4 @ 1258:7691eb8c8e55

Add libgnutls M4 macro to macros/missing/
author Mikael Berthe <mikael@lilotux.net>
date Tue, 26 Jun 2007 22:22:45 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1258
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
1 dnl Autoconf macros for libgnutls
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
2 dnl $id$
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
3
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
4 # Modified for LIBGNUTLS -- nmav
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
5 # Configure paths for LIBGCRYPT
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
6 # Shamelessly stolen from the one of XDELTA by Owen Taylor
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
7 # Werner Koch 99-12-09
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
8
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
9 dnl AM_PATH_LIBGNUTLS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
10 dnl Test for libgnutls, and define LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
11 dnl
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
12 AC_DEFUN([AM_PATH_LIBGNUTLS],
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
13 [dnl
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
14 dnl Get the cflags and libraries from the libgnutls-config script
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
15 dnl
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
16 AC_ARG_WITH(libgnutls-prefix,
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
17 [ --with-libgnutls-prefix=PFX Prefix where libgnutls is installed (optional)],
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
18 libgnutls_config_prefix="$withval", libgnutls_config_prefix="")
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
19
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
20 if test x$libgnutls_config_prefix != x ; then
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
21 if test x${LIBGNUTLS_CONFIG+set} != xset ; then
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
22 LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
23 fi
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
24 fi
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
25
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
26 AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, no)
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
27 min_libgnutls_version=ifelse([$1], ,0.1.0,$1)
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
28 AC_MSG_CHECKING(for libgnutls - version >= $min_libgnutls_version)
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
29 no_libgnutls=""
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
30 if test "$LIBGNUTLS_CONFIG" = "no" ; then
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
31 no_libgnutls=yes
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
32 else
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
33 LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags`
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
34 LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs`
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
35 libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version`
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
36
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
37
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
38 ac_save_CFLAGS="$CFLAGS"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
39 ac_save_LIBS="$LIBS"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
40 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
41 LIBS="$LIBS $LIBGNUTLS_LIBS"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
42 dnl
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
43 dnl Now check if the installed libgnutls is sufficiently new. Also sanity
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
44 dnl checks the results of libgnutls-config to some extent
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
45 dnl
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
46 rm -f conf.libgnutlstest
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
47 AC_TRY_RUN([
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
48 #include <stdio.h>
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
49 #include <stdlib.h>
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
50 #include <string.h>
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
51 #include <gnutls/gnutls.h>
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
52
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
53 int
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
54 main ()
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
55 {
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
56 system ("touch conf.libgnutlstest");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
57
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
58 if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) )
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
59 {
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
60 printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n",
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
61 "$libgnutls_config_version", gnutls_check_version(NULL) );
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
62 printf("*** was found! If libgnutls-config was correct, then it is best\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
63 printf("*** to remove the old version of LIBGNUTLS. You may also be able to fix the error\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
64 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
65 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
66 printf("*** required on your system.\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
67 printf("*** If libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
68 printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
69 printf("*** before re-running configure\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
70 }
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
71 else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) )
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
72 {
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
73 printf("\n*** LIBGNUTLS header file (version %s) does not match\n", LIBGNUTLS_VERSION);
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
74 printf("*** library (version %s)\n", gnutls_check_version(NULL) );
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
75 }
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
76 else
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
77 {
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
78 if ( gnutls_check_version( "$min_libgnutls_version" ) )
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
79 {
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
80 return 0;
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
81 }
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
82 else
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
83 {
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
84 printf("no\n*** An old version of LIBGNUTLS (%s) was found.\n",
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
85 gnutls_check_version(NULL) );
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
86 printf("*** You need a version of LIBGNUTLS newer than %s. The latest version of\n",
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
87 "$min_libgnutls_version" );
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
88 printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
89 printf("*** \n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
90 printf("*** If you have already installed a sufficiently new version, this error\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
91 printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
92 printf("*** being found. The easiest way to fix this is to remove the old version\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
93 printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
94 printf("*** correct copy of libgnutls-config. (In this case, you will have to\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
95 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
96 printf("*** so that the correct libraries are found at run-time))\n");
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
97 }
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
98 }
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
99 return 1;
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
100 }
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
101 ],, no_libgnutls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
102 CFLAGS="$ac_save_CFLAGS"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
103 LIBS="$ac_save_LIBS"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
104 fi
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
105
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
106 if test "x$no_libgnutls" = x ; then
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
107 AC_MSG_RESULT(yes)
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
108 ifelse([$2], , :, [$2])
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
109 else
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
110 if test -f conf.libgnutlstest ; then
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
111 :
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
112 else
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
113 AC_MSG_RESULT(no)
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
114 fi
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
115 if test "$LIBGNUTLS_CONFIG" = "no" ; then
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
116 echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
117 echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
118 echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
119 echo "*** full path to libgnutls-config."
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
120 else
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
121 if test -f conf.libgnutlstest ; then
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
122 :
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
123 else
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
124 echo "*** Could not run libgnutls test program, checking why..."
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
125 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
126 LIBS="$LIBS $LIBGNUTLS_LIBS"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
127 AC_TRY_LINK([
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
128 #include <stdio.h>
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
129 #include <stdlib.h>
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
130 #include <string.h>
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
131 #include <gnutls/gnutls.h>
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
132 ], [ return !!gnutls_check_version(NULL); ],
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
133 [ echo "*** The test program compiled, but did not run. This usually means"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
134 echo "*** that the run-time linker is not finding LIBGNUTLS or finding the wrong"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
135 echo "*** version of LIBGNUTLS. If it is not finding LIBGNUTLS, you'll need to set your"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
136 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
137 echo "*** to the installed location Also, make sure you have run ldconfig if that"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
138 echo "*** is required on your system"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
139 echo "***"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
140 echo "*** If you have an old version installed, it is best to remove it, although"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
141 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
142 echo "***" ],
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
143 [ echo "*** The test program failed to compile or link. See the file config.log for the"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
144 echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
145 echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
146 echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" ])
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
147 CFLAGS="$ac_save_CFLAGS"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
148 LIBS="$ac_save_LIBS"
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
149 fi
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
150 fi
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
151 LIBGNUTLS_CFLAGS=""
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
152 LIBGNUTLS_LIBS=""
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
153 ifelse([$3], , :, [$3])
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
154 fi
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
155 rm -f conf.libgnutlstest
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
156 AC_SUBST(LIBGNUTLS_CFLAGS)
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
157 AC_SUBST(LIBGNUTLS_LIBS)
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
158 ])
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
159
7691eb8c8e55 Add libgnutls M4 macro to macros/missing/
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
160 dnl *-*wedit:notab*-* Please keep this as the last line.