haakonnessjoen/MAC-Telnet

autogen.sh not working as it should on Ubuntu 22.04

guuslangelaar0 opened this issue · 4 comments

  • MAC Telnet version:

Latest version

  • Operating system and architecture:

Ubuntu 22.04 - Linux 5.15.0-52-generic x86_64 (VM)

  • Issue

Performing autogen.sh returns following error

  • Log
./configure: line 8210: syntax error near unexpected token `CRYPTO,'
./configure: line 8210: `PKG_CHECK_MODULES(CRYPTO, libcrypto >= 1.0.2)'

Got the same issue.
"apt-get install pkg-config" works fine for me.

New version uses autoconf later than what is in apt repo...

If anyone wants to get rid of autogen, here is sample makefile I use. c files must be in src folder, h files in include. Then just do make

CC = gcc
OPTIMIZE = no
MAKE_CXX_VERSION = gnu99
TARGET = mac_telnet
.PHONY: $(TARGET)

CXXFLAGS = -Wall -std=$(MAKE_CXX_VERSION) -DLOCALEDIR='"/usr/local/share/locale"'

ifeq ($(OPTIMIZE),no)
	CXXFLAGS += -g -fpermissive
else 
	CXXFLAGS += -Ofast
endif

CXXFLAGS += \
	-I./include

LIBS = \
	-lssl \
	-lcrypto 


all: $(TARGET)

$(TARGET): autologin.o console.o interfaces.o mactelnet.o protocol.o mndp.o mtwei.o
	$(CC) $(CXXFLAGS) -o $(TARGET) autologin.o console.o interfaces.o mactelnet.o protocol.o mndp.o mtwei.o -L/usr/lib $(LIBS)

autologin.o: 
	$(CC) $(CXXFLAGS) -c src/autologin.c

console.o: 
	$(CC) $(CXXFLAGS) -c src/console.c

interfaces.o: 
	$(CC) $(CXXFLAGS) -c src/interfaces.c

macping.o: 
	$(CC) $(CXXFLAGS) -c src/macping.c

mactelnet.o: 
	$(CC) $(CXXFLAGS) -c src/mactelnet.c

protocol.o: 
	$(CC) $(CXXFLAGS) -c src/protocol.c

mndp.o: 
	$(CC) $(CXXFLAGS) -c src/mndp.c

mtwei.o: 
	$(CC) $(CXXFLAGS) -c src/mtwei.c

users.o: 
	$(CC) $(CXXFLAGS) -c src/users.c

clean: 
	$(RM) $(TARGET) autologin.o console.o interfaces.o mactelnet.o protocol.o mndp.o mtwei.o

This should now work as expected.