Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 240918
Collapse All | Expand All

(-)a/Makefile.in (-15 / +21 lines)
Lines 1-36 Link Here
1
# ask for compliance
2
.POSIX:
3
1
prefix		=	@prefix@
4
prefix		=	@prefix@
2
INSTALL_PROG	=	@INSTALL@
5
INSTALL_PROG	=	@INSTALL@
3
CC		=	@CC@
6
CC		=	@CC@
7
# must be passed to CC when it'll call the linker
4
LDFLAGS		=	@LDFLAGS@
8
LDFLAGS		=	@LDFLAGS@
5
LIBS		=	@LIBS@
9
LIBS		=	@LIBS@
6
CFLAGS		=	@CPPFLAGS@ @CFLAGS@
10
# must always be passed to CC
11
CFLAGS		=	@CFLAGS@
12
# must be passed to CC when compiling C code
13
CPPFLAGS	=	@CPPFLAGS@
7
ALWAYSDEP	=	config.h Makefile
14
ALWAYSDEP	=	config.h Makefile
8
OBJS		=	ds.o misc.o network.o oer.o parse.o reg.o
15
OBJS		=	ds.o misc.o network.o oer.o parse.o reg.o
16
17
.SUFFIXES: .c .o
18
19
.c.o:
20
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
21
9
all:			oer
22
all:			oer
10
oer:			$(ALWAYSDEP) $(OBJS) mycrypt.o
23
oer:			$(ALWAYSDEP) $(OBJS) mycrypt.o
11
			$(CC) $(LDFLAGS) -o oer $(OBJS) $(LIBS)
24
			$(CC) $(CFLAGS) $(LDFLAGS) -o oer $(OBJS) $(LIBS)
12
			@echo ""
25
			@echo ""
13
			@echo "  Type \"make install\" to install oer"
26
			@echo "  Type \"make install\" to install oer"
14
			@echo ""
27
			@echo ""
15
mycrypt:		$(ALWAYSDEP) mycrypt.o
28
mycrypt:		$(ALWAYSDEP) mycrypt.o
16
			$(CC) $(LDFLAGS) -o mycrypt mycrypt.o $(LIBS)
29
			$(CC) $(CFLAGS) $(LDFLAGS) -o mycrypt mycrypt.o $(LIBS)
17
oer.o:			$(ALWAYSDEP) oer.c oer.h oer-common.h ds.o network.o misc.o
30
oer.o:			$(ALWAYSDEP) oer.c oer.h oer-common.h
18
			$(CC) $(CFLAGS) -c oer.c
19
mycrypt.o:		$(ALWAYSDEP) mycrypt.c
31
mycrypt.o:		$(ALWAYSDEP) mycrypt.c
20
			$(CC) $(CFLAGS) -c mycrypt.c
32
ds.o:			$(ALWAYSDEP) ds.c ds.h oer-common.h oer.h
21
ds.o:			$(ALWAYSDEP) ds.c ds.h oer-common.h oer.h misc.o reg.o
22
			$(CC) $(CFLAGS) -c ds.c
23
reg.o:			$(ALWAYSDEP) reg.c reg.h
33
reg.o:			$(ALWAYSDEP) reg.c reg.h
24
			$(CC) $(CFLAGS) -c reg.c
25
misc.o:			$(ALWAYSDEP) misc.c misc.h oer-common.h oer.h
34
misc.o:			$(ALWAYSDEP) misc.c misc.h oer-common.h oer.h
26
			$(CC) $(CFLAGS) -c misc.c
35
network.o:		$(ALWAYSDEP) network.c network.h oer-common.h oer.h
27
network.o:		$(ALWAYSDEP) network.c network.h oer-common.h oer.h parse.o ds.o misc.o
36
parse.o:		$(ALWAYSDEP) parse.c parse.h oer-common.h oer.h
28
			$(CC) $(CFLAGS) -c network.c
29
parse.o:		$(ALWAYSDEP) parse.c parse.h oer-common.h oer.h ds.o misc.o reg.o
30
			$(CC) $(CFLAGS) -c parse.c
