Skip to content

Instantly share code, notes, and snippets.

@jcmvbkbc
Created September 5, 2017 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcmvbkbc/f8d64eadb76b83ecf4880ae8d98853cc to your computer and use it in GitHub Desktop.
Save jcmvbkbc/f8d64eadb76b83ecf4880ae8d98853cc to your computer and use it in GitHub Desktop.
AC_INIT([test1], [1.0])
AC_CONFIG_AUX_DIR(autoconf)
AC_CONFIG_MACRO_DIR(autoconf)
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CONFIG_SRCDIR([configure.ac])
AC_PROG_CC
AC_CONFIG_FILES([Makefile])
AC_ARG_WITH([foo],
[AS_HELP_STRING([--with-foo],
[enable foo (default=no)])],
[enable_foo=$withval],
[enable_foo=no])
AM_CONDITIONAL([ENABLE_FOO],[test x$enable_foo = xyes])
AC_OUTPUT
if ENABLE_FOO
include $(srcdir)/Makefile.foo.include
endif
bin_PROGRAMS = test1
test1_SOURCES = test1.c
#include <stdio.h>
int main()
{
printf("Hello, world!\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment