Skip to content

Commit 047f0d4

Browse files
author
john.ledbetter
committed
added autoconf, automake scripts to build under Linux
1 parent 6cbe0bd commit 047f0d4

5 files changed

Lines changed: 89 additions & 111 deletions

File tree

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SUBDIRS = src/

README-Linux.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
To build:
2+
./configure
3+
make
4+
make install
5+
6+
If you have a fresh checkout or are having build-related issues,
7+
run the following to (re)generate the configure script:
8+
autoreconf -if
9+
10+
Note that to use autoreconf you will need to have GNU autotools installed.
11+

configure

Lines changed: 0 additions & 111 deletions
This file was deleted.

configure.ac

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
AC_INIT([bncsutil], [1.3.2], [bugs@example.com])
2+
3+
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
4+
AM_PROG_LIBTOOL
5+
6+
AC_PROG_INSTALL
7+
8+
AC_LANG_C
9+
AC_PROG_CC
10+
AC_PROG_CXX
11+
AC_PROG_INSTALL
12+
AC_PROG_MAKE_SET
13+
14+
AC_HEADER_STDC
15+
16+
AC_CHECK_LIB(gmp, __gmpz_init,, AC_MSG_ERROR([
17+
bncsutil requires libgmp; see http://gmplib.org]))
18+
19+
[echo -n "checking for little or big endian... " ]
20+
AC_TRY_RUN([
21+
#include <sys/types.h>
22+
int main()
23+
{
24+
uint16_t s = 1;
25+
uint16_t* ptr = &s;
26+
uint8_t n = *((uint8_t*)ptr);
27+
return n;
28+
}
29+
30+
]
31+
, AC_DEFINE([BIGENDIAN], [1], [Define to 1 if system is big endian])
32+
[echo "big"]
33+
, AC_DEFINE([LITTLEENDIAN], [1], [Define to 1 if system is little endian])
34+
[echo "little"]
35+
)
36+
37+
AC_CONFIG_HEADERS([config.h])
38+
AC_CONFIG_FILES([
39+
Makefile
40+
src/Makefile
41+
])
42+
43+
AC_OUTPUT

src/Makefile.am

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
AUTOMAKE_OPTIONS = gnu
2+
AM_CPPFLAGS = -I@ROOTINCDIR@
3+
lib_LTLIBRARIES = libbncsutil.la
4+
nobase_include_HEADERS = bncsutil/bncsutil.h \
5+
bncsutil/cdkeydecoder.h \
6+
bncsutil/decodekey.h \
7+
bncsutil/libinfo.h \
8+
bncsutil/nls.h \
9+
bncsutil/sha1.h \
10+
bncsutil/bsha1.h \
11+
bncsutil/checkrevision.h \
12+
bncsutil/file.h \
13+
bncsutil/mutil.h \
14+
bncsutil/oldauth.h \
15+
bncsutil/stack.h \
16+
bncsutil/buffer.h \
17+
bncsutil/debug.h \
18+
bncsutil/keytables.h \
19+
bncsutil/mutil_types.h \
20+
bncsutil/pe.h
21+
22+
libbncsutil_la_SOURCES = bncsutil/nls.c \
23+
bncsutil/pe.c \
24+
bncsutil/sha1.c \
25+
bncsutil/stack.c \
26+
bncsutil/bsha1.cpp \
27+
bncsutil/checkrevision.cpp \
28+
bncsutil/file.cpp \
29+
bncsutil/oldauth.cpp \
30+
bncsutil/cdkeydecoder.cpp \
31+
bncsutil/decodekey.cpp \
32+
bncsutil/libinfo.cpp
33+
34+
libbncsutil_la_LDFLAGS = -version-info 0:0:0

0 commit comments

Comments
 (0)