-LIBFILE= libadns.so.$(MAJOR).$(MINOR)
-
-CC=gcc $(WARNS) $(WERROR) $(OPTIMISE) $(DEBUG) $(XCFLAGS) $(DIRCFLAGS)
-DEBUG=-g
-OPTIMISE=-O2
-WARNS= -Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes \
- -Wcast-qual -Wpointer-arith
-WERROR=-Werror
-
-prefix= /usr/local
-bin_dir= $(prefix)/bin
-lib_dir= $(prefix)/lib
+SHLIBFILE= @SHLIBFILE@
+SHLIBSONAME= @SHLIBSONAME@
+SHLIBFORLINK= @SHLIBFORLINK@
+
+CC= @CC@
+CFLAGS= $(AUTOCFLAGS) $(WARNS) $(WERROR) $(DIRCFLAGS) $(XCFLAGS)
+LDFLAGS= $(AUTOLDFLAGS) $(DIRLDFLAGS) $(XLDFLAGS)
+LDLIBS= @LIBS@ $(XLIBS)
+AUTOCFLAGS= @CFLAGS@
+AUTOLDFLAGS= @LDFLAGS@
+WARNS= @WARNS@
+#WERROR= -Werror
+
+M4= m4
+RANLIB= @RANLIB@
+
+SHLIBCC= @SHLIBCC@
+
+MKSHLIB_1= @MKSHLIB_1@
+MKSHLIB_2= @MKSHLIB_2@
+MKSHLIB_3= @MKSHLIB_3@
+
+prefix= @prefix@
+exec_prefix= @exec_prefix@
+bin_dir= $(exec_prefix)/bin
+lib_dir= $(exec_prefix)/lib