31
install:		all
37
install:		all
32
			@./pre_install.sh $(prefix) $(INSTALL_PROG)
38
			@./pre_install.sh $(prefix) $(INSTALL_PROG)
33
.PHONY:			clean distclean
39
.PHONY:			all clean distclean install
34
clean:
40
clean:
35
			-rm -f oer *.o
41
			-rm -f oer *.o
36
distclean:
42
distclean:
(-)a/acconfig.h (-2 lines)
Removed Link Here
1
#undef SOURCE_LINES
2
#undef SOURCE_CHARS
(-)3797f25f96e8 (+172 lines)
Added Link Here
1
dnl Process this file with autoconf to produce a configure script.
2
AC_INIT([oer], [1.0.66])
3
AC_CONFIG_SRCDIR([oer.c])
4
AC_CONFIG_HEADER([config.h])
5
6
dnl This is the default destination
7
AC_PREFIX_DEFAULT([$HOME/oer])
8
9
dnl Checks for programs.
10
AC_PROG_CC
11
AC_PROG_MAKE_SET
12
AC_PROG_INSTALL
13
14
dnl we need uname
15
AC_CHECK_PROG(UNAME,uname,uname)
16
17
AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [enable runtime debugging (You should also set CFLAGS="-g")])], [debug=$enableval], [debug=no])
18
AC_ARG_ENABLE(opt, [AS_HELP_STRING([--disable-opt], [disable automatic setting of optimization compiler switches])], [opt="$enableval"], [opt=yes])
19
AC_ARG_ENABLE([strip], [AS_HELP_STRING([--disable-strip], [Disable automatic stripping of binaries])], [enable_strip="$enableval"], [enable_strip=yes])
20
21
AC_MSG_CHECKING(system type)
22
SYSTEM_TYPE=`${UNAME}`
23
AC_MSG_RESULT($SYSTEM_TYPE)
24
25
IRIX=no
26
AS_IF([test "x$SYSTEM_TYPE" = "xIRIX"],
27
	[IRIX=yes
28
	enable_strip=no
29
	])
30
31
AS_IF([test "$debug" = "yes"],
32
	[AC_DEFINE([DEBUG], [], [Add debugging codepaths])])
33
34
dnl for devs...
35
MYCFLAGSADDGCC="-Wstrict-prototypes -Wall"
36
37
dnl strip binaries by default
38
AS_IF([test "$enable_strip" = "yes" -a "x$IRIX" = "xno"],
39
	[MYLDFLAGSADDCC="$MYLDFLAGSADDCC -s"
40
	MYLDFLAGSADDGCC="$MYLDFLAGSADDGCC -s"])
41
42
AS_IF([test "$opt" = "yes"],
43
	[MYCFLAGSADDCC="$MYCFLAGSADDCC -O"
44
	MYCFLAGSADDGCC="$MYCFLAGSADDGCC -O2"])
45
46
dnl system specific compile settings
47
if test "x${SYSTEM_TYPE}" = "xHP-UX"; then
48
  MYCFLAGSADDCC="${MYCFLAGSADDCC} -Ae"
49
fi
50
if test "x${SYSTEM_TYPE}" = "xOSF1"; then
51
  MYCFLAGSADDCC="${MYCFLAGSADDCC} -std -no_intrinsics"
