Commits

ripencc  committed 227395f

cleanup build

  • Participants
  • Parent commits 74ce46c

Comments (0)

Files changed (4)

 
-CC	= @CC@
+CC	= @CC@ -fPIC
 CFLAGS	= @CFLAGS@
 COMPILE  = $(CC) $(CFLAGS) $(INCLUDES)
 
 LD	= @CC@
 LDFLAGS	= @LDFLAGS@
-AR	= @AR@
 RANLIB	= @RANLIB@
 
 SYS_LIBS= @LIBS@
 all: libbgpdump.so bgpdump 
 
 libbgpdump.a: $(LIB_H) $(LIB_O) Makefile cfile_tools.h util.h
-	$(AR) r libbgpdump.a $(LIB_O)
+	ar r libbgpdump.a $(LIB_O)
 	$(RANLIB) libbgpdump.a
 
 libbgpdump.so: libbgpdump.a

File bgpdump.spec.in

 Summary: MRT file reader
 Name: @PACKAGE_NAME@
 Version: @PACKAGE_VERSION@
-Release: 0
+Release: 1
 License: GPL
 URL: http://www.ris.ripe.net/source/
 Vendor: RIPE NCC Information Services department

File configure.in

 # Checks for programs.
 AC_PROG_CC
 AC_PROG_RANLIB
-AC_PATH_PROG([AR], [ar])
-
-if test -z "$AR"; then
-    AC_PATH_PROG([AR], [ar], , /usr/ccs/bin)
-    if test -z "$AR"; then
-        AC_MSG_ERROR([no ar found in /usr/ccs/bin:$PATH])
-    fi
-fi
 
 # Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([errno.h strings.h unistd.h arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/socket.h syslog.h unistd.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_SIZE_T
+AC_CHECK_HEADERS([arpa/inet.h netinet/in.h syslog.h])
 AC_STRUCT_TM
 
 # Check for u_*_t
 AC_CHECK_TYPE(u_int16_t, , AC_DEFINE(u_int16_t, uint16_t, [Define if system headers do not define u_int16_t]))
 AC_CHECK_TYPE(u_int32_t, , AC_DEFINE(u_int32_t, uint32_t, [Define if system headers do not define u_int32_t]))
 
-# Checks for library functions.
-AC_FUNC_MEMCMP
-AC_CHECK_FUNCS([memset])
-
-# Check for zlib
 AC_CHECK_LIB(z, gzopen, [], AC_DEFINE(DONT_HAVE_GZ, 1, Define if libz not present))
-
-# Check for libbz2
 AC_CHECK_LIB(bz2, BZ2_bzReadOpen, [], AC_DEFINE(DONT_HAVE_BZ2, 1, Define if libbzip2 not present))
 
 # Check for inet_ntoa in -lnsl if not found (Solaris)
 
 OS=`uname|sed -e 'y/A-Z/a-z/'`
 case $OS in
-	darwin*)
-		LDFLAGS='-dynamiclib'
-		;;
-	*)
-		LDFLAGS='-shared'
-		;;
+	darwin*) LDFLAGS="$LDFLAGS -dynamiclib" ;;
+	*) LDFLAGS="$LDFLAGS -shared" ;;
 esac
 
 AC_SUBST(CFLAGS)
     ti2s(0);
     ti2s(99999);
     ti2s(4294967295L);
-}
+}