mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Add a mechanism for using autoconf to detect the quirks of Unix systems
rather than relying on the user to edit the Makefile. Makefile.gtk still works as well as it ever did, but now we get a Makefile.in alongside it. mkunxarc.sh now relies on autoconf and friends to build the configure script for the Unix source distribution. [originally from svn r5673]
This commit is contained in:
44
unix/configure.ac
Normal file
44
unix/configure.ac
Normal file
@ -0,0 +1,44 @@
|
||||
# To compile this into a configure script, you need:
|
||||
# * Autoconf 2.50 or newer
|
||||
# * Gtk (for $prefix/share/aclocal/gtk.m4)
|
||||
# * Automake (for aclocal)
|
||||
# If you've got them, running "autoreconf" should work.
|
||||
|
||||
AC_INIT
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_HEADERS([uxconfig.h:uxconfig.in])
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CC
|
||||
if test "X$GCC" = Xyes; then
|
||||
CFLAGS="$CFLAGS -Wall -Werror"
|
||||
fi
|
||||
|
||||
AM_PATH_GTK([1.2.0], [all_targets="all-cli all-gtk"], [all_targets="all-cli"])
|
||||
AC_SUBST([all_targets])
|
||||
|
||||
AC_SEARCH_LIBS([socket], [xnet])
|
||||
|
||||
AC_CHECK_FUNCS([getaddrinfo ptsname pututline setresuid strsignal])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
AH_BOTTOM([
|
||||
/* Convert autoconf definitions to ones that PuTTY wants. */
|
||||
|
||||
#ifndef HAVE_GETADDRINFO
|
||||
# define NO_IPV6
|
||||
#endif
|
||||
#ifndef HAVE_SETRESUID
|
||||
# define HAVE_NO_SETRESUID
|
||||
#endif
|
||||
#ifndef HAVE_STRSIGNAL
|
||||
# define HAVE_NO_STRSIGNAL
|
||||
#endif
|
||||
#ifndef HAVE_PUTUTLINE
|
||||
# define OMIT_UTMP
|
||||
#endif
|
||||
#ifndef HAVE_PTSNAME
|
||||
# define BSD_PTYS
|
||||
#endif
|
||||
])
|
@ -1,6 +1,10 @@
|
||||
#ifndef PUTTY_UNIX_H
|
||||
#define PUTTY_UNIX_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "uxconfig.h" /* Space to hide it from mkfiles.pl */
|
||||
#endif
|
||||
|
||||
#include <stdio.h> /* for FILENAME_MAX */
|
||||
#include "charset.h"
|
||||
|
||||
|
Reference in New Issue
Block a user