52
fi
53
dnl newer SunOS/Solaris have different signal() behaviour
54
if test "x${SYSTEM_TYPE}" = "xSunOS"; then
55
	AC_DEFINE([NEW_SIGNALS], [], [Support Solaris's signal() behaviour])
56
fi
57
if test "x$IRIX" = "xIRIX"; then
58
  MYCFLAGSADDCC="$MYCFLAGSADDCC -std -no_intrinsics"
59
fi
60
61
dnl Append compiler CFLAGS and LDFLAGS
62
dnl assume gcc. Checking x$CC = xgcc is not enough -- there's ${HOST}-gcc, for example...
63
dnl Check that compiler works with the flags we've generated, falling
64
dnl back from GCC flags -> generic/system-specific flags -> no flags.
65
CFLAGS_save="$CFLAGS"
66
CPPFLAGS_save="$CPPFLAGS"
67
LDFLAGS_save="$LDFLAGS"
68
69
dnl GCC
70
CFLAGS="$CFLAGS_save $MYCFLAGSADDGCC"
71
LDFLAGS="$LDFLAGS_save $MYLDFLAGSADDGCC"
72
73
AC_COMPILE_IFELSE(
74
	[AC_LANG_PROGRAM(
75
		[[#include <stdio.h>]],
76
		[[fprintf(stderr, "Hello, gcc world!\n");]])],
77
	[:],
78
	[
79
	dnl system-specific/generic
80
	CFLAGS="$CFLAGS_save $MYCFLAGSADDCC"
81
	LDFLAGS="$LDFLAGS_save $MYLDFLAGSADDCC"
82
	AC_COMPILE_IFELSE(
83
		[AC_LANG_PROGRAM(
84
			[[#include <stdio.h>]],
85
			[[fprintf(stderr, "Hello, system-specific world!\n");]])],
86
		[:],
87
		[
88
		dnl no flags (user flags only)
89
		CFLAGS="$CFLAGS_save"
90
		LDFLAGS="$LDFLAGS_save"])])
91
92
dnl Find out source code size
93
LINES=`wc -l *.h *.c | tail -1 | sed 's/total/\ /' | tr -d ' '`
94
CHARS=`wc -c *.h *.c | tail -1 | sed 's/total/\ /' | tr -d ' '`
95
96
dnl export to config.h
97
AC_DEFINE_UNQUOTED(SOURCE_LINES,${LINES},[Number of source lines])
98
AC_DEFINE_UNQUOTED(SOURCE_CHARS,${CHARS},[Number of characters in the source])
99
100
dnl Checks for libraries (except IRIX)
101
if test "${IRIX}" = "no"; then
102
  AC_CHECK_LIB(crypt,crypt)
103
  AC_CHECK_LIB(socket,socket)
104
  AC_CHECK_LIB(nsl,connect)
105
  AC_CHECK_LIB(dns,gethostbyname)
106
  AC_CHECK_LIB(dl,dlopen)
107
fi
108
109
dnl Checks for header files.
110
AC_HEADER_STDC
111
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h crypt.h)
112
113
dnl FreeBSD doesn't like ctype.h to be included, why only The Red Devil knows 
114
if test "x${SYSTEM_TYPE}" != "xFreeBSD"; then  
115
  AC_CHECK_HEADERS(ctype.h)
116
else
117
  AC_MSG_WARN([
118
  Disabling ctype.h because of FreeBSD. You can safely
119
  ignore the implicit declaration of function isxxxxx messages.
120
  ]) 
121
fi
122
123
dnl check for uname
124
AC_CHECK_FUNCS(uname)
125
126
dnl check for getaddrinfo
127
AC_CHECK_FUNCS(getaddrinfo)
128
if test "${ac_cv_func_getaddrinfo}" = "no"; then
129
	AC_MSG_ERROR([
130
  Your system does not support the getaddrinfo function call.
131
  (you could try oer 1.0-62 or older.)
132
])
133
fi
134
135
dnl check for locale
136
AC_CHECK_HEADERS(locale.h)
137
138
dnl Checks for typedefs, structures, and compiler characteristics.
139
AC_C_CONST
140
AC_TYPE_SIZE_T
141
AC_HEADER_TIME
142
AC_STRUCT_TM
143
144
dnl Checks for library functions.
145
AC_TYPE_SIGNAL
146
AC_CHECK_FUNCS(snprintf)
147
if test "${ac_cv_func_snprintf}" = "no"; then
148
	AC_MSG_WARN([
149
  Your system does not have snprintf, using unsafe vsprintf alternative
150
])
151
fi
152
AC_CHECK_FUNCS(vsprintf)
153
if test "${ac_cv_func_vsprintf}" = "no"; then
154
	AC_MSG_ERROR([
155
  Your system does not even have vsprintf. Get a real system!
156
])
157
fi
158
AC_CHECK_FUNCS(vfprintf)
159
if test "${ac_cv_func_vfprintf}" = "no"; then
160
	AC_MSG_ERROR([
161
  Your system does not have vfprintf. Get a real system!
162
])
163
fi
164
165
AC_CONFIG_FILES([
166
	Makefile
167
	])
168
AC_OUTPUT
169
170
AC_MSG_RESULT([
171
  Type "make" to compile oer
172
])
(-)a/configure.in (-169 lines)
Removed Link Here
1
dnl Process this file with autoconf to produce a configure script.
2
AC_INIT(README)
3
AC_CONFIG_HEADER(config.h)
4
5
dnl This is the default destination
6
AC_PREFIX_DEFAULT($HOME/oer)
7
8
dnl Checks for programs.
9
AC_PROG_CC
10
AC_PROG_MAKE_SET
11
AC_PROG_INSTALL
12
13
dnl we need uname
14
AC_CHECK_PROG(UNAME,uname,uname)
15
16
AC_ARG_ENABLE(debug, [  --enable-debug          switch debug on (off by default)], debug=$enableval)
17
AC_ARG_ENABLE(opt, [  --enable-opt            switch optimization on (on by default)], opt=$enableval)
18
AC_ARG_ENABLE(profile, [  --enable-profile        switch profile on (off by default)], profile=$enableval)
19
20
AC_MSG_CHECKING(system type)
21
SYSTEM_TYPE=`${UNAME}`
22
AC_MSG_RESULT($SYSTEM_TYPE)
23
24
STRIP=yes
25
if test x${SYSTEM_TYPE} = "xIRIX"; then
26
  STRIP=no
27
fi
28
29
dnl compile defaults
30
MYCFLAGSADDCC="-O"
31
MYCFLAGSADDGCC="-O2 -Wstrict-prototypes -Wall"
32
MYLDFLAGSADDCC="-s"
33
MYLDFLAGSADDGCC="-s"
34
if test "$opt" = "no"; then
35
    MYCFLAGSADDCC=""
36
    MYCFLAGSADDGCC="-Wstrict-prototypes -Wall"
37
fi
38
if test "$debug" = "yes"; then
39
    MYCFLAGSADDCC="-DDEBUG -g"
40
    MYCFLAGSADDGCC="-DDEBUG -Wstrict-prototypes -Wall -g"
41
    MYLDFLAGSADDCC=""
42
    MYLDFLAGSADDGCC=""
43
fi
44
if test "$profile" = "yes"; then
45
    MYCFLAGSADDCC="$-DDEBUG -g -p"
46
    MYCFLAGSADDGCC="-DDEBUG -Wstrict-prototypes -Wall -g -pg"
47
    MYLDFLAGSADDCC="-p"
48
    MYLDFLAGSADDGCC="-pg"
49
fi
50
51
dnl system specific compile settings
52
if test "x${SYSTEM_TYPE}" = "xHP-UX"; then
53
  MYCFLAGSADDCC="${MYCFLAGSADDCC} -Ae -D_NO_H_ERRNO"
54
  MYCFLAGSADDGCC="${MYCFLAGSADDGCC} -D_NO_H_ERRNO"
55
fi
56
if test "x${SYSTEM_TYPE}" = "xOSF1"; then
57
  MYCFLAGSADDCC="${MYCFLAGSADDCC} -std -no_intrinsics"
58
  MYCFLAGSADDGCC="${MYCFLAGSADDGCC}"
59
fi
60
dnl newer SunOS/Solaris have different signal() behaviour
61
if test "x${SYSTEM_TYPE}" = "xSunOS"; then  
62
  MYCFLAGSADDCC="${MYCFLAGSADDCC} -DNEW_SIGNALS"
63
  MYCFLAGSADDGCC="${MYCFLAGSADDGCC} -DNEW_SIGNALS"
64
fi
65
IRIX=no
66
if test "x${SYSTEM_TYPE}" = "xIRIX"; then
67
  MYCFLAGSADDCC="${MYCFLAGSADDCC} -std -no_intrinsics"
68
  MYCFLAGSADDGCC="${MYCFLAGSADDGCC}"
69
  MYLDFLAGSADDCC=""
70
  MYLDFLAGSADDGCC=""
71
  IRIX=yes
72
fi
73
74
dnl assume gcc
75
MYCFLAGS="${MYCFLAGSADDGCC}"
76
MYLDFLAGS="${MYLDFLAGSADDGCC}"
77
if test "x$CC" != "xgcc"; then
78
  MYCFLAGS="${MYCFLAGSADDCC}"
79
  MYLDDFLAGS="${MYLDFLAGSADDCC}"
80
fi
81
82
dnl Set compiler CFLAGS
83
CFLAGS=${MYCFLAGS}
84
85
dnl Set linker LDFLAGS
86
LDFLAGS=${MYLDFLAGS}
87
88
dnl Find out source code size
89
LINES=`wc -l *.h *.c | tail -1 | sed 's/total/\ /' | tr -d ' '`
90
CHARS=`wc -c *.h *.c | tail -1 | sed 's/total/\ /' | tr -d ' '`
91
92
dnl export to config.h
93
AC_DEFINE_UNQUOTED(SOURCE_LINES,${LINES},[Number of source lines])
94
95
dnl export to config.h
96
AC_DEFINE_UNQUOTED(SOURCE_CHARS,${CHARS},[Number of characters in the source])
97
98
dnl Checks for libraries (except IRIX)
99
if test "${IRIX}" = "no"; then
100
  AC_CHECK_LIB(crypt,crypt)
101
  AC_CHECK_LIB(socket,socket)
102
  AC_CHECK_LIB(nsl,connect)
103
  AC_CHECK_LIB(dns,gethostbyname)
104
  AC_CHECK_LIB(dl,dlopen)
105
fi
106
107
dnl Checks for header files.
108
AC_HEADER_STDC
109
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h crypt.h)
110
111
dnl FreeBSD doesn't like ctype.h to be included, why only The Red Devil knows 
112
if test "x${SYSTEM_TYPE}" != "xFreeBSD"; then  
113
  AC_CHECK_HEADERS(ctype.h)
114
else
115
  echo "" 
116
  echo "  Disabling ctype.h because of FreeBSD, you can safely" 
117
  echo "  ignore the implicit declaration of function isxxxxx messages" 
118
  echo "" 
119
fi
120
121
dnl check for uname
122
AC_CHECK_FUNCS(uname)
123
124
dnl check for getaddrinfo
125
AC_CHECK_FUNCS(getaddrinfo)
126
if test "${ac_cv_func_getaddrinfo}" = "no"; then
127
  echo ""
128
  echo "  Your system does not support the getaddrinfo function call"
129
  echo "  (you could try oer 1.0-62 or older)"
130
  echo ""
131
  exit
132
fi
133
134
dnl check for locale
135
AC_CHECK_HEADERS(locale.h)
136
137
dnl Checks for typedefs, structures, and compiler characteristics.
138
AC_C_CONST
139
AC_TYPE_SIZE_T
140
AC_HEADER_TIME
141
AC_STRUCT_TM
142
143
dnl Checks for library functions.
144
AC_TYPE_SIGNAL
145
AC_CHECK_FUNCS(snprintf)
146
if test "${ac_cv_func_snprintf}" = "no"; then
147
  echo ""
148
  echo "  Your system does not have snprintf, using unsafe vsprintf alternative"
149
  echo ""
150
fi
151
AC_CHECK_FUNCS(vsprintf)
152
if test "${ac_cv_func_vsprintf}" = "no"; then
153
  echo ""
154
  echo "  Your system does not have vsprintf. Get a real system!"
155
  echo ""
156
  exit
157
fi
158
AC_CHECK_FUNCS(vfprintf)
159
if test "${ac_cv_func_vfprintf}" = "no"; then
160
  echo ""
161
  echo "  Your system does not have vfprintf. Get a real system!"
162
  echo ""
163
  exit
164
fi
165
166
AC_OUTPUT(Makefile)
167
AC_MSG_RESULT("")
168
AC_MSG_RESULT("  Type \"make\" to compile oer")
169
AC_MSG_RESULT("")

Return to bug 240918