Index: Makefile.in ================================================================== --- Makefile.in +++ Makefile.in @@ -28,18 +28,18 @@ includedir = @includedir@ LIBS = libconfig.$(AREXT) libconfig.$(SHOBJEXT) BINS = # The following two lines need to be kept syncronised. -OBJS = libconfig.o conf_space.o conf_section.o conf_apache.o conf_colon.o conf_equal.o conf_xml.o -SHOBJS = libconfig_shr.o conf_space_shr.o conf_section_shr.o conf_apache_shr.o conf_colon_shr.o conf_equal_shr.o conf_xml_shr.o +OBJS = libconfig.o conf_space.o conf_section.o conf_apache.o conf_colon.o conf_equal.o conf_xml.o @LIBOBJS@ +SHOBJS = libconfig_shr.o conf_space_shr.o conf_section_shr.o conf_apache_shr.o conf_colon_shr.o conf_equal_shr.o conf_xml_shr.o @SHLIBOBJS@ all: $(LIBS) $(BINS) -libconfig.$(SHOBJEXT): $(SHOBJS) @LIBOBJS@ +libconfig.$(SHOBJEXT): $(SHOBJS) $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJFLAGS) $(SHOBJLDFLAGS) -o $@ $^ -libconfig.$(AREXT): $(OBJS) @LIBOBJS@ +libconfig.$(AREXT): $(OBJS) $(AR) rcu $@ $^ -$(RANLIB) $@ libconfig.o: libconfig.c compat.h win32.h config.h libconfig.h libconfig_shr.o: libconfig.c compat.h win32.h config.h libconfig.h Index: aclocal.m4 ================================================================== --- aclocal.m4 +++ aclocal.m4 @@ -53,10 +53,12 @@ LDFLAGS="$OLD_LDFLAGS" ]) AC_DEFUN(DC_GET_SHOBJFLAGS, [ + AC_SUBST(SHLIBOBJS) + AC_MSG_CHECKING(how to create shared objects) DC_TEST_SHOBJFLAGS([-shared -fPIC], [-rdynamic], [ DC_TEST_SHOBJFLAGS([-shared -fPIC], [], [ DC_TEST_SHOBJFLAGS([-shared -fPIC], [-rdynamic -Wl,-G,-z,textoff], [ @@ -64,8 +66,12 @@ AC_MSG_ERROR(cant) ]) ]) ]) ]) + + for obj in $LIB@&t@OBJS; do + SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`" + done AC_MSG_RESULT($SHOBJLDFLAGS $SHOBJFLAGS) ]) Index: configure ================================================================== --- configure +++ configure @@ -1,9 +1,9 @@ #! /bin/sh # From configure.in Revision . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for libconfig 0.0.4. +# Generated by GNU Autoconf 2.59 for libconfig 0.0.5. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -266,12 +266,12 @@ : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='libconfig' PACKAGE_TARNAME='libconfig' -PACKAGE_VERSION='0.0.4' -PACKAGE_STRING='libconfig 0.0.4' +PACKAGE_VERSION='0.0.5' +PACKAGE_STRING='libconfig 0.0.5' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include @@ -307,11 +307,11 @@ #endif #if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB CPP EGREP AR ac_ct_AR LIBOBJS SHOBJFLAGS SHOBJLDFLAGS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB CPP EGREP AR ac_ct_AR LIBOBJS SHLIBOBJS SHOBJFLAGS SHOBJLDFLAGS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false @@ -776,11 +776,11 @@ # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libconfig 0.0.4 to adapt to many kinds of systems. +\`configure' configures libconfig 0.0.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. @@ -833,11 +833,11 @@ _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libconfig 0.0.4:";; + short | recursive ) echo "Configuration of libconfig 0.0.5:";; esac cat <<\_ACEOF Some influential environment variables: CC C compiler command @@ -944,11 +944,11 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -libconfig configure 0.0.4 +libconfig configure 0.0.5 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -958,11 +958,11 @@ exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libconfig $as_me 0.0.4, which was +It was created by libconfig $as_me 0.0.5, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF @@ -15724,10 +15724,12 @@ done + + echo "$as_me:$LINENO: checking how to create shared objects" >&5 echo $ECHO_N "checking how to create shared objects... $ECHO_C" >&6 @@ -15983,10 +15985,14 @@ rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$OLD_LDFLAGS" + + for obj in $LIBOBJS; do + SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`" + done echo "$as_me:$LINENO: result: $SHOBJLDFLAGS $SHOBJFLAGS" >&5 echo "${ECHO_T}$SHOBJLDFLAGS $SHOBJFLAGS" >&6 @@ -16351,11 +16357,11 @@ ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by libconfig $as_me 0.0.4, which was +This file was extended by libconfig $as_me 0.0.5, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS @@ -16411,11 +16417,11 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -libconfig config.status 0.0.4 +libconfig config.status 0.0.5 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation @@ -16624,10 +16630,11 @@ s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@LIBOBJS@,$LIBOBJS,;t t +s,@SHLIBOBJS@,$SHLIBOBJS,;t t s,@SHOBJFLAGS@,$SHOBJFLAGS,;t t s,@SHOBJLDFLAGS@,$SHOBJLDFLAGS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF Index: configure.in ================================================================== --- configure.in +++ configure.in @@ -1,7 +1,7 @@ AC_REVISION($Revision $) -AC_INIT(libconfig, 0.0.4) +AC_INIT(libconfig, 0.0.5) AC_CONFIG_HEADER(config.h) dnl Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET @@ -26,8 +26,9 @@ AC_CHECK_FUNCS(getpwuid) dnl Checks for Win32 specific things. DC_DO_WIN32 +dnl This must be last. DC_GET_SHOBJFLAGS AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3)