diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 149 |
1 files changed, 86 insertions, 63 deletions
diff --git a/configure.in b/configure.in index 3c4755b..19c8f63 100644 --- a/configure.in +++ b/configure.in @@ -1,106 +1,129 @@ dnl Process this file with autoconf to produce a configure script. +dnl Note: the banner comments below are intentionally done in shell syntax. +dnl These help me identify sections of the configure script produced +dnl by autoconf. Some comments might appear inane and obvious, but again +dnl they are there to delimit sections in the output configure script. + +############################################################################## +################ Setup ####################################################### ############################################################################## -### Autoconf setup -AC_INIT(mkid.c) +AC_INIT(src/mkid.c) AC_CONFIG_HEADER(config.h) +AC_PREREQ(2.10) +AC_ARG_PROGRAM ############################################################################## -### Package identification +################ Identify Package ############################################ +############################################################################## -PACKAGE=mkid +PACKAGE=id-utils VERSION=3.0.9 -PREV_VERSION=3.0.8 +PACKAGE_VERSION="$PACKAGE-$VERSION" AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION") +AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$PACKAGE_VERSION") AC_SUBST(PACKAGE) AC_SUBST(VERSION) -AC_SUBST(PREV_VERSION) +AC_SUBST(PACKAGE_VERSION) + +############################################################################## +################ Maintainer Stuff ############################################ +############################################################################## + +jm_MAINTAINER_MODE + +ALL_LINGUAS="de fr" + +changequote(,)dnl +case $VERSION in +*.*.*) README_ALPHA=README-alpha;; +*) README_ALPHA=;; +esac +changequote([, ])dnl +AC_SUBST(README_ALPHA) ############################################################################## -### Checks for programs. +################ Check for tools ############################################# +############################################################################## -AC_PROG_YACC AC_PROG_CC AC_PROG_LN_S -AC_PROG_INSTALL +fp_PROG_INSTALL AC_PROG_MAKE_SET +AC_PROG_CPP +AC_PROG_GCC_TRADITIONAL +AC_PROG_RANLIB +AC_AIX +AC_MINIX +AC_ISC_POSIX ############################################################################## -### Checks for libraries. +################ Check for libraries ######################################### +############################################################################## + +dnl no library checks ############################################################################## -### Checks for header files. +################ Check for header files ###################################### +############################################################################## -dnl AC_HEADER_DIRENT +AC_HEADER_DIRENT AC_HEADER_STDC +AC_HEADER_STAT AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(limits.h stddef.h sys/types.h sys/stat.h sys/param.h) -AC_CHECK_HEADERS(stdlib.h unistd.h string.h malloc.h memory.h assert.h ctype.h errno.h) -AC_CHECK_HEADERS(sys/ioctl.h termios.h termio.h sgtty.h regex.h) +AC_CHECK_HEADERS(limits.h sys/types.h sys/param.h stdlib.h unistd.h string.h) +AC_CHECK_HEADERS(malloc.h sys/ioctl.h termios.h termio.h sgtty.h regex.h) ############################################################################## -### Checks for typedefs, structures, and compiler characteristics. +################ Check for typedefs, structs, and compiler params ############ +############################################################################## -fp_C_PROTOTYPES AC_C_CONST +fp_C_PROTOTYPES AC_TYPE_SIGNAL AC_TYPE_OFF_T AC_TYPE_SIZE_T -AC_CHECK_TYPE(dev_t, unsigned short) -AC_CHECK_TYPE(ino_t, unsigned long) -CFLAGS=${CFLAGS--g} -LDFLAGS=${LDFLAGS--g} +############################################################################## +################ Set default compilation flags ############################### +############################################################################## + +: ${CFLAGS=-g} +: ${LDFLAGS=-g} AC_SUBST(CFLAGS) AC_SUBST(LDFLAGS) ############################################################################## -### Checks for library functions & system calls. +################ Check for library functions & system calls ################## +############################################################################## -AC_PROG_GCC_TRADITIONAL -AC_CHECK_FUNCS(getwd getcwd getopt_long basename dirname) -AC_CHECK_FUNCS(strdup strchr strrchr strcasecmp strerror) -AC_CHECK_FUNCS(memcpy bcopy memset bzero) -AC_CHECK_FUNCS(regcomp regcmp re_comp link) AC_FUNC_ALLOCA -AC_SUBST(ALLOCA) -if test "$ac_cv_func_re_comp" = no; then REGEXP="regex.o"; fi -AC_SUBST(REGEXP) -if test "$ac_cv_func_getopt_long" = no; then GETOPT="getopt.o getopt1.o"; fi -AC_SUBST(GETOPT) -if test "$ac_cv_func_strcasecmp" = no; then STRCASECMP="strcasecmp.o"; fi -AC_SUBST(STRCASECMP) -if test "$ac_cv_func_strerror" = no; then STRERROR="strerror.o"; fi -AC_SUBST(STRERROR) - -############################################################################## -### Directory locations. - -if test "x$prefix" != xNONE; then - datadir=$prefix/share -else - datadir=$ac_default_prefix/share -fi -IID_HELP_FILE=$datadir/iid.help -AC_SUBST(datadir) -AC_SUBST(IID_HELP_FILE) -AC_DEFINE_UNQUOTED(IID_HELP_FILE, "$datadir/iid.help") - -############################################################################## -### Makefile dependencies. - -case x$srcdir in -x) DEPEND=depend.out;; -*) DEPEND=$srcdir/depend.out;; -esac -DEPEND_FILE=$DEPEND -AC_SUBST(DEPEND) -AC_SUBST_FILE(DEPEND_FILE) +gm_DECL_SBRK +gm_DECL_SYS_ERRLIST +ud_WITH_REGEX +AC_CHECK_FUNCS(getwd getcwd link) +AC_REPLACE_FUNCS(strcasecmp strdup strndup strtok fnmatch) +AC_REPLACE_FUNCS(basename dirname error memcpy memset) +AC_REPLACE_GNU_GETOPT +AC_REPLACE_OBSTACK ############################################################################## -### Autoconf results generation. +################ Internationalization ######################################## +############################################################################## + +ud_GNU_GETTEXT +AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) + +############################################################################## +################ Generate the configure script ############################### +############################################################################## + +AC_OUTPUT([Makefile doc/Makefile lib/Makefile src/Makefile intl/Makefile po/Makefile.in], + [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; \ + test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h]) -AC_OUTPUT(Makefile, - [test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h]) +############################################################################## +################ Done ######################################################## +############################################################################## |