#21 cleanup configure.ac and Makefile.in
Closed a year ago by mlichvar. Opened 2 years ago by thomas_kuehne.
thomas_kuehne/newt master  into  master

Swap order of LDFLAGS and P*FLAGS
Thomas Kuehne • 2 years ago  
cleanup configure.ac
Thomas Kuehne • 2 years ago  
file modified
+2 -2
@@ -97,8 +97,8 @@ 

  		PLFLAGS=`$$pyconfig --libs`; \

  		echo $(CC) $(SHCFLAGS) $(CFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \

  		$(CC) $(SHCFLAGS) $(CFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \

- 		echo $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L.  -lnewt $(LIBS); \

- 		$(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L.  -lnewt $(LIBS); \

+ 		echo $(CC) --shared $(LDFLAGS) $$PLDFLAGS $$PLFLAGS -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L.  -lnewt $(LIBS); \

+ 		$(CC) --shared $(LDFLAGS) $$PLDFLAGS $$PLFLAGS -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L.  -lnewt $(LIBS); \

  	done || :

  	touch $@

  

file modified
+20 -16
@@ -1,10 +1,11 @@ 

- AC_INIT([newt_pr.h])

+ AC_INIT

+ AC_CONFIG_SRCDIR([newt_pr.h])

  

  PACKAGE=newt

  VERSION=0.52.21

  SONAME=0.52

  

- AC_CONFIG_HEADER([config.h])

+ AC_CONFIG_HEADERS([config.h])

  

  AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Package Name])

  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [NEWT Version String])
@@ -13,6 +14,9 @@ 

  AC_PROG_CC

  AC_PROG_LN_S

  AC_PROG_GREP

+ AC_PROG_CPP

+ AC_PROG_INSTALL

+ AC_PROG_MAKE_SET

  AC_SYS_LARGEFILE

  

  AC_CHECK_SIZEOF([long])
@@ -21,9 +25,9 @@ 

  

  # Are we using GNU ld?

  AC_MSG_CHECKING([for GNU ld])

- LD=`$CC -print-prog-name=ld 2>&5`

+ LD=$($CC -print-prog-name=ld 2>&5)

  

- if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld"` = 0; then

+ if test $($LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld") = 0; then

    # Not

    GNU_LD=""

    AC_MSG_RESULT([no])
@@ -82,20 +86,20 @@ 

  

    # check in a few common install locations

    if test x"${ac_cv_c_tclconfig}" = x ; then

-     for i in `ls -d ${libdir} 2>/dev/null` \

-       `ls -d /usr/lib 2>/dev/null` \

-       `ls -d /usr/lib64 2>/dev/null` \

-       `ls -d /usr/local/lib 2>/dev/null` \

-       `ls -d /usr/contrib/lib 2>/dev/null` \

-       `ls -d /usr/pkg/lib 2>/dev/null` \

-       `ls -d /usr/local/lib/tcl8.5 2>/dev/null` \

-       `ls -d /usr/local/lib/tcl8.4 2>/dev/null` \

-       `ls -d /usr/lib/tcl8.5 2>/dev/null` \

-       `ls -d /usr/lib/tcl8.4 2>/dev/null` \

-       `ls -d /opt/local/lib 2>/dev/null` \

+     for i in $(ls -d ${libdir} 2>/dev/null) \

+       $(ls -d /usr/lib 2>/dev/null) \

+       $(ls -d /usr/lib64 2>/dev/null) \

+       $(ls -d /usr/local/lib 2>/dev/null) \

+       $(ls -d /usr/contrib/lib 2>/dev/null) \

+       $(ls -d /usr/pkg/lib 2>/dev/null) \

+       $(ls -d /usr/local/lib/tcl8.5 2>/dev/null) \

+       $(ls -d /usr/local/lib/tcl8.4 2>/dev/null) \

+       $(ls -d /usr/lib/tcl8.5 2>/dev/null) \

+       $(ls -d /usr/lib/tcl8.4 2>/dev/null) \

+       $(ls -d /opt/local/lib 2>/dev/null) \

        ; do

        if test -f "$i/tclConfig.sh" ; then

-         ac_cv_c_tclconfig=`(cd $i; pwd)`

+         ac_cv_c_tclconfig=$( (cd $i; pwd) )

          break

        fi

      done

in configure.ac:
- update AC_INIT and AC_CONFIG_HEADER handling
- add missing AC_PROG_[...]
- replace backquoted command substitution `cmd` with clean $(cmd)

in Makefile.in
- swap order of LDFLAGS and P*FLAGS

Adding AC_PROG_INSTALL to configure.ac seems to break the configure script for me on Fedora:

$ ./configure 
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether ln -s works... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking how to run the C preprocessor... gcc -E
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."

The file can be added by automake --add-missing but this is not an automake project.

Any suggestions?

I pushed the commits except the one causing the issue mentioned above. If you find some way to address it, please submit a new PR.

Thanks.

Pull-Request has been closed by mlichvar

a year ago
Metadata